@ozdao/prometheus-framework 0.2.132 → 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/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
- 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.js +4 -4
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- 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/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +1 -1
- 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 +137 -122
- 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 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
package/dist/auth.server.js
CHANGED
@@ -5,7 +5,7 @@ const require$$1$1 = require("bcryptjs");
|
|
5
5
|
const require$$0$1 = require("mongoose");
|
6
6
|
const require$$1 = require("jwk-to-pem");
|
7
7
|
const mailing = require("./mailing-BX0q8DIs.js");
|
8
|
-
const index = require("./index-
|
8
|
+
const index = require("./index-CDbtWkBj.js");
|
9
9
|
const jwt$1 = require$$0;
|
10
10
|
const jwkToPem = require$$1;
|
11
11
|
async function verifyAppleIdToken$1(id_token) {
|
package/dist/auth.server.mjs
CHANGED
@@ -4,7 +4,7 @@ import require$$1$1 from "bcryptjs";
|
|
4
4
|
import require$$0$1 from "mongoose";
|
5
5
|
import require$$1 from "jwk-to-pem";
|
6
6
|
import { m as mailing } from "./mailing-Cdp8NXhP.mjs";
|
7
|
-
import { s as server } from "./index-
|
7
|
+
import { s as server } from "./index-C-8xOJnM.mjs";
|
8
8
|
const jwt$1 = require$$0;
|
9
9
|
const jwkToPem = require$$1;
|
10
10
|
async function verifyAppleIdToken$1(id_token) {
|
package/dist/community.server.js
CHANGED
@@ -4,7 +4,7 @@ const require$$0 = require("mongoose");
|
|
4
4
|
const queryProcessor$3 = require("./queryProcessor-iewDZq_f.js");
|
5
5
|
require("util");
|
6
6
|
require("uuid");
|
7
|
-
const index = require("./index-
|
7
|
+
const index = require("./index-CDbtWkBj.js");
|
8
8
|
const common_schema = require("./common.schema-BFhpUXUt.js");
|
9
9
|
const engagement_schema = require("./engagement.schema-D-9md46B.js");
|
10
10
|
const ownership_schema = require("./ownership.schema-DN0SlQL6.js");
|
@@ -3,7 +3,7 @@ import require$$0 from "mongoose";
|
|
3
3
|
import { q as queryProcessor$3 } from "./queryProcessor-DQSFR9YA.mjs";
|
4
4
|
import "util";
|
5
5
|
import "uuid";
|
6
|
-
import { s as server$1 } from "./index-
|
6
|
+
import { s as server$1 } from "./index-C-8xOJnM.mjs";
|
7
7
|
import { c as common_schema } from "./common.schema-ChBVARrs.mjs";
|
8
8
|
import { e as engagement_schema } from "./engagement.schema-CCdSLKd4.mjs";
|
9
9
|
import { o as ownership_schema } from "./ownership.schema-oyx6eNkZ.mjs";
|
package/dist/events.server.js
CHANGED
@@ -5,7 +5,7 @@ const require$$0 = require("mongoose");
|
|
5
5
|
const queryProcessor$2 = require("./queryProcessor-iewDZq_f.js");
|
6
6
|
const metadata_schema = require("./metadata.schema-6slGhpQS.js");
|
7
7
|
const require$$1 = require("stripe");
|
8
|
-
const index = require("./index-
|
8
|
+
const index = require("./index-CDbtWkBj.js");
|
9
9
|
const tickets_controller = require("./tickets.controller-WaQ4qMpv.js");
|
10
10
|
const common_schema = require("./common.schema-BFhpUXUt.js");
|
11
11
|
const engagement_schema = require("./engagement.schema-D-9md46B.js");
|
package/dist/events.server.mjs
CHANGED
@@ -3,7 +3,7 @@ import require$$0 from "mongoose";
|
|
3
3
|
import { q as queryProcessor$2 } from "./queryProcessor-DQSFR9YA.mjs";
|
4
4
|
import { s as seoFriendlyUrl, m as metadata_schema } from "./metadata.schema-CK5e2O3f.mjs";
|
5
5
|
import require$$1 from "stripe";
|
6
|
-
import { s as server$1 } from "./index-
|
6
|
+
import { s as server$1 } from "./index-C-8xOJnM.mjs";
|
7
7
|
import { t as tickets_controller } from "./tickets.controller-ByZ33N6_.mjs";
|
8
8
|
import { c as common_schema } from "./common.schema-ChBVARrs.mjs";
|
9
9
|
import { e as engagement_schema } from "./engagement.schema-CCdSLKd4.mjs";
|
package/dist/files.server.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
3
3
|
const require$$0 = require("path");
|
4
|
-
const index = require("./index-
|
4
|
+
const index = require("./index-CDbtWkBj.js");
|
5
5
|
const require$$0$1 = require("sharp");
|
6
6
|
const require$$1 = require("fs");
|
7
7
|
const require$$2 = require("fs/promises");
|
package/dist/files.server.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
2
2
|
import require$$0 from "path";
|
3
|
-
import { s as server$1 } from "./index-
|
3
|
+
import { s as server$1 } from "./index-C-8xOJnM.mjs";
|
4
4
|
import require$$0$1 from "sharp";
|
5
5
|
import require$$1 from "fs";
|
6
6
|
import require$$2 from "fs/promises";
|
package/dist/gallery.server.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
3
3
|
const require$$0 = require("path");
|
4
4
|
const queryProcessor = require("./queryProcessor-iewDZq_f.js");
|
5
|
-
const index = require("./index-
|
5
|
+
const index = require("./index-CDbtWkBj.js");
|
6
6
|
const common_schema = require("./common.schema-BFhpUXUt.js");
|
7
7
|
const engagement_schema = require("./engagement.schema-D-9md46B.js");
|
8
8
|
const ownership_schema = require("./ownership.schema-DN0SlQL6.js");
|
package/dist/gallery.server.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
2
2
|
import require$$0 from "path";
|
3
3
|
import { q as queryProcessor } from "./queryProcessor-DQSFR9YA.mjs";
|
4
|
-
import { s as server } from "./index-
|
4
|
+
import { s as server } from "./index-C-8xOJnM.mjs";
|
5
5
|
import { c as common_schema } from "./common.schema-ChBVARrs.mjs";
|
6
6
|
import { e as engagement_schema } from "./engagement.schema-CCdSLKd4.mjs";
|
7
7
|
import { o as ownership_schema } from "./ownership.schema-oyx6eNkZ.mjs";
|
@@ -0,0 +1,244 @@
|
|
1
|
+
import require$$0 from "jsonwebtoken";
|
2
|
+
import require$$0$1 from "crypto";
|
3
|
+
import require$$0$2 from "mongodb";
|
4
|
+
const jwt = require$$0;
|
5
|
+
const middlewareFactory$4 = (db) => {
|
6
|
+
const User = db.user;
|
7
|
+
const Role = db.role;
|
8
|
+
const verifyToken = async (req, res, next) => {
|
9
|
+
try {
|
10
|
+
if (!req.cookies.user) {
|
11
|
+
req.userId = null;
|
12
|
+
return next();
|
13
|
+
}
|
14
|
+
let user = JSON.parse(req.cookies.user);
|
15
|
+
let token = req.headers["x-access-token"] || user.accessToken;
|
16
|
+
if (!token) {
|
17
|
+
req.userId = null;
|
18
|
+
return next();
|
19
|
+
}
|
20
|
+
const decoded = jwt.verify(token, process.env.SECRET_KEY);
|
21
|
+
req.userId = decoded._id;
|
22
|
+
next();
|
23
|
+
} catch (err) {
|
24
|
+
console.log(err);
|
25
|
+
req.userId = null;
|
26
|
+
next();
|
27
|
+
}
|
28
|
+
};
|
29
|
+
const checkRole = (roleToCheck) => async (req, res, next) => {
|
30
|
+
try {
|
31
|
+
const user = await User.findById(req.userId).exec();
|
32
|
+
if (!user) {
|
33
|
+
return res.status(404).send({ message: "User Not found." });
|
34
|
+
}
|
35
|
+
const roles = await Role.find({ _id: { $in: user.roles } }).exec();
|
36
|
+
for (let role of roles) {
|
37
|
+
if (role.name === roleToCheck) {
|
38
|
+
next();
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
res.status(403).send({ message: `Require ${roleToCheck} Role!` });
|
43
|
+
} catch (err) {
|
44
|
+
res.status(500).send({ message: err.message });
|
45
|
+
}
|
46
|
+
};
|
47
|
+
const isAdmin = checkRole("admin");
|
48
|
+
const isModerator = checkRole("moderator");
|
49
|
+
return {
|
50
|
+
verifyToken,
|
51
|
+
isAdmin,
|
52
|
+
isModerator
|
53
|
+
};
|
54
|
+
};
|
55
|
+
var authJwt = middlewareFactory$4;
|
56
|
+
var authSecret;
|
57
|
+
var hasRequiredAuthSecret;
|
58
|
+
function requireAuthSecret() {
|
59
|
+
if (hasRequiredAuthSecret) return authSecret;
|
60
|
+
hasRequiredAuthSecret = 1;
|
61
|
+
const crypto = require$$0$1;
|
62
|
+
const middlewareFactory2 = () => {
|
63
|
+
const verifySecret = (method, endpoint, secret) => async (req, res, next) => {
|
64
|
+
const requestSignature = req.headers.signature;
|
65
|
+
const signature = crypto.createHmac("sha256", secret).update(method + endpoint).digest("hex");
|
66
|
+
if (signature === requestSignature) {
|
67
|
+
return next();
|
68
|
+
}
|
69
|
+
res.status(403).send("Forbidden");
|
70
|
+
};
|
71
|
+
return { verifySecret };
|
72
|
+
};
|
73
|
+
authSecret = middlewareFactory2;
|
74
|
+
return authSecret;
|
75
|
+
}
|
76
|
+
const middlewareFactory$3 = (db) => {
|
77
|
+
const User = db.user;
|
78
|
+
db.role;
|
79
|
+
const checkDuplicateUsernameOrEmail = async (req, res, next) => {
|
80
|
+
const { type, email, phone } = req.body;
|
81
|
+
console.log(req.body);
|
82
|
+
let query;
|
83
|
+
if (type === "phone" && phone) {
|
84
|
+
query = { phone };
|
85
|
+
}
|
86
|
+
if (type === "email" && email) {
|
87
|
+
query = { email };
|
88
|
+
}
|
89
|
+
try {
|
90
|
+
const user = await User.findOne(query).exec();
|
91
|
+
if (user) {
|
92
|
+
console.log(`USER_ALREADY_REGISTERED`);
|
93
|
+
res.status(400).send({ errorCode: "USER_ALREADY_REGISTERED" });
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
next();
|
97
|
+
} catch (err) {
|
98
|
+
console.log(err);
|
99
|
+
res.status(500).send({ message: err.message });
|
100
|
+
}
|
101
|
+
};
|
102
|
+
const checkRolesExisted = (req, res, next) => {
|
103
|
+
if (req.body.roles) {
|
104
|
+
for (let i = 0; i < req.body.roles.length; i++) {
|
105
|
+
if (!ROLES.includes(req.body.roles[i])) {
|
106
|
+
console.log(`Failed! Role ${req.body.roles[i]} does not exist!`);
|
107
|
+
res.status(400).send({
|
108
|
+
message: `Failed! Role ${req.body.roles[i]} does not exist!`
|
109
|
+
});
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
next();
|
115
|
+
};
|
116
|
+
return {
|
117
|
+
checkDuplicateUsernameOrEmail,
|
118
|
+
checkRolesExisted
|
119
|
+
};
|
120
|
+
};
|
121
|
+
var verifySignUp = middlewareFactory$3;
|
122
|
+
const middlewareFactory$2 = (db) => {
|
123
|
+
const User = db.user;
|
124
|
+
db.role;
|
125
|
+
const checkUserExist = async (req, res, next) => {
|
126
|
+
const { type, email, phone } = req.body;
|
127
|
+
let query;
|
128
|
+
if (type === "phone" && phone) {
|
129
|
+
query = { phone };
|
130
|
+
}
|
131
|
+
if (type === "email" && email) {
|
132
|
+
query = { email };
|
133
|
+
}
|
134
|
+
try {
|
135
|
+
const user = await User.findOne(query).exec();
|
136
|
+
if (!user) {
|
137
|
+
console.log(query);
|
138
|
+
res.status(400).send({ errorCode: "USER_NOT_REGISTERED_YET" });
|
139
|
+
return;
|
140
|
+
}
|
141
|
+
next();
|
142
|
+
} catch (err) {
|
143
|
+
res.status(500).send({ message: err.message });
|
144
|
+
}
|
145
|
+
};
|
146
|
+
return {
|
147
|
+
checkUserExist
|
148
|
+
};
|
149
|
+
};
|
150
|
+
var verifyUser = middlewareFactory$2;
|
151
|
+
const { ObjectId } = require$$0$2;
|
152
|
+
const middlewareFactory$1 = (db) => {
|
153
|
+
const User = db.user;
|
154
|
+
const Invite = db.invite;
|
155
|
+
const Membership = db.membership;
|
156
|
+
const checkInviteExist = async (req, res, next) => {
|
157
|
+
for (let invite of req.body.invites) {
|
158
|
+
let query;
|
159
|
+
if (invite.contact.includes("@")) {
|
160
|
+
query = { invitedEmail: invite.contact };
|
161
|
+
} else {
|
162
|
+
query = { invitedPhone: invite.contact };
|
163
|
+
}
|
164
|
+
query["owner.target"] = req.body.owner.target;
|
165
|
+
const userInvite = await Invite.findOne(query).exec();
|
166
|
+
if (userInvite) {
|
167
|
+
console.log(userInvite);
|
168
|
+
res.status(400).send({ message: "Инвайт c таким email или телефоном уже создан!" });
|
169
|
+
return;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
next();
|
173
|
+
};
|
174
|
+
const checkUsersExist = async (req, res, next) => {
|
175
|
+
for (let invite of req.body.invites) {
|
176
|
+
let query;
|
177
|
+
if (invite.contact.includes("@")) {
|
178
|
+
query = { email: invite.contact };
|
179
|
+
} else {
|
180
|
+
query = { phone: invite.contact };
|
181
|
+
}
|
182
|
+
const user = await User.findOne(query).exec();
|
183
|
+
console.log(req.params);
|
184
|
+
if (user) {
|
185
|
+
const membership = await Membership.findOne({ user: new ObjectId(user._id), "owner.target": req.body.owner.target }).exec();
|
186
|
+
if (membership) {
|
187
|
+
console.log(membership);
|
188
|
+
res.status(400).send({ message: "Пользователь с таким email или телефоном уже добавлен в организацию!" });
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
}
|
193
|
+
next();
|
194
|
+
};
|
195
|
+
return {
|
196
|
+
checkInviteExist,
|
197
|
+
checkUsersExist
|
198
|
+
};
|
199
|
+
};
|
200
|
+
var verifyInvites = middlewareFactory$1;
|
201
|
+
const middlewareFactory = (db) => {
|
202
|
+
const Category = db.category;
|
203
|
+
const checkCategoryExistOrNot = async (req, res, next) => {
|
204
|
+
try {
|
205
|
+
const category = await Category.findOne({ url: req.body.url });
|
206
|
+
if (category) {
|
207
|
+
res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
|
208
|
+
return;
|
209
|
+
}
|
210
|
+
next();
|
211
|
+
} catch (err) {
|
212
|
+
res.status(500).send({ message: err });
|
213
|
+
}
|
214
|
+
};
|
215
|
+
return {
|
216
|
+
checkCategoryExistOrNot
|
217
|
+
};
|
218
|
+
};
|
219
|
+
var verifyCategory = middlewareFactory;
|
220
|
+
const middlewareIndexFactory = (db) => {
|
221
|
+
const authJwt$1 = authJwt(db);
|
222
|
+
const authSecret2 = requireAuthSecret()();
|
223
|
+
const verifySignUp$1 = verifySignUp(db);
|
224
|
+
const verifyUser$1 = verifyUser(db);
|
225
|
+
const verifyInvites$1 = verifyInvites(db);
|
226
|
+
const verifyCategory$1 = verifyCategory(db);
|
227
|
+
return {
|
228
|
+
authJwt: authJwt$1,
|
229
|
+
authSecret: authSecret2,
|
230
|
+
verifySignUp: verifySignUp$1,
|
231
|
+
verifyUser: verifyUser$1,
|
232
|
+
verifyInvites: verifyInvites$1,
|
233
|
+
verifyCategory: verifyCategory$1
|
234
|
+
};
|
235
|
+
};
|
236
|
+
var server = middlewareIndexFactory;
|
237
|
+
export {
|
238
|
+
verifyInvites as a,
|
239
|
+
authJwt as b,
|
240
|
+
verifySignUp as c,
|
241
|
+
verifyCategory as d,
|
242
|
+
server as s,
|
243
|
+
verifyUser as v
|
244
|
+
};
|