From 6682bc268d27ef5efed8a74d5f87809a7329d252 Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Wed, 28 May 2025 19:41:06 -0700 Subject: [PATCH 1/2] Closes #557 - Removed SendGrid integration for account/email verification --- .env-cmdrc-template | 4 - README.md | 1 - docker-compose.yml | 4 - npm-shrinkwrap.json | 362 ++++----- package.json | 10 +- requests/Switcher API.postman_collection.json | 708 +++++++----------- src/api-docs/paths/path-admin.js | 15 - src/external/sendgrid.js | 34 - src/models/admin.js | 2 +- src/routers/admin.js | 9 - src/services/admin.js | 31 +- tests/admin.test.js | 55 +- 12 files changed, 426 insertions(+), 809 deletions(-) delete mode 100644 src/external/sendgrid.js diff --git a/.env-cmdrc-template b/.env-cmdrc-template index a403ccf8..2a459d86 100644 --- a/.env-cmdrc-template +++ b/.env-cmdrc-template @@ -2,10 +2,6 @@ "dev": { "ENV": "DEV", "PORT": "3000", - "SENDGRID_API_KEY": "[SENDGRID_API_KEY]", - "SENDGRID_MAIL_FROM": "no-reply@switcherapi.com", - "SENDGRID_CONFIRMATION_TEMPLATE": "[SENDGRID_CONFIRMATION_TEMPLATE]", - "SENDGRID_RECOVERY_TEMPLATE": "[SENDGRID_RECOVERY_TEMPLATE]", "MONGODB_URI": "mongodb://mongodb:27017/switcher-api", "RESOURCE_SECRECT": "admin", "JWT_SECRET": "[JWT_SECRET]", diff --git a/README.md b/README.md index a3482719..a8e2e58f 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,6 @@ Signing up an account to use Switcher API with an email/password or linking it t - **Singing up via email** - Admin: /admin/signup [POST] - **Singing up via GitHub** - Admin: /admin/github/auth?code= [POST] - **Singing up via Bitbucket** - Admin: /admin/bitbucket/auth?code= [POST] -- **Access confirmation** - Admin: /admin/signup/authorization?code= [POST] ### Domain Domains are responsible for centralizing all settings and configurations.
diff --git a/docker-compose.yml b/docker-compose.yml index 2de55b26..c6ea53f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,10 +43,6 @@ services: - SSL_CERT=${SSL_CERT} - MONGODB_URI=${MONGODB_URI} - - SENDGRID_API_KEY=${SENDGRID_API_KEY} - - SENDGRID_MAIL_FROM=${SENDGRID_MAIL_FROM} - - SENDGRID_CONFIRMATION_TEMPLATE=${SENDGRID_CONFIRMATION_TEMPLATE} - - SENDGRID_RECOVERY_TEMPLATE=${SENDGRID_RECOVERY_TEMPLATE} - RESOURCE_SECRET=${RESOURCE_SECRET} - JWT_SECRET=${JWT_SECRET} - JWT_ADMIN_TOKEN_RENEW_INTERVAL=${JWT_ADMIN_TOKEN_RENEW_INTERVAL} diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 4045a004..9bf85474 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -23,22 +23,22 @@ "jsonwebtoken": "^9.0.2", "moment": "^2.30.1", "mongodb": "^6.16.0", - "mongoose": "^8.14.1", - "pino": "^9.6.0", + "mongoose": "^8.15.1", + "pino": "^9.7.0", "pino-pretty": "^13.0.0", "swagger-ui-express": "^5.0.1", "switcher-client": "^4.2.0", - "validator": "^13.15.0" + "validator": "^13.15.15" }, "devDependencies": { "env-cmd": "^10.1.0", - "eslint": "^9.26.0", + "eslint": "^9.27.0", "jest": "^29.7.0", "jest-sonar-reporter": "^2.0.0", "node-notifier": "^10.0.1", "nodemon": "^3.1.10", "sinon": "^20.0.0", - "supertest": "^7.1.0" + "supertest": "^7.1.1" } }, "node_modules/@ampproject/remapping": { @@ -71,9 +71,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.1.tgz", - "integrity": "sha512-Q+E+rd/yBzNQhXkG+zQnF58e4zoZfBedaxwzPmicKsiK3nt8iJYrSrDbjwFFDGC4f+rPafqRaPH6TsDoSvMf7A==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", + "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", "dev": true, "license": "MIT", "engines": { @@ -81,22 +81,22 @@ } }, "node_modules/@babel/core": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", - "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.3.tgz", + "integrity": "sha512-hyrN8ivxfvJ4i0fIJuV4EOlV0WDMz5Ui4StRTgVaAvWeiRCilXgwVvxJKtFQ3TKtHgJscB2YiXKGNJuVwhQMtA==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", - "@babel/helper-module-transforms": "^7.27.1", - "@babel/helpers": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.3", + "@babel/parser": "^7.27.3", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.27.3", + "@babel/types": "^7.27.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -112,14 +112,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz", - "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", + "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/parser": "^7.27.3", + "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -129,13 +129,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.1.tgz", - "integrity": "sha512-2YaDd/Rd9E598B5+WIc8wJPmWETiiJXFYVE60oX8FDohv7rAUU3CQj+A1MgeEmcsk2+dQuEjIe/GDvig0SqL4g==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.1", + "@babel/compat-data": "^7.27.2", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -160,15 +160,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz", - "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -218,27 +218,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz", - "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.3.tgz", + "integrity": "sha512-h/eKy9agOya1IGuLaZ9tEUgz+uIRXcbtOhRtUyyMf8JFmn1iT13vnl/IGVWSkdOCG/pC57U4S1jnAabAavTMwg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.1.tgz", - "integrity": "sha512-I0dZ3ZpCrJ1c04OqlNsQcKiZlsrXf/kkE4FXzID9rIOYICsAbA8mMDzhW/luRNAHdCNt7os/u8wenklZDlUVUQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.3.tgz", + "integrity": "sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.1" + "@babel/types": "^7.27.3" }, "bin": { "parser": "bin/babel-parser.js" @@ -487,14 +487,14 @@ } }, "node_modules/@babel/template": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.1.tgz", - "integrity": "sha512-Fyo3ghWMqkHHpHQCoBs2VnYjR4iWFFjguTDEqA5WgZDOrFesVjMhMM2FSqTKSoUSDO1VQtavj8NFpdRBEvJTtg==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.1", + "@babel/parser": "^7.27.2", "@babel/types": "^7.27.1" }, "engines": { @@ -502,17 +502,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz", - "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.3.tgz", + "integrity": "sha512-lId/IfN/Ye1CIu8xG7oKBHXd2iNb2aW1ilPszzGcJug6M8RCKfVNcYhpI5+bMvFYjK7lXIM0R+a+6r8xhHp2FQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/parser": "^7.27.3", + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -531,9 +531,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", + "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", "dev": true, "license": "MIT", "dependencies": { @@ -619,9 +619,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -656,13 +656,16 @@ } }, "node_modules/@eslint/js": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", - "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { @@ -676,13 +679,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "levn": "^0.4.1" }, "engines": { @@ -742,9 +745,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1217,28 +1220,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@modelcontextprotocol/sdk": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.0.tgz", - "integrity": "sha512-k/1pb70eD638anoi0e8wUGAlbMJXyvdV4p62Ko+EZ7eBe1xMx8Uhak1R5DgfoofsK5IBBnRwsYGTaLZl+6/+RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "cors": "^2.8.5", - "cross-spawn": "^7.0.3", - "eventsource": "^3.0.2", - "express": "^5.0.1", - "express-rate-limit": "^7.5.0", - "pkce-challenge": "^5.0.0", - "raw-body": "^3.0.0", - "zod": "^3.23.8", - "zod-to-json-schema": "^3.24.1" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/@mongodb-js/saslprep": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.2.2.tgz", @@ -1424,9 +1405,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.15.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.11.tgz", - "integrity": "sha512-rlyK0vuU7VLEYQfXuC7QTFxDvkb6tKhDI7wR4r6ZzM0k8BJd44W0jxo6xmUjqSs4AlYmiYfLJU2f0pAG/FtCRw==", + "version": "22.15.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.24.tgz", + "integrity": "sha512-w9CZGm9RDjzTh/D+hFwlBJ3ziUaVw7oufKA3vOFSOZlzmW9AkZnfjPb+DLnrV6qtgL/LNmP0/2zBNCFHL3F0ng==", "dev": true, "license": "MIT", "dependencies": { @@ -1829,9 +1810,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", - "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", + "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", "dev": true, "funding": [ { @@ -1849,8 +1830,8 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001716", - "electron-to-chromium": "^1.5.149", + "caniuse-lite": "^1.0.30001718", + "electron-to-chromium": "^1.5.160", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, @@ -1952,9 +1933,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001717", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001717.tgz", - "integrity": "sha512-auPpttCq6BDEG8ZAuHJIplGw6GODhjw+/11e7IjpnYCxZcW/ONgPs0KVBJ0d1bY3e2+7PRe5RCLyP+PfwVgkYw==", + "version": "1.0.30001718", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", + "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", "dev": true, "funding": [ { @@ -2271,9 +2252,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -2408,9 +2389,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.150", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.150.tgz", - "integrity": "sha512-rOOkP2ZUMx1yL4fCxXQKDHQ8ZXwisb2OycOQVKHgvB3ZI4CvehOd4y2tfnnLDieJ3Zs1RL1Dlp3cMkyIn7nnXA==", + "version": "1.5.161", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", + "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", "dev": true, "license": "ISC" }, @@ -2554,9 +2535,9 @@ } }, "node_modules/eslint": { - "version": "9.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.26.0.tgz", - "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", + "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -2564,14 +2545,13 @@ "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.26.0", - "@eslint/plugin-kit": "^0.2.8", + "@eslint/js": "9.27.0", + "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", - "@modelcontextprotocol/sdk": "^1.8.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -2595,8 +2575,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "zod": "^3.24.2" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -2733,29 +2712,6 @@ "node": ">= 0.6" } }, - "node_modules/eventsource": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.6.tgz", - "integrity": "sha512-l19WpE2m9hSuyP06+FbuUUf1G+R0SFLrtQfbRb9PRr+oimOfxQhgGCbVaXg5IvZyyTThJsxh6L/srkMiCeBPDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eventsource-parser": "^3.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/eventsource-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.1.tgz", - "integrity": "sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -3715,9 +3671,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4254,9 +4210,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4486,9 +4442,9 @@ } }, "node_modules/jsonwebtoken/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -4498,12 +4454,12 @@ } }, "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } @@ -4684,9 +4640,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -4905,9 +4861,9 @@ } }, "node_modules/mongoose": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.14.1.tgz", - "integrity": "sha512-ijd12vjqUBr5Btqqflu0c/o8Oed5JpdaE0AKO9TjGxCgywYwnzt6ynR1ySjhgxGxrYVeXC0t1P11f1zlRiE93Q==", + "version": "8.15.1", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.15.1.tgz", + "integrity": "sha512-RhQ4DzmBi5BNGcS0w4u1vdMRIKcteXTCNzDt1j7XRcdWYBz1MjMjulBhPaeC5jBCHOD1yinuOFTTSOWLLGexWw==", "license": "MIT", "dependencies": { "bson": "^6.10.3", @@ -4992,9 +4948,9 @@ } }, "node_modules/node-notifier/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -5051,9 +5007,9 @@ } }, "node_modules/nodemon/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -5334,9 +5290,9 @@ } }, "node_modules/pino": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-9.6.0.tgz", - "integrity": "sha512-i85pKRCt4qMjZ1+L7sy2Ag4t1atFcdbEt76+7iRJn1g2BvsnRMGu9p8pivl9fs63M2kF/A0OacFZhTub+m/qMg==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-9.7.0.tgz", + "integrity": "sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==", "license": "MIT", "dependencies": { "atomic-sleep": "^1.0.0", @@ -5344,7 +5300,7 @@ "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pino-std-serializers": "^7.0.0", - "process-warning": "^4.0.0", + "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", @@ -5404,16 +5360,6 @@ "node": ">= 6" } }, - "node_modules/pkce-challenge": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", - "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.20.0" - } - }, "node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -5522,9 +5468,9 @@ } }, "node_modules/process-warning": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-4.0.1.tgz", - "integrity": "sha512-3c2LzQ3rY9d0hc1emcsHhfT9Jwz0cChib/QN89oME2R451w5fy3f0afAhERFZAwrbDU43wk12d0ORBpDVME50Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz", + "integrity": "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==", "funding": [ { "type": "github", @@ -6000,9 +5946,9 @@ } }, "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", "dev": true, "license": "ISC", "bin": { @@ -6219,9 +6165,9 @@ } }, "node_modules/superagent": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-9.0.2.tgz", - "integrity": "sha512-xuW7dzkUpcJq7QnhOsnNUgtYp3xRwpt2F7abdRYIpCsAt0hhUqia0EdxyXZQQpNmGtsCzYHryaKSV3q3GJnq7w==", + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-10.2.1.tgz", + "integrity": "sha512-O+PCv11lgTNJUzy49teNAWLjBZfc+A1enOwTpLlH6/rsvKcTwcdTT8m9azGkVqM7HBl5jpyZ7KTPhHweokBcdg==", "dev": true, "license": "MIT", "dependencies": { @@ -6230,7 +6176,7 @@ "debug": "^4.3.4", "fast-safe-stringify": "^2.1.1", "form-data": "^4.0.0", - "formidable": "^3.5.1", + "formidable": "^3.5.4", "methods": "^1.1.2", "mime": "2.6.0", "qs": "^6.11.0" @@ -6240,14 +6186,14 @@ } }, "node_modules/supertest": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-7.1.0.tgz", - "integrity": "sha512-5QeSO8hSrKghtcWEoPiO036fxH0Ii2wVQfFZSP0oqQhmjk8bOLhDFXr4JrvaFmPuEWUoq4znY3uSi8UzLKxGqw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-7.1.1.tgz", + "integrity": "sha512-aI59HBTlG9e2wTjxGJV+DygfNLgnWbGdZxiA/sgrnNNikIW8lbDvCtF6RnhZoJ82nU7qv7ZLjrvWqCEm52fAmw==", "dev": true, "license": "MIT", "dependencies": { "methods": "^1.1.2", - "superagent": "^9.0.1" + "superagent": "^10.2.1" }, "engines": { "node": ">=14.18.0" @@ -6280,9 +6226,9 @@ } }, "node_modules/swagger-ui-dist": { - "version": "5.21.0", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.21.0.tgz", - "integrity": "sha512-E0K3AB6HvQd8yQNSMR7eE5bk+323AUxjtCz/4ZNKiahOlPhPJxqn3UPIGs00cyY/dhrTDJ61L7C/a8u6zhGrZg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.22.0.tgz", + "integrity": "sha512-8YlCSxiyb8uPFa7qoB1lRHYr1PBbT1NuV9RvQdFFPFPudRBTPf9coU5jl02KhzvrtmTEw4jXRgb0kg8pJvVuWQ==", "license": "Apache-2.0", "dependencies": { "@scarf/scarf": "=1.4.0" @@ -6533,9 +6479,9 @@ } }, "node_modules/validator": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.0.tgz", - "integrity": "sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA==", + "version": "13.15.15", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.15.tgz", + "integrity": "sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A==", "license": "MIT", "engines": { "node": ">= 0.10" @@ -6711,26 +6657,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zod": { - "version": "3.24.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", - "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-json-schema": { - "version": "3.24.5", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", - "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", - "dev": true, - "license": "ISC", - "peerDependencies": { - "zod": "^3.24.1" - } } } } diff --git a/package.json b/package.json index 16c91a82..7411b94d 100644 --- a/package.json +++ b/package.json @@ -50,22 +50,22 @@ "jsonwebtoken": "^9.0.2", "moment": "^2.30.1", "mongodb": "^6.16.0", - "mongoose": "^8.14.1", - "pino": "^9.6.0", + "mongoose": "^8.15.1", + "pino": "^9.7.0", "pino-pretty": "^13.0.0", "swagger-ui-express": "^5.0.1", "switcher-client": "^4.2.0", - "validator": "^13.15.0" + "validator": "^13.15.15" }, "devDependencies": { "env-cmd": "^10.1.0", - "eslint": "^9.26.0", + "eslint": "^9.27.0", "jest": "^29.7.0", "jest-sonar-reporter": "^2.0.0", "node-notifier": "^10.0.1", "nodemon": "^3.1.10", "sinon": "^20.0.0", - "supertest": "^7.1.0" + "supertest": "^7.1.1" }, "repository": { "type": "git", diff --git a/requests/Switcher API.postman_collection.json b/requests/Switcher API.postman_collection.json index 2bae3a3c..e48834f5 100644 --- a/requests/Switcher API.postman_collection.json +++ b/requests/Switcher API.postman_collection.json @@ -18,7 +18,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -31,13 +32,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"\",\n\t\"email\": \"\",\n\t\"password\": \"\",\n\t\"token\": \"\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"email\": \"{{email}}\",\n\t\"password\": \"{{password}}\",\n\t\"token\": \"{{token}}\"\n}", "options": { "raw": { "language": "json" @@ -57,63 +57,6 @@ }, "response": [] }, - { - "name": "Admin - Signup Authorization", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "if (pm.response.code === 201) {", - " pm.environment.set('authToken', pm.response.json().jwt.token)", - "}" - ], - "type": "text/javascript" - } - } - ], - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{url}}/admin/signup/authorization?code=", - "host": [ - "{{url}}" - ], - "path": [ - "admin", - "signup", - "authorization" - ], - "query": [ - { - "key": "code", - "value": "" - } - ] - } - }, - "response": [] - }, { "name": "Admin - GitHub Auth", "event": [ @@ -125,7 +68,8 @@ " pm.environment.set('authToken', pm.response.json().jwt.token)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -138,7 +82,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -152,7 +95,7 @@ } }, "url": { - "raw": "{{url}}/admin/github/auth?code=", + "raw": "{{url}}/admin/github/auth?code={{code}}", "host": [ "{{url}}" ], @@ -164,7 +107,7 @@ "query": [ { "key": "code", - "value": "" + "value": "{{code}}" } ] } @@ -182,7 +125,8 @@ "// pm.environment.set('authToken', pm.response.json().jwt.token)", "// }" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -195,7 +139,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -209,7 +152,7 @@ } }, "url": { - "raw": "{{url}}/admin/bitbucket/auth?code=", + "raw": "{{url}}/admin/bitbucket/auth?code={{code}}", "host": [ "{{url}}" ], @@ -221,7 +164,7 @@ "query": [ { "key": "code", - "value": "" + "value": "{{code}}" } ] } @@ -236,13 +179,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"password\": \"12312312312\"\n}", + "raw": "{\n\t\"password\": \"{{password}}\"\n}", "options": { "raw": { "language": "json" @@ -274,7 +216,8 @@ " pm.environment.set('refreshToken', pm.response.json().jwt.refreshToken)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -287,13 +230,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n\t\"email\": \"mail@mail.com\",\r\n\t\"password\": \"123123123\"\r\n}", + "raw": "{\r\n\t\"email\": \"{{email}}\",\r\n\t\"password\": \"{{password}}\"\r\n}", "options": { "raw": { "language": "json" @@ -322,7 +264,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -335,13 +278,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n\t\"email\": \"mail@mail.com\"\r\n}", + "raw": "{\r\n\t\"email\": \"{{email}}\"\r\n}", "options": { "raw": { "language": "json" @@ -374,7 +316,8 @@ " pm.environment.set('authToken', pm.response.json().jwt.token)\r", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -387,13 +330,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\r\n\t\"code\": \"\",\r\n\t\"password\": \"\",\r\n\t\"token\": \"\"\r\n}", + "raw": "{\r\n\t\"code\": \"{{code}}\",\r\n\t\"password\": \"{{password}}\",\r\n\t\"token\": \"{{token}}\"\r\n}", "options": { "raw": { "language": "json" @@ -511,7 +453,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -526,13 +469,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"domain\": \"5e0ece606f4f994eac9007ae\",\n\t\"action\": [\"READ\", \"UPDATE\"],\n\t\"router\": \"GROUP\",\n\t\"element\": {\n\t\t\"name\": \"Project 2\"\n\t}\n}", + "raw": "{\n\t\"domain\": \"{{domain_id}}\",\n\t\"action\": [\"READ\", \"UPDATE\"],\n\t\"router\": \"GROUP\",\n\t\"element\": {\n\t\t\"name\": \"{{element_name}}\"\n\t}\n}", "options": { "raw": { "language": "json" @@ -562,7 +504,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -587,7 +530,7 @@ "variable": [ { "key": "admin", - "value": "5e0ece2b6f4f994eac9007ad" + "value": "{{adminid}}" } ] } @@ -686,7 +629,7 @@ "variable": [ { "key": "domain", - "value": "5ed5b45fbcd74972fc55b72e" + "value": "{{domainid}}" } ] } @@ -706,13 +649,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"QA\",\n\t\"domain\": \"\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"domain\": \"{{domainid}}\"\n}", "options": { "raw": { "language": "json" @@ -740,7 +682,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -766,7 +707,7 @@ "variable": [ { "key": "env", - "value": "5df2a4491bf6792758ba6b82" + "value": "{{envid}}" } ] } @@ -798,7 +739,7 @@ } }, "url": { - "raw": "{{url}}/environment/?domain=", + "raw": "{{url}}/environment/?domain={{domainid}}", "host": [ "{{url}}" ], @@ -824,7 +765,7 @@ }, { "key": "domain", - "value": "" + "value": "{{domainid}}" } ] } @@ -842,7 +783,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -867,7 +807,7 @@ "variable": [ { "key": "env", - "value": "5deac6bc2d61a41fa0a84789" + "value": "{{envid}}" } ] } @@ -891,7 +831,7 @@ "variable": [ { "key": "env", - "value": "5deac77f2d61a41fa0a8478f" + "value": "{{envid}}" } ] } @@ -911,13 +851,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"Android\",\n\t\"description\": \"Operational system\",\n\t\"domain\": \"5e0ece606f4f994eac9007ae\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"description\": \"{{description}}\",\n\t\"domain\": \"{{domainid}}\"\n}", "options": { "raw": { "language": "json" @@ -945,13 +884,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"description\": \"Mobile OS\"\n}", + "raw": "{\n\t\"description\": \"{{description}}\"\n}", "options": { "raw": { "language": "json" @@ -988,7 +926,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1001,7 +940,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" }, { @@ -1032,74 +970,12 @@ "variable": [ { "key": "component", - "value": "5edb2330985c4725fcf2146f" + "value": "{{componentid}}" } ] } }, - "response": [ - { - "name": "Domain - API Key", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "name": "Content-Type", - "type": "text" - }, - { - "key": "", - "value": "", - "type": "text" - } - ], - "url": { - "raw": "{{url}}/domain/generateApiKey/5df166239194d613400a52e7", - "host": [ - "{{url}}" - ], - "path": [ - "domain", - "generateApiKey", - "5df166239194d613400a52e7" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "X-Powered-By", - "value": "Express" - }, - { - "key": "Content-Type", - "value": "application/json; charset=utf-8" - }, - { - "key": "Content-Length", - "value": "73" - }, - { - "key": "ETag", - "value": "W/\"49-UUQ0fKZ1ks2v9yj6/x/6QT0U2MU\"" - }, - { - "key": "Date", - "value": "Thu, 12 Dec 2019 04:22:10 GMT" - }, - { - "key": "Connection", - "value": "keep-alive" - } - ], - "cookie": [], - "body": "{\n \"apiKey\": \"$2b$08$ukaPxVKYA9mIt1Xym.73SefuYU8Cne8PRprDlSxgOjaEvz3iP.a6S\"\n}" - } - ] + "response": [] }, { "name": "Component - Read", @@ -1112,7 +988,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1126,7 +1001,7 @@ } }, "url": { - "raw": "{{url}}/component/?domain=5e0ece606f4f994eac9007ae", + "raw": "{{url}}/component/?domain={{domainid}}", "host": [ "{{url}}" ], @@ -1152,7 +1027,7 @@ }, { "key": "domain", - "value": "5e0ece606f4f994eac9007ae" + "value": "{{domainid}}" } ] } @@ -1170,7 +1045,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1195,7 +1069,7 @@ "variable": [ { "key": "component", - "value": "5deca4d3ed149e3f804aecb9" + "value": "{{componentid}}" } ] } @@ -1219,7 +1093,7 @@ "variable": [ { "key": "component", - "value": "5deca63a9323870448544f2d" + "value": "{{componentid}}" } ] } @@ -1240,7 +1114,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1250,13 +1125,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"My Team 2\",\n\t\"domain\": \"5e0bbe269ad3100658ae2229\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"domain\": \"{{domainid}}\"\n}", "options": { "raw": { "language": "json" @@ -1294,7 +1168,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1307,7 +1182,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1321,7 +1195,7 @@ } }, "url": { - "raw": "{{url}}/team/?domain=5e0bbe0d9ad3100658ae2228", + "raw": "{{url}}/team/?domain={{domainid}}", "host": [ "{{url}}" ], @@ -1332,7 +1206,7 @@ "query": [ { "key": "domain", - "value": "5e0bbe0d9ad3100658ae2228" + "value": "{{domainid}}" } ] } @@ -1350,7 +1224,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1363,7 +1238,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1394,7 +1268,7 @@ "variable": [ { "key": "team", - "value": "5e10eda73a649463a8ef3751" + "value": "{{teamid}}" } ] } @@ -1410,7 +1284,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1420,7 +1295,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1445,7 +1319,7 @@ "variable": [ { "key": "team", - "value": "5e0bc0e1ac22583584aeb849" + "value": "{{teamid}}" } ] } @@ -1461,7 +1335,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1471,7 +1346,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1496,7 +1370,7 @@ "variable": [ { "key": "team", - "value": "5e0d10c21078a209b4215b7f" + "value": "{{teamid}}" } ] } @@ -1512,7 +1386,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1522,13 +1397,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"email\": \"roger.petruki@gmail.com\"\n}", + "raw": "{\n\t\"email\": \"{{email}}\"\n}", "options": { "raw": { "language": "json" @@ -1549,7 +1423,7 @@ "variable": [ { "key": "team", - "value": "5e10eda73a649463a8ef3751" + "value": "{{teamid}}" } ] } @@ -1565,7 +1439,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1575,7 +1450,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1603,7 +1477,7 @@ "variable": [ { "key": "team", - "value": "5ed404eabe178984d812f61e" + "value": "{{teamid}}" } ] } @@ -1619,7 +1493,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1629,7 +1504,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1658,11 +1532,11 @@ "variable": [ { "key": "id", - "value": "5e10eda73a649463a8ef3751" + "value": "{{teamid}}" }, { "key": "request_id", - "value": "5f30448867be1453684853fc" + "value": "{{requestid}}" } ] } @@ -1678,7 +1552,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1691,7 +1566,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1718,7 +1592,7 @@ "variable": [ { "key": "team", - "value": "5ed80055ada7c13b4cfd6a63" + "value": "{{teamid}}" } ] } @@ -1734,7 +1608,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1747,7 +1622,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -1775,7 +1649,7 @@ "variable": [ { "key": "team", - "value": "5e10eda73a649463a8ef3751" + "value": "{{teamid}}" } ] } @@ -1793,7 +1667,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1803,13 +1678,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"member\": \"5e35d5820cceed52b012ef26\"\n}", + "raw": "{\n\t\"member\": \"{{userid}}\"\n}", "options": { "raw": { "language": "json" @@ -1830,7 +1704,7 @@ "query": [ { "key": "id", - "value": "5e0bbe0d9ad3100658ae2228", + "value": "{{teamid}}", "disabled": true } ] @@ -1849,7 +1723,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1859,13 +1734,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"member\": \"5e0bbe0d9ad3100658ae2228\"\n}", + "raw": "{\n\t\"member\": \"{{userid}}\"\n}", "options": { "raw": { "language": "json" @@ -1873,7 +1747,7 @@ } }, "url": { - "raw": "{{url}}/team/member/remove/5e0bf0bab2ced93fb0b9111a", + "raw": "{{url}}/team/member/remove/:teamid", "host": [ "{{url}}" ], @@ -1881,7 +1755,13 @@ "team", "member", "remove", - "5e0bf0bab2ced93fb0b9111a" + ":teamid" + ], + "variable": [ + { + "key": "teamid", + "value": "{{teamid}}" + } ] } }, @@ -1898,7 +1778,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1908,13 +1789,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"permission\": \"5e35cb6bd5027a30749ecd28\"\n}", + "raw": "{\n\t\"permission\": \"{{permissionid}}\"\n}", "options": { "raw": { "language": "json" @@ -1922,7 +1802,7 @@ } }, "url": { - "raw": "{{url}}/team/permission/add/5e35d60f0cceed52b012ef28", + "raw": "{{url}}/team/permission/add/:teamid", "host": [ "{{url}}" ], @@ -1930,13 +1810,12 @@ "team", "permission", "add", - "5e35d60f0cceed52b012ef28" + ":teamid" ], - "query": [ + "variable": [ { - "key": "id", - "value": "5e0bbe0d9ad3100658ae2228", - "disabled": true + "key": "teamid", + "value": "{{teamid}}" } ] } @@ -1952,7 +1831,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1962,13 +1842,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"permission\": \"5e0bf2a097f71351a0007ab7\"\n}", + "raw": "{\n\t\"permission\": \"{{permissionid}}\"\n}", "options": { "raw": { "language": "json" @@ -1976,7 +1855,7 @@ } }, "url": { - "raw": "{{url}}/team/permission/remove/5e0bf0bab2ced93fb0b9111a", + "raw": "{{url}}/team/permission/remove/:teamid", "host": [ "{{url}}" ], @@ -1984,13 +1863,12 @@ "team", "permission", "remove", - "5e0bf0bab2ced93fb0b9111a" + ":teamid" ], - "query": [ + "variable": [ { - "key": "id", - "value": "5e0bbe0d9ad3100658ae2228", - "disabled": true + "key": "teamid", + "value": "{{teamid}}" } ] } @@ -2011,7 +1889,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2021,13 +1900,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"action\": \"READ\",\n\t\"router\": \"SWITCHER\",\n\t\"identifiedBy\": \"key\",\n\t\"values\": [\"TEST\", \"TEST2\"]\n}", + "raw": "{\n\t\"action\": \"{{action}}\",\n\t\"router\": \"{{router}}\",\n\t\"identifiedBy\": \"{{identifiedBy}}\",\n\t\"values\": [\"TEST\", \"TEST2\"]\n}", "options": { "raw": { "language": "json" @@ -2035,19 +1913,19 @@ } }, "url": { - "raw": "{{url}}/permission/create/:team", + "raw": "{{url}}/permission/create/:teamid", "host": [ "{{url}}" ], "path": [ "permission", "create", - ":team" + ":teamid" ], "variable": [ { - "key": "team", - "value": "5e35d60f0cceed52b012ef28" + "key": "teamid", + "value": "{{teamid}}" } ] } @@ -2065,7 +1943,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2075,13 +1954,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"active\": \"true\"\n}", + "raw": "{\n\t\"active\": \"{{active}}\"\n}", "options": { "raw": { "language": "json" @@ -2100,7 +1978,7 @@ "variable": [ { "key": "id", - "value": "5e0bf4a3a5753d65c0794af4" + "value": "{{permissionid}}" } ] } @@ -2116,7 +1994,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2129,7 +2008,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -2143,7 +2021,7 @@ } }, "url": { - "raw": "{{url}}/permission/?team=5e10eda73a649463a8ef3751", + "raw": "{{url}}/permission/?team={{teamid}}", "host": [ "{{url}}" ], @@ -2154,7 +2032,7 @@ "query": [ { "key": "team", - "value": "5e10eda73a649463a8ef3751" + "value": "{{teamid}}" } ] } @@ -2170,7 +2048,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2183,7 +2062,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -2208,7 +2086,7 @@ "variable": [ { "key": "id", - "value": "5e0bf449a5753d65c0794af3" + "value": "{{permissionid}}" } ] } @@ -2370,7 +2248,8 @@ "exec": [ "" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2380,7 +2259,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -2405,7 +2283,7 @@ "variable": [ { "key": "id", - "value": "5e0bf4b5a5753d65c0794af6" + "value": "{{permissionid}}" } ] } @@ -2423,7 +2301,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2433,13 +2312,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"value\": \"123\"\n}", + "raw": "{\n\t\"value\": \"{{value}}\"\n}", "options": { "raw": { "language": "json" @@ -2467,7 +2345,7 @@ "variable": [ { "key": "id", - "value": "5e0bf449a5753d65c0794af3" + "value": "{{permissionid}}" } ] } @@ -2485,7 +2363,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2495,13 +2374,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"value\": \"123\"\n}", + "raw": "{\n\t\"value\": \"{{value}}\"\n}", "options": { "raw": { "language": "json" @@ -2522,7 +2400,7 @@ "variable": [ { "key": "id", - "value": "5e0bf449a5753d65c0794af3" + "value": "{{permissionid}}" } ] } @@ -2545,7 +2423,8 @@ " pm.environment.set('apiKey', pm.response.json().apiKey)", "}" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -2555,13 +2434,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"My Domain\",\n\t\"description\": \"Doamin description\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"description\": \"{{description}}\"\n}", "options": { "raw": { "language": "json" @@ -2589,13 +2467,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"description\": \"Technology solutions - Test 1\"\n}", + "raw": "{\n\t\"description\": \"{{description}}\"\n}", "options": { "raw": { "language": "json" @@ -2614,7 +2491,7 @@ "variable": [ { "key": "domain", - "value": "5e0ece606f4f994eac9007ae" + "value": "{{domainid}}" } ] } @@ -2629,13 +2506,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"domain\": \"5e4f9d8966e06b59c8254500\"\n}", + "raw": "{\n\t\"domain\": \"{{domainid}}\"\n}", "options": { "raw": { "language": "json" @@ -2664,13 +2540,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"domain\": \"5e4f9d8966e06b59c8254500\"\n}", + "raw": "{\n\t\"domain\": \"{{domainid}}\"\n}", "options": { "raw": { "language": "json" @@ -2699,13 +2574,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"default\": true\n}", + "raw": "{\n\t\"default\": {{acrive}}\n}", "options": { "raw": { "language": "json" @@ -2725,7 +2599,7 @@ "variable": [ { "key": "domain", - "value": "5de9babb40778d3b5c82a07b" + "value": "{{domainid}}" } ] } @@ -2740,13 +2614,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"env\": \"QA\"\n}", + "raw": "{\n\t\"env\": \"{{env_name}}\"\n}", "options": { "raw": { "language": "json" @@ -2766,7 +2639,7 @@ "variable": [ { "key": "domain", - "value": "5de9babb40778d3b5c82a07b" + "value": "{{domainid}}" } ] } @@ -2853,7 +2726,7 @@ "variable": [ { "key": "domain", - "value": "5e0bbe269ad3100658ae2229" + "value": "{{domainid}}" } ] } @@ -2898,7 +2771,7 @@ "variable": [ { "key": "domain", - "value": "5e0ece606f4f994eac9007ae" + "value": "{{domainid}}" } ] } @@ -2923,7 +2796,7 @@ "variable": [ { "key": "domain", - "value": "5e0ece606f4f994eac9007ae" + "value": "{{domainid}}" } ] } @@ -2947,7 +2820,7 @@ "variable": [ { "key": "domain", - "value": "5dd36ab857445636ccdeb520" + "value": "{{domainid}}" } ] } @@ -2967,13 +2840,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"Project 2\",\n\t\"description\": \"Project #2 description\",\n\t\"domain\": \"5e0ece606f4f994eac9007ae\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"description\": \"{{description}}\",\n\t\"domain\": \"{{domainid}}\"\n}", "options": { "raw": { "language": "json" @@ -3001,13 +2873,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"name\": \"Rollout 2020\",\n\t\"description\": \"Changes that will be applied during the rollout\"\n}", + "raw": "{\n\t\"name\": \"{{name}}\",\n\t\"description\": \"{{description}}\"\n}", "options": { "raw": { "language": "json" @@ -3026,7 +2897,7 @@ "variable": [ { "key": "groupconfig", - "value": "5dd231391f11a7307c164531" + "value": "{{groupid}}" } ] } @@ -3041,13 +2912,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"default\": true,\n\t\"QA\": true\n}", + "raw": "{\n\t\"default\": {{active_default}},\n\t\"QA\": {{active_qa}}\n}", "options": { "raw": { "language": "json" @@ -3067,7 +2937,7 @@ "variable": [ { "key": "groupconfig", - "value": "5df166359194d613400a52e9" + "value": "{{groupid}}" } ] } @@ -3082,13 +2952,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"env\": \"default\"\n}", + "raw": "{\n\t\"env\": \"{{env_name}}\"\n}", "options": { "raw": { "language": "json" @@ -3108,7 +2977,7 @@ "variable": [ { "key": "groupconfig", - "value": "5de9c927248192258cd1c3f0" + "value": "{{groupid}}" } ] } @@ -3121,7 +2990,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/groupconfig?domain=5e0ece606f4f994eac9007ae", + "raw": "{{url}}/groupconfig?domain={{domainid}}", "host": [ "{{url}}" ], @@ -3151,7 +3020,7 @@ }, { "key": "domain", - "value": "5e0ece606f4f994eac9007ae" + "value": "{{domainid}}" } ] } @@ -3172,22 +3041,10 @@ "groupconfig", ":groupconfig" ], - "query": [ - { - "key": "key", - "value": "5dd06217fd3f1e403806db30", - "disabled": true - }, - { - "key": "skip", - "value": "2", - "disabled": true - } - ], "variable": [ { "key": "groupconfig", - "value": "5de9fc74279fa52e0c9cf499" + "value": "{{groupid}}" } ] } @@ -3234,7 +3091,7 @@ "variable": [ { "key": "groupconfig", - "value": "5df1664d9194d613400a52eb" + "value": "{{groupid}}" } ] } @@ -3259,7 +3116,7 @@ "variable": [ { "key": "groupconfig", - "value": "5df1664d9194d613400a52eb" + "value": "{{groupid}}" } ] } @@ -3283,7 +3140,7 @@ "variable": [ { "key": "groupconfig", - "value": "5dd230a81f11a7307c16452b" + "value": "{{groupid}}" } ] } @@ -3335,7 +3192,7 @@ "variable": [ { "key": "config", - "value": "5df1664d9194d613400a52eb" + "value": "{{configid}}" } ] } @@ -3360,7 +3217,7 @@ "variable": [ { "key": "config", - "value": "5df1664d9194d613400a52eb" + "value": "{{configid}}" } ] } @@ -3375,13 +3232,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"key\": \"RELAY_1\",\n\t\"description\": \"Feature which contains a relay\",\n\t\"group\": \"5e0ece9e6f4f994eac9007b1\"\n}", + "raw": "{\n\t\"key\": \"{{key}}\",\n\t\"description\": \"{{description}}\",\n\t\"group\": \"{{groupid}}\"\n}", "options": { "raw": { "language": "json" @@ -3409,13 +3265,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"key\": \"FF2FOR2021\",\n\t\"description\": \"Feature Flag\"\n}", + "raw": "{\n\t\"key\": \"{{key}}\",\n\t\"description\": \"{{description}}\"\n}", "options": { "raw": { "language": "json" @@ -3434,7 +3289,7 @@ "variable": [ { "key": "config", - "value": "5dd232241f11a7307c164535" + "value": "{{configid}}" } ] } @@ -3449,13 +3304,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"type\": \"VALIDATION\",\n\t\"description\": \"Validate input via external API\",\n\t\"activated\": {\n\t\t\"default\": true\n\t},\n\t\"endpoint\": {\n\t\t\"default\": \"http://localhost:3001\"\n\t},\n\t\"method\": \"GET\",\n\t\"auth_prefix\": \"Bearer\",\n\t\"auth_token\": {\n\t\t\"default\": \"123\"\n\t}\n}", + "raw": "{\n\t\"type\": \"VALIDATION\",\n\t\"description\": \"{{description}}\",\n\t\"activated\": {\n\t\t\"default\": {{activated_default}}\n\t},\n\t\"endpoint\": {\n\t\t\"default\": \"{{endpoint_default}}\"\n\t},\n\t\"method\": \"GET\",\n\t\"auth_prefix\": \"{{auth_prefix}}\",\n\t\"auth_token\": {\n\t\t\"default\": \"{{auth_token_default}}\"\n\t}\n}", "options": { "raw": { "language": "json" @@ -3475,7 +3329,7 @@ "variable": [ { "key": "config", - "value": "5f45ca87b196cd151c6ec8bf" + "value": "{{configid}}" } ] } @@ -3490,13 +3344,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"activated\": {\n\t\t\"development\": true\n\t},\n\t\"endpoint\": {\n\t\t\"development\": \"http://localhost:3000\"\n\t}\n}", + "raw": "{\n\t\"activated\": {\n\t\t\"development\": {{activated_development_env}}\n\t},\n\t\"endpoint\": {\n\t\t\"development\": \"{{endpoint_development_env}}\"\n\t}\n}", "options": { "raw": { "language": "json" @@ -3516,7 +3369,7 @@ "variable": [ { "key": "config", - "value": "5f4588335a311b4848e51f2e" + "value": "{{configid}}" } ] } @@ -3531,13 +3384,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"default\": true,\n\t\"QA\": true\n}", + "raw": "{\n\t\"default\": {{active_default}},\n\t\"QA\": {{active_qa}}\n}", "options": { "raw": { "language": "json" @@ -3557,7 +3409,7 @@ "variable": [ { "key": "config", - "value": "5df1664d9194d613400a52eb" + "value": "{{configid}}" } ] } @@ -3572,13 +3424,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"env\": \"default\"\n}", + "raw": "{\n\t\"env\": \"{{env_name}}\"\n}", "options": { "raw": { "language": "json" @@ -3598,7 +3449,7 @@ "variable": [ { "key": "config", - "value": "5de9c927248192258cd1c3f0" + "value": "{{configid}}" } ] } @@ -3613,13 +3464,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"component\": \"5e0ecf7d6f4f994eac9007b6\"\n}", + "raw": "{\n\t\"component\": \"{{componentid}}\"\n}", "options": { "raw": { "language": "json" @@ -3639,7 +3489,7 @@ "variable": [ { "key": "config", - "value": "5e0eceb66f4f994eac9007b2" + "value": "{{configid}}" } ] } @@ -3654,13 +3504,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"components\": [\n\t\t\"5e0ecf7d6f4f994eac9007b6\",\n\t\t\"5e30f18d8db9c44460d22771\"\n\t]\n}", + "raw": "{\n\t\"components\": [\n\t\t\"{{componentid}}\"\n\t]\n}", "options": { "raw": { "language": "json" @@ -3680,7 +3529,7 @@ "variable": [ { "key": "config", - "value": "5e0eceb66f4f994eac9007b2" + "value": "{{configid}}" } ] } @@ -3695,13 +3544,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"component\": \"5e0eceb66f4f994eac9007b2\"\n}", + "raw": "{\n\t\"component\": \"{{componentid}}\"\n}", "options": { "raw": { "language": "json" @@ -3721,7 +3569,7 @@ "variable": [ { "key": "config", - "value": "5deac6e42d61a41fa0a8478b" + "value": "{{configid}}" } ] } @@ -3736,7 +3584,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -3762,7 +3609,7 @@ "variable": [ { "key": "config", - "value": "5f458a38388f1a389892780a" + "value": "{{configid}}" } ] } @@ -3777,7 +3624,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -3804,7 +3650,7 @@ "variable": [ { "key": "config", - "value": "5f504cc2aaea6121c4a35bfc" + "value": "{{configid}}" } ] } @@ -3819,7 +3665,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -3847,11 +3692,11 @@ "variable": [ { "key": "config", - "value": "5f504cc2aaea6121c4a35bfc" + "value": "{{configid}}" }, { "key": "environment", - "value": "default" + "value": "{{env_name}}" } ] } @@ -3900,7 +3745,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/config?group=groupid", + "raw": "{{url}}/config?group={{groupid}}", "host": [ "{{url}}" ], @@ -3910,7 +3755,7 @@ "query": [ { "key": "group", - "value": "groupid" + "value": "{{groupid}}" }, { "key": "fields", @@ -3943,7 +3788,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/config/:config?resolveComponents=true", + "raw": "{{url}}/config/:config?resolveComponents={{resolve_components_true_false}}", "host": [ "{{url}}" ], @@ -3954,13 +3799,13 @@ "query": [ { "key": "resolveComponents", - "value": "true" + "value": "{{resolve_components_true_false}}" } ], "variable": [ { "key": "config", - "value": "5e0eceb66f4f994eac9007b2" + "value": "{{configid}}" } ] } @@ -3984,7 +3829,7 @@ "variable": [ { "key": "config", - "value": "5dd230b31f11a7307c16452c" + "value": "{{configid}}" } ] } @@ -4004,13 +3849,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"description\": \"Allowed IP address\",\n \"strategy\": \"NETWORK_VALIDATION\",\n \"values\": [\"10.0.0.3/24\"],\n \"operation\": \"EXIST\",\n \"config\": \"5e0ecebe6f4f994eac9007b3\",\n \"env\": \"default\"\n}", + "raw": "{\n \"description\": \"{{description}}\",\n \"strategy\": \"NETWORK_VALIDATION\",\n \"values\": [\"{{value1}}\"],\n \"operation\": \"EXIST\",\n \"config\": \"{{configid}}\",\n \"env\": \"{{env_name}}\"\n}", "options": { "raw": { "language": "json" @@ -4038,13 +3882,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"description\": \"Rollout countries\",\n \"strategy\": \"VALUE_VALIDATION\",\n \"values\": [\"USA\", \"Canada\", \"Australia\", \"Africa\"],\n \"operation\": \"NOT_EXIST\",\n \"config\": \"5df1664d9194d613400a52eb\",\n \"env\": \"default\"\n}", + "raw": "{\n \"description\": \"{{description}}\",\n \"strategy\": \"VALUE_VALIDATION\",\n \"values\": [\"USA\", \"Canada\", \"Australia\", \"Africa\"],\n \"operation\": \"NOT_EXIST\",\n \"config\": \"{{configid}}\",\n \"env\": \"{{env_name}}\"\n}", "options": { "raw": { "language": "json" @@ -4072,13 +3915,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"description\": \"Changed\",\n\t\"operation\": \"NOT_EXIST\"\n}", + "raw": "{\n\t\"description\": \"{{description}}\",\n\t\"operation\": \"NOT_EXIST\"\n}", "options": { "raw": { "language": "json" @@ -4097,7 +3939,7 @@ "variable": [ { "key": "id", - "value": "5df1668d9194d613400a52ee" + "value": "{{stratetegyid}}" } ] } @@ -4112,13 +3954,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"value\": \"Canada\"\n}", + "raw": "{\n\t\"value\": \"{{value}}\"\n}", "options": { "raw": { "language": "json" @@ -4138,7 +3979,7 @@ "variable": [ { "key": "id", - "value": "5df1668d9194d613400a52ee" + "value": "{{stratetegyid}}" } ] } @@ -4153,13 +3994,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"oldvalue\": \"192.168.0.1\",\n\t\"newvalue\": \"192.168.0.2\"\n}", + "raw": "{\n\t\"oldvalue\": \"{{old_value}}\",\n\t\"newvalue\": \"{{new_value}}\"\n}", "options": { "raw": { "language": "json" @@ -4179,7 +4019,7 @@ "variable": [ { "key": "id", - "value": "5df1668d9194d613400a52ee" + "value": "{{stratetegyid}}" } ] } @@ -4194,13 +4034,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"value\": \"Canada\"\n}", + "raw": "{\n\t\"value\": \"{{value}}\"\n}", "options": { "raw": { "language": "json" @@ -4220,7 +4059,7 @@ "variable": [ { "key": "id", - "value": "5df1668d9194d613400a52ee" + "value": "{{stratetegyid}}" } ] } @@ -4235,13 +4074,12 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n\t\"default\": false\n}", + "raw": "{\n\t\"default\": {{active}}\n}", "options": { "raw": { "language": "json" @@ -4261,7 +4099,7 @@ "variable": [ { "key": "id", - "value": "5e2b7f09b91d810cd037424b" + "value": "{{stratetegyid}}" } ] } @@ -4274,7 +4112,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/configstrategy?env=QA&config=5e0ecebe6f4f994eac9007b3", + "raw": "{{url}}/configstrategy?env={{env_name}}&config={{configid}}", "host": [ "{{url}}" ], @@ -4289,7 +4127,7 @@ }, { "key": "env", - "value": "QA" + "value": "{{env_name}}" }, { "key": "limit", @@ -4303,7 +4141,7 @@ }, { "key": "config", - "value": "5e0ecebe6f4f994eac9007b3" + "value": "{{configid}}" } ] } @@ -4334,7 +4172,7 @@ "variable": [ { "key": "id", - "value": "5deac6fc2d61a41fa0a8478d" + "value": "{{stratetegyid}}" } ] } @@ -4376,7 +4214,7 @@ "variable": [ { "key": "id", - "value": "5de1e309d3162634b832e8a7" + "value": "{{stratetegyid}}" } ] } @@ -4462,7 +4300,7 @@ "variable": [ { "key": "id", - "value": "5df1668d9194d613400a52ee" + "value": "{{stratetegyid}}" } ] } @@ -4487,7 +4325,7 @@ "variable": [ { "key": "id", - "value": "5df1668d9194d613400a52ee" + "value": "{{stratetegyid}}" } ] } @@ -4511,7 +4349,7 @@ "variable": [ { "key": "id", - "value": "5de1e309d3162634b832e8a7" + "value": "{{stratetegyid}}" } ] } @@ -4534,7 +4372,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -4548,7 +4385,7 @@ } }, "url": { - "raw": "{{url}}/metric/data?domainid=5e0ece606f4f994eac9007ae&page=1", + "raw": "{{url}}/metric/data?domainid={{domainid}}&page=1", "host": [ "{{url}}" ], @@ -4559,7 +4396,7 @@ "query": [ { "key": "domainid", - "value": "5e0ece606f4f994eac9007ae", + "value": "{{domainid}}", "description": "required" }, { @@ -4569,7 +4406,7 @@ }, { "key": "key", - "value": "FEATURE01", + "value": "{{switcher_key}}", "disabled": true }, { @@ -4579,7 +4416,7 @@ }, { "key": "component", - "value": "Android", + "value": "{{component_name}}", "disabled": true }, { @@ -4589,27 +4426,27 @@ }, { "key": "group", - "value": "Rollout 2030", + "value": "{{group_name}}", "disabled": true }, { "key": "environment", - "value": "QA", + "value": "{{env_name}}", "disabled": true }, { "key": "dateAfter", - "value": "2020-07-30 23:20:00", + "value": "{{date_after_YYYY-MM-DD HH24:mm:ss}}", "disabled": true }, { "key": "dateBefore", - "value": "2020-07-30 23:22:27", + "value": "{{date_before_YYYY-MM-DD HH24:mm:ss}}", "disabled": true }, { "key": "sortBy", - "value": "result", + "value": "{{sort_by}}", "description": "Can add params separated by ;", "disabled": true } @@ -4629,7 +4466,6 @@ { "key": "Content-Type", "value": "application/json", - "name": "Content-Type", "type": "text" } ], @@ -4643,7 +4479,7 @@ } }, "url": { - "raw": "{{url}}/metric/statistics?domainid=5e0ece606f4f994eac9007ae&statistics=all", + "raw": "{{url}}/metric/statistics?domainid={{domainid}}&statistics=all", "host": [ "{{url}}" ], @@ -4654,7 +4490,7 @@ "query": [ { "key": "domainid", - "value": "5e0ece606f4f994eac9007ae", + "value": "{{domainid}}", "description": "required" }, { @@ -4664,7 +4500,7 @@ }, { "key": "key", - "value": "FEATURE01", + "value": "{{switcher_key}}", "disabled": true }, { @@ -4674,7 +4510,7 @@ }, { "key": "component", - "value": "InventoryWS", + "value": "{{component_name}}", "disabled": true }, { @@ -4684,12 +4520,12 @@ }, { "key": "group", - "value": "Release 1", + "value": "{{group_name}}", "disabled": true }, { "key": "environment", - "value": "QA", + "value": "{{env_name", "disabled": true }, { @@ -4719,7 +4555,7 @@ "method": "DELETE", "header": [], "url": { - "raw": "{{url}}/metric/?domainid=5e0eced36f4f994eac9007b4&key=SWITCHER_KEY", + "raw": "{{url}}/metric/?domainid={{domainid}}&key={{key}}", "host": [ "{{url}}" ], @@ -4730,12 +4566,12 @@ "query": [ { "key": "domainid", - "value": "5e0eced36f4f994eac9007b4", + "value": "{{domainid}}", "description": "required" }, { "key": "key", - "value": "SWITCHER_KEY", + "value": "{{key}}", "description": "required" } ] @@ -4779,7 +4615,7 @@ "variable": [ { "key": "domain", - "value": "" + "value": "{{domainid}}" } ] } @@ -4803,7 +4639,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"team_id\": \"TEAM_ID\",\r\n \"domain_id\": \"DOMAIN_ID\"\r\n}", + "raw": "{\r\n \"team_id\": \"{{slack_teamid}}\",\r\n \"domain_id\": \"{{domainid}}\"\r\n}", "options": { "raw": { "language": "json" @@ -4842,7 +4678,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"team_id\": \"TUW2RH760\",\r\n \"domain_id\": \"DOMAIN_ID\",\r\n \"ticket_content\": {\r\n \"environment\": \"default\",\r\n \"group\": \"Experimental\",\r\n \"switcher\": \"MY_SWITCHER2\",\r\n \"status\": true,\r\n \"observations\": \"Activate\"\r\n }\r\n}", + "raw": "{\r\n \"team_id\": \"{{slack_teamid}}}}\",\r\n \"domain_id\": \"{{domainid}}\",\r\n \"ticket_content\": {\r\n \"environment\": \"{{env_name}}\",\r\n \"group\": \"{{group_name}}\",\r\n \"switcher\": \"{{switcher_key}}\",\r\n \"status\": {{status}},\r\n \"observations\": \"{{observations}}\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -4881,7 +4717,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"team_id\": \"TEAM_ID\",\r\n \"domain_id\": \"DOMAIN_ID\",\r\n \"ticket_content\": {\r\n \"environment\": \"default\",\r\n \"group\": \"Experimental\",\r\n \"switcher\": \"MY_SWITCHER2\",\r\n \"status\": true,\r\n \"observations\": \"Activate\"\r\n }\r\n}", + "raw": "{\r\n \"team_id\": \"{{slack_teamid}}\",\r\n \"domain_id\": \"{{domainid}}\",\r\n \"ticket_content\": {\r\n \"environment\": \"{{env_name}}\",\r\n \"group\": \"{{group_name}}\",\r\n \"switcher\": \"{{switcher_key}}\",\r\n \"status\": {{status}},\r\n \"observations\": \"{{observations}}\"\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -4931,7 +4767,7 @@ } }, "url": { - "raw": "{{url}}/slack/v1/domains?team_id=TEAM_ID", + "raw": "{{url}}/slack/v1/domains?team_id={{slack_teamid}}", "host": [ "{{url}}" ], @@ -4943,7 +4779,7 @@ "query": [ { "key": "team_id", - "value": "TEAM_ID" + "value": "{{slack_teamid}}" } ] } @@ -4967,7 +4803,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"team_id\": \"TEAM_ID\",\r\n \"domain_id\": \"DOMAIN_ID\",\r\n \"ticket_id\": \"665aacd9281e9ee4693db7f9\",\r\n \"approved\": false\r\n}", + "raw": "{\r\n \"team_id\": \"{{slack_teamid}}\",\r\n \"domain_id\": \"{{domainid}}\",\r\n \"ticket_id\": \"{{ticketid}}\",\r\n \"approved\": {{true_false}}\r\n}", "options": { "raw": { "language": "json" @@ -5163,7 +4999,7 @@ }, { "key": "domain", - "value": "5e0ece606f4f994eac9007ae" + "value": "{{domainid}}" } ] } @@ -5195,7 +5031,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [\r\n \"Group Test\"\r\n ],\r\n \"content\": {\r\n \"activated\": false\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [\r\n \"{{group_name}}\"\r\n ],\r\n \"content\": {\r\n \"activated\": {{true_false}}\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5233,7 +5069,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"Group Test\",\r\n \"NEW_SWITCHER_2\"\r\n ],\r\n \"content\": {\r\n \"activated\": false\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\"\r\n ],\r\n \"content\": {\r\n \"activated\": {{true_false}}\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5271,7 +5107,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"Group Test\",\r\n \"NEW_SWITCHER_2\"\r\n ],\r\n \"content\": {\r\n \"relay\": {\r\n \"type\": \"NOTIFICATION\",\r\n \"method\": \"POST\",\r\n \"endpoint\": \"https://localhost:3000\",\r\n \"description\": \"Push message to log\",\r\n \"activated\": true\r\n }\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\"\r\n ],\r\n \"content\": {\r\n \"relay\": {\r\n \"type\": \"NOTIFICATION\",\r\n \"method\": \"POST\",\r\n \"endpoint\": \"{{endpoint}}\",\r\n \"description\": \"{{description}}\",\r\n \"activated\": {{true_false}}\r\n }\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5309,7 +5145,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"STRATEGY\",\r\n \"path\": [\r\n \"New Group\",\r\n \"NEW_SWITCHER_STRATEGY\",\r\n \"VALUE_VALIDATION\"\r\n\r\n ],\r\n \"content\": {\r\n \"values\": [\r\n \"A\",\r\n \"C\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"CHANGED\",\r\n \"diff\": \"STRATEGY\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\",\r\n \"VALUE_VALIDATION\"\r\n\r\n ],\r\n \"content\": {\r\n \"values\": [\r\n \"A\",\r\n \"C\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5347,7 +5183,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [],\r\n \"content\": {\r\n \"name\": \"New Group\",\r\n \"activated\": true\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [],\r\n \"content\": {\r\n \"name\": \"{{group_name}}\",\r\n \"activated\": {{true_false}}\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5385,7 +5221,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [],\r\n \"content\": {\r\n \"name\": \"New Group\",\r\n \"description\": \"New Group Description\",\r\n \"activated\": true,\r\n \"config\": [\r\n {\r\n \"key\": \"NEW_SWITCHER_FROM_GROUP\",\r\n \"description\": \"New Switcher\",\r\n \"activated\": false,\r\n \"components\": [\r\n \"switcher-playground\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [],\r\n \"content\": {\r\n \"name\": \"{{group_name}}\",\r\n \"description\": \"{{description}}\",\r\n \"activated\": {{group_activated}},\r\n \"config\": [\r\n {\r\n \"key\": \"{{switcher_key}}\",\r\n \"description\": \"{{switcher_description}}\",\r\n \"activated\": {{switcher_activated}},\r\n \"components\": [\r\n \"{{component_name}}\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5423,7 +5259,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"New Group\"\r\n ],\r\n \"content\": {\r\n \"key\": \"NEW_SWITCHER_2\",\r\n \"description\": \"New Switcher #2\",\r\n \"activated\": true,\r\n \"components\": [\r\n \"switcher-playground\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"{{group_name}}\"\r\n ],\r\n \"content\": {\r\n \"key\": \"{{switcher_key}}\",\r\n \"description\": \"{{switcher_description}}\",\r\n \"activated\": {{switcher_activated}},\r\n \"components\": [\r\n \"{{component_name}}\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5461,7 +5297,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"New Group\"\r\n ],\r\n \"content\": {\r\n \"key\": \"NEW_SWITCHER_RELAY\",\r\n \"description\": \"New Switcher Relay\",\r\n \"activated\": true,\r\n \"components\": [\r\n \"switcher-playground\"\r\n ],\r\n \"relay\": {\r\n \"type\": \"NOTIFICATION\",\r\n \"method\": \"POST\",\r\n \"endpoint\": \"https://localhost:3000\",\r\n \"description\": \"Push message to log\",\r\n \"activated\": true\r\n }\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"{{group_name}}\"\r\n ],\r\n \"content\": {\r\n \"key\": \"{{switcher_key}}\",\r\n \"description\": \"{{switcher_description}}\",\r\n \"activated\": {{switcher_activated}},\r\n \"components\": [\r\n \"{{component_name}}\"\r\n ],\r\n \"relay\": {\r\n \"type\": \"NOTIFICATION\",\r\n \"method\": \"POST\",\r\n \"endpoint\": \"{{relay_endpoint}}\",\r\n \"description\": \"{{relay_description}}\",\r\n \"activated\": {{relay_activated}}\r\n }\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5499,7 +5335,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"New Group\"\r\n ],\r\n \"content\": {\r\n \"key\": \"NEW_SWITCHER_STRATEGY\",\r\n \"description\": \"New Switcher\",\r\n \"activated\": true,\r\n \"strategies\": [\r\n {\r\n \"strategy\": \"VALUE_VALIDATION\",\r\n \"description\": \"Test Strategy\",\r\n \"operation\": \"EXIST\",\r\n \"activated\": true,\r\n \"values\": [\r\n \"A\",\r\n \"B\"\r\n ]\r\n }\r\n ],\r\n \"components\": [\r\n \"switcher-playground\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"{{group_name}}\"\r\n ],\r\n \"content\": {\r\n \"key\": \"{{switcher_key}}\",\r\n \"description\": \"{{switcher_description}}\",\r\n \"activated\": {{switcher_activated}},\r\n \"strategies\": [\r\n {\r\n \"strategy\": \"VALUE_VALIDATION\",\r\n \"description\": \"{{startegy_description}}\",\r\n \"operation\": \"EXIST\",\r\n \"activated\": true,\r\n \"values\": [\r\n \"A\",\r\n \"B\"\r\n ]\r\n }\r\n ],\r\n \"components\": [\r\n \"{{component_name}}\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5537,7 +5373,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"STRATEGY\",\r\n \"path\": [\r\n \"New Group\",\r\n \"NEW_SWITCHER_STRATEGY\"\r\n ],\r\n \"content\": {\r\n \"strategy\": \"NUMERIC_VALIDATION\",\r\n \"description\": \"Test Strategy\",\r\n \"operation\": \"EQUAL\",\r\n \"activated\": true,\r\n \"values\": [\r\n \"100\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"NEW\",\r\n \"diff\": \"STRATEGY\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\"\r\n ],\r\n \"content\": {\r\n \"strategy\": \"NUMERIC_VALIDATION\",\r\n \"description\": \"{{strategy_description}}\",\r\n \"operation\": \"EQUAL\",\r\n \"activated\": true,\r\n \"values\": [\r\n \"100\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5575,7 +5411,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [\r\n \"New Group\"\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"GROUP\",\r\n \"path\": [\r\n \"{{group_name}}\"\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5613,7 +5449,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"COMPONENT\",\r\n \"path\": [\r\n \"New Group\",\r\n \"NEW_SWITCHER_STRATEGY\"\r\n ],\r\n \"content\": [\r\n \"switcher-playground\"\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"COMPONENT\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\"\r\n ],\r\n \"content\": [\r\n \"{{component_name}}\"\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5651,7 +5487,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"STRATEGY\",\r\n \"path\": [\r\n \"New Group\",\r\n \"NEW_SWITCHER_STRATEGY\",\r\n \"VALUE_VALIDATION\"\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"STRATEGY\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\",\r\n \"VALUE_VALIDATION\"\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5689,7 +5525,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"RELAY\",\r\n \"path\": [\r\n \"New Group\",\r\n \"NEW_SWITCHER_RELAY\"\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"RELAY\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\"\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5727,7 +5563,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"New Group\",\r\n \"NEW_SWITCHER_STRATEGY\"\r\n ]\r\n }\r\n ]\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n \"changes\": [\r\n {\r\n \"action\": \"DELETED\",\r\n \"diff\": \"CONFIG\",\r\n \"path\": [\r\n \"{{group_name}}\",\r\n \"{{switcher_key}}\"\r\n ]\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5771,7 +5607,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n\t\"repository\": \"{{gitops_github_url}}\",\r\n\t\"token\": \"{{gitops_github_pat}}\",\r\n\t\"branch\": \"develop\",\r\n \"path\": \"resources\",\r\n \"environment\": \"default\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\",\r\n\t\t\"name\": \"GitOps\"\r\n\t},\r\n\t\"settings\": {\r\n\t\t\"active\": true,\r\n\t\t\"window\": \"30s\",\r\n\t\t\"forceprune\": true\r\n\t}\t\r\n}", + "raw": "{\r\n\t\"repository\": \"{{gitops_github_url}}\",\r\n\t\"token\": \"{{gitops_github_pat}}\",\r\n\t\"branch\": \"{{branch_name}}\",\r\n \"path\": \"{{path}}\",\r\n \"environment\": \"{{env_name}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\",\r\n\t\t\"name\": \"{{gitops_domain_name}}\"\r\n\t},\r\n\t\"settings\": {\r\n\t\t\"active\": {{active}},\r\n\t\t\"window\": \"30s\",\r\n\t\t\"forceprune\": {{force_prune}}\r\n\t}\t\r\n}", "options": { "raw": { "language": "json" @@ -5810,7 +5646,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\"\r\n\t}\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\"\r\n\t}\r\n}", "options": { "raw": { "language": "json" @@ -5878,7 +5714,7 @@ "method": "GET", "header": [], "url": { - "raw": "{{url}}/gitops/v1/account/{{gitops_domain_id}}?environment=default", + "raw": "{{url}}/gitops/v1/account/{{gitops_domain_id}}?environment={{env_name}}", "host": [ "{{url}}" ], @@ -5891,7 +5727,7 @@ "query": [ { "key": "environment", - "value": "default" + "value": "{{env_name}}" } ] } @@ -5915,7 +5751,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n\t\"repository\": \"{{gitops_github_url}}\",\r\n\t\"branch\": \"develop\",\r\n \"token\": \"{{gitops_github_pat}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\",\r\n\t\t\"name\": \"GitOps\"\r\n\t},\r\n\t\"settings\": {\r\n\t\t\"active\": true,\r\n\t\t\"window\": \"3m\",\r\n\t\t\"forceprune\": true\r\n\t}\t\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n\t\"repository\": \"{{gitops_github_url}}\",\r\n\t\"branch\": \"{{branch}}\",\r\n \"token\": \"{{gitops_github_pat}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\",\r\n\t\t\"name\": \"{{gitops_domain_name}}\"\r\n\t},\r\n\t\"settings\": {\r\n\t\t\"active\": {{active}},\r\n\t\t\"window\": \"3m\",\r\n\t\t\"forceprune\": true\r\n\t}\t\r\n}", "options": { "raw": { "language": "json" @@ -5953,7 +5789,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"token\": \"{{gitops_github_pat}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\"\r\n\t},\r\n \"environments\": [\r\n \"default\"\r\n ]\r\n}", + "raw": "{\r\n \"token\": \"{{gitops_github_pat}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\"\r\n\t},\r\n \"environments\": [\r\n \"{{env_name}}\"\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -5992,7 +5828,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"environment\": \"default\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\"\r\n\t}\r\n}", + "raw": "{\r\n \"environment\": \"{{env_name}}\",\r\n\t\"domain\": {\r\n\t\t\"id\": \"{{gitops_domain_id}}\"\r\n\t}\r\n}", "options": { "raw": { "language": "json" @@ -6033,7 +5869,7 @@ "mode": "graphql", "graphql": { "query": "query Domain(\r\n $_id: String, \r\n $name: String, \r\n $activated: Boolean, \r\n $environment: String, \r\n $_component: String) {\r\n domain(\r\n _id: $_id, \r\n name: $name, \r\n activated: $activated, \r\n environment: $environment,\r\n _component: $_component\r\n ) {\r\n _id\r\n name\r\n version\r\n description\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n activated\r\n group {\r\n _id\r\n name\r\n description\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n config {\r\n _id\r\n key\r\n description\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n strategies {\r\n _id\r\n strategy\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n operation\r\n values\r\n }\r\n relay {\r\n type\r\n method\r\n endpoint\r\n description\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n }\r\n components\r\n }\r\n }\r\n }\r\n}", - "variables": "{\r\n \"_id\": \"5e44eb76916dd10048d72542\",\r\n \"activated\": true,\r\n \"environment\": \"\",\r\n \"_component\": \"\"\r\n}" + "variables": "{\r\n \"_id\": \"{{domainid}}\",\r\n \"activated\": {{activated}},\r\n \"environment\": \"{{env_name}}\",\r\n \"_component\": \"{{component_name}}\"\r\n}" } }, "url": { @@ -6057,7 +5893,7 @@ "mode": "graphql", "graphql": { "query": "query Domain(\r\n $_id: String, \r\n $name: String, \r\n $activated: Boolean, \r\n $environment: String, \r\n $_component: String) {\r\n domain(\r\n _id: $_id, \r\n name: $name, \r\n activated: $activated, \r\n environment: $environment,\r\n _component: $_component\r\n ) {\r\n _id\r\n name\r\n version\r\n description\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n activated\r\n group {\r\n _id\r\n name\r\n description\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n config {\r\n _id\r\n key\r\n description\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n strategies {\r\n _id\r\n strategy\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n operation\r\n values\r\n }\r\n components\r\n }\r\n }\r\n }\r\n}", - "variables": "{\r\n \"name\": \"GitOps\",\r\n \"activated\": true,\r\n \"environment\": \"\",\r\n \"_component\": \"\"\r\n}" + "variables": "{\r\n \"name\": \"{{domain_name}}\",\r\n \"activated\": {{activated}},\r\n \"environment\": \"{{env_name}}\",\r\n \"_component\": \"{{component_name}}\"\r\n}" } }, "url": { @@ -6081,7 +5917,7 @@ "mode": "graphql", "graphql": { "query": "query Configuration(\r\n $domain: String!, \r\n $group: String,\r\n $group_id: String,\r\n $key: String,\r\n $config_id: String,\r\n $slack_team_id: String,\r\n $environment: String) {\r\n configuration(domain: $domain, group: $group, group_id: $group_id, key: $key, config_id: $config_id, slack_team_id: $slack_team_id, environment: $environment) {\r\n domain {\r\n id: _id\r\n name\r\n owner\r\n transfer\r\n activated\r\n integrations {\r\n slack\r\n }\r\n }\r\n group {\r\n _id\r\n name\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n }\r\n config {\r\n _id\r\n key\r\n activated\r\n }\r\n }\r\n}", - "variables": "{\r\n \"domain\": \"\",\r\n \"group\": \"\",\r\n \"group_id\": \"\",\r\n \"key\": \"FEATURE_1\",\r\n \"config_id\": \"\",\r\n \"slack_team_id\": \"\",\r\n \"environment\": \"default\"\r\n}" + "variables": "{\r\n \"domain\": \"{{doaminid}}\",\r\n \"key\": \"{{switcher_key}}\"\r\n}" } }, "url": { @@ -6105,7 +5941,7 @@ "mode": "graphql", "graphql": { "query": "query Configuration(\r\n $domain: String!, \r\n $group: String,\r\n $group_id: String,\r\n $key: String,\r\n $config_id: String,\r\n $slack_team_id: String,\r\n $environment: String) {\r\n configuration(domain: $domain, group: $group, group_id: $group_id, key: $key, config_id: $config_id, slack_team_id: $slack_team_id, environment: $environment) {\r\n domain {\r\n id: _id\r\n name\r\n owner\r\n transfer\r\n activated\r\n integrations {\r\n slack\r\n }\r\n }\r\n group {\r\n _id\r\n name\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n }\r\n config {\r\n _id\r\n key\r\n activated\r\n }\r\n }\r\n}", - "variables": "{\r\n \"domain\": \"\",\r\n \"group\": \"Group 1\",\r\n \"group_id\": \"\",\r\n \"key\": \"\",\r\n \"config_id\": \"\",\r\n \"slack_team_id\": \"\",\r\n \"environment\": \"default\"\r\n}" + "variables": "{\r\n \"domain\": \"{{domainid}}\",\r\n \"group\": \"{{group_name}}\"\r\n}" } }, "url": { @@ -6129,7 +5965,7 @@ "mode": "graphql", "graphql": { "query": "query Configuration(\r\n $domain: String!, \r\n $group: String,\r\n $group_id: String,\r\n $key: String,\r\n $config_id: String,\r\n $slack_team_id: String,\r\n $environment: String) {\r\n configuration(domain: $domain, group: $group, group_id: $group_id, key: $key, config_id: $config_id, slack_team_id: $slack_team_id, environment: $environment) {\r\n domain {\r\n id: _id\r\n name\r\n owner\r\n transfer\r\n activated\r\n integrations {\r\n slack\r\n }\r\n }\r\n group {\r\n _id\r\n name\r\n activated\r\n statusByEnv {\r\n env\r\n value\r\n }\r\n }\r\n config {\r\n _id\r\n key\r\n activated\r\n }\r\n }\r\n}", - "variables": "{\r\n \"domain\": \"\",\r\n \"group\": \"\",\r\n \"group_id\": \"\",\r\n \"key\": \"\",\r\n \"config_id\": \"\",\r\n \"slack_team_id\": \"T123456789\",\r\n \"environment\": \"default\"\r\n}" + "variables": "{\r\n \"domain\": \"{{domainid}}\",\r\n \"slack_team_id\": \"{{slack_team_id}}\"\r\n}" } }, "url": { @@ -6153,7 +5989,7 @@ "mode": "graphql", "graphql": { "query": "query Permission(\r\n $domain: String!, $actions: [String]!, $router: String!, \r\n $parent: String, $environment: String) {\r\n permission(\r\n domain: $domain, \r\n parent: $parent, \r\n actions: $actions,\r\n router: $router,\r\n environment: $environment\r\n ) {\r\n id\r\n name\r\n permissions {\r\n action\r\n result\r\n }\r\n }\r\n}", - "variables": "{\r\n \"domain\": \"\",\r\n \"parent\": \"\",\r\n \"actions\": [\"READ\", \"UPDATE\", \"DELETE\"],\r\n \"router\": \"SWITCHER\",\r\n \"environment\": \"\"\r\n}" + "variables": "{\r\n \"domain\": \"{{domainid}}\",\r\n \"parent\": \"{{groupid}}\",\r\n \"actions\": [\"READ\", \"UPDATE\", \"DELETE\"],\r\n \"router\": \"SWITCHER\",\r\n \"environment\": \"\"\r\n}" } }, "url": { @@ -6177,7 +6013,7 @@ "mode": "graphql", "graphql": { "query": "query Permission(\r\n $domain: String!, $actions: [String]!, $router: String!, \r\n $parent: String, $environment: String) {\r\n permission(\r\n domain: $domain, \r\n parent: $parent, \r\n actions: $actions,\r\n router: $router,\r\n environment: $environment\r\n ) {\r\n id\r\n name\r\n permissions {\r\n action\r\n result\r\n }\r\n }\r\n}", - "variables": "{\r\n \"domain\": \"\",\r\n \"actions\": [\"READ\", \"UPDATE\", \"DELETE\"],\r\n \"router\": \"GROUP\",\r\n \"environment\": \"\"\r\n}" + "variables": "{\r\n \"domain\": \"{{domainid}}\",\r\n \"actions\": [\"READ\", \"UPDATE\", \"DELETE\"],\r\n \"router\": \"GROUP\",\r\n \"environment\": \"{{env_name}}\"\r\n}" } }, "url": { @@ -6206,7 +6042,7 @@ "mode": "graphql", "graphql": { "query": "query Configuration($slack_team_id: String!) {\r\n configuration(slack_team_id: $slack_team_id) {\r\n environments\r\n }\r\n}", - "variables": "{\r\n \"slack_team_id\": \"TEAM_ID\"\r\n}" + "variables": "{\r\n \"slack_team_id\": \"{{slack_team_id}}\"\r\n}" } }, "url": { @@ -6230,7 +6066,7 @@ "mode": "graphql", "graphql": { "query": "query Configuration($slack_team_id: String!, $environment: String) {\r\n configuration(slack_team_id: $slack_team_id, environment: $environment) {\r\n group {\r\n name\r\n activated\r\n }\r\n }\r\n}", - "variables": "{\r\n \"slack_team_id\": \"TEAM_ID\",\r\n \"environment\": \"development\"\r\n}" + "variables": "{\r\n \"slack_team_id\": \"{{slack_team_id}}\",\r\n \"environment\": \"{{env_name}}\"\r\n}" } }, "url": { @@ -6254,7 +6090,7 @@ "mode": "graphql", "graphql": { "query": "query Configuration($slack_team_id: String!, $environment: String, $group: String) {\r\n configuration(slack_team_id: $slack_team_id, environment: $environment, group: $group) {\r\n config {\r\n key\r\n activated\r\n }\r\n }\r\n}", - "variables": "{\r\n \"slack_team_id\": \"TEAM_ID\",\r\n \"group\": \"Group Name\",\r\n \"environment\": \"default\"\r\n}" + "variables": "{\r\n \"slack_team_id\": \"{{slack_team_id}}\",\r\n \"group\": \"{{group_name}}\",\r\n \"environment\": \"{{env_name}}\"\r\n}" } }, "url": { diff --git a/src/api-docs/paths/path-admin.js b/src/api-docs/paths/path-admin.js index 8386b001..24c6e523 100644 --- a/src/api-docs/paths/path-admin.js +++ b/src/api-docs/paths/path-admin.js @@ -18,21 +18,6 @@ export default { } } }, - '/admin/signup/authorization': { - post: { - tags: ['Admin'], - description: 'Admin signup authorization', - parameters: [ - queryParameter('code', 'Authorization code', true) - ], - responses: { - '201': { - description: 'Admin signup authorization', - content: commonSchemaContent('AdminLoginResponse') - } - } - } - }, '/admin/github/auth': { post: { tags: ['Admin'], diff --git a/src/external/sendgrid.js b/src/external/sendgrid.js deleted file mode 100644 index 6c780555..00000000 --- a/src/external/sendgrid.js +++ /dev/null @@ -1,34 +0,0 @@ -import axios from 'axios'; - -export const sendGridApiUrl = 'https://api.sendgrid.com/v3/mail/send'; - -export function sendAuthCode(email, name, code) { - sendMail(email, name, code, process.env.SENDGRID_CONFIRMATION_TEMPLATE); -} - -export function sendAccountRecoveryCode(email, name, code) { - sendMail(email, name, code, process.env.SENDGRID_RECOVERY_TEMPLATE); -} - -function sendMail(email, name, code, template_id) { - if (!process.env.SENDGRID_API_KEY) { - return; - } - - axios.post(sendGridApiUrl, { - from: { email: process.env.SENDGRID_MAIL_FROM }, - personalizations: [{ - to: [{ email }], - dynamic_template_data: { - code, - name - } - }], - template_id - }, { - headers: { - Authorization: `Bearer ${process.env.SENDGRID_API_KEY}`, - 'Content-Type': 'application/json' - } - }); -} \ No newline at end of file diff --git a/src/models/admin.js b/src/models/admin.js index f01636c4..0b871a42 100644 --- a/src/models/admin.js +++ b/src/models/admin.js @@ -28,7 +28,7 @@ const adminSchema = new mongoose.Schema({ active: { type: Boolean, required: true, - default: false + default: true }, teams: [{ type: mongoose.Schema.Types.ObjectId, diff --git a/src/routers/admin.js b/src/routers/admin.js index 0165c52e..91d3790a 100644 --- a/src/routers/admin.js +++ b/src/routers/admin.js @@ -27,15 +27,6 @@ router.post('/admin/signup', [ } }); -router.post('/admin/signup/authorization', async (req, res) => { - try { - const { admin, jwt } = await Services.signUpAuth(req.query.code); - res.status(201).send({ admin, jwt }); - } catch (e) { - responseException(res, e, 400); - } -}); - router.post('/admin/github/auth', async (req, res) => { try { const { admin, jwt } = await Services.signUpGitHub(req.query.code); diff --git a/src/services/admin.js b/src/services/admin.js index 7edb2aa5..b2e28da7 100644 --- a/src/services/admin.js +++ b/src/services/admin.js @@ -2,7 +2,6 @@ import { BadRequestError, NotFoundError } from '../exceptions/index.js'; import { validate_token } from '../external/google-recaptcha.js'; import { getBitBucketToken, getBitBucketUserInfo } from '../external/oauth-bitbucket.js'; import { getGitToken, getGitUserInfo } from '../external/oauth-git.js'; -import { sendAccountRecoveryCode, sendAuthCode } from '../external/sendgrid.js'; import { checkAdmin } from '../external/switcher-api-facade.js'; import Admin from '../models/admin.js'; import Domain from '../models/domain.js'; @@ -27,32 +26,9 @@ export async function getAdmin(where) { export async function signUp(args, remoteAddress) { await checkAdmin(args.email); await validate_token(args.token, remoteAddress); - const admin = new Admin(args); - const code = await admin.generateAuthCode(); - - if (process.env.GOOGLE_SKIP_AUTH == 'true') { - admin.active = true; - } - - await admin.save(); - - sendAuthCode(admin.email, admin.name, code); - return admin; -} - -export async function signUpAuth(code) { - let admin = await Admin.findUserByAuthCode(code, false); - - if (!admin) { - throw new NotFoundError('Account not found'); - } - - admin.active = true; - admin.code = null; - const jwt = await admin.generateAuthToken(); - await admin.save(); - return { admin, jwt }; + const admin = new Admin(args); + return admin.save(); } export async function signUpGitHub(code) { @@ -88,9 +64,8 @@ export async function signIn(email, password) { export async function loginRequestRecovery(email) { const admin = await getAdmin({ email }); if (admin) { - const code = await admin.generateAuthCode(); + await admin.generateAuthCode(); admin.save(); - sendAccountRecoveryCode(admin.email, admin.name, code); } } diff --git a/tests/admin.test.js b/tests/admin.test.js index eb2979ee..7d565172 100644 --- a/tests/admin.test.js +++ b/tests/admin.test.js @@ -64,7 +64,7 @@ describe('Testing Admin insertion', () => { admin: { name: 'New Admin', email: 'new_admin@mail.com', - active: false + active: true } }); @@ -97,52 +97,6 @@ describe('Testing Admin insertion', () => { axiosPostStub.restore(); }); - test('ADMIN_SUITE - Should NOT login before access confirmation sent via Email', async () => { - // given - let admin = await Admin.findById(signedupUser).lean().exec(); - expect(admin).not.toBeNull(); - expect(admin.active).toEqual(false); - - // test - await request(app) - .post('/admin/login') - .send({ - email: admin.email, - password: '12312312312' - }).expect(401); - }); - - test('ADMIN_SUITE - Should confirm access to a new Admin', async () => { - // given - let admin = await Admin.findById(signedupUser).lean().exec(); - expect(admin).not.toBeNull(); - expect(admin.active).toEqual(false); - - // test - await request(app) - .post(`/admin/signup/authorization?code=${admin.code}`) - .send().expect(201); - - // DB validation - document updated - admin = await Admin.findById(signedupUser).lean().exec(); - expect(admin.active).toEqual(true); - }); - - test('ADMIN_SUITE - Should login after access confirmation', async () => { - // given - let admin = await Admin.findById(signedupUser).lean().exec(); - expect(admin).not.toBeNull(); - expect(admin.active).toEqual(true); - - // test - await request(app) - .post('/admin/login') - .send({ - email: admin.email, - password: '12312312312' - }).expect(200); - }); - test('ADMIN_SUITE - Should NOT access routes - Admin not active', async () => { // given let admin = await Admin.findById(signedupUser).exec(); @@ -169,12 +123,6 @@ describe('Testing Admin insertion', () => { await admin.save(); }); - test('ADMIN_SUITE - Should NOT confirm access to a new Admin - Invalid access code', async () => { - await request(app) - .post('/admin/signup/authorization?code=INVALID_CODE') - .send().expect(404); - }); - test('ADMIN_SUITE - Should request password recovery', async () => { // mock axiosPostStub = sinon.stub(axios, 'post'); @@ -1037,7 +985,6 @@ describe('Testing Admin collaboration endpoint - Reading permissions', () => { }); }); - describe('Testing Admin collaboration endpoint', () => { beforeAll(setupDatabase); From 9339aae9d44269c33528470d89e0714b4eafa366 Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Wed, 28 May 2025 19:44:59 -0700 Subject: [PATCH 2/2] chore: bump sonarsource/sonarqube-scan-actio@5.2.0 --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3cb98d61..cdadbb7b 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -56,7 +56,7 @@ jobs: SWITCHER_API_LOGGER: false - name: SonarCloud Scan - uses: sonarsource/sonarqube-scan-action@v5.0.0 + uses: sonarsource/sonarqube-scan-action@v5.2.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}