@ozdao/prometheus-framework 0.2.133 → 0.2.134
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/alignment-pattern.cjs +1 -0
- package/dist/_virtual/alignment-pattern.js +4 -0
- package/dist/_virtual/browser.cjs +1 -0
- package/dist/_virtual/browser.js +4 -0
- package/dist/_virtual/canvas.cjs +1 -0
- package/dist/_virtual/canvas.js +4 -0
- package/dist/_virtual/dijkstra.cjs +1 -0
- package/dist/_virtual/dijkstra.js +4 -0
- package/dist/_virtual/error-correction-code.cjs +1 -0
- package/dist/_virtual/error-correction-code.js +4 -0
- package/dist/_virtual/error-correction-level.cjs +1 -0
- package/dist/_virtual/error-correction-level.js +4 -0
- package/dist/_virtual/finder-pattern.cjs +1 -0
- package/dist/_virtual/finder-pattern.js +4 -0
- package/dist/_virtual/format-info.cjs +1 -0
- package/dist/_virtual/format-info.js +4 -0
- package/dist/_virtual/galois-field.cjs +1 -0
- package/dist/_virtual/galois-field.js +4 -0
- package/dist/_virtual/mask-pattern.cjs +1 -0
- package/dist/_virtual/mask-pattern.js +4 -0
- package/dist/_virtual/mode.cjs +1 -0
- package/dist/_virtual/mode.js +4 -0
- package/dist/_virtual/polynomial.cjs +1 -0
- package/dist/_virtual/polynomial.js +4 -0
- package/dist/_virtual/qrcode.cjs +1 -0
- package/dist/_virtual/qrcode.js +4 -0
- package/dist/_virtual/regex.cjs +1 -0
- package/dist/_virtual/regex.js +4 -0
- package/dist/_virtual/segments.cjs +1 -0
- package/dist/_virtual/segments.js +4 -0
- package/dist/_virtual/svg-tag.cjs +1 -0
- package/dist/_virtual/svg-tag.js +4 -0
- package/dist/_virtual/utils.cjs +1 -0
- package/dist/_virtual/utils.js +4 -0
- package/dist/_virtual/utils2.cjs +1 -0
- package/dist/_virtual/utils2.js +4 -0
- package/dist/_virtual/version-check.cjs +1 -0
- package/dist/_virtual/version-check.js +4 -0
- package/dist/_virtual/version.cjs +1 -0
- package/dist/_virtual/version.js +4 -0
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-C-8xOJnM.mjs +244 -0
- package/dist/index-CDbtWkBj.js +243 -0
- package/dist/main-5IrI2IOV.js +92 -0
- package/dist/main-BY2OvGB9.mjs +14509 -0
- package/dist/main.css +1 -1
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/dijkstrajs/dijkstra.cjs +1 -0
- package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
- package/dist/node_modules/encode-utf8/index.cjs +1 -0
- package/dist/node_modules/encode-utf8/index.js +30 -0
- package/dist/node_modules/qrcode/lib/browser.cjs +1 -0
- package/dist/node_modules/qrcode/lib/browser.js +45 -0
- package/dist/node_modules/qrcode/lib/can-promise.cjs +1 -0
- package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/byte-data.js +24 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
- package/dist/node_modules/qrcode/lib/core/format-info.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
- package/dist/node_modules/qrcode/lib/core/mode.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.cjs +4 -0
- package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
- package/dist/node_modules/qrcode/lib/core/regex.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
- package/dist/node_modules/qrcode/lib/core/segments.cjs +2 -0
- package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
- package/dist/node_modules/qrcode/lib/core/utils.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
- package/dist/node_modules/qrcode/lib/core/version-check.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
- package/dist/node_modules/qrcode/lib/core/version.cjs +1 -0
- package/dist/node_modules/qrcode/lib/core/version.js +74 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.cjs +1 -0
- package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.cjs +2 -0
- package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.cjs +1 -0
- package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +19 -20
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +36 -36
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +29 -29
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +23 -23
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +8 -8
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +32 -32
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +34 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +76 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +105 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +106 -0
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +140 -125
- package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +41 -0
- package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +98 -22
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +103 -13
- package/dist/wallet.server.mjs +103 -13
- package/dist/web-5eyiz9L7.mjs +54 -0
- package/dist/web-C04IcLk4.js +1 -0
- package/package.json +1 -1
- package/src/components/Field/Field.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/globals/components/partials/Header.vue +2 -2
- package/src/modules/globals/localization/vue-i18n.js +5 -5
- package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -3
- package/src/modules/landing/components/sections/SectionEarn.vue +1 -6
- package/src/modules/middlewares/server/authSecret.js +22 -0
- package/src/modules/middlewares/server/index.js +7 -5
- package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -2
- package/src/modules/wallet/controllers/routes/rewards.routes.js +27 -3
- package/src/modules/wallet/models/wallet.model.js +5 -5
- package/src/modules/wallet/{components → views/components}/blocks/CardBalanceReplenished.vue +17 -7
- package/src/modules/wallet/{components/blocks/CardDeposite.vue → views/components/blocks/CardDeposit.vue} +4 -4
- package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +98 -0
- package/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue +144 -0
- package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +131 -0
- package/src/modules/wallet/views/components/pages/Wallet.vue +95 -68
- package/src/modules/wallet/views/localization/wallet.json +37 -0
- package/src/modules/wallet/views/store/wallet.store.js +145 -28
- package/src/modules/wallet/wallet.server.js +2 -2
- package/src/modules/wallet/components/blocks/CryptoDeposite.vue +0 -55
- package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +0 -181
- package/src/modules/wallet/controllers/factories/rewards.factory.population.js +0 -213
- package/src/modules/wallet/localization/Wallet.json +0 -22
- /package/src/modules/wallet/{components/blocks/CashDeposite.vue → views/components/blocks/CashDeposit.vue} +0 -0
@@ -0,0 +1,243 @@
|
|
1
|
+
"use strict";
|
2
|
+
const require$$0 = require("jsonwebtoken");
|
3
|
+
const require$$0$1 = require("crypto");
|
4
|
+
const require$$0$2 = require("mongodb");
|
5
|
+
const jwt = require$$0;
|
6
|
+
const middlewareFactory$4 = (db) => {
|
7
|
+
const User = db.user;
|
8
|
+
const Role = db.role;
|
9
|
+
const verifyToken = async (req, res, next) => {
|
10
|
+
try {
|
11
|
+
if (!req.cookies.user) {
|
12
|
+
req.userId = null;
|
13
|
+
return next();
|
14
|
+
}
|
15
|
+
let user = JSON.parse(req.cookies.user);
|
16
|
+
let token = req.headers["x-access-token"] || user.accessToken;
|
17
|
+
if (!token) {
|
18
|
+
req.userId = null;
|
19
|
+
return next();
|
20
|
+
}
|
21
|
+
const decoded = jwt.verify(token, process.env.SECRET_KEY);
|
22
|
+
req.userId = decoded._id;
|
23
|
+
next();
|
24
|
+
} catch (err) {
|
25
|
+
console.log(err);
|
26
|
+
req.userId = null;
|
27
|
+
next();
|
28
|
+
}
|
29
|
+
};
|
30
|
+
const checkRole = (roleToCheck) => async (req, res, next) => {
|
31
|
+
try {
|
32
|
+
const user = await User.findById(req.userId).exec();
|
33
|
+
if (!user) {
|
34
|
+
return res.status(404).send({ message: "User Not found." });
|
35
|
+
}
|
36
|
+
const roles = await Role.find({ _id: { $in: user.roles } }).exec();
|
37
|
+
for (let role of roles) {
|
38
|
+
if (role.name === roleToCheck) {
|
39
|
+
next();
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
res.status(403).send({ message: `Require ${roleToCheck} Role!` });
|
44
|
+
} catch (err) {
|
45
|
+
res.status(500).send({ message: err.message });
|
46
|
+
}
|
47
|
+
};
|
48
|
+
const isAdmin = checkRole("admin");
|
49
|
+
const isModerator = checkRole("moderator");
|
50
|
+
return {
|
51
|
+
verifyToken,
|
52
|
+
isAdmin,
|
53
|
+
isModerator
|
54
|
+
};
|
55
|
+
};
|
56
|
+
var authJwt = middlewareFactory$4;
|
57
|
+
var authSecret;
|
58
|
+
var hasRequiredAuthSecret;
|
59
|
+
function requireAuthSecret() {
|
60
|
+
if (hasRequiredAuthSecret) return authSecret;
|
61
|
+
hasRequiredAuthSecret = 1;
|
62
|
+
const crypto = require$$0$1;
|
63
|
+
const middlewareFactory2 = () => {
|
64
|
+
const verifySecret = (method, endpoint, secret) => async (req, res, next) => {
|
65
|
+
const requestSignature = req.headers.signature;
|
66
|
+
const signature = crypto.createHmac("sha256", secret).update(method + endpoint).digest("hex");
|
67
|
+
if (signature === requestSignature) {
|
68
|
+
return next();
|
69
|
+
}
|
70
|
+
res.status(403).send("Forbidden");
|
71
|
+
};
|
72
|
+
return { verifySecret };
|
73
|
+
};
|
74
|
+
authSecret = middlewareFactory2;
|
75
|
+
return authSecret;
|
76
|
+
}
|
77
|
+
const middlewareFactory$3 = (db) => {
|
78
|
+
const User = db.user;
|
79
|
+
db.role;
|
80
|
+
const checkDuplicateUsernameOrEmail = async (req, res, next) => {
|
81
|
+
const { type, email, phone } = req.body;
|
82
|
+
console.log(req.body);
|
83
|
+
let query;
|
84
|
+
if (type === "phone" && phone) {
|
85
|
+
query = { phone };
|
86
|
+
}
|
87
|
+
if (type === "email" && email) {
|
88
|
+
query = { email };
|
89
|
+
}
|
90
|
+
try {
|
91
|
+
const user = await User.findOne(query).exec();
|
92
|
+
if (user) {
|
93
|
+
console.log(`USER_ALREADY_REGISTERED`);
|
94
|
+
res.status(400).send({ errorCode: "USER_ALREADY_REGISTERED" });
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
next();
|
98
|
+
} catch (err) {
|
99
|
+
console.log(err);
|
100
|
+
res.status(500).send({ message: err.message });
|
101
|
+
}
|
102
|
+
};
|
103
|
+
const checkRolesExisted = (req, res, next) => {
|
104
|
+
if (req.body.roles) {
|
105
|
+
for (let i = 0; i < req.body.roles.length; i++) {
|
106
|
+
if (!ROLES.includes(req.body.roles[i])) {
|
107
|
+
console.log(`Failed! Role ${req.body.roles[i]} does not exist!`);
|
108
|
+
res.status(400).send({
|
109
|
+
message: `Failed! Role ${req.body.roles[i]} does not exist!`
|
110
|
+
});
|
111
|
+
return;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
next();
|
116
|
+
};
|
117
|
+
return {
|
118
|
+
checkDuplicateUsernameOrEmail,
|
119
|
+
checkRolesExisted
|
120
|
+
};
|
121
|
+
};
|
122
|
+
var verifySignUp = middlewareFactory$3;
|
123
|
+
const middlewareFactory$2 = (db) => {
|
124
|
+
const User = db.user;
|
125
|
+
db.role;
|
126
|
+
const checkUserExist = async (req, res, next) => {
|
127
|
+
const { type, email, phone } = req.body;
|
128
|
+
let query;
|
129
|
+
if (type === "phone" && phone) {
|
130
|
+
query = { phone };
|
131
|
+
}
|
132
|
+
if (type === "email" && email) {
|
133
|
+
query = { email };
|
134
|
+
}
|
135
|
+
try {
|
136
|
+
const user = await User.findOne(query).exec();
|
137
|
+
if (!user) {
|
138
|
+
console.log(query);
|
139
|
+
res.status(400).send({ errorCode: "USER_NOT_REGISTERED_YET" });
|
140
|
+
return;
|
141
|
+
}
|
142
|
+
next();
|
143
|
+
} catch (err) {
|
144
|
+
res.status(500).send({ message: err.message });
|
145
|
+
}
|
146
|
+
};
|
147
|
+
return {
|
148
|
+
checkUserExist
|
149
|
+
};
|
150
|
+
};
|
151
|
+
var verifyUser = middlewareFactory$2;
|
152
|
+
const { ObjectId } = require$$0$2;
|
153
|
+
const middlewareFactory$1 = (db) => {
|
154
|
+
const User = db.user;
|
155
|
+
const Invite = db.invite;
|
156
|
+
const Membership = db.membership;
|
157
|
+
const checkInviteExist = async (req, res, next) => {
|
158
|
+
for (let invite of req.body.invites) {
|
159
|
+
let query;
|
160
|
+
if (invite.contact.includes("@")) {
|
161
|
+
query = { invitedEmail: invite.contact };
|
162
|
+
} else {
|
163
|
+
query = { invitedPhone: invite.contact };
|
164
|
+
}
|
165
|
+
query["owner.target"] = req.body.owner.target;
|
166
|
+
const userInvite = await Invite.findOne(query).exec();
|
167
|
+
if (userInvite) {
|
168
|
+
console.log(userInvite);
|
169
|
+
res.status(400).send({ message: "Инвайт c таким email или телефоном уже создан!" });
|
170
|
+
return;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
next();
|
174
|
+
};
|
175
|
+
const checkUsersExist = async (req, res, next) => {
|
176
|
+
for (let invite of req.body.invites) {
|
177
|
+
let query;
|
178
|
+
if (invite.contact.includes("@")) {
|
179
|
+
query = { email: invite.contact };
|
180
|
+
} else {
|
181
|
+
query = { phone: invite.contact };
|
182
|
+
}
|
183
|
+
const user = await User.findOne(query).exec();
|
184
|
+
console.log(req.params);
|
185
|
+
if (user) {
|
186
|
+
const membership = await Membership.findOne({ user: new ObjectId(user._id), "owner.target": req.body.owner.target }).exec();
|
187
|
+
if (membership) {
|
188
|
+
console.log(membership);
|
189
|
+
res.status(400).send({ message: "Пользователь с таким email или телефоном уже добавлен в организацию!" });
|
190
|
+
return;
|
191
|
+
}
|
192
|
+
}
|
193
|
+
}
|
194
|
+
next();
|
195
|
+
};
|
196
|
+
return {
|
197
|
+
checkInviteExist,
|
198
|
+
checkUsersExist
|
199
|
+
};
|
200
|
+
};
|
201
|
+
var verifyInvites = middlewareFactory$1;
|
202
|
+
const middlewareFactory = (db) => {
|
203
|
+
const Category = db.category;
|
204
|
+
const checkCategoryExistOrNot = async (req, res, next) => {
|
205
|
+
try {
|
206
|
+
const category = await Category.findOne({ url: req.body.url });
|
207
|
+
if (category) {
|
208
|
+
res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
|
209
|
+
return;
|
210
|
+
}
|
211
|
+
next();
|
212
|
+
} catch (err) {
|
213
|
+
res.status(500).send({ message: err });
|
214
|
+
}
|
215
|
+
};
|
216
|
+
return {
|
217
|
+
checkCategoryExistOrNot
|
218
|
+
};
|
219
|
+
};
|
220
|
+
var verifyCategory = middlewareFactory;
|
221
|
+
const middlewareIndexFactory = (db) => {
|
222
|
+
const authJwt$1 = authJwt(db);
|
223
|
+
const authSecret2 = requireAuthSecret()();
|
224
|
+
const verifySignUp$1 = verifySignUp(db);
|
225
|
+
const verifyUser$1 = verifyUser(db);
|
226
|
+
const verifyInvites$1 = verifyInvites(db);
|
227
|
+
const verifyCategory$1 = verifyCategory(db);
|
228
|
+
return {
|
229
|
+
authJwt: authJwt$1,
|
230
|
+
authSecret: authSecret2,
|
231
|
+
verifySignUp: verifySignUp$1,
|
232
|
+
verifyUser: verifyUser$1,
|
233
|
+
verifyInvites: verifyInvites$1,
|
234
|
+
verifyCategory: verifyCategory$1
|
235
|
+
};
|
236
|
+
};
|
237
|
+
var server = middlewareIndexFactory;
|
238
|
+
exports.authJwt = authJwt;
|
239
|
+
exports.server = server;
|
240
|
+
exports.verifyCategory = verifyCategory;
|
241
|
+
exports.verifyInvites = verifyInvites;
|
242
|
+
exports.verifySignUp = verifySignUp;
|
243
|
+
exports.verifyUser = verifyUser;
|