@abyss-project/main 1.0.9 → 1.0.11
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 +1 -1
- package/dist/api/application.admin.api.d.ts +8 -8
- package/dist/api/application.admin.api.js +35 -35
- package/dist/api/application.api.d.ts +7 -7
- package/dist/api/application.api.js +31 -31
- package/dist/api/auth.api.d.ts +10 -10
- package/dist/api/auth.api.js +57 -57
- package/dist/api/billing.api.d.ts +4 -4
- package/dist/api/billing.api.js +16 -16
- package/dist/api/gift-code.admin.api.d.ts +8 -8
- package/dist/api/gift-code.admin.api.js +34 -34
- package/dist/api/gift-code.api.d.ts +4 -4
- package/dist/api/gift-code.api.js +20 -20
- package/dist/api/index.d.ts +23 -23
- package/dist/api/index.js +39 -39
- package/dist/api/metrics.admin.api.d.ts +4 -4
- package/dist/api/metrics.admin.api.js +16 -16
- package/dist/api/monitor.api.d.ts +2 -2
- package/dist/api/monitor.api.js +8 -8
- package/dist/api/newsletter.admin.api.d.ts +6 -6
- package/dist/api/newsletter.admin.api.js +25 -25
- package/dist/api/project-access.admin.api.d.ts +13 -13
- package/dist/api/project-access.admin.api.js +52 -52
- package/dist/api/project-access.api.d.ts +14 -14
- package/dist/api/project-access.api.js +59 -59
- package/dist/api/project.admin.api.d.ts +7 -7
- package/dist/api/project.admin.api.js +34 -34
- package/dist/api/project.api.d.ts +14 -14
- package/dist/api/project.api.js +62 -62
- package/dist/api/user-credit-purchase.admin.api.d.ts +7 -7
- package/dist/api/user-credit-purchase.admin.api.js +28 -28
- package/dist/api/user-credit-purchase.api.d.ts +3 -3
- package/dist/api/user-credit-purchase.api.js +14 -14
- package/dist/api/user-notification.admin.api.d.ts +5 -5
- package/dist/api/user-notification.admin.api.js +20 -20
- package/dist/api/user-notification.api.d.ts +4 -4
- package/dist/api/user-notification.api.js +18 -18
- package/dist/api/user-ticket.admin.api.d.ts +11 -11
- package/dist/api/user-ticket.admin.api.js +49 -49
- package/dist/api/user-ticket.api.d.ts +10 -10
- package/dist/api/user-ticket.api.js +45 -45
- package/dist/api/user-transaction.admin.api.d.ts +5 -5
- package/dist/api/user-transaction.admin.api.js +20 -20
- package/dist/api/user-transaction.api.d.ts +3 -3
- package/dist/api/user-transaction.api.js +14 -14
- package/dist/api/user.admin.api.d.ts +11 -11
- package/dist/api/user.admin.api.js +46 -46
- package/dist/api/user.api.d.ts +19 -19
- package/dist/api/user.api.js +84 -84
- package/dist/front/index.d.ts +1 -1
- package/dist/front/index.js +17 -17
- package/dist/front/redirection.d.ts +2 -2
- package/dist/front/redirection.js +5 -5
- package/dist/index.d.ts +21 -21
- package/dist/index.js +91 -89
- package/dist/translate/en.translate.d.ts +182 -182
- package/dist/translate/en.translate.js +186 -186
- package/dist/translate/fr.translate.d.ts +182 -182
- package/dist/translate/fr.translate.js +186 -186
- package/dist/translate/index.d.ts +2 -2
- package/dist/translate/index.js +18 -18
- package/dist/types/enum/abyss-service.enum.d.ts +12 -11
- package/dist/types/enum/abyss-service.enum.js +16 -15
- package/dist/types/enum/api-error.enum.d.ts +39 -39
- package/dist/types/enum/api-error.enum.js +44 -44
- package/dist/types/enum/billing-product.enum.d.ts +8 -8
- package/dist/types/enum/billing-product.enum.js +12 -12
- package/dist/types/enum/gift-code-type.enum.d.ts +3 -3
- package/dist/types/enum/gift-code-type.enum.js +7 -7
- package/dist/types/enum/index.d.ts +18 -18
- package/dist/types/enum/index.js +34 -34
- package/dist/types/enum/newsletter-type.enum.d.ts +4 -4
- package/dist/types/enum/newsletter-type.enum.js +8 -8
- package/dist/types/enum/oauth-account-type.enum.d.ts +3 -3
- package/dist/types/enum/oauth-account-type.enum.js +7 -7
- package/dist/types/enum/project-access-permission.enum.d.ts +13 -13
- package/dist/types/enum/project-access-permission.enum.js +17 -17
- package/dist/types/enum/project-application-access-permission.enum.d.ts +38 -38
- package/dist/types/enum/project-application-access-permission.enum.js +42 -42
- package/dist/types/enum/subscription-level.enum.d.ts +55 -55
- package/dist/types/enum/subscription-level.enum.js +128 -128
- package/dist/types/enum/token-type.enum.d.ts +5 -5
- package/dist/types/enum/token-type.enum.js +9 -9
- package/dist/types/enum/user-credit-purchase-currency.enum.d.ts +5 -5
- package/dist/types/enum/user-credit-purchase-currency.enum.js +9 -9
- package/dist/types/enum/user-credit-purchase-payment-method.enum.d.ts +3 -3
- package/dist/types/enum/user-credit-purchase-payment-method.enum.js +7 -7
- package/dist/types/enum/user-credit-purchase-platform.enum.d.ts +8 -8
- package/dist/types/enum/user-credit-purchase-platform.enum.js +12 -12
- package/dist/types/enum/user-language.enum.d.ts +4 -4
- package/dist/types/enum/user-language.enum.js +8 -8
- package/dist/types/enum/user-notification-content-type.enum.d.ts +286 -286
- package/dist/types/enum/user-notification-content-type.enum.js +51 -51
- package/dist/types/enum/user-notification-type.enum.d.ts +6 -6
- package/dist/types/enum/user-notification-type.enum.js +10 -10
- package/dist/types/enum/user-ticket-category.enum.d.ts +9 -9
- package/dist/types/enum/user-ticket-category.enum.js +13 -13
- package/dist/types/enum/user-transaction-type.enum.d.ts +14 -14
- package/dist/types/enum/user-transaction-type.enum.js +18 -18
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +21 -21
- package/dist/types/interface/api/index.d.ts +48 -48
- package/dist/types/interface/api/index.js +64 -64
- package/dist/types/interface/api/requests/application.admin.request.d.ts +36 -36
- package/dist/types/interface/api/requests/application.admin.request.js +2 -2
- package/dist/types/interface/api/requests/application.request.d.ts +34 -34
- package/dist/types/interface/api/requests/application.request.js +2 -2
- package/dist/types/interface/api/requests/auth.request.d.ts +40 -40
- package/dist/types/interface/api/requests/auth.request.js +2 -2
- package/dist/types/interface/api/requests/billing.request.d.ts +9 -9
- package/dist/types/interface/api/requests/billing.request.js +2 -2
- package/dist/types/interface/api/requests/gift-code.admin.request.d.ts +53 -53
- package/dist/types/interface/api/requests/gift-code.admin.request.js +2 -2
- package/dist/types/interface/api/requests/gift-code.request.d.ts +12 -12
- package/dist/types/interface/api/requests/gift-code.request.js +2 -2
- package/dist/types/interface/api/requests/newsletter.admin.request.d.ts +21 -21
- package/dist/types/interface/api/requests/newsletter.admin.request.js +2 -2
- package/dist/types/interface/api/requests/project-access.admin.request.d.ts +80 -80
- package/dist/types/interface/api/requests/project-access.admin.request.js +2 -2
- package/dist/types/interface/api/requests/project-access.request.d.ts +78 -78
- package/dist/types/interface/api/requests/project-access.request.js +2 -2
- package/dist/types/interface/api/requests/project.admin.request.d.ts +32 -32
- package/dist/types/interface/api/requests/project.admin.request.js +2 -2
- package/dist/types/interface/api/requests/project.request.d.ts +60 -60
- package/dist/types/interface/api/requests/project.request.js +2 -2
- package/dist/types/interface/api/requests/user-credit-purchase.admin.request.d.ts +43 -43
- package/dist/types/interface/api/requests/user-credit-purchase.admin.request.js +2 -2
- package/dist/types/interface/api/requests/user-credit-purchase.request.d.ts +10 -10
- package/dist/types/interface/api/requests/user-credit-purchase.request.js +2 -2
- package/dist/types/interface/api/requests/user-notification.admin.request.d.ts +27 -27
- package/dist/types/interface/api/requests/user-notification.admin.request.js +2 -2
- package/dist/types/interface/api/requests/user-notification.request.d.ts +14 -14
- package/dist/types/interface/api/requests/user-notification.request.js +2 -2
- package/dist/types/interface/api/requests/user-ticket.admin.request.d.ts +61 -61
- package/dist/types/interface/api/requests/user-ticket.admin.request.js +2 -2
- package/dist/types/interface/api/requests/user-ticket.request.d.ts +50 -50
- package/dist/types/interface/api/requests/user-ticket.request.js +2 -2
- package/dist/types/interface/api/requests/user-transaction.admin.request.d.ts +31 -31
- package/dist/types/interface/api/requests/user-transaction.admin.request.js +2 -2
- package/dist/types/interface/api/requests/user-transaction.request.d.ts +8 -8
- package/dist/types/interface/api/requests/user-transaction.request.js +2 -2
- package/dist/types/interface/api/requests/user.admin.request.d.ts +53 -53
- package/dist/types/interface/api/requests/user.admin.request.js +2 -2
- package/dist/types/interface/api/requests/user.request.d.ts +85 -85
- package/dist/types/interface/api/requests/user.request.js +2 -2
- package/dist/types/interface/api/responses/application.admin.response.d.ts +28 -28
- package/dist/types/interface/api/responses/application.admin.response.js +2 -2
- package/dist/types/interface/api/responses/application.response.d.ts +25 -25
- package/dist/types/interface/api/responses/application.response.js +2 -2
- package/dist/types/interface/api/responses/auth.response.d.ts +42 -42
- package/dist/types/interface/api/responses/auth.response.js +2 -2
- package/dist/types/interface/api/responses/billing.response.d.ts +18 -18
- package/dist/types/interface/api/responses/billing.response.js +2 -2
- package/dist/types/interface/api/responses/gift-code.admin.response.d.ts +25 -25
- package/dist/types/interface/api/responses/gift-code.admin.response.js +2 -2
- package/dist/types/interface/api/responses/gift-code.response.d.ts +12 -12
- package/dist/types/interface/api/responses/gift-code.response.js +2 -2
- package/dist/types/interface/api/responses/metrics.admin.response.d.ts +40 -40
- package/dist/types/interface/api/responses/metrics.admin.response.js +2 -2
- package/dist/types/interface/api/responses/monitor.response.d.ts +7 -7
- package/dist/types/interface/api/responses/monitor.response.js +2 -2
- package/dist/types/interface/api/responses/newsletter.admin.response.d.ts +17 -17
- package/dist/types/interface/api/responses/newsletter.admin.response.js +2 -2
- package/dist/types/interface/api/responses/project-access.admin.response.d.ts +51 -51
- package/dist/types/interface/api/responses/project-access.admin.response.js +2 -2
- package/dist/types/interface/api/responses/project-access.response.d.ts +49 -49
- package/dist/types/interface/api/responses/project-access.response.js +2 -2
- package/dist/types/interface/api/responses/project.admin.response.d.ts +54 -54
- package/dist/types/interface/api/responses/project.admin.response.js +2 -2
- package/dist/types/interface/api/responses/project.response.d.ts +94 -94
- package/dist/types/interface/api/responses/project.response.js +2 -2
- package/dist/types/interface/api/responses/user-credit-purchase.admin.response.d.ts +22 -22
- package/dist/types/interface/api/responses/user-credit-purchase.admin.response.js +2 -2
- package/dist/types/interface/api/responses/user-credit-purchase.response.d.ts +8 -8
- package/dist/types/interface/api/responses/user-credit-purchase.response.js +2 -2
- package/dist/types/interface/api/responses/user-notification.admin.response.d.ts +19 -19
- package/dist/types/interface/api/responses/user-notification.admin.response.js +2 -2
- package/dist/types/interface/api/responses/user-notification.response.d.ts +13 -13
- package/dist/types/interface/api/responses/user-notification.response.js +2 -2
- package/dist/types/interface/api/responses/user-ticket.admin.response.d.ts +38 -38
- package/dist/types/interface/api/responses/user-ticket.admin.response.js +2 -2
- package/dist/types/interface/api/responses/user-ticket.response.d.ts +34 -34
- package/dist/types/interface/api/responses/user-ticket.response.js +2 -2
- package/dist/types/interface/api/responses/user-transaction.admin.response.d.ts +13 -13
- package/dist/types/interface/api/responses/user-transaction.admin.response.js +2 -2
- package/dist/types/interface/api/responses/user-transaction.response.d.ts +11 -11
- package/dist/types/interface/api/responses/user-transaction.response.js +2 -2
- package/dist/types/interface/api/responses/user.admin.response.d.ts +45 -45
- package/dist/types/interface/api/responses/user.admin.response.js +2 -2
- package/dist/types/interface/api/responses/user.response.d.ts +85 -85
- package/dist/types/interface/api/responses/user.response.js +2 -2
- package/dist/types/interface/api/type-message/api-error.d.ts +8 -8
- package/dist/types/interface/api/type-message/api-error.js +2 -2
- package/dist/types/interface/api/type-message/base-order.d.ts +4 -4
- package/dist/types/interface/api/type-message/base-order.js +2 -2
- package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -10
- package/dist/types/interface/api/type-message/base-paginate.js +2 -2
- package/dist/types/interface/api/type-message/response.d.ts +5 -5
- package/dist/types/interface/api/type-message/response.js +2 -2
- package/dist/types/interface/index.d.ts +21 -21
- package/dist/types/interface/index.js +37 -37
- package/dist/types/interface/models/application.model.d.ts +14 -14
- package/dist/types/interface/models/application.model.js +2 -2
- package/dist/types/interface/models/gift-code-activation.model.d.ts +13 -13
- package/dist/types/interface/models/gift-code-activation.model.js +2 -2
- package/dist/types/interface/models/gift-code.model.d.ts +18 -18
- package/dist/types/interface/models/gift-code.model.js +2 -2
- package/dist/types/interface/models/newsletter-history.model.d.ts +8 -8
- package/dist/types/interface/models/newsletter-history.model.js +2 -2
- package/dist/types/interface/models/newsletter-member.model.d.ts +7 -7
- package/dist/types/interface/models/newsletter-member.model.js +2 -2
- package/dist/types/interface/models/oauth-account.model.d.ts +17 -17
- package/dist/types/interface/models/oauth-account.model.js +2 -2
- package/dist/types/interface/models/project-access.model.d.ts +19 -19
- package/dist/types/interface/models/project-access.model.js +2 -2
- package/dist/types/interface/models/project-application-access.model.d.ts +13 -13
- package/dist/types/interface/models/project-application-access.model.js +2 -2
- package/dist/types/interface/models/project-authentication-session.model.d.ts +10 -10
- package/dist/types/interface/models/project-authentication-session.model.js +2 -2
- package/dist/types/interface/models/project-authentication.model.d.ts +10 -10
- package/dist/types/interface/models/project-authentication.model.js +2 -2
- package/dist/types/interface/models/project.model.d.ts +20 -20
- package/dist/types/interface/models/project.model.js +2 -2
- package/dist/types/interface/models/subscription.model.d.ts +16 -16
- package/dist/types/interface/models/subscription.model.js +2 -2
- package/dist/types/interface/models/token-history.model.d.ts +44 -44
- package/dist/types/interface/models/token-history.model.js +2 -2
- package/dist/types/interface/models/user-credit-purchase.model.d.ts +22 -22
- package/dist/types/interface/models/user-credit-purchase.model.js +2 -2
- package/dist/types/interface/models/user-notification.model.d.ts +14 -14
- package/dist/types/interface/models/user-notification.model.js +2 -2
- package/dist/types/interface/models/user-ticket-message-attachment.model.d.ts +14 -14
- package/dist/types/interface/models/user-ticket-message-attachment.model.js +2 -2
- package/dist/types/interface/models/user-ticket-message.model.d.ts +14 -14
- package/dist/types/interface/models/user-ticket-message.model.js +2 -2
- package/dist/types/interface/models/user-ticket.model.d.ts +15 -15
- package/dist/types/interface/models/user-ticket.model.js +2 -2
- package/dist/types/interface/models/user-transaction.model.d.ts +19 -19
- package/dist/types/interface/models/user-transaction.model.js +2 -2
- package/dist/types/interface/models/user.model.d.ts +34 -34
- package/dist/types/interface/models/user.model.js +2 -2
- package/dist/types/models/index.d.ts +1 -1
- package/dist/types/models/index.js +17 -17
- package/dist/types/models/transfer.model.d.ts +36 -36
- package/dist/types/models/transfer.model.js +73 -73
- package/dist/types/session.d.ts +26 -26
- package/dist/types/session.js +2 -2
- package/dist/types/utils/billing.util.d.ts +2 -2
- package/dist/types/utils/billing.util.js +33 -33
- package/dist/types/utils/convert-query.util.d.ts +2 -2
- package/dist/types/utils/convert-query.util.js +2 -2
- package/dist/types/utils/index.d.ts +6 -6
- package/dist/types/utils/index.js +21 -21
- package/dist/types/utils/notifications.type-util.d.ts +8 -8
- package/dist/types/utils/notifications.type-util.js +2 -2
- package/dist/types/utils/overwrite.util.d.ts +9 -9
- package/dist/types/utils/overwrite.util.js +2 -2
- package/dist/types/utils/require-one.util.d.ts +6 -6
- package/dist/types/utils/require-one.util.js +2 -2
- package/dist/utils/array.utils.d.ts +1 -1
- package/dist/utils/array.utils.js +7 -7
- package/dist/utils/byte.utils.d.ts +2 -2
- package/dist/utils/byte.utils.js +71 -71
- package/dist/utils/duration.utils.d.ts +1 -1
- package/dist/utils/duration.utils.js +10 -10
- package/dist/utils/enum-to-array.utils.d.ts +2 -2
- package/dist/utils/enum-to-array.utils.js +14 -14
- package/dist/utils/error.utils.d.ts +15 -15
- package/dist/utils/error.utils.js +24 -24
- package/dist/utils/import.utils.d.ts +1 -1
- package/dist/utils/import.utils.js +7 -7
- package/dist/utils/index.d.ts +9 -9
- package/dist/utils/index.js +25 -25
- package/dist/utils/is-valid-object.utils.d.ts +1 -1
- package/dist/utils/is-valid-object.utils.js +12 -12
- package/dist/utils/notification.utils.d.ts +3 -3
- package/dist/utils/notification.utils.js +11 -11
- package/dist/utils/sleep.utils.d.ts +1 -1
- package/dist/utils/sleep.utils.js +9 -9
- package/dist/utils/subscription.utils.d.ts +6 -6
- package/dist/utils/subscription.utils.js +41 -41
- package/package.json +5 -5
- package/tsconfig.json +105 -105
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCreditPrice = exports.getCreditPriceByQuantity = void 0;
|
|
4
|
-
const QUANTITY_STEP = [500, 1000, 2000, 5000];
|
|
5
|
-
const getCreditPriceByQuantity = (quantity) => {
|
|
6
|
-
if (quantity <= 500) {
|
|
7
|
-
return 1;
|
|
8
|
-
}
|
|
9
|
-
else if (quantity <= 1000) {
|
|
10
|
-
return 0.9;
|
|
11
|
-
}
|
|
12
|
-
else if (quantity <= 2000) {
|
|
13
|
-
return 0.7;
|
|
14
|
-
}
|
|
15
|
-
else if (quantity <= 5000) {
|
|
16
|
-
return 0.62;
|
|
17
|
-
}
|
|
18
|
-
return 0.6;
|
|
19
|
-
};
|
|
20
|
-
exports.getCreditPriceByQuantity = getCreditPriceByQuantity;
|
|
21
|
-
const getCreditPrice = (quantity) => {
|
|
22
|
-
let remainingQuantity = quantity;
|
|
23
|
-
return QUANTITY_STEP.reduce((acc, step, index) => {
|
|
24
|
-
if (remainingQuantity <= 0) {
|
|
25
|
-
return acc;
|
|
26
|
-
}
|
|
27
|
-
const stepQuantity = QUANTITY_STEP.length - 1 === index ? remainingQuantity : Math.min(remainingQuantity, step);
|
|
28
|
-
const subTotal = (0, exports.getCreditPriceByQuantity)(step) * stepQuantity;
|
|
29
|
-
remainingQuantity = remainingQuantity - stepQuantity;
|
|
30
|
-
return acc + subTotal;
|
|
31
|
-
}, 0);
|
|
32
|
-
};
|
|
33
|
-
exports.getCreditPrice = getCreditPrice;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCreditPrice = exports.getCreditPriceByQuantity = void 0;
|
|
4
|
+
const QUANTITY_STEP = [500, 1000, 2000, 5000];
|
|
5
|
+
const getCreditPriceByQuantity = (quantity) => {
|
|
6
|
+
if (quantity <= 500) {
|
|
7
|
+
return 1;
|
|
8
|
+
}
|
|
9
|
+
else if (quantity <= 1000) {
|
|
10
|
+
return 0.9;
|
|
11
|
+
}
|
|
12
|
+
else if (quantity <= 2000) {
|
|
13
|
+
return 0.7;
|
|
14
|
+
}
|
|
15
|
+
else if (quantity <= 5000) {
|
|
16
|
+
return 0.62;
|
|
17
|
+
}
|
|
18
|
+
return 0.6;
|
|
19
|
+
};
|
|
20
|
+
exports.getCreditPriceByQuantity = getCreditPriceByQuantity;
|
|
21
|
+
const getCreditPrice = (quantity) => {
|
|
22
|
+
let remainingQuantity = quantity;
|
|
23
|
+
return QUANTITY_STEP.reduce((acc, step, index) => {
|
|
24
|
+
if (remainingQuantity <= 0) {
|
|
25
|
+
return acc;
|
|
26
|
+
}
|
|
27
|
+
const stepQuantity = QUANTITY_STEP.length - 1 === index ? remainingQuantity : Math.min(remainingQuantity, step);
|
|
28
|
+
const subTotal = (0, exports.getCreditPriceByQuantity)(step) * stepQuantity;
|
|
29
|
+
remainingQuantity = remainingQuantity - stepQuantity;
|
|
30
|
+
return acc + subTotal;
|
|
31
|
+
}, 0);
|
|
32
|
+
};
|
|
33
|
+
exports.getCreditPrice = getCreditPrice;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as core from 'express-serve-static-core';
|
|
2
|
-
export type ConvertQuery<T> = core.Query;
|
|
1
|
+
import * as core from 'express-serve-static-core';
|
|
2
|
+
export type ConvertQuery<T> = core.Query;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './overwrite.util';
|
|
2
|
-
export * from './require-one.util';
|
|
3
|
-
export * from './convert-query.util';
|
|
4
|
-
export * from './notifications.type-util';
|
|
5
|
-
export * from './billing.util';
|
|
6
|
-
export type ValueOf<T> = T[keyof T];
|
|
1
|
+
export * from './overwrite.util';
|
|
2
|
+
export * from './require-one.util';
|
|
3
|
+
export * from './convert-query.util';
|
|
4
|
+
export * from './notifications.type-util';
|
|
5
|
+
export * from './billing.util';
|
|
6
|
+
export type ValueOf<T> = T[keyof T];
|
|
@@ -1,21 +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("./overwrite.util"), exports);
|
|
18
|
-
__exportStar(require("./require-one.util"), exports);
|
|
19
|
-
__exportStar(require("./convert-query.util"), exports);
|
|
20
|
-
__exportStar(require("./notifications.type-util"), exports);
|
|
21
|
-
__exportStar(require("./billing.util"), exports);
|
|
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("./overwrite.util"), exports);
|
|
18
|
+
__exportStar(require("./require-one.util"), exports);
|
|
19
|
+
__exportStar(require("./convert-query.util"), exports);
|
|
20
|
+
__exportStar(require("./notifications.type-util"), exports);
|
|
21
|
+
__exportStar(require("./billing.util"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ValueOf } from '.';
|
|
2
|
-
import { UserNotificationContentType, UserNotificationContentTypeData } from '../enum';
|
|
3
|
-
export type NotificationDTO = ValueOf<{
|
|
4
|
-
[K in UserNotificationContentType]: {
|
|
5
|
-
contentType: K;
|
|
6
|
-
data: UserNotificationContentTypeData[K];
|
|
7
|
-
};
|
|
8
|
-
}>;
|
|
1
|
+
import { ValueOf } from '.';
|
|
2
|
+
import { UserNotificationContentType, UserNotificationContentTypeData } from '../enum';
|
|
3
|
+
export type NotificationDTO = ValueOf<{
|
|
4
|
+
[K in UserNotificationContentType]: {
|
|
5
|
+
contentType: K;
|
|
6
|
+
data: UserNotificationContentTypeData[K];
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type Diff<T extends string | number | symbol, U extends string | number | symbol> = ({
|
|
2
|
-
[P in T]: P;
|
|
3
|
-
} & {
|
|
4
|
-
[P in U]: never;
|
|
5
|
-
} & {
|
|
6
|
-
[x: string]: never;
|
|
7
|
-
})[T];
|
|
8
|
-
export type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
|
|
9
|
-
export {};
|
|
1
|
+
type Diff<T extends string | number | symbol, U extends string | number | symbol> = ({
|
|
2
|
+
[P in T]: P;
|
|
3
|
+
} & {
|
|
4
|
+
[P in U]: never;
|
|
5
|
+
} & {
|
|
6
|
+
[x: string]: never;
|
|
7
|
+
})[T];
|
|
8
|
+
export type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
|
|
9
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
2
|
-
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
3
|
-
}[Keys];
|
|
4
|
-
export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
5
|
-
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
6
|
-
}[Keys];
|
|
1
|
+
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
2
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
3
|
+
}[Keys];
|
|
4
|
+
export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
5
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
6
|
+
}[Keys];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const notEmpty: <TValue>(value: TValue | null | undefined) => value is TValue;
|
|
1
|
+
export declare const notEmpty: <TValue>(value: TValue | null | undefined) => value is TValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.notEmpty = void 0;
|
|
4
|
-
const notEmpty = (value) => {
|
|
5
|
-
return value !== null && value !== undefined;
|
|
6
|
-
};
|
|
7
|
-
exports.notEmpty = notEmpty;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.notEmpty = void 0;
|
|
4
|
+
const notEmpty = (value) => {
|
|
5
|
+
return value !== null && value !== undefined;
|
|
6
|
+
};
|
|
7
|
+
exports.notEmpty = notEmpty;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ByteSizeResult } from 'byte-size';
|
|
2
|
-
export declare const byteSizeIEC: (value: number) => ByteSizeResult;
|
|
1
|
+
import { ByteSizeResult } from 'byte-size';
|
|
2
|
+
export declare const byteSizeIEC: (value: number) => ByteSizeResult;
|
package/dist/utils/byte.utils.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
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.byteSizeIEC = void 0;
|
|
7
|
-
const byte_size_1 = __importDefault(require("byte-size"));
|
|
8
|
-
const byteSizeIEC = (value) => {
|
|
9
|
-
byte_size_1.default.defaultOptions({
|
|
10
|
-
units: 'simple',
|
|
11
|
-
precision: 2,
|
|
12
|
-
customUnits: {
|
|
13
|
-
simple: [
|
|
14
|
-
{ from: 0, to: Math.pow(1024, 1), unit: 'o', long: 'octets' },
|
|
15
|
-
{
|
|
16
|
-
from: Math.pow(1024, 1),
|
|
17
|
-
to: Math.pow(1024, 2),
|
|
18
|
-
unit: 'Ko',
|
|
19
|
-
long: 'kiloOctets',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
from: Math.pow(1024, 2),
|
|
23
|
-
to: Math.pow(1024, 3),
|
|
24
|
-
unit: 'Mo',
|
|
25
|
-
long: 'megaOctets',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
from: Math.pow(1024, 3),
|
|
29
|
-
to: Math.pow(1024, 4),
|
|
30
|
-
unit: 'Go',
|
|
31
|
-
long: 'gigaOctets',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
from: Math.pow(1024, 4),
|
|
35
|
-
to: Math.pow(1024, 5),
|
|
36
|
-
unit: 'To',
|
|
37
|
-
long: 'teraOctets',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
from: Math.pow(1024, 5),
|
|
41
|
-
to: Math.pow(1024, 6),
|
|
42
|
-
unit: 'Po',
|
|
43
|
-
long: 'petaOctets',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
from: Math.pow(1024, 6),
|
|
47
|
-
to: Math.pow(1024, 7),
|
|
48
|
-
unit: 'Eo',
|
|
49
|
-
long: 'exaOctets',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
from: Math.pow(1024, 7),
|
|
53
|
-
to: Math.pow(1024, 8),
|
|
54
|
-
unit: 'Zo',
|
|
55
|
-
long: 'zettaOctets',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
from: Math.pow(1024, 8),
|
|
59
|
-
to: Math.pow(1024, 9),
|
|
60
|
-
unit: 'Yo',
|
|
61
|
-
long: 'yotaOctets',
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
},
|
|
65
|
-
toStringFn() {
|
|
66
|
-
return this.value + this.unit;
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
return (0, byte_size_1.default)(value, { units: 'simple' });
|
|
70
|
-
};
|
|
71
|
-
exports.byteSizeIEC = byteSizeIEC;
|
|
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.byteSizeIEC = void 0;
|
|
7
|
+
const byte_size_1 = __importDefault(require("byte-size"));
|
|
8
|
+
const byteSizeIEC = (value) => {
|
|
9
|
+
byte_size_1.default.defaultOptions({
|
|
10
|
+
units: 'simple',
|
|
11
|
+
precision: 2,
|
|
12
|
+
customUnits: {
|
|
13
|
+
simple: [
|
|
14
|
+
{ from: 0, to: Math.pow(1024, 1), unit: 'o', long: 'octets' },
|
|
15
|
+
{
|
|
16
|
+
from: Math.pow(1024, 1),
|
|
17
|
+
to: Math.pow(1024, 2),
|
|
18
|
+
unit: 'Ko',
|
|
19
|
+
long: 'kiloOctets',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
from: Math.pow(1024, 2),
|
|
23
|
+
to: Math.pow(1024, 3),
|
|
24
|
+
unit: 'Mo',
|
|
25
|
+
long: 'megaOctets',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
from: Math.pow(1024, 3),
|
|
29
|
+
to: Math.pow(1024, 4),
|
|
30
|
+
unit: 'Go',
|
|
31
|
+
long: 'gigaOctets',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
from: Math.pow(1024, 4),
|
|
35
|
+
to: Math.pow(1024, 5),
|
|
36
|
+
unit: 'To',
|
|
37
|
+
long: 'teraOctets',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
from: Math.pow(1024, 5),
|
|
41
|
+
to: Math.pow(1024, 6),
|
|
42
|
+
unit: 'Po',
|
|
43
|
+
long: 'petaOctets',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
from: Math.pow(1024, 6),
|
|
47
|
+
to: Math.pow(1024, 7),
|
|
48
|
+
unit: 'Eo',
|
|
49
|
+
long: 'exaOctets',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
from: Math.pow(1024, 7),
|
|
53
|
+
to: Math.pow(1024, 8),
|
|
54
|
+
unit: 'Zo',
|
|
55
|
+
long: 'zettaOctets',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
from: Math.pow(1024, 8),
|
|
59
|
+
to: Math.pow(1024, 9),
|
|
60
|
+
unit: 'Yo',
|
|
61
|
+
long: 'yotaOctets',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
toStringFn() {
|
|
66
|
+
return this.value + this.unit;
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
return (0, byte_size_1.default)(value, { units: 'simple' });
|
|
70
|
+
};
|
|
71
|
+
exports.byteSizeIEC = byteSizeIEC;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getDurationInMilliseconds: (start: [number, number]) => number;
|
|
1
|
+
export declare const getDurationInMilliseconds: (start: [number, number]) => number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDurationInMilliseconds = void 0;
|
|
4
|
-
const getDurationInMilliseconds = (start) => {
|
|
5
|
-
const NS_PER_SEC = 1e9;
|
|
6
|
-
const NS_TO_MS = 1e6;
|
|
7
|
-
const diff = process.hrtime(start);
|
|
8
|
-
return (diff[0] * NS_PER_SEC + diff[1]) / NS_TO_MS;
|
|
9
|
-
};
|
|
10
|
-
exports.getDurationInMilliseconds = getDurationInMilliseconds;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDurationInMilliseconds = void 0;
|
|
4
|
+
const getDurationInMilliseconds = (start) => {
|
|
5
|
+
const NS_PER_SEC = 1e9;
|
|
6
|
+
const NS_TO_MS = 1e6;
|
|
7
|
+
const diff = process.hrtime(start);
|
|
8
|
+
return (diff[0] * NS_PER_SEC + diff[1]) / NS_TO_MS;
|
|
9
|
+
};
|
|
10
|
+
exports.getDurationInMilliseconds = getDurationInMilliseconds;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const enumToArray: (enums: any) => string[];
|
|
2
|
-
export declare const enumToStringValue: (enumerator: any) => any[];
|
|
1
|
+
export declare const enumToArray: (enums: any) => string[];
|
|
2
|
+
export declare const enumToStringValue: (enumerator: any) => any[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.enumToStringValue = exports.enumToArray = void 0;
|
|
4
|
-
const enumToArray = (enums) => {
|
|
5
|
-
return Object.keys(enums).map((type) => {
|
|
6
|
-
return enums[type];
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
exports.enumToArray = enumToArray;
|
|
10
|
-
const enumToStringValue = (enumerator) => {
|
|
11
|
-
const keys = Object.keys(enumerator).filter((k) => typeof enumerator[k] === 'number');
|
|
12
|
-
return keys.map((k) => enumerator[k]);
|
|
13
|
-
};
|
|
14
|
-
exports.enumToStringValue = enumToStringValue;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enumToStringValue = exports.enumToArray = void 0;
|
|
4
|
+
const enumToArray = (enums) => {
|
|
5
|
+
return Object.keys(enums).map((type) => {
|
|
6
|
+
return enums[type];
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
exports.enumToArray = enumToArray;
|
|
10
|
+
const enumToStringValue = (enumerator) => {
|
|
11
|
+
const keys = Object.keys(enumerator).filter((k) => typeof enumerator[k] === 'number');
|
|
12
|
+
return keys.map((k) => enumerator[k]);
|
|
13
|
+
};
|
|
14
|
+
exports.enumToStringValue = enumToStringValue;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Code, ErrorType } from '../types';
|
|
2
|
-
type ErrorParams = {
|
|
3
|
-
code: Code;
|
|
4
|
-
type: ErrorType;
|
|
5
|
-
message?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare class ServiceException extends Error {
|
|
8
|
-
private readonly code;
|
|
9
|
-
private readonly type;
|
|
10
|
-
getCode(): Code;
|
|
11
|
-
getType(): ErrorType;
|
|
12
|
-
constructor(params: ErrorParams);
|
|
13
|
-
}
|
|
14
|
-
export declare const handleError: (error: Error | ErrorParams, _params?: ErrorParams) => Error;
|
|
15
|
-
export {};
|
|
1
|
+
import { Code, ErrorType } from '../types';
|
|
2
|
+
type ErrorParams = {
|
|
3
|
+
code: Code;
|
|
4
|
+
type: ErrorType;
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare class ServiceException extends Error {
|
|
8
|
+
private readonly code;
|
|
9
|
+
private readonly type;
|
|
10
|
+
getCode(): Code;
|
|
11
|
+
getType(): ErrorType;
|
|
12
|
+
constructor(params: ErrorParams);
|
|
13
|
+
}
|
|
14
|
+
export declare const handleError: (error: Error | ErrorParams, _params?: ErrorParams) => Error;
|
|
15
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handleError = exports.ServiceException = void 0;
|
|
4
|
-
class ServiceException extends Error {
|
|
5
|
-
getCode() {
|
|
6
|
-
return this.code;
|
|
7
|
-
}
|
|
8
|
-
getType() {
|
|
9
|
-
return this.type;
|
|
10
|
-
}
|
|
11
|
-
constructor(params) {
|
|
12
|
-
super(params.message);
|
|
13
|
-
this.code = params.code;
|
|
14
|
-
this.type = params.type;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.ServiceException = ServiceException;
|
|
18
|
-
const handleError = (error, _params) => {
|
|
19
|
-
if (error instanceof Error) {
|
|
20
|
-
return error;
|
|
21
|
-
}
|
|
22
|
-
return new ServiceException(error);
|
|
23
|
-
};
|
|
24
|
-
exports.handleError = handleError;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleError = exports.ServiceException = void 0;
|
|
4
|
+
class ServiceException extends Error {
|
|
5
|
+
getCode() {
|
|
6
|
+
return this.code;
|
|
7
|
+
}
|
|
8
|
+
getType() {
|
|
9
|
+
return this.type;
|
|
10
|
+
}
|
|
11
|
+
constructor(params) {
|
|
12
|
+
super(params.message);
|
|
13
|
+
this.code = params.code;
|
|
14
|
+
this.type = params.type;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ServiceException = ServiceException;
|
|
18
|
+
const handleError = (error, _params) => {
|
|
19
|
+
if (error instanceof Error) {
|
|
20
|
+
return error;
|
|
21
|
+
}
|
|
22
|
+
return new ServiceException(error);
|
|
23
|
+
};
|
|
24
|
+
exports.handleError = handleError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const extensionFileToImport: () => ".ts" | ".js";
|
|
1
|
+
export declare const extensionFileToImport: () => ".ts" | ".js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extensionFileToImport = void 0;
|
|
4
|
-
const extensionFileToImport = () => {
|
|
5
|
-
return process.env.NODE_ENV === 'DEVELOPMENT' ? '.ts' : '.js';
|
|
6
|
-
};
|
|
7
|
-
exports.extensionFileToImport = extensionFileToImport;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extensionFileToImport = void 0;
|
|
4
|
+
const extensionFileToImport = () => {
|
|
5
|
+
return process.env.NODE_ENV === 'DEVELOPMENT' ? '.ts' : '.js';
|
|
6
|
+
};
|
|
7
|
+
exports.extensionFileToImport = extensionFileToImport;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './enum-to-array.utils';
|
|
2
|
-
export * from './error.utils';
|
|
3
|
-
export * from './is-valid-object.utils';
|
|
4
|
-
export * from './byte.utils';
|
|
5
|
-
export * from './import.utils';
|
|
6
|
-
export * from './notification.utils';
|
|
7
|
-
export * from './sleep.utils';
|
|
8
|
-
export * from './subscription.utils';
|
|
9
|
-
export * from './array.utils';
|
|
1
|
+
export * from './enum-to-array.utils';
|
|
2
|
+
export * from './error.utils';
|
|
3
|
+
export * from './is-valid-object.utils';
|
|
4
|
+
export * from './byte.utils';
|
|
5
|
+
export * from './import.utils';
|
|
6
|
+
export * from './notification.utils';
|
|
7
|
+
export * from './sleep.utils';
|
|
8
|
+
export * from './subscription.utils';
|
|
9
|
+
export * from './array.utils';
|
package/dist/utils/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
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("./enum-to-array.utils"), exports);
|
|
18
|
-
__exportStar(require("./error.utils"), exports);
|
|
19
|
-
__exportStar(require("./is-valid-object.utils"), exports);
|
|
20
|
-
__exportStar(require("./byte.utils"), exports);
|
|
21
|
-
__exportStar(require("./import.utils"), exports);
|
|
22
|
-
__exportStar(require("./notification.utils"), exports);
|
|
23
|
-
__exportStar(require("./sleep.utils"), exports);
|
|
24
|
-
__exportStar(require("./subscription.utils"), exports);
|
|
25
|
-
__exportStar(require("./array.utils"), exports);
|
|
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("./enum-to-array.utils"), exports);
|
|
18
|
+
__exportStar(require("./error.utils"), exports);
|
|
19
|
+
__exportStar(require("./is-valid-object.utils"), exports);
|
|
20
|
+
__exportStar(require("./byte.utils"), exports);
|
|
21
|
+
__exportStar(require("./import.utils"), exports);
|
|
22
|
+
__exportStar(require("./notification.utils"), exports);
|
|
23
|
+
__exportStar(require("./sleep.utils"), exports);
|
|
24
|
+
__exportStar(require("./subscription.utils"), exports);
|
|
25
|
+
__exportStar(require("./array.utils"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function isValidObject(data: Record<string, number>): boolean;
|
|
1
|
+
export declare function isValidObject(data: Record<string, number>): boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isValidObject = void 0;
|
|
4
|
-
function isValidObject(data) {
|
|
5
|
-
if (!data)
|
|
6
|
-
return false;
|
|
7
|
-
const isArray = Array.isArray(data);
|
|
8
|
-
const isObject = Object.prototype.toString.call(data) === '[object Object]';
|
|
9
|
-
const hasKeys = !!Object.keys(data).length;
|
|
10
|
-
return !isArray && isObject && hasKeys;
|
|
11
|
-
}
|
|
12
|
-
exports.isValidObject = isValidObject;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isValidObject = void 0;
|
|
4
|
+
function isValidObject(data) {
|
|
5
|
+
if (!data)
|
|
6
|
+
return false;
|
|
7
|
+
const isArray = Array.isArray(data);
|
|
8
|
+
const isObject = Object.prototype.toString.call(data) === '[object Object]';
|
|
9
|
+
const hasKeys = !!Object.keys(data).length;
|
|
10
|
+
return !isArray && isObject && hasKeys;
|
|
11
|
+
}
|
|
12
|
+
exports.isValidObject = isValidObject;
|