From a1c0eb3cb0fa1ed81efd40dfa776785ad55a89fb Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 30 Oct 2025 13:04:16 +0530 Subject: [PATCH 1/9] kafka-fix --- src/.env.sample | 4 +++- src/envVariables.js | 5 +++++ src/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/.env.sample b/src/.env.sample index aeea479e..b7c705af 100644 --- a/src/.env.sample +++ b/src/.env.sample @@ -196,4 +196,6 @@ EVENT_TENANT_LISTENER_API='http://interface:3567/scp/v1/tenant/add' #Enable / disable organization event EVENT_ENABLE_ORGANIZATION_EVENTS=true #Event Kafka topic for organization create/update -EVENT_ORGANIZATION_KAFKA_TOPIC='dev.organizationEvent' \ No newline at end of file +EVENT_ORGANIZATION_KAFKA_TOPIC='dev.organizationEvent' +#Service name for health Check +SERVICE_NAME = 'UserService' \ No newline at end of file diff --git a/src/envVariables.js b/src/envVariables.js index 1e8a3208..2fca2daf 100644 --- a/src/envVariables.js +++ b/src/envVariables.js @@ -511,6 +511,11 @@ let enviromentVariables = { optional: true, default: 'x-tenant-code', }, + SERVICE_NAME: { + message: 'Required SERVICE_NAME', + optional: true, + default: 'UserService', + }, } let success = true diff --git a/src/package.json b/src/package.json index 10b60fc5..c6a1d111 100644 --- a/src/package.json +++ b/src/package.json @@ -45,7 +45,7 @@ "elevate-encryption": "^1.0.1", "elevate-logger": "^3.1.0", "elevate-node-cache": "^1.0.6", - "elevate-services-health-check": "^0.0.6", + "elevate-services-health-check": "^0.0.7", "email-validator": "^2.0.4", "express": "^4.17.1", "express-fileupload": "^1.2.1", From 426d472072f11dfaa4262ea8f30d85215f4437e8 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 30 Oct 2025 16:21:04 +0530 Subject: [PATCH 2/9] changed-in-version --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index c6a1d111..dffc58a7 100644 --- a/src/package.json +++ b/src/package.json @@ -45,7 +45,7 @@ "elevate-encryption": "^1.0.1", "elevate-logger": "^3.1.0", "elevate-node-cache": "^1.0.6", - "elevate-services-health-check": "^0.0.7", + "elevate-services-health-check": "^0.0.8", "email-validator": "^2.0.4", "express": "^4.17.1", "express-fileupload": "^1.2.1", From c14aa95d054bca8038666fd5c4a074c5c7d06ee1 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Tue, 11 Nov 2025 11:56:00 +0530 Subject: [PATCH 3/9] adding-version-from-package-file-for-healthCheck --- src/health-checks/health-check.js | 10 +++++++--- src/health-checks/health.config.js | 1 - src/package.json | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/health-checks/health-check.js b/src/health-checks/health-check.js index 747c7259..0be924dc 100644 --- a/src/health-checks/health-check.js +++ b/src/health-checks/health-check.js @@ -9,16 +9,21 @@ const { healthCheckHandler } = require('elevate-services-health-check') const healthCheckConfig = require('./health.config') const { v1: uuidv1 } = require('uuid') +const packageFile = require('../package.json') let health_check = async function (req, res) { try { - const response = await healthCheckHandler(healthCheckConfig, req.query.basicCheck, req.query.serviceName) + const response = await healthCheckHandler( + healthCheckConfig, + req.query.basicCheck, + req.query.serviceName, + packageFile.version + ) res.status(200).json(response) } catch (err) { console.error('Health config validation failed:', err.message || err) res.status(400).json({ id: 'userService.Health.API', - ver: '1.0', ts: new Date(), params: { resmsgid: uuidv1(), @@ -41,7 +46,6 @@ let healthCheckStatus = function (req, res) { let response = function (req, result) { return { id: 'User.service.Health.API', - ver: '1.0', ts: new Date(), params: { resmsgid: uuidv1(), diff --git a/src/health-checks/health.config.js b/src/health-checks/health.config.js index 4d0b1bf2..fcd30d25 100644 --- a/src/health-checks/health.config.js +++ b/src/health-checks/health.config.js @@ -7,7 +7,6 @@ module.exports = { name: process.env.SERVICE_NAME, - version: '1.0.0', checks: { kafka: { enabled: true, diff --git a/src/package.json b/src/package.json index dffc58a7..2507b22e 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "com.shikshalokam.mentoring.userservice", - "version": "1.0.0", + "version": "3.4", "description": "A user service for mentoring capability", "main": "app.js", "bin": { @@ -45,7 +45,7 @@ "elevate-encryption": "^1.0.1", "elevate-logger": "^3.1.0", "elevate-node-cache": "^1.0.6", - "elevate-services-health-check": "^0.0.8", + "elevate-services-health-check": "^0.0.9", "email-validator": "^2.0.4", "express": "^4.17.1", "express-fileupload": "^1.2.1", From e4d1ad8e52c794a586f04e44aaf38708d70de9e5 Mon Sep 17 00:00:00 2001 From: Nevil Mathew Date: Mon, 17 Nov 2025 03:09:25 +0530 Subject: [PATCH 4/9] update: postman collection --- .../MentorED-Users.postman_collection.json | 4122 +++++++++++++++-- 1 file changed, 3638 insertions(+), 484 deletions(-) diff --git a/src/api-doc/MentorED-Users.postman_collection.json b/src/api-doc/MentorED-Users.postman_collection.json index 41305594..d8e946cc 100644 --- a/src/api-doc/MentorED-Users.postman_collection.json +++ b/src/api-doc/MentorED-Users.postman_collection.json @@ -1,9 +1,9 @@ { "info": { - "_postman_id": "372fb1dd-162b-4318-90c3-b67dfbf9e5a0", + "_postman_id": "e58f7535-ddce-4632-96fc-d9c3d5bc7bc0", "name": "MentorED-Users", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "40647259" + "_exporter_id": "21498549" }, "item": [ { @@ -11,18 +11,92 @@ "item": [ { "name": "Create Account", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "/* const apiKey = pm.collectionVariables.get(\"MAILSLURP_KEY\");", + "const inboxId = pm.collectionVariables.get(\"inboxId\");", + "if (!apiKey || !inboxId) throw new Error(\"MAILSLURP_KEY or inboxId missing\");", + "", + "const timeout = 30000; // wait up to 30s for email", + "const url = `https://api.mailslurp.com/inboxes/getLatestEmail?inboxId=${inboxId}&timeoutMillis=${timeout}`;", + "", + "pm.sendRequest({", + " url,", + " method: \"GET\",", + " header: {", + " \"x-api-key\": apiKey,", + " \"Content-Type\": \"application/json\"", + " }", + "}, function (err, res) {", + " if (err) {", + " console.error(err);", + " return;", + " }", + " if (res && res.status === 'OK') {", + " const body = res.json().body || res.json().text || \"\";", + " // extract 6-digit code", + " const m = body.match(/(\\d{6})/);", + " if (m) {", + " pm.collectionVariables.set(\"otp\", m[1]);", + " console.log(\"otp extracted:\", m[1]);", + " } else {", + " console.warn(\"OTP not found in email body\");", + " }", + " } else {", + " console.warn(\"No email found or non-200 status\", res && res.status);", + " }", + "});", + " */" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "const apiKey = pm.collectionVariables.get(\"MAILSLURP_KEY\");", + "const inboxId = pm.collectionVariables.get(\"inboxId\"); // or pm.environment.get(\"inboxId\")", + "", + "if (!apiKey) throw new Error(\"MAILSLURP_KEY missing\");", + "", + "pm.sendRequest({", + " url: `https://api.mailslurp.com/inboxes/${inboxId}`,", + " method: \"DELETE\",", + " header: {", + " \"x-api-key\": apiKey,", + " \"Content-Type\": \"application/json\"", + " }", + "}, function (err, res) {", + " if (err) {", + " console.error(err);", + " return;", + " }", + " console.log(\"Deleted inbox\", inboxId, \"status\", res.status);", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], "request": { "method": "POST", "header": [ { "key": "origin", - "value": "localhost", + "value": "{{origin}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Nevil Mathew\",\n \"email\": \"nevil@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", + "raw": "{\n \"name\": \"Nevil Mathew\",\n \"email\": \"nevil123@tunerlabs.com\",\n \"password\": \"PASSword###11\",\n \"otp\": 123456,\n \"state\": \"6853e0168500f000144a3ea4\",\n \"district\": \"6853e0828500f000144a3ec3\",\n \"block\": \"6853e0bb8500f000144a3f89\",\n \"cluster\": \"6853e0e58500f000144a4bba\",\n \"school\": \"6853e8cd8500f000144ba572\",\n \"registration_code\": \"\",\n \"professional_role\": \"682593bd97b5680013e6a16c\",\n \"professional_subroles\": [\n \"6825a7a597b5680013e841c2\"\n ]\n}", "options": { "raw": { "language": "json" @@ -35,7 +109,315 @@ "path": ["v1", "account", "create"] } }, - "response": [] + "response": [ + { + "name": "Create with phone", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"User Phone\",\n \"phone\": \"1123454786\",\n \"phone_code\": \"+91\",\n \"password\": \"PASSword###11\",\n \"secret_code\": \"sot\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "create"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 19:31:53 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4055" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=496, reset=10" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "6e4d2048-17f7-4e22-8274-5ef3dc2f53db" + }, + { + "key": "etag", + "value": "W/\"fd7-Sdrd8TzWZBcfht5r2KUktc2W9G0\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Sign-up successful, Please wait while logging in.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMDEsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NDcxMywiZXhwIjoxNzQ3MjUxMTEzfQ.1JcUltTp8kvJcZmoogmsX4Rd2Jplpf-uZECfzNaVkUA\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMDEsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NDcxMywiZXhwIjoxNzQ3NzY5NTEzfQ.cmLSNaiY3UPcvfx5XxoFQ_pZCyry60qNRGnly6z4u1s\",\n \"user\": {\n \"id\": 28,\n \"email\": null,\n \"email_verified\": \"false\",\n \"name\": \"User Phone\",\n \"username\": \"userphone_x41gtkigdpreg-\",\n \"phone\": \"1123454786\",\n \"phone_code\": \"+91\",\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T19:31:53.655Z\",\n \"updated_at\": \"2025-05-13T19:31:53.655Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ]\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"6e4d2048-17f7-4e22-8274-5ef3dc2f53db\"\n }\n}" + }, + { + "name": "Create with email", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"User a\",\n \"email\": \"a@sot.com\",\n \"password\": \"PASSword###11\",\n \"secret_code\": \"sot\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "create"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:10:28 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4015" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=498, reset=55" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "3a96f65b-bb9a-4829-a69f-bcdf7d04cdd0" + }, + { + "key": "etag", + "value": "W/\"faf-mx9TTPd3lh1imXhhASssR02fa9c\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Sign-up successful, Please wait while logging in.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOSwibmFtZSI6IlVzZXIgYSIsInNlc3Npb25faWQiOjMyNCwib3JnYW5pemF0aW9uX2lkcyI6WyIxMiJdLCJvcmdhbml6YXRpb25fY29kZXMiOlsic290Il0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjEyLCJuYW1lIjoiU09UIiwiY29kZSI6InNvdCIsImRlc2NyaXB0aW9uIjoiUyBPIFQiLCJzdGF0dXMiOiJBQ1RJVkUiLCJyZWxhdGVkX29yZ3MiOm51bGwsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwibWV0YSI6bnVsbCwiY3JlYXRlZF9ieSI6MSwidXBkYXRlZF9ieSI6bnVsbCwicm9sZXMiOlt7ImlkIjoyMywidGl0bGUiOiJtZW50ZWUiLCJsYWJlbCI6Im1lbnRlZSIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfSx7ImlkIjo0MSwidGl0bGUiOiJsZWFybmVyIiwibGFiZWwiOiJMZWFybmVyIiwidXNlcl90eXBlIjowLCJzdGF0dXMiOiJBQ1RJVkUiLCJvcmdhbml6YXRpb25faWQiOjEwLCJ2aXNpYmlsaXR5IjoiUFVCTElDIiwidGVuYW50X2NvZGUiOiJzaGlrc2hhbG9rYW0iLCJ0cmFuc2xhdGlvbnMiOm51bGx9XX1dfSwiaWF0IjoxNzQ3MTY3MDI4LCJleHAiOjE3NDcyNTM0Mjh9.fvcaXfM4eQq1K8R8RboQFGSzCt3nxhrOEMoVBsVFRWw\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOSwibmFtZSI6IlVzZXIgYSIsInNlc3Npb25faWQiOjMyNCwib3JnYW5pemF0aW9uX2lkcyI6WyIxMiJdLCJvcmdhbml6YXRpb25fY29kZXMiOlsic290Il0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjEyLCJuYW1lIjoiU09UIiwiY29kZSI6InNvdCIsImRlc2NyaXB0aW9uIjoiUyBPIFQiLCJzdGF0dXMiOiJBQ1RJVkUiLCJyZWxhdGVkX29yZ3MiOm51bGwsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwibWV0YSI6bnVsbCwiY3JlYXRlZF9ieSI6MSwidXBkYXRlZF9ieSI6bnVsbCwicm9sZXMiOlt7ImlkIjoyMywidGl0bGUiOiJtZW50ZWUiLCJsYWJlbCI6Im1lbnRlZSIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfSx7ImlkIjo0MSwidGl0bGUiOiJsZWFybmVyIiwibGFiZWwiOiJMZWFybmVyIiwidXNlcl90eXBlIjowLCJzdGF0dXMiOiJBQ1RJVkUiLCJvcmdhbml6YXRpb25faWQiOjEwLCJ2aXNpYmlsaXR5IjoiUFVCTElDIiwidGVuYW50X2NvZGUiOiJzaGlrc2hhbG9rYW0iLCJ0cmFuc2xhdGlvbnMiOm51bGx9XX1dfSwiaWF0IjoxNzQ3MTY3MDI4LCJleHAiOjE3NDc3NzE4Mjh9.juw5DnwELVp-rx8ZOWe_zFvKnU51uHXEx-_2kIlV7aQ\",\n \"user\": {\n \"id\": 29,\n \"email\": \"a@sot.com\",\n \"email_verified\": \"false\",\n \"name\": \"User a\",\n \"username\": \"usera_bremf0p96oruee\",\n \"phone\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T20:10:28.687Z\",\n \"updated_at\": \"2025-05-13T20:10:28.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ]\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"3a96f65b-bb9a-4829-a69f-bcdf7d04cdd0\"\n }\n}" + } + ] + }, + { + "name": "Registration Otp", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "/* // Create MailSlurp inbox and set env vars", + "const apiKey = pm.collectionVariables.get(\"MAILSLURP_KEY\");", + "if (!apiKey) throw new Error(\"Set MAILSLURP_KEY environment variable\");", + "", + "pm.sendRequest({", + " url: \"https://api.mailslurp.com/inboxes\",", + " method: \"POST\",", + " header: {", + " \"x-api-key\": apiKey,", + " \"Content-Type\": \"application/json\"", + " },", + " body: {", + " mode: \"raw\",", + " raw: JSON.stringify({ description: \"temp inbox for signup\" })", + " }", + "}, function (err, res) {", + " if (err) {", + " console.error(err);", + " return;", + " }", + " const json = res.json();", + " pm.collectionVariables.set(\"inboxId\", json.id);", + " pm.collectionVariables.set(\"emailAddress\", json.emailAddress);", + " console.log(\"inboxId\", json.id, \"email\", json.emailAddress);", + "});", + "", + "", + "postman.setNextRequest(\"Create Account\");", + " */" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Nevil\",\n \"email\": \"nevil1234@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/registrationOtp", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "registrationOtp"] + } + }, + "response": [ + { + "name": "Registration Otp with email", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Origin", + "value": "localhost", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"User a\",\n \"email\": \"aaasasaqajaksdanlk@sot.com\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/registrationOtp", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "registrationOtp"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Language", + "value": "en" + }, + { + "key": "X-Request-Ids", + "value": "157c9c1f-2f35-4e46-8cbc-1ea83ddda01e" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "231" + }, + { + "key": "ETag", + "value": "W/\"e7-lbN0qmDK4s2o5fQe2/LrdlSR8cE\"" + }, + { + "key": "Date", + "value": "Wed, 14 May 2025 10:51:59 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"OTP has been sent to your registered email ID. Please enter the otp to complete the registration process.\",\n \"result\": [],\n \"meta\": {\n \"formsVersion\": [],\n \"correlation\": \"157c9c1f-2f35-4e46-8cbc-1ea83ddda01e\"\n }\n}" + } + ] }, { "name": "Login Account", @@ -44,9 +426,1408 @@ "listen": "test", "script": { "exec": [ - "var jsonBody = JSON.parse(responseBody);", + "var jsonBody = pm.response.json();", "pm.environment.set(\"token\", jsonBody.result.access_token);", - "pm.environment.set(\"refresh_token\", jsonBody.result.refresh_token);" + "pm.environment.set(\"refresh_token\", jsonBody.result.refresh_token);", + "", + "pm.test(\"Response content type is application/json\", function () {", + " pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(", + " \"application/json; charset=utf-8\"", + " );", + "});", + "var responseSchema = {", + " type: \"object\",", + " properties: {", + " responseCode: {", + " type: \"string\",", + " },", + " message: {", + " type: \"string\",", + " },", + " result: {", + " type: \"object\",", + " properties: {", + " access_token: {", + " type: \"string\",", + " },", + " refresh_token: {", + " type: \"string\",", + " },", + " user: {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " email: {", + " type: \"string\",", + " },", + " email_verified: {", + " type: \"string\",", + " },", + " name: {", + " type: \"string\",", + " },", + " username: {", + " type: \"string\",", + " },", + " phone: {", + " type: \"string\",", + " },", + " phone_code: {", + " type: \"null\",", + " },", + " location: {", + " type: \"object\",", + " properties: {", + " value: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " },", + " required: [\"value\", \"label\"],", + " },", + " about: {", + " type: \"string\",", + " },", + " share_link: {", + " type: \"string\",", + " },", + " status: {", + " type: \"string\",", + " },", + " image: {", + " type: \"string\",", + " },", + " has_accepted_terms_and_conditions: {", + " type: \"boolean\",", + " },", + " languages: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " value: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " },", + " required: [\"value\", \"label\"],", + " },", + " ],", + " },", + " preferred_language: {", + " type: \"object\",", + " properties: {", + " value: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " },", + " required: [\"value\", \"label\"],", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " meta: {", + " type: \"null\",", + " },", + " created_at: {", + " type: \"string\",", + " },", + " updated_at: {", + " type: \"string\",", + " },", + " deleted_at: {", + " type: \"null\",", + " },", + " organizations: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " name: {", + " type: \"string\",", + " },", + " code: {", + " type: \"string\",", + " },", + " description: {", + " type: \"string\",", + " },", + " status: {", + " type: \"string\",", + " },", + " related_orgs: {", + " type: \"array\",", + " items: {},", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " meta: {", + " type: \"null\",", + " },", + " created_by: {", + " type: \"null\",", + " },", + " updated_by: {", + " type: \"integer\",", + " },", + " roles: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " title: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " user_type: {", + " type: \"integer\",", + " },", + " status: {", + " type: \"string\",", + " },", + " organization_id: {", + " type: \"integer\",", + " },", + " visibility: {", + " type: \"string\",", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " translations: {", + " type: \"null\",", + " },", + " },", + " required: [", + " \"id\",", + " \"title\",", + " \"label\",", + " \"user_type\",", + " \"status\",", + " \"organization_id\",", + " \"visibility\",", + " \"tenant_code\",", + " \"translations\",", + " ],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " title: {", + " type: \"string\",", + " },", + " label: {", + " type: \"null\",", + " },", + " user_type: {", + " type: \"integer\",", + " },", + " status: {", + " type: \"string\",", + " },", + " organization_id: {", + " type: \"integer\",", + " },", + " visibility: {", + " type: \"string\",", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " translations: {", + " type: \"null\",", + " },", + " },", + " required: [", + " \"id\",", + " \"title\",", + " \"label\",", + " \"user_type\",", + " \"status\",", + " \"organization_id\",", + " \"visibility\",", + " \"tenant_code\",", + " \"translations\",", + " ],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " title: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " user_type: {", + " type: \"integer\",", + " },", + " status: {", + " type: \"string\",", + " },", + " organization_id: {", + " type: \"integer\",", + " },", + " visibility: {", + " type: \"string\",", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " translations: {", + " type: \"null\",", + " },", + " },", + " required: [", + " \"id\",", + " \"title\",", + " \"label\",", + " \"user_type\",", + " \"status\",", + " \"organization_id\",", + " \"visibility\",", + " \"tenant_code\",", + " \"translations\",", + " ],", + " },", + " ],", + " },", + " },", + " required: [", + " \"id\",", + " \"name\",", + " \"code\",", + " \"description\",", + " \"status\",", + " \"related_orgs\",", + " \"tenant_code\",", + " \"meta\",", + " \"created_by\",", + " \"updated_by\",", + " \"roles\",", + " ],", + " },", + " ],", + " },", + " identifier: {", + " type: \"string\",", + " },", + " },", + " required: [", + " \"id\",", + " \"email\",", + " \"email_verified\",", + " \"name\",", + " \"username\",", + " \"phone\",", + " \"phone_code\",", + " \"location\",", + " \"about\",", + " \"share_link\",", + " \"status\",", + " \"image\",", + " \"has_accepted_terms_and_conditions\",", + " \"languages\",", + " \"preferred_language\",", + " \"tenant_code\",", + " \"meta\",", + " \"created_at\",", + " \"updated_at\",", + " \"deleted_at\",", + " \"organizations\",", + " \"identifier\",", + " ],", + " },", + " },", + " required: [\"access_token\", \"refresh_token\", \"user\"],", + " },", + " meta: {", + " type: \"object\",", + " properties: {", + " formsVersion: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " ],", + " },", + " correlation: {", + " type: \"string\",", + " },", + " },", + " required: [\"formsVersion\", \"correlation\"],", + " },", + " },", + " required: [\"responseCode\", \"message\", \"result\", \"meta\"],", + "};", + "", + "var response = pm.response.json();", + "pm.test(\"Schema is valid\", function () {", + " pm.expect(tv4.validate(response, responseSchema)).to.be.true;", + "});", + "pm.test(\"Response status is 200 OK\", function () {", + " pm.response.to.have.status(200);", + "});" ], "type": "text/javascript", "packages": {} @@ -58,13 +1839,13 @@ "header": [ { "key": "origin", - "value": "localhost", + "value": "{{origin}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"identifier\": \"nevilmathe_ftwpept_4stxhk\",\n \"password\": \"PASSword###11\"\n}", + "raw": "{\n //\"identifier\": \"{{emailAddress}}\",\n \"identifier\": \"nevil@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", "options": { "raw": { "language": "json" @@ -77,7 +1858,254 @@ "path": ["v1", "account", "login"] } }, - "response": [] + "response": [ + { + "name": "Login with phone", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"1123454786\",\n \"phone_code\":\"+91\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/login", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:13:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4082" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=499, reset=60" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "6340ed53-0029-457f-b872-b5d240a31974" + }, + { + "key": "etag", + "value": "W/\"ff2-/Rka1S+3Om5CC5g2Apr8nhTsqf0\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"User logged in successfully.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjYsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzIxNywiZXhwIjoxNzQ3MjUzNjE3fQ.sbuypdcniz1mBK44GX2FRtjojqyGx0IkrM_69Y28vO0\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjYsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzIxNywiZXhwIjoxNzQ3NzcyMDE3fQ.dxzdstS5JdgJG897pzwHnYgvail05kjBmnoY7Fdjz4s\",\n \"user\": {\n \"id\": 28,\n \"email\": null,\n \"email_verified\": \"false\",\n \"name\": \"User Phone\",\n \"username\": \"userphone_x41gtkigdpreg-\",\n \"phone\": \"6e7718cb6079828bc2e2980f0016f9eb\",\n \"phone_code\": \"+91\",\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T19:31:53.655Z\",\n \"updated_at\": \"2025-05-13T19:31:53.655Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ],\n \"identifier\": \"1123454786\"\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"6340ed53-0029-457f-b872-b5d240a31974\"\n }\n}" + }, + { + "name": "Login With username", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"userphone_x41gtkigdpreg-\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/login", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:14:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4096" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=496, reset=11" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "f8886640-20e7-4676-bb87-13c5848c1ed8" + }, + { + "key": "etag", + "value": "W/\"1000-G5Vc5n867I+KtYgRcbwXNs5InJ4\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"User logged in successfully.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjgsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzI2NiwiZXhwIjoxNzQ3MjUzNjY2fQ.7wV5yAwdVYRiCssP3_lPPhIfOcC7yBDHHDGxgHAPVpo\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjgsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzI2NiwiZXhwIjoxNzQ3NzcyMDY2fQ.bh4BytkLV3xDOu56-DWHshpWJvmpErghDna889FX8Do\",\n \"user\": {\n \"id\": 28,\n \"email\": null,\n \"email_verified\": \"false\",\n \"name\": \"User Phone\",\n \"username\": \"userphone_x41gtkigdpreg-\",\n \"phone\": \"6e7718cb6079828bc2e2980f0016f9eb\",\n \"phone_code\": \"+91\",\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T19:31:53.655Z\",\n \"updated_at\": \"2025-05-13T19:31:53.655Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ],\n \"identifier\": \"userphone_x41gtkigdpreg-\"\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"f8886640-20e7-4676-bb87-13c5848c1ed8\"\n }\n}" + }, + { + "name": "Login With Email", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"user@shikshalokam.com\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/login", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:15:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4577" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=499, reset=60" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "3c0bd341-b4dd-4340-8d0f-340ace421091" + }, + { + "key": "etag", + "value": "W/\"11e1-iWrwHPStib5yka70onv6JbLHEog\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"User logged in successfully.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoxMiwibmFtZSI6IlVzZXIgQSBzaGlrc2hhbG9rYW0iLCJzZXNzaW9uX2lkIjozMjksIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTEiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNsIl0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjExLCJuYW1lIjoiU2hpa3NoYWxva2FtIiwiY29kZSI6InNsIiwiZGVzY3JpcHRpb24iOiJTaGlrc2hhTG9rYW0gaXMgc3RyaXZpbmcgdG8gY3JlYXRlIGEgbmF0aW9uYWwgY29udmVyc2F0aW9uIGFib3V0IGVkdWNhdGlvbiBsZWFkZXJzaGlwIHRoZSB3aGF0IHdoeSBhbmQgaG93IG9mIGl0Iiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzMxNiwiZXhwIjoxNzQ3MjUzNzE2fQ.7aWoNcFTYI8JsVr-6aWOZXTAqnj5SpUtab73b8igCBA\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoxMiwibmFtZSI6IlVzZXIgQSBzaGlrc2hhbG9rYW0iLCJzZXNzaW9uX2lkIjozMjksIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTEiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNsIl0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjExLCJuYW1lIjoiU2hpa3NoYWxva2FtIiwiY29kZSI6InNsIiwiZGVzY3JpcHRpb24iOiJTaGlrc2hhTG9rYW0gaXMgc3RyaXZpbmcgdG8gY3JlYXRlIGEgbmF0aW9uYWwgY29udmVyc2F0aW9uIGFib3V0IGVkdWNhdGlvbiBsZWFkZXJzaGlwIHRoZSB3aGF0IHdoeSBhbmQgaG93IG9mIGl0Iiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzMxNiwiZXhwIjoxNzQ3NzcyMTE2fQ.Kl92B7kNf0YvYAiKJ7ZbKF0o_hFrHzxH1nGqbI-3L80\",\n \"user\": {\n \"id\": 12,\n \"email\": \"95c030f3897cb805da27d1b3f7c6e004c377e4ea658c9a2f494e45df7c2f6b67\",\n \"email_verified\": \"false\",\n \"name\": \"User A shikshalokam\",\n \"username\": \"userashiks_7zamif0hf_b9jg\",\n \"phone\": null,\n \"phone_code\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T11:23:48.687Z\",\n \"updated_at\": \"2025-05-13T11:23:48.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 11,\n \"name\": \"Shikshalokam\",\n \"code\": \"sl\",\n \"description\": \"ShikshaLokam is striving to create a national conversation about education leadership the what why and how of it\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ],\n \"identifier\": \"user@shikshalokam.com\"\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"3c0bd341-b4dd-4340-8d0f-340ace421091\"\n }\n}" + } + ] }, { "name": "Accept Terms & Condition", @@ -86,7 +2114,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -102,26 +2130,21 @@ "name": "Reset Password", "request": { "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "email", - "value": "ankit.s@pacewisdomss.com", - "type": "text" - }, - { - "key": "password", - "value": "test123", - "type": "text" - }, - { - "key": "otp", - "value": "336969", - "type": "text" + "header": [ + { + "key": "Origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"8848355670\",\n \"phone_code\": \"+91\", //optional, required when identifier is a phone number\n \"password\": \"PASSword###111\",\n \"otp\": 774554\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { "raw": "{{UserDevBaseUrl}}user/v1/account/resetPassword", @@ -138,19 +2161,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ - { - "key": "", - "value": "", - "type": "text", - "disabled": true - }, { "key": "refresh_token", "value": "{{refresh_token}}", @@ -172,26 +2189,19 @@ "method": "POST", "header": [ { - "key": "X-auth-token", - "value": " {{token}}", - "type": "text", - "disabled": true + "key": "Origin", + "value": "{{origin}}", + "type": "text" } ], "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "email", - "value": "ankit.s@pacewisdomss.com", - "type": "text" - }, - { - "key": "password", - "value": "\"\"", - "type": "text" + "mode": "raw", + "raw": "{\n \"identifier\": \"nevil@tunerlabs.com\",\n //\"phone_code\":\"+91\", //optional, required when identifier is a phone number\n \"password\": \"PASSword###111\"\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { "raw": "{{UserDevBaseUrl}}user/v1/account/generateOtp", @@ -200,7 +2210,82 @@ }, "description": "To generate and regenerate otp" }, - "response": [] + "response": [ + { + "name": "Generate Otp", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Origin", + "value": "localhost", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"123445678\",\n \"phone_code\":\"+91\",\n \"password\": \"PASSword###111\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/generateOtp", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "generateOtp"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Language", + "value": "en" + }, + { + "key": "X-Request-Ids", + "value": "d18c50ab-9d3c-4aa9-b9b1-373490e727ec" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "221" + }, + { + "key": "ETag", + "value": "W/\"dd-QWC6Spp+Nd2YvDBIj7hIgweMu0A\"" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 17:09:19 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"OTP has been sent to your registered email ID. Please enter the number to update your password.\",\n \"result\": [],\n \"meta\": {\n \"formsVersion\": [],\n \"correlation\": \"d18c50ab-9d3c-4aa9-b9b1-373490e727ec\"\n }\n}" + } + ] }, { "name": "Logout Account", @@ -209,14 +2294,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", - "type": "text", - "disabled": true + "type": "text" } ], "body": { @@ -244,30 +2328,35 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/list?type=mentor&page=1&limit=2&search=p", + "raw": "{{UserDevBaseUrl}}user/v1/account/list?type=mentor", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "account", "list"], "query": [ { "key": "type", - "value": "mentor" + "value": "mentor", + "description": "Required" }, { "key": "page", - "value": "1" + "value": "1", + "disabled": true }, { "key": "limit", - "value": "2" + "value": "100", + "disabled": true }, { "key": "search", - "value": "p" + "value": "p", + "description": "Base64 URL encoded", + "disabled": true } ] } @@ -275,59 +2364,57 @@ "response": [] }, { - "name": "Registration Otp", + "name": "List User with Id", "request": { "method": "POST", "header": [ { "key": "X-auth-token", - "value": " {{token}}", - "type": "text", - "disabled": true + "value": "{{token}}", + "type": "text" } ], "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "email", - "value": "nevil@tunerlabs.com", - "type": "text" - }, + "mode": "raw", + "raw": "{\n \"user_ids\": [\n 4,\n 5,\n 6\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/search?type=ALL&tenant_code=default", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "search"], + "query": [ { - "key": "password", - "value": "testing", - "type": "text" + "key": "type", + "value": "ALL" }, { - "key": "name", - "value": "Nevil", - "type": "text" + "key": "tenant_code", + "value": "default" } ] - }, - "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/registrationOtp", - "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "account", "registrationOtp"] } }, "response": [] }, { - "name": "List User with Id", + "name": "Change Password", "request": { "method": "POST", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"userIds\" : [4,5,6]\n}", + "raw": "{\n \"oldPassword\": \"PASSword###111\",\n \"newPassword\": \"PASSword###11\"\n}", "options": { "raw": { "language": "json" @@ -335,58 +2422,98 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/list", + "raw": "{{UserDevBaseUrl}}user/v1/account/changePassword", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "account", "list"] + "path": ["v1", "account", "changePassword"] } }, "response": [] }, { - "name": "Change Password", + "name": "Delete account", "request": { - "method": "POST", + "method": "DELETE", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "oldPassword", - "value": "password", - "type": "text" - }, - { - "key": "newPassword", - "value": "Password@123", - "type": "text" + "mode": "raw", + "raw": "{\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/changePassword", + "raw": "{{UserDevBaseUrl}}user/v1/account/delete", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "delete"] + } + }, + "response": [] + }, + { + "name": "User sessions", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/sessions?status=ACTIVE&period=1h", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "account", "changePassword"], + "path": ["v1", "account", "sessions"], "query": [ { - "key": "oldPassword", - "value": "password", - "disabled": true + "key": "status", + "value": "ACTIVE" }, { - "key": "newPassword", - "value": "Password@123", - "disabled": true + "key": "period", + "value": "1h", + "description": "Filters results to only those whose started_at occurred within the given duration (e.g., 30m, 1h, 2d)." } ] } }, "response": [] + }, + { + "name": "Validate User session", + "request": { + "method": "POST", + "header": [ + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"token\": \"bearer {{token}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/validateUserSession", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "validateUserSession"] + } + }, + "response": [] } ] }, @@ -395,22 +2522,125 @@ "item": [ { "name": "Read User", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, "request": { "method": "GET", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user", "read"], + "query": [ + { + "key": "language", + "value": "kn", + "disabled": true + } + ] + } + }, + "response": [ + { + "name": "Read User", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user", "read"], + "query": [ + { + "key": "language", + "value": "kn", + "disabled": true + } + ] + } }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:19:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "2657" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "50;w=60" + }, + { + "key": "RateLimit", + "value": "limit=50, remaining=46, reset=7" + }, + { + "key": "ETag", + "value": "W/\"a61-hZxcWpBTuLIcgh9jPjyqUaSRS4s\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Profile fetched successfully.\",\n \"result\": {\n \"id\": \"12\",\n \"email\": \"user@shikshalokam.com\",\n \"email_verified\": \"false\",\n \"name\": \"User A shikshalokam\",\n \"username\": \"userashiks_7zamif0hf_b9jg\",\n \"phone\": null,\n \"phone_code\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T11:23:48.687Z\",\n \"updated_at\": \"2025-05-13T11:23:48.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": \"11\",\n \"name\": \"Shikshalokam\",\n \"code\": \"sl\",\n \"description\": \"ShikshaLokam is striving to create a national conversation about education leadership the what why and how of it\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": \"23\",\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n },\n {\n \"id\": \"41\",\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n }\n ]\n }\n ],\n \"permissions\": [\n {\n \"module\": \"user\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"form\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"cloud-services\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"organization\",\n \"request_type\": [\n \"POST\",\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity-type\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"account\",\n \"request_type\": [\n \"GET\",\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"user-role\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n }\n ],\n \"image_cloud_path\": null\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"d90ad4db-8a17-4bab-9a9f-491856a67657\"\n }\n}" + } + ] + }, + { + "name": "Get user by ID", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ { "key": "internal_access_token", "value": "{{internal_access_token}}", - "type": "text", - "disabled": true + "type": "text" } ], "body": { @@ -418,19 +2648,127 @@ "raw": "" }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/user/read/1", + "raw": "{{UserDevBaseUrl}}user/v1/user/profileById/:id?tenant_code=default", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "user", "read", "1"], + "path": ["v1", "user", "profileById", ":id"], "query": [ { - "key": "language", - "value": "kn", - "disabled": true + "key": "username", + "value": "nevilmathe_ftwpept_4stxhk", + "disabled": true + }, + { + "key": "email", + "value": "nevil@tunerlabs.com", + "disabled": true + }, + { + "key": "phone", + "value": "8848355670", + "disabled": true + }, + { + "key": "phone_code", + "value": "%2B91", + "disabled": true + }, + { + "key": "tenant_code", + "value": "default" + } + ], + "variable": [ + { + "key": "id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Read User", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user", "read"], + "query": [ + { + "key": "language", + "value": "kn", + "disabled": true + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:19:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "2657" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "50;w=60" + }, + { + "key": "RateLimit", + "value": "limit=50, remaining=46, reset=7" + }, + { + "key": "ETag", + "value": "W/\"a61-hZxcWpBTuLIcgh9jPjyqUaSRS4s\"" } - ] + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Profile fetched successfully.\",\n \"result\": {\n \"id\": \"12\",\n \"email\": \"user@shikshalokam.com\",\n \"email_verified\": \"false\",\n \"name\": \"User A shikshalokam\",\n \"username\": \"userashiks_7zamif0hf_b9jg\",\n \"phone\": null,\n \"phone_code\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T11:23:48.687Z\",\n \"updated_at\": \"2025-05-13T11:23:48.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": \"11\",\n \"name\": \"Shikshalokam\",\n \"code\": \"sl\",\n \"description\": \"ShikshaLokam is striving to create a national conversation about education leadership the what why and how of it\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": \"23\",\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n },\n {\n \"id\": \"41\",\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n }\n ]\n }\n ],\n \"permissions\": [\n {\n \"module\": \"user\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"form\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"cloud-services\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"organization\",\n \"request_type\": [\n \"POST\",\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity-type\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"account\",\n \"request_type\": [\n \"GET\",\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"user-role\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n }\n ],\n \"image_cloud_path\": null\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"d90ad4db-8a17-4bab-9a9f-491856a67657\"\n }\n}" } - }, - "response": [] + ] }, { "name": "Update User", @@ -439,13 +2777,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Nevil\",\n \"location\": [\n \"ap\"\n ],\n \"about\": \"This is teswt\",\n \"has_accepted_terms_and_conditions\": true,\n \"image\": \"https://cloudstorage.com/container/abc.png\",\n \"languages\": [\n \"en_in\",\n \"en_in\"\n ]\n}", + "raw": "{\n \"name\": \"NEVIL\",\n \"location\": \"ap\",\n \"about\": \"This is teswt\",\n \"has_accepted_terms_and_conditions\": true,\n \"image\": \"https://cloudstorage.com/container/abc.png\",\n \"state\": \"67037c725fb1cfaa2c13839e\",\n \"roles\": [\n 8\n ],\n \"district\": \"67f4e1933bad83b75d4958e3\",\n \"block\": \"67f4e2197bd713b75309c8b1\",\n \"cluster\": \"67f4e25a3bad83b75d4958e7\",\n \"school\": \"67f4e2fa3bad83b75d4958ef\",\n \"professional_role\": \"67f4e2fa3bad83b75d4958ef\",\n \"professional_subroles\": [\n \"67f4e2fa3bad83b75d4958ef\"\n ]\n}", "options": { "raw": { "language": "json" @@ -470,7 +2808,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -493,7 +2831,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -529,7 +2867,30 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user-role/list", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "list"] + } + }, + "response": [] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", "type": "text" }, { @@ -541,12 +2902,70 @@ ], "body": { "mode": "raw", - "raw": "" + "raw": "{\n \"title\": \"role\",\n \"user_type\": 0,\n \"visibility\": \"PUBLIC\",\n \"label\": \"Session Manager\",\n \"status\": \"ACTIVE\"\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { - "raw": "{{interfaceBaseUrl}}elevate-user/v1/user-role/list", - "host": ["{{interfaceBaseUrl}}elevate-user"], - "path": ["v1", "user-role", "list"] + "raw": "{{UserDevBaseUrl}}user/v1/user-role/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "create"] + } + }, + "response": [] + }, + { + "name": "Update", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"mentee\",\n \"user_type\": 0,\n \"visibility\": \"PUBLIC\",\n \"label\": \"MENTEE\",\n \"status\": \"ACTIVE\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user-role/update/5", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "update", "5"] + } + }, + "response": [] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user-role/delete/177", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "delete", "177"] } }, "response": [] @@ -563,7 +2982,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -591,7 +3010,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -605,9 +3024,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/form/read/1", + "raw": "{{UserDevBaseUrl}}user/v1/form/read", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "form", "read", "1"] + "path": ["v1", "form", "read"] } }, "response": [] @@ -619,13 +3038,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"type\": \"profile\",\n \"sub_type\": \"profileForm\",\n \"data\": {\n \"template_name\": \"defaultTemplate\",\n \"fields\": {\n \"controls\": [\n {\n \"name\": \"name\",\n \"label\": \"Your name\",\n \"value\": \"mentor\",\n \"class\": \"ion-no-margin\",\n \"type\": \"text\",\n \"position\": \"floating\",\n \"placeHolder\": \"Please enter your full name\",\n \"errorMessage\": \"This field can only contain alphabets\",\n \"showValidationError\": true,\n \"validators\": {\n \"required\": true,\n \"pattern\": \"^[^0-9!@#%$&()\\\\-`.+,/\\\"]*$\"\n },\n \"options\": []\n },\n {\n \"name\": \"location\",\n \"label\": \"Select your location\",\n \"value\": [\n {\n \"value\": \"AP\",\n \"label\": \"Andhra Pradesh\"\n }\n ],\n \"class\": \"ion-no-margin\",\n \"type\": \"select\",\n \"position\": \"floating\",\n \"errorLabel\": \"Location\",\n \"errorMessage\": \"Please select your location\",\n \"validators\": {\n \"required\": true\n },\n \"options\": [\n {\n \"value\": \"AP\",\n \"label\": \"Andhra Pradesh\"\n },\n {\n \"value\": \"AR\",\n \"label\": \"Arunachal Pradesh\"\n },\n {\n \"value\": \"As\",\n \"label\": \"Assam\"\n },\n {\n \"value\": \"BR\",\n \"label\": \"Bihar\"\n },\n {\n \"value\": \"CG\",\n \"label\": \"Chhattisgarh\"\n },\n {\n \"value\": \"GA\",\n \"label\": \"Goa\"\n },\n {\n \"value\": \"GJ\",\n \"label\": \"Gujarat\"\n },\n {\n \"value\": \"HR\",\n \"label\": \"Haryana\"\n },\n {\n \"value\": \"HP\",\n \"label\": \"Himachal Pradesh\"\n },\n {\n \"value\": \"JH\",\n \"label\": \"Jharkhand\"\n },\n {\n \"value\": \"KN\",\n \"label\": \"Karnataka\"\n },\n {\n \"value\": \"KL\",\n \"label\": \"Kerala\"\n },\n {\n \"value\": \"MP\",\n \"label\": \"Madhya Pradesh\"\n },\n {\n \"value\": \"MH\",\n \"label\": \"Maharashtra\"\n },\n {\n \"value\": \"MN\",\n \"label\": \"Manipur\"\n },\n {\n \"value\": \"ML\",\n \"label\": \"Meghalaya\"\n },\n {\n \"value\": \"MZ\",\n \"label\": \"Mizoram\"\n },\n {\n \"value\": \"NL\",\n \"label\": \"Nagaland\"\n },\n {\n \"value\": \"OD\",\n \"label\": \"Odisha\"\n },\n {\n \"value\": \"PB\",\n \"label\": \"Punjab\"\n },\n {\n \"value\": \"RJ\",\n \"label\": \"Rajasthan\"\n },\n {\n \"value\": \"SK\",\n \"label\": \"Sikkim\"\n },\n {\n \"value\": \"TN\",\n \"label\": \"Tamil Nadu\"\n },\n {\n \"value\": \"TS\",\n \"label\": \"Telangana\"\n },\n {\n \"value\": \"TR\",\n \"label\": \"Tripura\"\n },\n {\n \"value\": \"UP\",\n \"label\": \"Uttar Pradesh\"\n },\n {\n \"value\": \"UK\",\n \"label\": \"Uttarakhand\"\n },\n {\n \"value\": \"WB\",\n \"label\": \"West Bengal\"\n }\n ]\n },\n {\n \"name\": \"designation\",\n \"label\": \"Your role\",\n \"class\": \"ion-no-margin\",\n \"value\": [\n {\n \"value\": \"teacher\",\n \"label\": \"Teacher\"\n },\n {\n \"value\": \"HM\",\n \"label\": \"Head master\"\n }\n ],\n \"type\": \"chip\",\n \"position\": \"\",\n \"disabled\": false,\n \"showSelectAll\": true,\n \"errorLabel\": \"Designation\",\n \"errorMessage\": \"Enter your role\",\n \"addNewPopupHeader\": \"Add a new role\",\n \"validators\": {\n \"required\": true\n },\n \"showAddOption\": true,\n \"options\": [\n {\n \"value\": \"teacher\",\n \"label\": \"Teacher\"\n },\n {\n \"value\": \"HM\",\n \"label\": \"Head master\"\n },\n {\n \"value\": \"BEO\",\n \"label\": \"Block education officer\"\n },\n {\n \"value\": \"DEO\",\n \"label\": \"District education officer\"\n }\n ]\n },\n {\n \"name\": \"experience\",\n \"label\": \"Your experience in years\",\n \"value\": \"10\",\n \"class\": \"ion-no-margin\",\n \"type\": \"text\",\n \"position\": \"floating\",\n \"placeHolder\": \"Ex. 5 years\",\n \"errorMessage\": \"Enter your experience in years\",\n \"isNumberOnly\": true,\n \"validators\": {\n \"required\": true,\n \"maxLength\": 2\n },\n \"options\": []\n },\n {\n \"name\": \"about\",\n \"label\": \"Tell us about yourself\",\n \"value\": \"mentor\",\n \"class\": \"ion-no-margin\",\n \"type\": \"textarea\",\n \"position\": \"floating\",\n \"errorMessage\": \"This field cannot be empty\",\n \"placeHolder\": \"Please use only 150 character\",\n \"validators\": {\n \"required\": true,\n \"maxLength\": 150\n },\n \"options\": []\n },\n {\n \"name\": \"areasOfExpertise\",\n \"label\": \"Your expertise\",\n \"class\": \"ion-no-margin\",\n \"value\": [\n {\n \"value\": \"eduLdship\",\n \"label\": \"Educational leadership\"\n }\n ],\n \"type\": \"chip\",\n \"position\": \"\",\n \"disabled\": false,\n \"showSelectAll\": true,\n \"errorLabel\": \"Expertise\",\n \"errorMessage\": \"Enter your expertise\",\n \"addNewPopupHeader\": \"Add your expertise\",\n \"validators\": {\n \"required\": true\n },\n \"showAddOption\": true,\n \"options\": [\n {\n \"value\": \"eduLdship\",\n \"label\": \"Educational leadership\"\n },\n {\n \"value\": \"schoolProcess\",\n \"label\": \"School process\"\n }\n ]\n },\n {\n \"name\": \"educationQualification\",\n \"label\": \"Education qualification\",\n \"value\": \"mentor\",\n \"class\": \"ion-no-margin\",\n \"type\": \"text\",\n \"position\": \"floating\",\n \"errorLabel\": \"Education qualification\",\n \"errorMessage\": \"Enter education qualification\",\n \"placeHolder\": \"Ex. BA, B.ED\",\n \"validators\": {\n \"required\": true\n },\n \"options\": []\n },\n {\n \"name\": \"languages\",\n \"label\": \"Languages\",\n \"class\": \"ion-no-margin\",\n \"value\": [\n {\n \"value\": \"english\",\n \"label\": \"English\"\n }\n ],\n \"type\": \"chip\",\n \"position\": \"\",\n \"disabled\": false,\n \"showSelectAll\": true,\n \"errorLabel\": \"Medium\",\n \"errorMessage\": \"Enter language\",\n \"addNewPopupHeader\": \"Add new language\",\n \"validators\": {\n \"required\": true\n },\n \"showAddOption\": true,\n \"options\": [\n {\n \"value\": \"english\",\n \"label\": \"English\"\n },\n {\n \"value\": \"hindi\",\n \"label\": \"Hindi\"\n }\n ]\n }\n ]\n }\n }\n}", + "raw": "{\n \"type\": \"user\",\n \"sub_type\": \"registration\",\n \"data\": {\n \"template_name\": \"defaultTemplate\",\n \"fields\": {\n \"result\": [\n {\n \"hint\": null,\n \"name\": \"firstName\",\n \"type\": \"text\",\n \"label\": \"First Name\",\n \"order\": \"1\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"^(?=.*[a-zA-Z])[a-zA-Z ]+$\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": true,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_FIRST_NAME\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"lastName\",\n \"type\": \"text\",\n \"label\": \"Last Name\",\n \"order\": \"3\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"^(?=.*[a-zA-Z])[a-zA-Z ]+$\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": false,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_LAST_NAME\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"Username\",\n \"type\": \"text\",\n \"label\": \"Username\",\n \"order\": \"3\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": true,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_USERNAME\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"email\",\n \"type\": \"email\",\n \"label\": \"Email\",\n \"order\": \"4\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": null,\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": false,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_EMAIL\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"mobile\",\n \"type\": \"text\",\n \"label\": \"Contact Number\",\n \"order\": \"5\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"^[0-9]{10}$\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": false,\n \"validation\": [\n \"mobile\"\n ],\n \"placeholder\": \"ENTER_CONTACT_NUMBER\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"password\",\n \"type\": \"text\",\n \"label\": \"Password\",\n \"order\": \"6\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": [\n \"password\"\n ],\n \"placeholder\": \"ENTER_PASSWORD\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"confirm_password\",\n \"type\": \"text\",\n \"label\": \"Confirm Password\",\n \"order\": \"6\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": [\n \"password\"\n ],\n \"placeholder\": \"ENTER_CONFIRM_PASSWORD\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"Role\",\n \"type\": \"drop_down\",\n \"label\": \"Role\",\n \"order\": \"7\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": true,\n \"maxSelections\": 1\n }\n },\n {\n \"hint\": null,\n \"name\": \"Sub-Role\",\n \"type\": \"drop_down\",\n \"label\": \"Sub-Role\",\n \"order\": \"8\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": false,\n \"isMultiSelect\": true,\n \"maxSelections\": 10\n }\n },\n {\n \"hint\": null,\n \"name\": \"Udise\",\n \"type\": \"text\",\n \"label\": \"Udise\",\n \"order\": \"9\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"State\",\n \"type\": \"text\",\n \"label\": \"State\",\n \"order\": \"10\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"District\",\n \"type\": \"text\",\n \"label\": \"District\",\n \"order\": \"11\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"Block\",\n \"type\": \"text\",\n \"label\": \"Block\",\n \"order\": \"12\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"Cluster\",\n \"type\": \"text\",\n \"label\": \"Cluster\",\n \"order\": \"13\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"School\",\n \"type\": \"text\",\n \"label\": \"School\",\n \"order\": \"14\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n }\n ],\n \"meta\": {\n \"registration_code\": {\n \"name\": \"District\",\n \"value_ref\": \"external_id\"\n }\n },\n \"context\": \"USERS\",\n \"contextType\": \"LEARNER\"\n }\n }\n\t}", "options": { "raw": { "language": "json" @@ -652,7 +3071,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -663,13 +3082,13 @@ } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getSignedUrl?fileName=laptop1.jpg", + "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getSignedUrl?fileName=27-oct-bulkupload.csv", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "cloud-services", "file", "getSignedUrl"], "query": [ { "key": "fileName", - "value": "laptop1.jpg" + "value": "27-oct-bulkupload.csv" } ] } @@ -683,7 +3102,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -694,13 +3113,13 @@ } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getDownloadableUrl?filePath=users/2-1695710833829-user_creation.csv", + "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getDownloadableUrl?filePath=users/59-1747832592343-samplecsvlocal.csv", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "cloud-services", "file", "getDownloadableUrl"], "query": [ { "key": "filePath", - "value": "users/2-1695710833829-user_creation.csv" + "value": "users/59-1747832592343-samplecsvlocal.csv" } ] } @@ -714,7 +3133,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -744,14 +3163,14 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/admin/deleteUser/1", + "raw": "{{UserDevBaseUrl}}user/v1/admin/deleteUser/40", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "admin", "deleteUser", "1"] + "path": ["v1", "admin", "deleteUser", "40"] } }, "response": [] @@ -769,7 +3188,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"system\",\n \"email\": \"system@admin.com\",\n \"password\": \"testing\",\n \"secret_code\": \"W5bF7gesuS0xsNWmpsKy\"\n}", + "raw": "{\n \"name\": \"system\",\n \"email\": \"system@admin.com\",\n \"password\": \"PASSword###11\",\n \"secret_code\": \"W5bF7gesuS0xsNWmpsKy\"\n}", "options": { "raw": { "language": "json" @@ -795,16 +3214,23 @@ "var jsonBody = JSON.parse(responseBody);", "pm.environment.set(\"token\", jsonBody.result.access_token);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Origin", + "value": "default-qa.tekdinext.com", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"email\":\"system@admin.com\",\n \"password\":\"testing\"\n}", + "raw": "{\n \"identifier\": \"nevil@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", "options": { "raw": { "language": "json" @@ -826,13 +3252,18 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"email\": \"suman@cc.com\",\n \"organization_id\": 1\n}", + "raw": "{\n \"identifier\": \"bracadmin2025@yopmail.com\", //or \"user_id\": \"3\",\n \"organization_id\":58\n}", "options": { "raw": { "language": "json" @@ -848,13 +3279,18 @@ "response": [] }, { - "name": "Deactivate Org", + "name": "Deactivate Organisation", "request": { "method": "POST", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", "type": "text" } ], @@ -868,9 +3304,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/admin/deactivateOrg/2", + "raw": "{{UserDevBaseUrl}}user/v1/admin/deactivateOrg/gxs", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "admin", "deactivateOrg", "2"], + "path": ["v1", "admin", "deactivateOrg", "gxs"], "query": [ { "key": "status", @@ -881,6 +3317,96 @@ } }, "response": [] + }, + { + "name": "Raw query", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"query\": \"SELECT * FROM users u INNER JOIN user_organization_roles ur ON u.id = ur.user_id AND u.tenant_code = ur.tenant_code WHERE u.id > 1 AND u.tenant_code = 'default'\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/admin/executeRawQuery", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "admin", "executeRawQuery"], + "query": [ + { + "key": "page", + "value": "", + "disabled": true + }, + { + "key": "limit", + "value": "", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Assign role to a user", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_id\": 2,\n \"role_id\": 7\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/admin/assignRole", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "admin", "assignRole"], + "query": [ + { + "key": "page", + "value": "", + "disabled": true + }, + { + "key": "limit", + "value": "", + "disabled": true + } + ] + } + }, + "response": [] } ] }, @@ -927,6 +3453,42 @@ }, "response": [] }, + { + "name": "Org details", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "x-auth-token", + "value": "{{token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/details/1", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "details", "1"], + "query": [ + { + "key": "organisation_code", + "value": "ls", + "disabled": true + } + ] + } + }, + "response": [] + }, { "name": "Create Organization", "request": { @@ -940,13 +3502,13 @@ }, { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"orgrr\",\n \"code\": \"mentor112\",\n \"description\": \"testing org\",\n \"domains\": [\"cc.com\"]\n}", + "raw": "{\n \"name\": \"New organization\",\n \"code\": \"neworgs\",\n \"description\": \"Description\",\n \"tenant_code\": \"shikshalokam\",\n \"registration_codes\": [\n \"neworgdatas\"\n ],\n \"domains\": [\n \"neworg.org\"\n ]\n}", "options": { "raw": { "language": "json" @@ -968,13 +3530,69 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"MentorEd\",\n \"description\": \"Organisation of the default tenant\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/update/1", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "update", "1"] + } + }, + "response": [] + }, + { + "name": "addRelatedOrg", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"related_orgs\": [\n 41\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/addRelatedOrg/1", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "addRelatedOrg", "1"] + } + }, + "response": [] + }, + { + "name": "Remove realated orgs", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"MentorEd\",\n \"description\": \"testing org\",\n \"related_orgs\": [\n 3,\n 4\n ]\n}", + "raw": "{\n \"related_orgs\": [\n 41\n ]\n}", "options": { "raw": { "language": "json" @@ -982,9 +3600,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/organization/update/1", + "raw": "{{UserDevBaseUrl}}user/v1/organization/removeRelatedOrg/1", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "organization", "update", "1"] + "path": ["v1", "organization", "removeRelatedOrg", "1"] } }, "response": [] @@ -996,12 +3614,17 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "default", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/organization/list?page=1&limit=10", + "raw": "{{UserDevBaseUrl}}user/v1/organization/list?page=1&limit=10&tenant_code", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "organization", "list"], "query": [ @@ -1012,6 +3635,10 @@ { "key": "limit", "value": "10" + }, + { + "key": "tenant_code", + "value": null } ] } @@ -1025,7 +3652,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1045,6 +3672,64 @@ } }, "response": [] + }, + { + "name": "Add registration code", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"registration_codes\": [\n \"abBang\",\n \"puducherry\",\n \"mys\"\n ],\n \"tenant_code\": \"shikshagraha\" //only valid for admin roles, else tenant is identified from token\n}" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/addRegistrationCode", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "addRegistrationCode"] + } + }, + "response": [] + }, + { + "name": "Remove registration code", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"registration_codes\": [\n \"abBang\",\n \"puducherry\",\n \"mys\"\n ],\n \"tenant_code\": \"shikshagraha\" //only valid for admin roles, else tenant is identified from token\n}" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/removeRegistrationCode", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "removeRegistrationCode"] + } + }, + "response": [] } ] }, @@ -1058,13 +3743,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"ml\",\n \"label\": \"Malayalam\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 1\n}", + "raw": "{\n \"value\": \"ml\",\n \"label\": \"Malayalam\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 50\n}", "options": { "raw": { "language": "json" @@ -1087,13 +3772,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"hm\",\n \"label\": \"malayalam\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 1\n}", + "raw": "", "options": { "raw": { "language": "json" @@ -1101,16 +3786,58 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity/read?read_user_entity=true", + "raw": "{{UserDevBaseUrl}}user/v1/entity/read?value=ml&entity_type_id=44", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "entity", "read"], "query": [ + { + "key": "value", + "value": "ml", + "description": "User value or id" + }, + { + "key": "entity_type_id", + "value": "44" + }, { "key": "id", - "value": "2", - "description": "User value or id", + "value": "1115", "disabled": true - }, + } + ] + }, + "description": "NOTE: Pass type as roles/designation/expertise etc. whatever types needs to be created" + }, + "response": [] + }, + { + "name": "Entity list", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/entity/list?entity_type_id=12", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "entity", "list"], + "query": [ { "key": "value", "value": "ml", @@ -1118,9 +3845,13 @@ "disabled": true }, { - "key": "read_user_entity", - "value": "true", - "description": "use this param to get all entities, including user created entities." + "key": "id", + "value": "1115", + "disabled": true + }, + { + "key": "entity_type_id", + "value": "12" } ] }, @@ -1135,13 +3866,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"english\",\n \"label\": \"English\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 1\n}", + "raw": "{\n \"label\": \"English UUS\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\"\n}", "options": { "raw": { "language": "json" @@ -1149,9 +3880,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity/update/1", + "raw": "{{UserDevBaseUrl}}user/v1/entity/update/3", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "entity", "update", "1"] + "path": ["v1", "entity", "update", "3"] }, "description": "NOET: All body req parameters are optional to update." }, @@ -1164,14 +3895,14 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity/delete/1", + "raw": "{{UserDevBaseUrl}}user/v1/entity/delete/1117", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "entity", "delete", "1"] + "path": ["v1", "entity", "delete", "1117"] } }, "response": [] @@ -1188,13 +3919,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"ln\",\n \"label\": \"Languages\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"data_type\": \"STRING\"\n}", + "raw": "{\n \"value\": \"ln\",\n \"label\": \"Languages\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"model_names\": [\n \"User\"\n ],\n \"data_type\": \"STRING\"\n}", "options": { "raw": { "language": "json" @@ -1217,7 +3948,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1237,7 +3968,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1283,13 +4014,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"roles\",\n \"label\": \"RolesV\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"data_type\": \"string\"\n}", + "raw": "{\n \"value\": \"ln\",\n \"label\": \"BAASA\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"model_names\": [\n \"User\"\n ],\n \"data_type\": \"STRING\"\n}", "options": { "raw": { "language": "json" @@ -1297,9 +4028,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity-type/update/1", + "raw": "{{UserDevBaseUrl}}user/v1/entity-type/update/64", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "entity-type", "update", "1"] + "path": ["v1", "entity-type", "update", "64"] }, "description": "NOET: All body req parameters are optional to update." }, @@ -1312,7 +4043,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1358,7 +4089,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}" + "value": "bearer {{token}}" }, { "key": "", @@ -1396,7 +4127,8 @@ "listen": "test", "script": { "exec": [""], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1405,7 +4137,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1414,7 +4146,7 @@ "formdata": [ { "key": "file_path", - "value": "org-admin/test.csv", + "value": "users/59-1747832592343-samplecsvlocal.csv", "type": "text" } ] @@ -1434,7 +4166,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1467,14 +4199,14 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/org-admin/getRequestDetails/1", + "raw": "{{UserDevBaseUrl}}user/v1/org-admin/getRequestDetails/5", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "org-admin", "getRequestDetails", "1"] + "path": ["v1", "org-admin", "getRequestDetails", "5"] } }, "response": [] @@ -1486,13 +4218,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"id\": [1,2]\n}", + "raw": "{\n \"emails\": [\n \"nevilab@shikshalokam.org\"\n ],\n \"ids\": [\n 55\n ]\n}", "options": { "raw": { "language": "json" @@ -1526,7 +4258,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -1559,7 +4291,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -1570,7 +4302,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"request_id\": 1,\n\t\"comments\": [\"All uploaded documents verified\", \"Profile information verified\"],\n\t\"status\": \"APPROVED\"\n}\n" + "raw": "{\n \"request_id\": 5,\n \"comments\": [\n \"All uploaded documents verified\",\n \"Profile information verified\"\n ],\n \"status\": \"APPROVED\"\n}" }, "url": { "raw": "{{UserDevBaseUrl}}user/v1/org-admin/updateRequestStatus", @@ -1587,7 +4319,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}" }, { "key": "Content-Type", @@ -1596,12 +4328,12 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"entity_type_value\": \"categories\",\n\t\"target_entity_type_label\": \"training\"\n}" + "raw": "{\n\t\"entity_type_value\": \"languages\",\n\t\"target_entity_type_label\": \"Languages\"\n}" }, "url": { - "raw": "{{MentoringBaseUrl}}/mentoring/v1/org-admin/inheritEntityType", - "host": ["{{MentoringBaseUrl}}"], - "path": ["mentoring", "v1", "org-admin", "inheritEntityType"] + "raw": "{{UserDevBaseUrl}}user/v1/org-admin/inheritEntityType", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "org-admin", "inheritEntityType"] } }, "response": [] @@ -1613,7 +4345,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}" }, { "key": "Content-Type", @@ -1630,8 +4362,8 @@ } }, "url": { - "raw": "{{interfaceBaseUrl}}user/v1/org-admin/updateUser/157", - "host": ["{{interfaceBaseUrl}}user"], + "raw": "{{UserDevBaseUrl}}user/v1/org-admin/updateUser/157", + "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "org-admin", "updateUser", "157"] } }, @@ -1649,7 +4381,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -1680,7 +4412,85 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/notification/template/?type=email&code=invitee_upload_status", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "notification", "template", ""], + "query": [ + { + "key": "type", + "value": "email" + }, + { + "key": "code", + "value": "invitee_upload_status" + } + ] + } + }, + "response": [] + }, + { + "name": "Read Notification Templates with ID", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/notification/template/:id", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "notification", "template", ":id"], + "variable": [ + { + "key": "id", + "value": "20" + } + ] + } + }, + "response": [] + }, + { + "name": "Read all Notification Templates Copy", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", "type": "text" } ], @@ -1694,9 +4504,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/notification/template/14", + "raw": "{{UserDevBaseUrl}}user/v1/notification/template", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "notification", "template", "14"] + "path": ["v1", "notification", "template"] } }, "response": [] @@ -1708,13 +4518,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"type\" : \"email\",\n \"code\": \"tl-email-invite\",\n \"subject\": \"Hi Welcome Back We missed You\" ,\n \"body\": \"

Dear User,

Welcome back to mentorEd\",\n \"email_header\": \"email_header\",\n \"email_footer\":\"email_footer\"\n}", + "raw": " {\n \"id\": 8,\n \"type\": \"emailHeader\",\n \"code\": \"email_header\",\n \"subject\": null,\n \"body\": \"

Shiksha

\",\n \"status\": \"ACTIVE\",\n \"email_header\": null,\n \"email_footer\": null,\n \"created_by\": null,\n \"updated_by\": null,\n \"tenant_code\": \"default\",\n \"organization_code\": \"default_code\",\n \"created_at\": \"2025-05-08T11:43:06.000Z\",\n \"updated_at\": \"2025-05-08T11:43:06.000Z\",\n \"deleted_at\": null\n }", "options": { "raw": { "language": "json" @@ -1722,9 +4532,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/notification/template/14", + "raw": "{{UserDevBaseUrl}}user/v1/notification/template/8", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "notification", "template", "14"] + "path": ["v1", "notification", "template", "8"] } }, "response": [] @@ -1741,12 +4551,12 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/user-role/list?page=1&limit=10&search=system&organization_id=1&language=kn", + "raw": "{{UserDevBaseUrl}}user/v1/user-role/list?page=1&limit=100&status=ACTIVE", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "user-role", "list"], "query": [ @@ -1756,19 +4566,16 @@ }, { "key": "limit", - "value": "10" + "value": "100" }, { "key": "search", - "value": "system" - }, - { - "key": "organization_id", - "value": "1" + "value": "system", + "disabled": true }, { "key": "user_type", - "value": "2", + "value": "1", "disabled": true }, { @@ -1778,12 +4585,12 @@ }, { "key": "status", - "value": "ACTIVE", - "disabled": true + "value": "ACTIVE" }, { "key": "language", - "value": "kn" + "value": "kn", + "disabled": true } ] } @@ -1791,13 +4598,13 @@ "response": [] }, { - "name": "Default List User Roles", + "name": "[DEPRECATED]Default List User Roles", "request": { "method": "GET", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1850,13 +4657,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{ \n\"id\":\"12\",\n\"title\":\"head_master\", \n\"label\":\"Head Master\",\n\"user_type\": 1, \n \"meta\": {\n \"entityTypes\" : [ \n {\n \"entityTypeId\" : \"5f32d8228e0dc8312404056e\", \n \"entityType\" : \"state\" \n }\n ]\n },\n\"status\":\"ACTIVE\", \n\"visibility\":\"PUBLIC\",\n \"translations\" : {\n \"hi\" : {\n \"title\" : \"हेड मास्टर\"\n },\n \"kn\" : {\n \"title\" : \"ಹೆಡ್ ಮಾಸ್ಟರ್\"\n },\n \"te\" : {\n \"title\" : \"హెడ్ ​​మాస్టర్\"\n },\n \"bn\" : {\n \"title\" : \"হেড মাস্টার\"\n },\n \"gu\" : {\n \"title\" : \"હેડ માસ્તર\"\n },\n \"ta\" : {\n \"title\" : \"தலைமை ஆசிரியர்\"\n },\n \"pa\" : {\n \"title\" : \"ਹੈੱਡ ਮਾਸਟਰ\"\n },\n \"ml\" : {\n \"title\" : \"ഹെഡ് മാസ്റ്റർ\"\n },\n \"mr\" : {\n \"title\" : \"मुख्याध्यापक\"\n },\n \"ur\" : {\n \"title\" : \"ہیڈ ماسٹر\"\n },\n \"or\" : {\n \"title\" : \"ହେଡ୍ ମାଷ୍ଟର |\"\n }\n }\n} ", + "raw": "{\n \"title\": \"session_manager\",\n \"user_type\": 0,\n \"visibility\": \"PUBLIC\",\n \"label\": \"Session Manager\",\n \"status\": \"ACTIVE\"\n}", "options": { "raw": { "language": "json" @@ -1878,13 +4685,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{ \n\"id\":\"12\",\n\"title\":\"head_master\", \n\"label\":\"Head Master\",\n\"user_type\": 1, \n \"meta\": {\n \"entityTypes\" : [ \n {\n \"entityTypeId\" : \"5f32d8228e0dc8312404056e\", \n \"entityType\" : \"state\" \n }\n ]\n },\n\"status\":\"ACTIVE\", \n\"visibility\":\"PUBLIC\",\n \"translations\" : {\n \"hi\" : {\n \"title\" : \"हेड मास्टर\"\n },\n \"kn\" : {\n \"title\" : \"ಹೆಡ್ ಮಾಸ್ಟರ್\"\n },\n \"te\" : {\n \"title\" : \"హెడ్ ​​మాస్టర్\"\n },\n \"bn\" : {\n \"title\" : \"হেড মাস্টার\"\n },\n \"gu\" : {\n \"title\" : \"હેડ માસ્તર\"\n },\n \"ta\" : {\n \"title\" : \"தலைமை ஆசிரியர்\"\n },\n \"pa\" : {\n \"title\" : \"ਹੈੱਡ ਮਾਸਟਰ\"\n },\n \"ml\" : {\n \"title\" : \"ഹെഡ് മാസ്റ്റർ\"\n },\n \"mr\" : {\n \"title\" : \"मुख्याध्यापक\"\n },\n \"ur\" : {\n \"title\" : \"ہیڈ ماسٹر\"\n },\n \"or\" : {\n \"title\" : \"ହେଡ୍ ମାଷ୍ଟର |\"\n }\n }\n} ", + "raw": "{\n \"title\": \"mentee\",\n \"label\": \"Mentee ROLE\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"visibility\": \"PUBLIC\",\n \"translations\": null\n}", "options": { "raw": { "language": "json" @@ -1898,7 +4705,7 @@ "variable": [ { "key": "id", - "value": "10" + "value": "5" } ] } @@ -1912,92 +4719,20 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/user-role/delete/:id", - "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "user-role", "delete", ":id"], - "variable": [ - { - "key": "id", - "value": "7" - } - ] - } - }, - "response": [] - }, - { - "name": "Create User Roles", - "request": { - "method": "POST", - "header": [ - { - "key": "X-auth-token", - "value": " {{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n\"title\": \"test_role\",\n\"user_type\": 1,\n\"status\": \"ACTIVE\",\n\"visibility\": \"PUBLIC\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{UserDevBaseUrl}}elevate-user/v1/user-role/create", - "host": ["{{UserDevBaseUrl}}elevate-user"], - "path": ["v1", "user-role", "create"] - } - }, - "response": [] - }, - { - "name": "Update User Roles", - "request": { - "method": "POST", - "header": [ - { - "key": "X-auth-token", - "value": " {{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"title\": \"test_role_one_updated\",\n \"user_type\": 1,\n \"visibility\": \"PUBLIC\",\n \"status\": \"ACTIVE\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{UserDevBaseUrl}}elevate-user/v1/user-role/update/13", - "host": ["{{UserDevBaseUrl}}elevate-user"], - "path": ["v1", "user-role", "update", "13"] - } - }, - "response": [] - }, - { - "name": "Delete User Roles", - "request": { - "method": "DELETE", - "header": [ - { - "key": "X-auth-token", - "value": " {{token}}" - } - ], - "url": { - "raw": "{{UserDevBaseUrl}}elevate-user/v1/user-role/delete/13", - "host": ["{{UserDevBaseUrl}}elevate-user"], - "path": ["v1", "user-role", "delete", "13"] + "raw": "{{UserDevBaseUrl}}user/v1/user-role/delete/:id", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "delete", ":id"], + "variable": [ + { + "key": "id", + "value": "7" + } + ] } }, "response": [] @@ -2017,7 +4752,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2045,7 +4780,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2084,7 +4819,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2119,7 +4854,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2150,7 +4885,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2178,7 +4913,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2220,7 +4955,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2253,7 +4988,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2284,7 +5019,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -2318,13 +5053,293 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"permission_id\" : 1\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}mentoring/v1/role-permission-mapping/delete/:role_id", + "host": ["{{UserDevBaseUrl}}mentoring"], + "path": ["v1", "role-permission-mapping", "delete", ":role_id"], + "variable": [ + { + "key": "role_id", + "value": "5" + } + ] + } + }, + "response": [] + }, + { + "name": "List RolePermission", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "bearer {{token}}", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}mentoring/v1/role-permission-mapping/list", + "host": ["{{UserDevBaseUrl}}mentoring"], + "path": ["v1", "role-permission-mapping", "list"] + } + }, + "response": [] + } + ] + }, + { + "name": "Public", + "item": [ + { + "name": "Branding", + "request": { + "method": "GET", + "header": [ + { + "key": "Origin", + "value": "{{origin}}", + "type": "text", + "disabled": true + }, + { + "key": "x-tenant-code", + "value": "shikshalokam", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/public/branding", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "public", "branding"], + "query": [ + { + "key": "org_code", + "value": "default_code", + "description": "Optional", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Check username", + "request": { + "method": "GET", + "header": [ + { + "key": "Origin", + "value": "{{origin}}", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/public/checkUsername?username=nevil_ngrcbhcfke-k1x", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "public", "checkUsername"], + "query": [ + { + "key": "username", + "value": "nevil_ngrcbhcfke-k1x" + } + ] + } + }, + "response": [] + }, + { + "name": "User Invite", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Origin", + "value": "{{origin}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"permission_id\" : 1\n}", + "raw": "{\n \"tenant_code\": \"default\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/public/userInvites?invitation_key", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "public", "userInvites"], + "query": [ + { + "key": "invitation_key", + "value": null + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Tenant", + "item": [ + { + "name": "Tenant Create or Update", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "origin", + "value": "https://dev.elevate-mentoring.shikshalokam.org" + }, + { + "key": "X-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"shikshagraha\",\n \"description\": \"ShikshaLokam\",\n \"logo\": \"https:\",\n \"theming\": {},\n \"meta\": {\n \"test\": \"2341\",\n \"eee\": {\n \"sss\": 123,\n \"array\": [\n {\n \"abc\": \"1232\"\n }\n ]\n }\n },\n \"domains\": \"shikshalokam-qa.tekdinext.com\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/tenant/update/dummy", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "tenant", "update", "dummy"] + }, + "description": "Generated from cURL: curl --location 'https://saas-qa.tekdinext.com/user/v1/tenant/update' \\\n--header 'Content-Type: application/json' \\\n--header 'origin: https://dev.elevate-mentoring.shikshalokam.org' \\\n--header 'X-auth-token: bearer {{token}}' \\\n--data '{\n \"name\": \"Test\",\n \"code\": \"test\",\n \"description\": \"Test domain\",\n \"logo\": \"\",\n \"theming\": {},\n \"meta\": {},\n \"domains\": \"https://test.123.domain.com\"\n}'" + }, + "response": [] + }, + { + "name": "Tenant add domain", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "origin", + "value": "https://dev.elevate-mentoring.shikshalokam.org", + "disabled": true + }, + { + "key": "X-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"domains\": [\n \"https://test.2.domain.com\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/tenant/addDomain/shikshagraha", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "tenant", "addDomain", "shikshagraha"] + } + }, + "response": [] + }, + { + "name": "Bulk User Create", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "X-auth-token", + "value": "{{token}}" + }, + { + "key": "tenant", + "value": "shikshagraha", + "disabled": true + }, + { + "key": "organization", + "value": "sot", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"file_path\": \"users/1-1761570904451-users/1-1756128403580-27-oct-bulkupload.csv\",\n \"upload_type\": \"upload\"\n}" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/tenant/bulkUserCreate", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "tenant", "bulkUserCreate"] + } + }, + "response": [] + }, + { + "name": "Tenant remove Domain", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "origin", + "value": "https://dev.elevate-mentoring.shikshalokam.org", + "disabled": true + }, + { + "key": "X-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"domains\": [\n \"new.domain.scd\"\n ]\n}", "options": { "raw": { "language": "json" @@ -2332,119 +5347,161 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}mentoring/v1/role-permission-mapping/delete/:role_id", - "host": ["{{UserDevBaseUrl}}mentoring"], - "path": ["v1", "role-permission-mapping", "delete", ":role_id"], - "variable": [ - { - "key": "role_id", - "value": "5" - } - ] + "raw": "{{UserDevBaseUrl}}user/v1/tenant/removeDomain/dummy", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "tenant", "removeDomain", "dummy"] } }, "response": [] }, { - "name": "List RolePermission", + "name": "Tenant Read", "request": { - "method": "POST", + "auth": { + "type": "noauth" + }, + "method": "GET", "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "X-auth-token", - "value": " {{token}}", - "type": "text" + "value": "{{token}}" } ], "url": { - "raw": "{{UserDevBaseUrl}}mentoring/v1/role-permission-mapping/list", - "host": ["{{UserDevBaseUrl}}mentoring"], - "path": ["v1", "role-permission-mapping", "list"] + "raw": "{{UserDevBaseUrl}}user/v1/tenant/read/default", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "tenant", "read", "default"] } }, "response": [] - } - ] - }, - { - "name": "Public", - "item": [ + }, { - "name": "Branding", + "name": "Tenant read(internal)", "request": { + "auth": { + "type": "noauth" + }, "method": "GET", "header": [ { - "key": "X-auth-token", - "value": " {{token}}" + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}/user/v1/public/branding", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "v1", "public", "branding"], - "query": [ - { - "key": "org_code", - "value": "default_code", - "disabled": true - } - ] + "raw": "{{UserDevBaseUrl}}user/v1/tenant/readInternal/shikshalokam", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "tenant", "readInternal", "shikshalokam"] } }, "response": [] }, { - "name": "Public userInvites", + "name": "Tenant List", "request": { + "auth": { + "type": "noauth" + }, "method": "GET", "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "origin", - "value": "{{origin}}" + "value": "localhost" + }, + { + "key": "X-auth-token", + "value": "{{token}}" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/public/userInvites?invitation_key=bfbaad67-a63a-44a2-804c-09c685233207", + "raw": "{{UserDevBaseUrl}}user/v1/tenant/list", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "public", "userInvites"], - "query": [ - { - "key": "invitation_key", - "value": "bfbaad67-a63a-44a2-804c-09c685233207" - } - ] - }, - "description": "Generated from cURL: curl --location 'http://localhost:3001/user/v1/public/userInvites?invitation_key=bfbaad67-a63a-44a2-804c-09c685233207' \\\n--header 'origin: shikshagraha-qa.tekdinext.com'" + "path": ["v1", "tenant", "list"] + } }, "response": [] } ] }, { - "name": "Tenant", + "name": "Health", "item": [ { - "name": "Tenant Create or Update", + "name": "New Request", "request": { - "method": "POST", + "method": "GET", + "header": [], + "url": { + "raw": "{{UserDevBaseUrl}}user/health", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["health"] + } + }, + "response": [] + } + ] + }, + { + "name": "Feature", + "item": [ + { + "name": "Delete Feature", + "request": { + "method": "DELETE", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "X-auth-token", + "value": "{{token}}" }, { - "key": "origin", - "value": "https://dev.elevate-mentoring.shikshalokam.org" + "key": "content-type", + "value": "application/json" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/feature/delete/high", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "feature", "delete", "high"] + } + }, + "response": [] + }, + { + "name": "Create Feature", + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true }, { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Test\",\n \"code\": \"test\",\n \"description\": \"Test domain\",\n \"logo\": \"\",\n \"theming\": {},\n \"meta\": {},\n \"domains\": \"https://test.123.domain.com\"\n}", + "raw": "{\n \"code\": \"mithra\",\n \"label\": \"Mithra\"\n}", "options": { "raw": { "language": "json" @@ -2452,16 +5509,15 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}/user/v1/tenant/update", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "v1", "tenant", "update"] - }, - "description": "Generated from cURL: curl --location 'https://saas-qa.tekdinext.com/user/v1/tenant/update' \\\n--header 'Content-Type: application/json' \\\n--header 'origin: https://dev.elevate-mentoring.shikshalokam.org' \\\n--header 'X-auth-token: {{token}}' \\\n--data '{\n \"name\": \"Test\",\n \"code\": \"test\",\n \"description\": \"Test domain\",\n \"logo\": \"\",\n \"theming\": {},\n \"meta\": {},\n \"domains\": \"https://test.123.domain.com\"\n}'" + "raw": "{{UserDevBaseUrl}}user/v1/feature/update", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "feature", "update"] + } }, "response": [] }, { - "name": "Tenant add domain", + "name": "Update Feature", "request": { "auth": { "type": "noauth" @@ -2469,21 +5525,20 @@ "method": "POST", "header": [ { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "origin", - "value": "https://dev.elevate-mentoring.shikshalokam.org" + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true }, { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"domains\" : [\"https://test.2.domain.com\"]\n}", + "raw": "{\n\n \"label\": \"HIGH\",\n \"description\": \"heyy\"\n \n}", "options": { "raw": { "language": "json" @@ -2491,37 +5546,75 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}/user/v1/tenant/addDomain/test", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "v1", "tenant", "addDomain", "test"] + "raw": "{{UserDevBaseUrl}}user/v1/feature/update/high", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "feature", "update", "high"] } }, "response": [] }, { - "name": "Tenant remove Domain", + "name": "List Feature", "request": { "auth": { "type": "noauth" }, - "method": "POST", + "method": "GET", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "X-auth-token", + "value": "{{token}}" }, { - "key": "origin", - "value": "https://dev.elevate-mentoring.shikshalokam.org" + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "disabled": true + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/feature/list?search=", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "feature", "list"], + "query": [ + { + "key": "search", + "value": "" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Organization Feature", + "item": [ + { + "name": "Create Org Feature", + "request": { + "method": "POST", + "header": [ + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true }, { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}", + "type": "text" + }, + { + "key": "organizationcode", + "value": "shikshagraha", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"domains\" : [\"https://test.2.domain.com\"]\n}", + "raw": "{\n \"feature_code\": \"mithra\",\n \"feature_name\": \"Mithra\"\n}", "options": { "raw": { "language": "json" @@ -2529,38 +5622,37 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}/user/v1/tenant/removeDomain/test", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "v1", "tenant", "removeDomain", "test"] + "raw": "{{UserDevBaseUrl}}user/v1/organization-feature/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization-feature", "create"] } }, "response": [] }, { - "name": "User Bulk Upload", + "name": "Update Org Feature", "request": { - "method": "POST", + "method": "PATCH", "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, { "key": "X-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "type": "text" }, { - "key": "tenant", - "value": "{{tenant_code}}" + "key": "organizationcode", + "value": "default_code", + "type": "text" }, { - "key": "organization", - "value": "{{org_code}}" + "key": "tenantcode", + "value": "shikshalokam", + "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"file_path\" : \"users/1-1749801919492-bulkupload.csv\",\n \"editable_fields\" : [\"name\"]\n}", + "raw": "{\n \"enabled\": true,\n \"feature_name\": \"Mitra\",\n \"meta\": {\n \"url\": \"https://dev.elevate-mitra.shikshalokam.org/mohini/sso?accToken=\",\n \"icon\": \"/assets/images/ic_mitra.svg\",\n \"theme\": {\n \"primaryColor\": \"#572E91\",\n \"secondaryColor\": \"#FF9911\"\n },\n \"title\": \"MITRA\",\n \"sameOrigin\": true\n }\n}", "options": { "raw": { "language": "json" @@ -2568,91 +5660,153 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/tenant/bulkUserCreate", + "raw": "{{UserDevBaseUrl}}user/v1/organization-feature/update/mitra", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "tenant", "bulkUserCreate"] - }, - "description": "Generated from cURL: curl --location 'http://localhost:3001/user/v1/tenant/bulkUserCreate' \\\n--header 'Content-Type: application/json' \\\n--header 'X-auth-token: {{token}}' \\\n--header 'tenant: shikshagraha' \\\n--header 'organization: blr' \\\n--data '{\n \"file_path\" : \"users/1-1749801919492-bulkupload.csv\",\n \"editable_fields\" : [\"name\"]\n}'" + "path": ["v1", "organization-feature", "update", "mitra"] + } }, "response": [] }, { - "name": "Tenant Read", + "name": "List Org Feature", "request": { - "auth": { - "type": "noauth" - }, "method": "GET", "header": [ { - "key": "Content-Type", - "value": "application/json" + "key": "X-auth-token", + "value": "{{token}}" }, { - "key": "origin", - "value": "https://dev.elevate-mentoring.shikshalokam.org" + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "disabled": true }, { - "key": "X-auth-token", - "value": " {{token}}" + "key": "organizationcode", + "value": "default_code", + "description": "default_code", + "type": "text" + }, + { + "key": "tenantcode", + "value": "shikshalokam", + "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}/user/v1/tenant/read/test", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "v1", "tenant", "read", "test"] + "raw": "{{UserDevBaseUrl}}user/v1/organization-feature/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization-feature", "read"] } }, "response": [] }, { - "name": "Tenant List", + "name": "Delete Org Feature", "request": { - "auth": { - "type": "noauth" - }, - "method": "GET", + "method": "DELETE", "header": [ { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "origin", - "value": "https://dev.elevate-mentoring.shikshalokam.org" + "key": "X-auth-token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyLCJuYW1lIjoiUHJpeWFua2EiLCJzZXNzaW9uX2lkIjo2LCJvcmdhbml6YXRpb25faWRzIjpbIjEiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbImRlZmF1bHQiXSwidGVuYW50X2NvZGUiOiJkZWZhdWx0Iiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjEsIm5hbWUiOiJEZWZhdWx0IE9yZ2FuaXphdGlvbiIsImNvZGUiOiJkZWZhdWx0IiwiZGVzY3JpcHRpb24iOiJEZWZhdWx0IE9yZ2FuaXNhdGlvbiIsInN0YXR1cyI6IkFDVElWRSIsInJlbGF0ZWRfb3JncyI6bnVsbCwidGVuYW50X2NvZGUiOiJkZWZhdWx0IiwibWV0YSI6bnVsbCwiY3JlYXRlZF9ieSI6bnVsbCwidXBkYXRlZF9ieSI6bnVsbCwicm9sZXMiOlt7ImlkIjo1LCJ0aXRsZSI6Im1lbnRlZSIsImxhYmVsIjpudWxsLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MSwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoiZGVmYXVsdCIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NiwidGl0bGUiOiJhZG1pbiIsImxhYmVsIjpudWxsLCJ1c2VyX3R5cGUiOjEsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MSwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoiZGVmYXVsdCIsInRyYW5zbGF0aW9ucyI6bnVsbH1dfV19LCJpYXQiOjE3NDg4NjU1MjgsImV4cCI6MzU0ODg2NTUyOH0.CEYacOe-nJoFICsH3kMgGRfrftS-W0vRW2m7Y0cprtg" }, { - "key": "X-auth-token", - "value": " {{token}}" + "key": "content-type", + "value": "application/json" } ], "url": { - "raw": "{{UserDevBaseUrl}}/user/v1/tenant/list", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "v1", "tenant", "list"] + "raw": "{{UserDevBaseUrl}}user/v1/organization-feature/update/3", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization-feature", "update", "3"] } }, "response": [] } ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "// Check if overrides should be enabled (toggle via environment variable)", + "const useOverrides = pm.environment.get('admin_use_overrides') === 'true';", + "", + "if (useOverrides) {", + " // Get values from environment variables", + " const orgCode = pm.environment.get('admin_org_code');", + " const tenantCode = pm.environment.get('admin_tenant_code');", + "", + " // Validate: If any is set, ensure all are provided (mirrors your middleware logic)", + " if (orgCode || tenantCode) {", + " /* if (!orgId || !orgCode || !tenantCode) {", + " console.log('Warning: Partial overrides detected. All three must be set in environment.');", + " // Optionally, throw to halt: throw new Error('All override values required');", + " } else { */", + " // Add headers dynamically", + " console.log('Replacing.....');", + "", + " pm.request.headers.add({", + " key: 'X-Org-Code',", + " value: orgCode", + " });", + " pm.request.headers.add({", + " key: 'X-Tenant-Code',", + " value: tenantCode", + " });", + " console.log('Admin override headers added successfully.');", + " // }", + " }", + "} else {", + " console.log('Admin overrides disabled—no extra headers added.');", + "}" + ] + } }, { - "name": "Health Check", - "item": [ - { - "name": "health", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{UserDevBaseUrl}}/user/health", - "host": ["{{UserDevBaseUrl}}"], - "path": ["user", "health"] - } - }, - "response": [] - } - ] + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [""] + } + } + ], + "variable": [ + { + "key": "UserDevBaseUrl", + "value": "https://saas-qa.tekdinext.com/", + "type": "string" + }, + { + "key": "token", + "value": "", + "type": "string" + }, + { + "key": "MAILSLURP_KEY", + "value": "", + "type": "string", + "disabled": true + }, + { + "key": "inboxId", + "value": "", + "disabled": true + }, + { + "key": "emailAddress", + "value": "", + "disabled": true + }, + { + "key": "otp", + "value": "", + "disabled": true } ] } From 1e4b6e4262a6833fdea1a2a5d8285a8d61517025 Mon Sep 17 00:00:00 2001 From: MallanagoudaB Date: Thu, 27 Nov 2025 14:59:16 +0530 Subject: [PATCH 5/9] change-in-version --- src/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.json b/src/package.json index 2507b22e..e541c3a4 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "com.shikshalokam.mentoring.userservice", - "version": "3.4", + "version": "3.3.24", "description": "A user service for mentoring capability", "main": "app.js", "bin": { From 94740ba766e4d7e524bae0bec492ed6fac1176fd Mon Sep 17 00:00:00 2001 From: sumanvpacewisdom Date: Thu, 1 Jan 2026 19:21:14 +0530 Subject: [PATCH 6/9] console logs for kafka --- src/helpers/eventBroadcasterMain.js | 49 ++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/src/helpers/eventBroadcasterMain.js b/src/helpers/eventBroadcasterMain.js index 1e832f35..5c46723a 100644 --- a/src/helpers/eventBroadcasterMain.js +++ b/src/helpers/eventBroadcasterMain.js @@ -23,15 +23,26 @@ const getEndpoints = (eventGroup) => { } const isEventEnabled = (eventGroup) => { + console.log(`[EVENT BROADCASTER] Checking if event enabled for group: ${eventGroup}`) + console.log(`[EVENT BROADCASTER] Environment variables:`) + console.log(` EVENT_ENABLE_USER_EVENTS: ${process.env.EVENT_ENABLE_USER_EVENTS}`) + console.log(` EVENT_ENABLE_USER_KAFKA_EVENTS: ${process.env.EVENT_ENABLE_USER_KAFKA_EVENTS}`) + console.log(` EVENT_USER_LISTENER_API: ${process.env.EVENT_USER_LISTENER_API}`) + console.log(` EVENT_USER_KAFKA_TOPIC: ${process.env.EVENT_USER_KAFKA_TOPIC}`) + switch (eventGroup) { case 'organizationEvents': return process.env.EVENT_ENABLE_ORG_EVENTS !== 'false' case 'userEvents': - return process.env.EVENT_ENABLE_USER_EVENTS !== 'false' + const apiEnabled = process.env.EVENT_ENABLE_USER_EVENTS !== 'false' + console.log(`[EVENT BROADCASTER] API events enabled for userEvents: ${apiEnabled}`) + return apiEnabled case 'tenantEvents': return process.env.EVENT_ENABLE_TENANT_EVENTS !== 'false' case 'userEvents-kafka': - return process.env.EVENT_ENABLE_USER_KAFKA_EVENTS !== 'false' + const kafkaEnabled = process.env.EVENT_ENABLE_USER_KAFKA_EVENTS !== 'false' + console.log(`[EVENT BROADCASTER] Kafka events enabled for userEvents: ${kafkaEnabled}`) + return kafkaEnabled case 'tenantEvents-kafka': return process.env.EVENT_ENABLE_TENANT_KAFKA_EVENTS !== 'false' case 'organizationEvents-kafka': @@ -43,52 +54,61 @@ const isEventEnabled = (eventGroup) => { exports.eventBroadcasterMain = async (eventGroup, { requestBody, headers = {}, isInternal = true }) => { try { - console.log('API Event ') + console.log(`[EVENT BROADCASTER] API Event starting for group: ${eventGroup}`) if (!requestBody) throw new Error('Event Body Generation Failed') if (!isEventEnabled(eventGroup)) throw new Error(`Events Not Enabled For The Group "${eventGroup}"`) if (isInternal) headers.internal_access_token = process.env.INTERNAL_ACCESS_TOKEN const endPoints = getEndpoints(eventGroup) + console.log(`[EVENT BROADCASTER] API endpoints found: ${JSON.stringify(endPoints)}`) const requestPromises = endPoints.map((endPoint) => { + console.log(`[EVENT BROADCASTER] Making HTTP request to: ${endPoint}`) return requester.post(endPoint, '', headers, requestBody) }) const results = await Promise.allSettled(requestPromises) - console.log('PROMISE ------->>> ', results) + console.log(`[EVENT BROADCASTER] API Event results: ${JSON.stringify(results)}`) results.forEach((result, index) => { if (result.status === 'rejected') console.error(`Error for endpoint ${endPoints[index].url}:`, result.reason) }) } catch (err) { - console.log(err) + console.log(`[EVENT BROADCASTER] API Event error: ${err.message}`) } } exports.eventBroadcasterKafka = async (eventGroup, { requestBody }) => { try { + console.log(`[EVENT BROADCASTER] Kafka Event starting for group: ${eventGroup}`) if (!requestBody) throw new Error('Kafka Event Body Generation Failed') if (!isEventEnabled(`${eventGroup}-kafka`)) throw new Error(`Kafka Events Not Enabled For The Group "${eventGroup}"`) + console.log(`[EVENT BROADCASTER] Kafka Events enabled, pushing to Kafka for group: ${eventGroup}`) //push to kafka based on eventGroup switch (eventGroup) { case 'organizationEvents': + console.log(`[EVENT BROADCASTER] Pushing organization event to Kafka`) await kafkaCommunication.pushOrganizationEventsToKafka(requestBody) break case 'userEvents': + console.log(`[EVENT BROADCASTER] Pushing user event to Kafka topic: ${process.env.EVENT_USER_KAFKA_TOPIC}`) await kafkaCommunication.pushUserEventsToKafka(requestBody) + console.log(`[EVENT BROADCASTER] User event pushed to Kafka successfully`) break case 'tenantEvents': + console.log(`[EVENT BROADCASTER] Pushing tenant event to Kafka`) await kafkaCommunication.pushTenantEventsToKafka(requestBody) break default: - console.log('No Kafka Event Group Found') + console.log('[EVENT BROADCASTER] No Kafka Event Group Found') break } } catch (err) { - console.log(err) + console.log(`[EVENT BROADCASTER] Kafka Event error: ${err.message}`) } } exports.broadcastEvent = async (eventGroup, { requestBody, headers = {}, isInternal = true }) => { try { - //TODO: Remove this log after testing - console.log(util.inspect(requestBody, { depth: null, colors: true, compact: false })) + console.log(`[EVENT BROADCASTER] ===== BROADCAST EVENT STARTING =====`) + console.log(`[EVENT BROADCASTER] Event Group: ${eventGroup}`) + console.log(`[EVENT BROADCASTER] Request Body: ${util.inspect(requestBody, { depth: null, colors: false, compact: false })}`) // Fire both broadcaster functions concurrently const broadcastPromises = [ @@ -96,18 +116,23 @@ exports.broadcastEvent = async (eventGroup, { requestBody, headers = {}, isInter exports.eventBroadcasterKafka(eventGroup, { requestBody }), ] + console.log(`[EVENT BROADCASTER] Starting both API and Kafka broadcasts concurrently...`) // Execute both functions and get their results const results = await Promise.allSettled(broadcastPromises) // Check for failed promises and throw warnings results.forEach((result, index) => { if (result.status === 'rejected') { - const broadcaster = index === 0 ? 'eventBroadcasterMain' : 'eventBroadcasterKafka' - console.warn(`Warning: ${broadcaster} failed for eventGroup "${eventGroup}": ${result.reason}`) + const broadcaster = index === 0 ? 'eventBroadcasterMain (API)' : 'eventBroadcasterKafka' + console.warn(`[EVENT BROADCASTER] Warning: ${broadcaster} failed for eventGroup "${eventGroup}": ${result.reason}`) + } else { + const broadcaster = index === 0 ? 'eventBroadcasterMain (API)' : 'eventBroadcasterKafka' + console.log(`[EVENT BROADCASTER] Success: ${broadcaster} completed for eventGroup "${eventGroup}"`) } }) + console.log(`[EVENT BROADCASTER] ===== BROADCAST EVENT COMPLETED =====`) } catch (err) { // Log any unexpected errors from the promise settlement - console.error('Error in broadcastEvent:', err) + console.error('[EVENT BROADCASTER] Error in broadcastEvent:', err) } } From 42ec06f5616f220f867c2320640765e388276929 Mon Sep 17 00:00:00 2001 From: sumanvpacewisdom Date: Thu, 1 Jan 2026 20:16:14 +0530 Subject: [PATCH 7/9] logs in sccount creation --- src/controllers/v1/account.js | 31 ++++++++++++++++++ src/services/account.js | 60 +++++++++++++++++++++++++++++++---- 2 files changed, 85 insertions(+), 6 deletions(-) diff --git a/src/controllers/v1/account.js b/src/controllers/v1/account.js index ab01de63..47ea6b2b 100644 --- a/src/controllers/v1/account.js +++ b/src/controllers/v1/account.js @@ -25,25 +25,56 @@ module.exports = class Account { */ async create(req) { + console.log('👤 [USER API] ===== ACCOUNT CREATION API STARTING =====') + console.log('👤 [USER API] Request headers:', JSON.stringify(req.headers, null, 2)) + console.log('👤 [USER API] Request body keys:', Object.keys(req.body)) + console.log('👤 [USER API] Request body:', JSON.stringify(req.body, null, 2)) + const params = req.body const host = req.headers.origin || '' + console.log('👤 [USER API] Origin host:', host) let domain = '' if (host) { try { const url = new URL(host) domain = url.hostname + console.log('👤 [USER API] Extracted domain via URL:', domain) } catch (error) { + console.log('👤 [USER API] URL parsing failed, using fallback method') domain = host.split(':')[0] + console.log('👤 [USER API] Extracted domain via split:', domain) } + } else { + console.log('👤 [USER API] ⚠️ No origin header found, domain will be empty') } + console.log('👤 [USER API] Final domain:', domain) + const device_info = req.headers && req.headers['device-info'] ? JSON.parse(req.headers['device-info']) : {} + console.log('👤 [USER API] Device info:', JSON.stringify(device_info, null, 2)) + try { + console.log('👤 [USER API] Calling accountService.create with:') + console.log('👤 [USER API] - params keys:', Object.keys(params)) + console.log('👤 [USER API] - device_info:', device_info) + console.log('👤 [USER API] - domain:', domain) + const createdAccount = await accountService.create(params, device_info, domain) + + console.log('👤 [USER API] Account creation SUCCESS') + console.log('👤 [USER API] Response status:', createdAccount?.statusCode || 'NO_STATUS') + console.log('👤 [USER API] Response message:', createdAccount?.message || 'NO_MESSAGE') + console.log('👤 [USER API] ===== ACCOUNT CREATION API COMPLETED =====') + return createdAccount } catch (error) { + console.log('👤 [USER API] ❌ ACCOUNT CREATION FAILED') + console.log('👤 [USER API] ❌ Error message:', error.message) + console.log('👤 [USER API] ❌ Error stack:', error.stack) + console.log('👤 [USER API] ❌ Error object:', JSON.stringify(error, Object.getOwnPropertyNames(error), 2)) + console.log('👤 [USER API] ===== ACCOUNT CREATION API ERROR =====') return error } } diff --git a/src/services/account.js b/src/services/account.js index 88d9b71e..0bfb7d3d 100644 --- a/src/services/account.js +++ b/src/services/account.js @@ -55,6 +55,13 @@ module.exports = class AccountHelper { */ static async create(bodyData, deviceInfo, domain) { + console.log('🔐 [ACCOUNT SERVICE] ===== ACCOUNT CREATION SERVICE STARTING =====') + console.log('🔐 [ACCOUNT SERVICE] Input parameters:') + console.log('🔐 [ACCOUNT SERVICE] - bodyData keys:', Object.keys(bodyData)) + console.log('🔐 [ACCOUNT SERVICE] - deviceInfo:', JSON.stringify(deviceInfo, null, 2)) + console.log('🔐 [ACCOUNT SERVICE] - domain:', domain) + console.log('🔐 [ACCOUNT SERVICE] Full bodyData:', JSON.stringify(bodyData, null, 2)) + const projection = ['password'] let isInvitedUserId = false @@ -66,20 +73,30 @@ module.exports = class AccountHelper { responseCode: 'CLIENT_ERROR', }) + console.log('🔐 [ACCOUNT SERVICE] Step 1: Looking up tenant domain...') const tenantDomain = await tenantDomainQueries.findOne({ domain }) + console.log('🔐 [ACCOUNT SERVICE] Tenant domain result:', tenantDomain ? JSON.stringify(tenantDomain, null, 2) : 'NOT_FOUND') + if (!tenantDomain) { + console.log('🔐 [ACCOUNT SERVICE] ❌ TENANT_DOMAIN_NOT_FOUND for domain:', domain) return notFoundResponse('TENANT_DOMAIN_NOT_FOUND_PING_ADMIN') } + console.log('🔐 [ACCOUNT SERVICE] Step 2: Looking up tenant details...') const tenantDetail = await tenantQueries.findOne({ code: tenantDomain.tenant_code, status: common.ACTIVE_STATUS, }) + console.log('🔐 [ACCOUNT SERVICE] Tenant detail result:', tenantDetail ? JSON.stringify(tenantDetail, null, 2) : 'NOT_FOUND') + if (!tenantDetail) { + console.log('🔐 [ACCOUNT SERVICE] ❌ TENANT_NOT_FOUND for tenant_code:', tenantDomain.tenant_code) return notFoundResponse('TENANT_NOT_FOUND_PING_ADMIN') } + console.log('🔐 [ACCOUNT SERVICE] Step 3: Validating email/phone presence...') if (!bodyData.email && !bodyData.phone) { + console.log('🔐 [ACCOUNT SERVICE] ❌ EMAIL_OR_PHONE_REQUIRED') return responses.failureResponse({ message: 'EMAIL_OR_PHONE_REQUIRED', statusCode: httpStatusCode.bad_request, @@ -89,38 +106,59 @@ module.exports = class AccountHelper { let domainDetails = null + console.log('🔐 [ACCOUNT SERVICE] Step 4: Processing registration code...') if (bodyData.registration_code) { + console.log('🔐 [ACCOUNT SERVICE] Looking up organization with registration code:', bodyData.registration_code.toLowerCase()) domainDetails = await organizationQueries.findOrgWithRegistrationCode({ tenant_code: tenantDetail.code, registration_code: bodyData.registration_code.toLowerCase(), }) + console.log('🔐 [ACCOUNT SERVICE] Organization lookup result:', domainDetails ? JSON.stringify(domainDetails, null, 2) : 'NOT_FOUND') if (!domainDetails) { + console.log('🔐 [ACCOUNT SERVICE] ❌ INVALID_ORG_registration_code') return responses.failureResponse({ message: 'INVALID_ORG_registration_code', statusCode: httpStatusCode.bad_request, responseCode: 'CLIENT_ERROR', }) } + } else { + console.log('🔐 [ACCOUNT SERVICE] No registration code provided') } + console.log('🔐 [ACCOUNT SERVICE] Step 5: Encrypting email/phone...') // Handle email encryption if provided let encryptedEmailId = null let plaintextEmailId = null if (bodyData.email) { + console.log('🔐 [ACCOUNT SERVICE] Encrypting email...') plaintextEmailId = bodyData.email.toLowerCase() - encryptedEmailId = emailEncryption.encrypt(plaintextEmailId) - bodyData.email = encryptedEmailId + try { + encryptedEmailId = emailEncryption.encrypt(plaintextEmailId) + bodyData.email = encryptedEmailId + console.log('🔐 [ACCOUNT SERVICE] Email encryption successful') + } catch (encryptError) { + console.log('🔐 [ACCOUNT SERVICE] ❌ Email encryption failed:', encryptError.message) + throw encryptError + } } // Handle phone encryption if provided let encryptedPhoneNumber = null let plaintextPhoneNumber = null if (bodyData.phone && bodyData.phone_code) { + console.log('🔐 [ACCOUNT SERVICE] Encrypting phone number...') plaintextPhoneNumber = bodyData.phone - encryptedPhoneNumber = emailEncryption.encrypt(plaintextPhoneNumber) - bodyData.phone = encryptedPhoneNumber - bodyData.phone_code = bodyData.phone_code // Store phone_code separately + try { + encryptedPhoneNumber = emailEncryption.encrypt(plaintextPhoneNumber) + bodyData.phone = encryptedPhoneNumber + bodyData.phone_code = bodyData.phone_code // Store phone_code separately + console.log('🔐 [ACCOUNT SERVICE] Phone encryption successful') + } catch (encryptError) { + console.log('🔐 [ACCOUNT SERVICE] ❌ Phone encryption failed:', encryptError.message) + throw encryptError + } } const criteria = [] @@ -624,13 +662,23 @@ module.exports = class AccountHelper { broadcastEvent('userEvents', { requestBody: eventBody, isInternal: true }) + console.log('🔐 [ACCOUNT SERVICE] ===== ACCOUNT CREATION SUCCESS =====') + console.log('🔐 [ACCOUNT SERVICE] Final result keys:', Object.keys(result)) + console.log('🔐 [ACCOUNT SERVICE] User created successfully') + return responses.successResponse({ statusCode: httpStatusCode.created, message: 'USER_CREATED_SUCCESSFULLY', result, }) } catch (error) { - console.log(error) + console.log('🔐 [ACCOUNT SERVICE] ❌ CRITICAL ERROR IN ACCOUNT CREATION') + console.log('🔐 [ACCOUNT SERVICE] ❌ Error message:', error.message) + console.log('🔐 [ACCOUNT SERVICE] ❌ Error stack:', error.stack) + console.log('🔐 [ACCOUNT SERVICE] ❌ Error object:', JSON.stringify(error, Object.getOwnPropertyNames(error), 2)) + console.log('🔐 [ACCOUNT SERVICE] ❌ Error name:', error.name) + console.log('🔐 [ACCOUNT SERVICE] ❌ Error code:', error.code) + console.log('🔐 [ACCOUNT SERVICE] ===== ACCOUNT SERVICE ERROR END =====') throw error } } From 29bc4d74054786e25a791a800dfa363ab02456e8 Mon Sep 17 00:00:00 2001 From: sumanvpacewisdom Date: Mon, 5 Jan 2026 16:20:55 +0530 Subject: [PATCH 8/9] aditional kafka logs --- src/configs/kafka.js | 37 ++++++++++++++- src/generics/kafka-communication.js | 70 +++++++++++++++++++++++++++-- 2 files changed, 102 insertions(+), 5 deletions(-) diff --git a/src/configs/kafka.js b/src/configs/kafka.js index 6e4017d6..e46db1db 100644 --- a/src/configs/kafka.js +++ b/src/configs/kafka.js @@ -14,37 +14,65 @@ const { elevateLog } = require('elevate-logger') const logger = elevateLog.init() module.exports = async () => { + console.log('🚀 [USER SERVICE KAFKA] ===== STARTING KAFKA CONFIGURATION =====') + console.log('🚀 [USER SERVICE KAFKA] Environment variables:') + console.log('🚀 [USER SERVICE KAFKA] KAFKA_URL:', process.env.KAFKA_URL) + console.log('🚀 [USER SERVICE KAFKA] KAFKA_GROUP_ID:', process.env.KAFKA_GROUP_ID) + console.log('🚀 [USER SERVICE KAFKA] EVENT_USER_KAFKA_TOPIC:', process.env.EVENT_USER_KAFKA_TOPIC) + console.log('🚀 [USER SERVICE KAFKA] CLEAR_INTERNAL_CACHE:', process.env.CLEAR_INTERNAL_CACHE) + const kafkaIps = process.env.KAFKA_URL.split(',') + console.log('🚀 [USER SERVICE KAFKA] Kafka brokers:', kafkaIps) + const KafkaClient = new Kafka({ - clientId: 'mentoring', + clientId: 'user-service', brokers: kafkaIps, }) + console.log('🚀 [USER SERVICE KAFKA] Creating producer and consumer...') const producer = KafkaClient.producer() const consumer = KafkaClient.consumer({ groupId: process.env.KAFKA_GROUP_ID }) + console.log('🚀 [USER SERVICE KAFKA] Connecting producer...') await producer.connect() + console.log('🚀 [USER SERVICE KAFKA] ✅ Producer connected successfully') + + console.log('🚀 [USER SERVICE KAFKA] Connecting consumer...') await consumer.connect() + console.log('🚀 [USER SERVICE KAFKA] ✅ Consumer connected successfully') producer.on('producer.connect', () => { logger.info(`KafkaProvider: connected`) + console.log('🚀 [USER SERVICE KAFKA] Producer event: connected') }) producer.on('producer.disconnect', () => { logger.error(`KafkaProvider: could not connect`, { triggerNotification: true, }) + console.log('🚀 [USER SERVICE KAFKA] Producer event: disconnected') }) const subscribeToConsumer = async () => { - await consumer.subscribe({ topics: [process.env.CLEAR_INTERNAL_CACHE] }) + console.log('🚀 [USER SERVICE KAFKA] Setting up consumer subscriptions...') + const topics = [process.env.CLEAR_INTERNAL_CACHE].filter(Boolean) + console.log('🚀 [USER SERVICE KAFKA] Subscribing to topics:', topics) + + await consumer.subscribe({ topics }) await consumer.run({ eachMessage: async ({ topic, partition, message }) => { try { + console.log('🚀 [USER SERVICE KAFKA] Cache clear message received:', { + topic, + partition, + offset: message.offset + }) let streamingData = JSON.parse(message.value) if (streamingData.type == 'CLEAR_INTERNAL_CACHE') { + console.log('🚀 [USER SERVICE KAFKA] Processing cache clear for:', streamingData.value) utils.internalDel(streamingData.value) } } catch (error) { + console.log('🚀 [USER SERVICE KAFKA] ❌ Consumer error:', error.message) logger.error('Subscribe to consumer failed:' + error, { triggerNotification: true, }) @@ -52,8 +80,13 @@ module.exports = async () => { }, }) } + + console.log('🚀 [USER SERVICE KAFKA] Starting consumer subscriptions...') subscribeToConsumer() + console.log('🚀 [USER SERVICE KAFKA] Setting global variables...') global.kafkaProducer = producer global.kafkaClient = KafkaClient + + console.log('🚀 [USER SERVICE KAFKA] ===== KAFKA CONFIGURATION COMPLETED =====') } diff --git a/src/generics/kafka-communication.js b/src/generics/kafka-communication.js index 6fd9ce8d..f2b97ab9 100644 --- a/src/generics/kafka-communication.js +++ b/src/generics/kafka-communication.js @@ -17,10 +17,42 @@ const pushEmailToKafka = async (message) => { const pushUserEventsToKafka = async (message) => { try { - const payload = { topic: process.env.EVENT_USER_KAFKA_TOPIC, messages: [{ value: JSON.stringify(message) }] } - return await pushPayloadToKafka(payload) + console.log('📤 [USER KAFKA PRODUCER] ===== KAFKA USER EVENT DETAILS =====') + console.log('📤 [USER KAFKA PRODUCER] Target Topic:', process.env.EVENT_USER_KAFKA_TOPIC) + console.log('📤 [USER KAFKA PRODUCER] Kafka Producer Status:', kafkaProducer ? 'Connected' : 'Not Connected') + console.log('📤 [USER KAFKA PRODUCER] Message Details:') + console.log('📤 [USER KAFKA PRODUCER] Entity:', message.entity) + console.log('📤 [USER KAFKA PRODUCER] Event Type:', message.eventType) + console.log('📤 [USER KAFKA PRODUCER] Entity ID:', message.entityId) + console.log('📤 [USER KAFKA PRODUCER] Tenant Code:', message.tenant_code) + console.log('📤 [USER KAFKA PRODUCER] Created By:', message.created_by) + console.log('📤 [USER KAFKA PRODUCER] Organizations:', message.organizations?.length || 0, 'orgs') + + const messageString = JSON.stringify(message) + console.log('📤 [USER KAFKA PRODUCER] Payload Size:', messageString.length, 'bytes') + console.log('📤 [USER KAFKA PRODUCER] First 200 chars:', messageString.substring(0, 200) + '...') + + const payload = { topic: process.env.EVENT_USER_KAFKA_TOPIC, messages: [{ value: messageString }] } + console.log('📤 [USER KAFKA PRODUCER] Kafka Payload Prepared:') + console.log('📤 [USER KAFKA PRODUCER] Topic:', payload.topic) + console.log('📤 [USER KAFKA PRODUCER] Messages Count:', payload.messages.length) + + console.log('📤 [USER KAFKA PRODUCER] Sending to Kafka...') + const response = await pushPayloadToKafka(payload) + + console.log('📤 [USER KAFKA PRODUCER] ✅ Kafka Response Received:') + console.log('📤 [USER KAFKA PRODUCER] Success:', response ? 'Yes' : 'No') + if (response && response[0]) { + console.log('📤 [USER KAFKA PRODUCER] Topic:', response[0].topicName) + console.log('📤 [USER KAFKA PRODUCER] Partition:', response[0].partition) + console.log('📤 [USER KAFKA PRODUCER] Offset:', response[0].baseOffset) + } + console.log('📤 [USER KAFKA PRODUCER] ===== KAFKA USER EVENT COMPLETED =====') + + return response } catch (error) { - console.log(error) + console.log('📤 [USER KAFKA PRODUCER] ❌ ERROR in pushUserEventsToKafka:', error.message) + console.log('📤 [USER KAFKA PRODUCER] ❌ Error stack:', error.stack) return error } } @@ -50,9 +82,41 @@ const pushOrganizationEventsToKafka = async (message) => { const pushPayloadToKafka = async (payload) => { try { + console.log('📤 [KAFKA PRODUCER] ===== SENDING PAYLOAD TO KAFKA =====') + console.log('📤 [KAFKA PRODUCER] Producer Ready:', !!kafkaProducer) + console.log('📤 [KAFKA PRODUCER] Payload Topic:', payload.topic) + console.log('📤 [KAFKA PRODUCER] Message Count:', payload.messages.length) + console.log('📤 [KAFKA PRODUCER] Kafka Brokers:', process.env.KAFKA_URL || 'Not configured') + + console.log('📤 [KAFKA PRODUCER] Calling kafkaProducer.send()...') + const startTime = Date.now() let response = await kafkaProducer.send(payload) + const endTime = Date.now() + + console.log('📤 [KAFKA PRODUCER] ✅ Kafka Send Completed:') + console.log('📤 [KAFKA PRODUCER] Duration:', endTime - startTime, 'ms') + console.log('📤 [KAFKA PRODUCER] Response Type:', typeof response) + console.log('📤 [KAFKA PRODUCER] Response Array Length:', Array.isArray(response) ? response.length : 'Not an array') + + if (response && Array.isArray(response) && response.length > 0) { + response.forEach((result, index) => { + console.log(`📤 [KAFKA PRODUCER] Result ${index}:`) + console.log(`📤 [KAFKA PRODUCER] Topic: ${result.topicName}`) + console.log(`📤 [KAFKA PRODUCER] Partition: ${result.partition}`) + console.log(`📤 [KAFKA PRODUCER] Base Offset: ${result.baseOffset}`) + console.log(`📤 [KAFKA PRODUCER] Log Start Offset: ${result.logStartOffset}`) + }) + } + console.log('📤 [KAFKA PRODUCER] ===== KAFKA SEND COMPLETED =====') + return response } catch (error) { + console.log('📤 [KAFKA PRODUCER] ❌ ERROR in pushPayloadToKafka:', error.message) + console.log('📤 [KAFKA PRODUCER] ❌ Error details:', { + name: error.name, + code: error.code, + stack: error.stack?.split('\n').slice(0, 3).join('\n') + }) return error } } From 6f988ea2fb938f30828a13d066646b54c1650874 Mon Sep 17 00:00:00 2001 From: sumanvpacewisdom Date: Tue, 6 Jan 2026 11:27:19 +0530 Subject: [PATCH 9/9] Removed Console logs for kafka and user creation --- src/controllers/v1/account.js | 30 ------------------ src/helpers/eventBroadcasterMain.js | 27 ---------------- src/services/account.js | 48 ----------------------------- 3 files changed, 105 deletions(-) diff --git a/src/controllers/v1/account.js b/src/controllers/v1/account.js index 47ea6b2b..e059b0b0 100644 --- a/src/controllers/v1/account.js +++ b/src/controllers/v1/account.js @@ -25,56 +25,26 @@ module.exports = class Account { */ async create(req) { - console.log('👤 [USER API] ===== ACCOUNT CREATION API STARTING =====') - console.log('👤 [USER API] Request headers:', JSON.stringify(req.headers, null, 2)) - console.log('👤 [USER API] Request body keys:', Object.keys(req.body)) - console.log('👤 [USER API] Request body:', JSON.stringify(req.body, null, 2)) - const params = req.body const host = req.headers.origin || '' - console.log('👤 [USER API] Origin host:', host) let domain = '' if (host) { try { const url = new URL(host) domain = url.hostname - console.log('👤 [USER API] Extracted domain via URL:', domain) } catch (error) { - console.log('👤 [USER API] URL parsing failed, using fallback method') domain = host.split(':')[0] - console.log('👤 [USER API] Extracted domain via split:', domain) } - } else { - console.log('👤 [USER API] ⚠️ No origin header found, domain will be empty') } - console.log('👤 [USER API] Final domain:', domain) - const device_info = req.headers && req.headers['device-info'] ? JSON.parse(req.headers['device-info']) : {} - console.log('👤 [USER API] Device info:', JSON.stringify(device_info, null, 2)) try { - console.log('👤 [USER API] Calling accountService.create with:') - console.log('👤 [USER API] - params keys:', Object.keys(params)) - console.log('👤 [USER API] - device_info:', device_info) - console.log('👤 [USER API] - domain:', domain) - const createdAccount = await accountService.create(params, device_info, domain) - - console.log('👤 [USER API] Account creation SUCCESS') - console.log('👤 [USER API] Response status:', createdAccount?.statusCode || 'NO_STATUS') - console.log('👤 [USER API] Response message:', createdAccount?.message || 'NO_MESSAGE') - console.log('👤 [USER API] ===== ACCOUNT CREATION API COMPLETED =====') - return createdAccount } catch (error) { - console.log('👤 [USER API] ❌ ACCOUNT CREATION FAILED') - console.log('👤 [USER API] ❌ Error message:', error.message) - console.log('👤 [USER API] ❌ Error stack:', error.stack) - console.log('👤 [USER API] ❌ Error object:', JSON.stringify(error, Object.getOwnPropertyNames(error), 2)) - console.log('👤 [USER API] ===== ACCOUNT CREATION API ERROR =====') return error } } diff --git a/src/helpers/eventBroadcasterMain.js b/src/helpers/eventBroadcasterMain.js index 5c46723a..86270263 100644 --- a/src/helpers/eventBroadcasterMain.js +++ b/src/helpers/eventBroadcasterMain.js @@ -23,25 +23,16 @@ const getEndpoints = (eventGroup) => { } const isEventEnabled = (eventGroup) => { - console.log(`[EVENT BROADCASTER] Checking if event enabled for group: ${eventGroup}`) - console.log(`[EVENT BROADCASTER] Environment variables:`) - console.log(` EVENT_ENABLE_USER_EVENTS: ${process.env.EVENT_ENABLE_USER_EVENTS}`) - console.log(` EVENT_ENABLE_USER_KAFKA_EVENTS: ${process.env.EVENT_ENABLE_USER_KAFKA_EVENTS}`) - console.log(` EVENT_USER_LISTENER_API: ${process.env.EVENT_USER_LISTENER_API}`) - console.log(` EVENT_USER_KAFKA_TOPIC: ${process.env.EVENT_USER_KAFKA_TOPIC}`) - switch (eventGroup) { case 'organizationEvents': return process.env.EVENT_ENABLE_ORG_EVENTS !== 'false' case 'userEvents': const apiEnabled = process.env.EVENT_ENABLE_USER_EVENTS !== 'false' - console.log(`[EVENT BROADCASTER] API events enabled for userEvents: ${apiEnabled}`) return apiEnabled case 'tenantEvents': return process.env.EVENT_ENABLE_TENANT_EVENTS !== 'false' case 'userEvents-kafka': const kafkaEnabled = process.env.EVENT_ENABLE_USER_KAFKA_EVENTS !== 'false' - console.log(`[EVENT BROADCASTER] Kafka events enabled for userEvents: ${kafkaEnabled}`) return kafkaEnabled case 'tenantEvents-kafka': return process.env.EVENT_ENABLE_TENANT_KAFKA_EVENTS !== 'false' @@ -54,18 +45,14 @@ const isEventEnabled = (eventGroup) => { exports.eventBroadcasterMain = async (eventGroup, { requestBody, headers = {}, isInternal = true }) => { try { - console.log(`[EVENT BROADCASTER] API Event starting for group: ${eventGroup}`) if (!requestBody) throw new Error('Event Body Generation Failed') if (!isEventEnabled(eventGroup)) throw new Error(`Events Not Enabled For The Group "${eventGroup}"`) if (isInternal) headers.internal_access_token = process.env.INTERNAL_ACCESS_TOKEN const endPoints = getEndpoints(eventGroup) - console.log(`[EVENT BROADCASTER] API endpoints found: ${JSON.stringify(endPoints)}`) const requestPromises = endPoints.map((endPoint) => { - console.log(`[EVENT BROADCASTER] Making HTTP request to: ${endPoint}`) return requester.post(endPoint, '', headers, requestBody) }) const results = await Promise.allSettled(requestPromises) - console.log(`[EVENT BROADCASTER] API Event results: ${JSON.stringify(results)}`) results.forEach((result, index) => { if (result.status === 'rejected') console.error(`Error for endpoint ${endPoints[index].url}:`, result.reason) @@ -76,28 +63,21 @@ exports.eventBroadcasterMain = async (eventGroup, { requestBody, headers = {}, i } exports.eventBroadcasterKafka = async (eventGroup, { requestBody }) => { try { - console.log(`[EVENT BROADCASTER] Kafka Event starting for group: ${eventGroup}`) if (!requestBody) throw new Error('Kafka Event Body Generation Failed') if (!isEventEnabled(`${eventGroup}-kafka`)) throw new Error(`Kafka Events Not Enabled For The Group "${eventGroup}"`) - console.log(`[EVENT BROADCASTER] Kafka Events enabled, pushing to Kafka for group: ${eventGroup}`) //push to kafka based on eventGroup switch (eventGroup) { case 'organizationEvents': - console.log(`[EVENT BROADCASTER] Pushing organization event to Kafka`) await kafkaCommunication.pushOrganizationEventsToKafka(requestBody) break case 'userEvents': - console.log(`[EVENT BROADCASTER] Pushing user event to Kafka topic: ${process.env.EVENT_USER_KAFKA_TOPIC}`) await kafkaCommunication.pushUserEventsToKafka(requestBody) - console.log(`[EVENT BROADCASTER] User event pushed to Kafka successfully`) break case 'tenantEvents': - console.log(`[EVENT BROADCASTER] Pushing tenant event to Kafka`) await kafkaCommunication.pushTenantEventsToKafka(requestBody) break default: - console.log('[EVENT BROADCASTER] No Kafka Event Group Found') break } } catch (err) { @@ -106,9 +86,6 @@ exports.eventBroadcasterKafka = async (eventGroup, { requestBody }) => { } exports.broadcastEvent = async (eventGroup, { requestBody, headers = {}, isInternal = true }) => { try { - console.log(`[EVENT BROADCASTER] ===== BROADCAST EVENT STARTING =====`) - console.log(`[EVENT BROADCASTER] Event Group: ${eventGroup}`) - console.log(`[EVENT BROADCASTER] Request Body: ${util.inspect(requestBody, { depth: null, colors: false, compact: false })}`) // Fire both broadcaster functions concurrently const broadcastPromises = [ @@ -116,7 +93,6 @@ exports.broadcastEvent = async (eventGroup, { requestBody, headers = {}, isInter exports.eventBroadcasterKafka(eventGroup, { requestBody }), ] - console.log(`[EVENT BROADCASTER] Starting both API and Kafka broadcasts concurrently...`) // Execute both functions and get their results const results = await Promise.allSettled(broadcastPromises) @@ -124,13 +100,10 @@ exports.broadcastEvent = async (eventGroup, { requestBody, headers = {}, isInter results.forEach((result, index) => { if (result.status === 'rejected') { const broadcaster = index === 0 ? 'eventBroadcasterMain (API)' : 'eventBroadcasterKafka' - console.warn(`[EVENT BROADCASTER] Warning: ${broadcaster} failed for eventGroup "${eventGroup}": ${result.reason}`) } else { const broadcaster = index === 0 ? 'eventBroadcasterMain (API)' : 'eventBroadcasterKafka' - console.log(`[EVENT BROADCASTER] Success: ${broadcaster} completed for eventGroup "${eventGroup}"`) } }) - console.log(`[EVENT BROADCASTER] ===== BROADCAST EVENT COMPLETED =====`) } catch (err) { // Log any unexpected errors from the promise settlement console.error('[EVENT BROADCASTER] Error in broadcastEvent:', err) diff --git a/src/services/account.js b/src/services/account.js index 0bfb7d3d..33c8afe1 100644 --- a/src/services/account.js +++ b/src/services/account.js @@ -55,13 +55,6 @@ module.exports = class AccountHelper { */ static async create(bodyData, deviceInfo, domain) { - console.log('🔐 [ACCOUNT SERVICE] ===== ACCOUNT CREATION SERVICE STARTING =====') - console.log('🔐 [ACCOUNT SERVICE] Input parameters:') - console.log('🔐 [ACCOUNT SERVICE] - bodyData keys:', Object.keys(bodyData)) - console.log('🔐 [ACCOUNT SERVICE] - deviceInfo:', JSON.stringify(deviceInfo, null, 2)) - console.log('🔐 [ACCOUNT SERVICE] - domain:', domain) - console.log('🔐 [ACCOUNT SERVICE] Full bodyData:', JSON.stringify(bodyData, null, 2)) - const projection = ['password'] let isInvitedUserId = false @@ -73,30 +66,22 @@ module.exports = class AccountHelper { responseCode: 'CLIENT_ERROR', }) - console.log('🔐 [ACCOUNT SERVICE] Step 1: Looking up tenant domain...') const tenantDomain = await tenantDomainQueries.findOne({ domain }) - console.log('🔐 [ACCOUNT SERVICE] Tenant domain result:', tenantDomain ? JSON.stringify(tenantDomain, null, 2) : 'NOT_FOUND') if (!tenantDomain) { - console.log('🔐 [ACCOUNT SERVICE] ❌ TENANT_DOMAIN_NOT_FOUND for domain:', domain) return notFoundResponse('TENANT_DOMAIN_NOT_FOUND_PING_ADMIN') } - console.log('🔐 [ACCOUNT SERVICE] Step 2: Looking up tenant details...') const tenantDetail = await tenantQueries.findOne({ code: tenantDomain.tenant_code, status: common.ACTIVE_STATUS, }) - console.log('🔐 [ACCOUNT SERVICE] Tenant detail result:', tenantDetail ? JSON.stringify(tenantDetail, null, 2) : 'NOT_FOUND') if (!tenantDetail) { - console.log('🔐 [ACCOUNT SERVICE] ❌ TENANT_NOT_FOUND for tenant_code:', tenantDomain.tenant_code) return notFoundResponse('TENANT_NOT_FOUND_PING_ADMIN') } - console.log('🔐 [ACCOUNT SERVICE] Step 3: Validating email/phone presence...') if (!bodyData.email && !bodyData.phone) { - console.log('🔐 [ACCOUNT SERVICE] ❌ EMAIL_OR_PHONE_REQUIRED') return responses.failureResponse({ message: 'EMAIL_OR_PHONE_REQUIRED', statusCode: httpStatusCode.bad_request, @@ -106,17 +91,13 @@ module.exports = class AccountHelper { let domainDetails = null - console.log('🔐 [ACCOUNT SERVICE] Step 4: Processing registration code...') if (bodyData.registration_code) { - console.log('🔐 [ACCOUNT SERVICE] Looking up organization with registration code:', bodyData.registration_code.toLowerCase()) domainDetails = await organizationQueries.findOrgWithRegistrationCode({ tenant_code: tenantDetail.code, registration_code: bodyData.registration_code.toLowerCase(), }) - console.log('🔐 [ACCOUNT SERVICE] Organization lookup result:', domainDetails ? JSON.stringify(domainDetails, null, 2) : 'NOT_FOUND') if (!domainDetails) { - console.log('🔐 [ACCOUNT SERVICE] ❌ INVALID_ORG_registration_code') return responses.failureResponse({ message: 'INVALID_ORG_registration_code', statusCode: httpStatusCode.bad_request, @@ -124,22 +105,17 @@ module.exports = class AccountHelper { }) } } else { - console.log('🔐 [ACCOUNT SERVICE] No registration code provided') } - console.log('🔐 [ACCOUNT SERVICE] Step 5: Encrypting email/phone...') // Handle email encryption if provided let encryptedEmailId = null let plaintextEmailId = null if (bodyData.email) { - console.log('🔐 [ACCOUNT SERVICE] Encrypting email...') plaintextEmailId = bodyData.email.toLowerCase() try { encryptedEmailId = emailEncryption.encrypt(plaintextEmailId) bodyData.email = encryptedEmailId - console.log('🔐 [ACCOUNT SERVICE] Email encryption successful') } catch (encryptError) { - console.log('🔐 [ACCOUNT SERVICE] ❌ Email encryption failed:', encryptError.message) throw encryptError } } @@ -148,15 +124,12 @@ module.exports = class AccountHelper { let encryptedPhoneNumber = null let plaintextPhoneNumber = null if (bodyData.phone && bodyData.phone_code) { - console.log('🔐 [ACCOUNT SERVICE] Encrypting phone number...') plaintextPhoneNumber = bodyData.phone try { encryptedPhoneNumber = emailEncryption.encrypt(plaintextPhoneNumber) bodyData.phone = encryptedPhoneNumber bodyData.phone_code = bodyData.phone_code // Store phone_code separately - console.log('🔐 [ACCOUNT SERVICE] Phone encryption successful') } catch (encryptError) { - console.log('🔐 [ACCOUNT SERVICE] ❌ Phone encryption failed:', encryptError.message) throw encryptError } } @@ -662,9 +635,6 @@ module.exports = class AccountHelper { broadcastEvent('userEvents', { requestBody: eventBody, isInternal: true }) - console.log('🔐 [ACCOUNT SERVICE] ===== ACCOUNT CREATION SUCCESS =====') - console.log('🔐 [ACCOUNT SERVICE] Final result keys:', Object.keys(result)) - console.log('🔐 [ACCOUNT SERVICE] User created successfully') return responses.successResponse({ statusCode: httpStatusCode.created, @@ -672,13 +642,6 @@ module.exports = class AccountHelper { result, }) } catch (error) { - console.log('🔐 [ACCOUNT SERVICE] ❌ CRITICAL ERROR IN ACCOUNT CREATION') - console.log('🔐 [ACCOUNT SERVICE] ❌ Error message:', error.message) - console.log('🔐 [ACCOUNT SERVICE] ❌ Error stack:', error.stack) - console.log('🔐 [ACCOUNT SERVICE] ❌ Error object:', JSON.stringify(error, Object.getOwnPropertyNames(error), 2)) - console.log('🔐 [ACCOUNT SERVICE] ❌ Error name:', error.name) - console.log('🔐 [ACCOUNT SERVICE] ❌ Error code:', error.code) - console.log('🔐 [ACCOUNT SERVICE] ===== ACCOUNT SERVICE ERROR END =====') throw error } } @@ -875,7 +838,6 @@ module.exports = class AccountHelper { result, }) } catch (error) { - console.log(error) throw error } } @@ -918,7 +880,6 @@ module.exports = class AccountHelper { message: 'LOGGED_OUT_SUCCESSFULLY', }) } catch (error) { - console.log(error) throw error } } @@ -1153,7 +1114,6 @@ module.exports = class AccountHelper { message: 'OTP_SENT_SUCCESSFULLY', }) } catch (error) { - console.log(error) throw error } } @@ -1573,7 +1533,6 @@ module.exports = class AccountHelper { result, }) } catch (error) { - console.log(error) throw error } } @@ -1725,7 +1684,6 @@ module.exports = class AccountHelper { }) } } catch (error) { - console.log(error) throw error } } @@ -1757,7 +1715,6 @@ module.exports = class AccountHelper { // Clear Redis cache asynchronously (fire and forget) const redisUserKey = `${common.redisUserPrefix}${tenantCode}_${userId}` utilsHelper.redisDel(redisUserKey).catch((err) => { - console.error('Redis delete error:', err) }) return responses.successResponse({ @@ -1877,7 +1834,6 @@ module.exports = class AccountHelper { message: 'USER_ROLE_UPDATED_SUCCESSFULLY', }) } catch (error) { - console.log(error) throw error } } @@ -1981,7 +1937,6 @@ module.exports = class AccountHelper { }, }) } catch (error) { - console.log(error) throw error } } @@ -2080,7 +2035,6 @@ module.exports = class AccountHelper { result, }) } catch (error) { - console.log(error) throw error } } @@ -2118,7 +2072,6 @@ module.exports = class AccountHelper { user.email = emailEncryption.decrypt(user.email) userIdsAndInvalidEmails.push(user.id) } catch (err) { - console.error(`Decryption failed for email: ${encryptedEmail}`, err) const originalEmail = emailEncryption.decrypt(encryptedEmail) userIdsAndInvalidEmails.push(originalEmail) } @@ -2127,7 +2080,6 @@ module.exports = class AccountHelper { const originalEmail = emailEncryption.decrypt(encryptedEmail) userIdsAndInvalidEmails.push(originalEmail) } catch (err) { - console.error(`Decryption failed for email: ${encryptedEmail}`, err) userIdsAndInvalidEmails.push('Decryption failed') } }