From 2d1354e453aea9823dfe595e6f263ee8530c2498 Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 14 Aug 2023 13:08:39 -0400 Subject: [PATCH 01/28] APPEALS-28105 Initial adding of WEBEX Mockservice --- lib/fakes/webex_service.rb | 99 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 lib/fakes/webex_service.rb diff --git a/lib/fakes/webex_service.rb b/lib/fakes/webex_service.rb new file mode 100644 index 00000000000..1b4a586abe0 --- /dev/null +++ b/lib/fakes/webex_service.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +class Fakes::WebexService < ExternalApi::WebexService + COMMUNICATION_PACKAGE_UUID = "24eb6a66-3833-4de6-bea4-4b614e55d5ac" + DISTRIBUTION_UUID = "201cef13-49ba-4f40-8741-97d06cee0270" + + class << self + def send_communication_package_request(file_number, name, document_references) + fake_package_request(file_number, name, document_references) + end + + def send_distribution_request(package_id, recipient, destinations) + [fake_distribution_request(package_id, recipient, destinations)] + end + + def get_distribution_request(distribution_uuid) + distribution = VbmsDistribution.find_by(uuid: distribution_uuid) + + return distribution_not_found_response unless distribution + + fake_distribution_response(distribution.uuid) + end + + private + + def bad_request_response + HTTPI::Response.new( + 400, + {}, + { + "error": "BadRequestError", + "message": "Id is not valid" + }.with_indifferent_access + ) + end + + def bad_access_response + HTTPI::Response.new( + 403, + {}, + { + "error": "BadRequestError", + "message": "Conference link cannot be created due to insufficient privileges" + }.with_indifferent_access + ) + end + + def distribution_not_found_response + HTTPI::Response.new( + 404, + {}, + { + "error": "BadRequestError", + "message": "Conference link does not exist at this time" + }.with_indifferent_access + ) + end + + # POST: /package-manager-service/communication-package + def fake_package_request(file_number, name, document_references) + HTTPI::Response.new( + 201, + {}, + { + "id" => COMMUNICATION_PACKAGE_UUID, + "fileNumber": file_number, + "name": name, + "documentReferences": document_references, + "status": "NEW", + "createDate": "" + }.with_indifferent_access + ) + end + + # POST: /package-manager-service/distribution + def fake_distribution_request(package_id, recipient, destinations) + HTTPI::Response.new( + 201, + {}, + { + + }.with_indifferent_access + ) + end + + # rubocop:disable Metrics/MethodLength + # GET: /package-manager-service/distribution/{id} + def webex_conference_response(_distribution_id) + HTTPI::Response.new( + 200, + {}, + { + 'fake_key': 'fake_value' + }.with_indifferent_access + ) + end + # rubocop:enable Metrics/MethodLength + end +end From 6f2e8e0cdf95ae8eab94de320de6a787e5020345 Mon Sep 17 00:00:00 2001 From: breedbah Date: Wed, 16 Aug 2023 11:19:55 -0400 Subject: [PATCH 02/28] APPEALS-28105 start of webex custom server --- client/mocks/webex-mocks/README.md | 25 ++++++++ client/mocks/webex-mocks/webex-mock-server.js | 42 +++++++++++++ client/mocks/webex-mocks/webex-mock.json | 63 +++++++++++++++++++ client/package.json | 3 +- 4 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 client/mocks/webex-mocks/README.md create mode 100644 client/mocks/webex-mocks/webex-mock-server.js create mode 100644 client/mocks/webex-mocks/webex-mock.json diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md new file mode 100644 index 00000000000..a74f888ec7c --- /dev/null +++ b/client/mocks/webex-mocks/README.md @@ -0,0 +1,25 @@ +Setup json server + +Step 1: Open a terminal + +Step 2: Navigate to the caseflow application + +step 3: Run command: npm install json-server + +step 4: Run command: npx json-server --watch client/mocks/webex-mocks/webex-mock.json --port 3001 + +*info: You will recieve all available routes within the terminal under 'Resources' + +*info: port must be set on a different port to run due to caseflow running on port 3000 + +step 5: Open a browser window in chrome and navigate to localhost:3001 [You will get an empty object] + +*info: reference guides +[https://jsonplaceholder.typicode.com/guide/] +[https://blog.logrocket.com/how-to-bootstrap-your-project-with-json-server/] + +step 6: Append the key to the path you are wanting to query [localhost:30001/conference-links] + +*info: this will give you the list of objects with the corresponding key + +step 7: Append the id to GET the specific id [localhost:30001/conference-links/1] diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js new file mode 100644 index 00000000000..00a398e6dbb --- /dev/null +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -0,0 +1,42 @@ +const jsonServer = require("json-server"); +const express = require("express"); +const server = jsonServer.create(); +const router = jsonServer.router("mocks/webex-mocks/webex-mock.json"); // your mock data file +const middlewares = jsonServer.defaults(); + +server.use(middlewares); +server.use(jsonServer.bodyParser); + +// Example custom routes for specific error handling +server.get("/error-400", (req, res) => { + res + .status(400) + .json({ + message: "The request was invalid or cannot be otherwise served.", + }); +}); + +server.get("/error-401", (req, res) => { + res + .status(401) + .json({ message: "Authentication credentials were missing or incorrect." }); +}); + +// ... Similarly, add routes for other error codes ... + +// Middleware to handle not-found items +server.use((req, res, next) => { + if (req.method === 'GET' && res.locals.data == null) { + res.status(404).json({ message: "Item not found" }); + } else { + next(); + } +}); + +// To handle the default behavior, use the router middleware last +server.use(router); + +// Start the server +server.listen(3001, () => { + console.log("JSON Server is running on port 3001"); +}); diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json new file mode 100644 index 00000000000..7b821c529e5 --- /dev/null +++ b/client/mocks/webex-mocks/webex-mock.json @@ -0,0 +1,63 @@ +{ + "conference-links": [ + { "id":1, + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "", + "meetingOptions": [{ + "enabledChat": true, + "enableVideo": true + }], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [{ + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + }] }, + { + "id": 2, + "title": "Number 2!!!", + "author": "typicode" + } + ], + "comments": [ + { + "id": 1, + "body": "some comment", + "postId": 1 + }, + { + "id": 2, + "body": "some comment", + "postId": 1 + } + ], + "profile": { + "name": "typicode" + } +} diff --git a/client/package.json b/client/package.json index cc2ba8fbd77..1efdc7c44f0 100644 --- a/client/package.json +++ b/client/package.json @@ -25,7 +25,8 @@ "dev": "yarn run dev:clear-build && NODE_ENV=development yarn run build -w", "dev:hot": "webpack-dev-server", "storybook": "start-storybook -p 6006", - "build:storybook": "build-storybook -o ../public/storybook" + "build:storybook": "build-storybook -o ../public/storybook", + "webex-server": "node mocks/webex-mocks/webex-mock-server" }, "cacheDirectories": [ "node_modules", From 717b69c85792e6d235a3efec0e2eed93579b7700 Mon Sep 17 00:00:00 2001 From: breedbah Date: Wed, 16 Aug 2023 13:55:08 -0400 Subject: [PATCH 03/28] APPEALS-28105 Adding error messages --- client/mocks/webex-mocks/README.md | 21 ++-- client/mocks/webex-mocks/webex-mock-server.js | 96 +++++++++++++++---- 2 files changed, 85 insertions(+), 32 deletions(-) diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index a74f888ec7c..33e47c11342 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -2,24 +2,21 @@ Setup json server Step 1: Open a terminal -Step 2: Navigate to the caseflow application +Step 2: Navigate to the caseflow/client step 3: Run command: npm install json-server -step 4: Run command: npx json-server --watch client/mocks/webex-mocks/webex-mock.json --port 3001 +step 4: Run command: npm run webex-server -*info: You will recieve all available routes within the terminal under 'Resources' +\*info: You will recieve all available routes within the terminal under 'Resources' -*info: port must be set on a different port to run due to caseflow running on port 3000 +\*info: port must be set on a different port to run due to caseflow running on port 3000 -step 5: Open a browser window in chrome and navigate to localhost:3001 [You will get an empty object] +step 5: Open a browser window in chrome and navigate to localhost:3001 [You will get the default page] -*info: reference guides -[https://jsonplaceholder.typicode.com/guide/] -[https://blog.logrocket.com/how-to-bootstrap-your-project-with-json-server/] +\*info: reference guides +[https://github.com/typicode/json-server/blob/master/README.md] -step 6: Append the key to the path you are wanting to query [localhost:30001/conference-links] -*info: this will give you the list of objects with the corresponding key - -step 7: Append the id to GET the specific id [localhost:30001/conference-links/1] +Tutorial Resources: +[https://www.youtube.com/watch?v=_1kNqAybxW0&list=PLC3y8-rFHvwhc9YZIdqNL5sWeTCGxF4ya&index=1] diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 00a398e6dbb..c9dcb5ffdba 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -1,42 +1,98 @@ -const jsonServer = require("json-server"); -const express = require("express"); +const jsonServer = require('json-server'); const server = jsonServer.create(); -const router = jsonServer.router("mocks/webex-mocks/webex-mock.json"); // your mock data file +const router = jsonServer.router('mocks/webex-mocks/webex-mock.json'); const middlewares = jsonServer.defaults(); server.use(middlewares); server.use(jsonServer.bodyParser); // Example custom routes for specific error handling -server.get("/error-400", (req, res) => { - res - .status(400) - .json({ - message: "The request was invalid or cannot be otherwise served.", - }); +server.get('/error-400', (req, res) => { + res.status(400).json({ + message: 'The request was invalid or cannot be otherwise served.', + }); }); -server.get("/error-401", (req, res) => { - res - .status(401) - .json({ message: "Authentication credentials were missing or incorrect." }); +server.get('/error-401', (req, res) => { + res.status(401).json({ + message: 'Authentication credentials were missing or incorrect.' + }); +}); + +server.get('/error-403', (req, res) => { + res.status(403).json({ + message: 'The request is understood, but it has been refused or access is not allowed', + }); +}); + +server.get('/error-405', (req, res) => { + res.status(405).json({ + message: + 'The request was made to a resource using an HTTP request method that is not supported.', + }); +}); + +server.get('/error-409', (req, res) => { + res.status(409).json({ + message: + 'The request could not be processed because it conflicts with some established rule of the system.', + }); +}); + +server.get('/error-410', (req, res) => { + res.status(410).json({ + message: 'The requested resource is no longer available.', + }); }); // ... Similarly, add routes for other error codes ... +// To handle the default behavior, use the router middleware last +server.use(router); + // Middleware to handle not-found items server.use((req, res, next) => { - if (req.method === 'GET' && res.locals.data == null) { - res.status(404).json({ message: "Item not found" }); + if (req.method === 'GET' && res.locals.data === null) { + res.status(404).json({ message: 'Item not found' }); } else { next(); } }); -// To handle the default behavior, use the router middleware last -server.use(router); +const errorRoutes = [ + { + path: '/error-400', + description: 'The request was invalid or cannot be otherwise served.' + }, + { + path: '/error-401', + description: 'Authentication credentials were missing or incorrect.' + } + // ... Add other error routes here +]; + +// ... + +server.listen(3050, () => { + console.log(' \\{^_^}/ hi!\n'); + console.log(' Loading mocks/webex-mocks/webex-mock.json'); + console.log(' Done\n'); + + console.log(' Resources:'); + const routes = Object.keys(router.db.getState()); + + routes.forEach((route) => { + console.log(` http://localhost:3050/${route}`); + }); + + console.log('\n Error Routes:'); + errorRoutes.forEach(route => { + console.log(` ${route.path} - ${route.description}`); + }); + + console.log('\n Home'); + console.log(' http://localhost:3050'); -// Start the server -server.listen(3001, () => { - console.log("JSON Server is running on port 3001"); + console.log('\n Type s + enter at any time to create a snapshot of the database'); + console.log(' Watching...'); }); From 2f671d10029326d24413a0dbc65eb915bfab50cc Mon Sep 17 00:00:00 2001 From: breedbah Date: Wed, 16 Aug 2023 16:40:00 -0400 Subject: [PATCH 04/28] APPEALS-28105 Completed adding errors to server --- client/mocks/webex-mocks/webex-mock-server.js | 103 +++++++++++++++--- 1 file changed, 90 insertions(+), 13 deletions(-) diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index c9dcb5ffdba..b921b749bc5 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -45,6 +45,75 @@ server.get('/error-410', (req, res) => { }); }); +server.get('/error-415', (req, res) => { + res.status(415).json({ + message: + 'The request was made to a resource without specifying a media type or used a media type that is not supported.', + }); +}); + +server.get('/error-423', (req, res) => { + res.status(423).json({ + message: 'The requested resource is temporarily unavailable', + }); +}); + +server.get('/error-428', (req, res) => { + res.status(428).json({ + message: + 'File(s) cannot be scanned for malware and need to be force downloaded.', + }); +}); + +server.get('/error-429', (req, res) => { + res.status(429).json({ + message: + 'Too many requests have been sent in a given amount of time and the request has been rate limited.', + }); +}); + +server.get('/error-500', (req, res) => { + res.status(500).json({ + message: 'Something went wrong on the server.', + }); +}); + +server.get('/error-502', (req, res) => { + res.status(502).json({ + message: 'The server received an invalid response from an upstream server while processing the request.', + }); +}); + +server.get('/error-503', (req, res) => { + res.status(503).json({ + message: 'Server is overloaded with requests. Try again later.', + }); +}); + +server.get('/error-504', (req, res) => { + res.status(504).json({ + message: 'An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.', + }); +}); + +server.get('/health-check-yellow', (req, res) => { + res.status(200).json({ + status: 'yellow', + }); +}); + +server.get('/health-check-red', (req, res) => { + res.status(200).json({ + status: 'red', + }); +}); + +server.get('/health-check-green', (req, res) => { + res.status(200).json({ + status: 'green', + }); +}); + // ... Similarly, add routes for other error codes ... // To handle the default behavior, use the router middleware last @@ -60,18 +129,26 @@ server.use((req, res, next) => { }); const errorRoutes = [ - { - path: '/error-400', - description: 'The request was invalid or cannot be otherwise served.' - }, - { - path: '/error-401', - description: 'Authentication credentials were missing or incorrect.' - } - // ... Add other error routes here -]; + '/error-400', + '/error-401', + '/error-403', + '/error-404', + '/error-405', + '/error-409', + '/error-410', + '/error-415', + '/error-423', + '/error-428', + '/error-429', + '/error-500', + '/error-502', + '/error-503', + '/error-504', + '/health-check-yellow', + '/health-check-red', + '/health-check-green', -// ... +]; server.listen(3050, () => { console.log(' \\{^_^}/ hi!\n'); @@ -86,8 +163,8 @@ server.listen(3050, () => { }); console.log('\n Error Routes:'); - errorRoutes.forEach(route => { - console.log(` ${route.path} - ${route.description}`); + errorRoutes.forEach((route) => { + console.log(` ${route}`); }); console.log('\n Home'); From 1b8b8fbe167dcbc5ab72bf369de93d98019d127c Mon Sep 17 00:00:00 2001 From: breedbah Date: Thu, 17 Aug 2023 08:01:24 -0400 Subject: [PATCH 05/28] APPEALS-28105 changes to webex server --- client/mocks/webex-mocks/webex-mock.json | 357 ++++++++++++++++++++--- 1 file changed, 314 insertions(+), 43 deletions(-) diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json index 7b821c529e5..7d50e1c5209 100644 --- a/client/mocks/webex-mocks/webex-mock.json +++ b/client/mocks/webex-mocks/webex-mock.json @@ -1,48 +1,319 @@ { "conference-links": [ - { "id":1, - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "", - "meetingOptions": [{ - "enabledChat": true, - "enableVideo": true - }], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [{ - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - }] }, { - "id": 2, - "title": "Number 2!!!", - "author": "typicode" + "id": 1, + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ] + }, + { + "id": "2", + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ] + }, + { + "id": "3", + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ] + }, + { + "id": "4", + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ] + }, + { + "id": "5", + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "fakerdomain.com", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ] + }, + { + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "fakerdomain.com", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ], + "id": "kN94iPM" + }, + { + "title": "CASEFLOW_MOCK_SERVICE_<>", + "start": "2019-11-01 20:00:00", + "end": "2019-11-01 21:00:00", + "timezone": "Asia/Shanghai", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "enabledJoinBeforeHost": false, + "enableConnectAudioBeforeHost": false, + "joinBeforeHostMinutes": 0, + "excludePassword": false, + "publicMeeting": false, + "reminderTime": 0, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "enabledWebCastView": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 0, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "sendEmail": false, + "siteUrl": "fakerdomain.com", + "meetingOptions": [ + { + "enabledChat": true, + "enableVideo": true + } + ], + "attendeePrivileges": { + "enableShareContent": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": [ + { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudianceCallBack": false, + "entryAndExitTone": "beep", + "allowHosttoUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + ], + "id": "mv06qEy" } ], "comments": [ @@ -60,4 +331,4 @@ "profile": { "name": "typicode" } -} +} \ No newline at end of file From 05c620b0efd24756216cd4bf7ff85c62bf32d51e Mon Sep 17 00:00:00 2001 From: breedbah Date: Thu, 17 Aug 2023 12:07:59 -0400 Subject: [PATCH 06/28] APPEALS-28105 Started autogenerate data functionality --- client/mocks/webex-mocks/README.md | 6 +- client/mocks/webex-mocks/routes.json | 6 + .../mocks/webex-mocks/webex-mock-generator.js | 31 ++ client/mocks/webex-mocks/webex-mock-server.js | 170 ++++---- client/mocks/webex-mocks/webex-mock.json | 364 +++--------------- client/package.json | 3 +- lib/fakes/webex_service.rb | 99 ----- 7 files changed, 189 insertions(+), 490 deletions(-) create mode 100644 client/mocks/webex-mocks/routes.json create mode 100644 client/mocks/webex-mocks/webex-mock-generator.js delete mode 100644 lib/fakes/webex_service.rb diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index 33e47c11342..a51a05d8554 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -8,11 +8,15 @@ step 3: Run command: npm install json-server step 4: Run command: npm run webex-server +step 5: If you would like to autogenerate test data, run this command: npm run generate-webex + \*info: You will recieve all available routes within the terminal under 'Resources' \*info: port must be set on a different port to run due to caseflow running on port 3000 -step 5: Open a browser window in chrome and navigate to localhost:3001 [You will get the default page] +step 5: Open a browser window in chrome and navigate to localhost:3050 [You will get the default page] + +\*info: You can use any api endpoint software you want like Postman, but a good lightweight vs code ext. is [Thunder Client] \*info: reference guides [https://github.com/typicode/json-server/blob/master/README.md] diff --git a/client/mocks/webex-mocks/routes.json b/client/mocks/webex-mocks/routes.json new file mode 100644 index 00000000000..ce5c6a6006d --- /dev/null +++ b/client/mocks/webex-mocks/routes.json @@ -0,0 +1,6 @@ +{ + + "/api/conference-links/:id": "/conferencelinks/:id", + "/api/conference-links": "/conferenceLinks" + +} diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js new file mode 100644 index 00000000000..b4cec01d566 --- /dev/null +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -0,0 +1,31 @@ +const fs = require("fs"); +const faker = require("faker"); + +const generateConferenceLinks = () => { + let users = []; + + for (let id = 1; id <= 10; id++) { + users.push({ + id: id, + name: faker.name.firstName(), + email: faker.internet.email(), + address: faker.address.streetAddress(), + // ... other fields + }); + } + + return users; +}; + +// Generate the data +const data = { + conferenceLinks: generateConferenceLinks(), + // ... other data models +}; + +// Check if the script is being run directly +if (require.main === module) { + fs.writeFileSync("mocks/webex-mocks/webex-mock.json", JSON.stringify(data, null, 2)); + console.log("Generated new data in webex-mock.json"); +} + diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index b921b749bc5..cd75f624f1a 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -1,175 +1,195 @@ -const jsonServer = require('json-server'); +const jsonServer = require("json-server"); const server = jsonServer.create(); -const router = jsonServer.router('mocks/webex-mocks/webex-mock.json'); +const path = require("path"); +const router = jsonServer.router( + path.join("mocks/webex-mocks/webex-mock.json") +); const middlewares = jsonServer.defaults(); +const routesRewrite = require("./routes.json"); server.use(middlewares); server.use(jsonServer.bodyParser); -// Example custom routes for specific error handling -server.get('/error-400', (req, res) => { +// Apply the routes rewrites +server.use(jsonServer.rewriter(routesRewrite)); + +// Custom error routes and handlers +server.get("/error-400", (req, res) => { res.status(400).json({ - message: 'The request was invalid or cannot be otherwise served.', + message: "The request was invalid or cannot be otherwise served.", }); }); -server.get('/error-401', (req, res) => { +server.get("/error-401", (req, res) => { res.status(401).json({ - message: 'Authentication credentials were missing or incorrect.' + message: "Authentication credentials were missing or incorrect.", }); }); -server.get('/error-403', (req, res) => { +server.get("/error-403", (req, res) => { res.status(403).json({ - message: 'The request is understood, but it has been refused or access is not allowed', + message: + "The request is understood, but it has been refused or access is not allowed", }); }); -server.get('/error-405', (req, res) => { +server.get("/error-405", (req, res) => { res.status(405).json({ message: - 'The request was made to a resource using an HTTP request method that is not supported.', + "The request was made to a resource using an HTTP request method that is not supported.", }); }); -server.get('/error-409', (req, res) => { +server.get("/error-409", (req, res) => { res.status(409).json({ message: - 'The request could not be processed because it conflicts with some established rule of the system.', + "The request could not be processed because it conflicts with some established rule of the system.", }); }); -server.get('/error-410', (req, res) => { +server.get("/error-410", (req, res) => { res.status(410).json({ - message: 'The requested resource is no longer available.', + message: "The requested resource is no longer available.", }); }); -server.get('/error-415', (req, res) => { +server.get("/error-415", (req, res) => { res.status(415).json({ message: - 'The request was made to a resource without specifying a media type or used a media type that is not supported.', + "The request was made to a resource without specifying a media type or used a media type that is not supported.", }); }); -server.get('/error-423', (req, res) => { +server.get("/error-423", (req, res) => { res.status(423).json({ - message: 'The requested resource is temporarily unavailable', + message: "The requested resource is temporarily unavailable", }); }); -server.get('/error-428', (req, res) => { +server.get("/error-428", (req, res) => { res.status(428).json({ message: - 'File(s) cannot be scanned for malware and need to be force downloaded.', + "File(s) cannot be scanned for malware and need to be force downloaded.", }); }); -server.get('/error-429', (req, res) => { +server.get("/error-429", (req, res) => { res.status(429).json({ message: - 'Too many requests have been sent in a given amount of time and the request has been rate limited.', + "Too many requests have been sent in a given amount of time and the request has been rate limited.", }); }); -server.get('/error-500', (req, res) => { +server.get("/error-500", (req, res) => { res.status(500).json({ - message: 'Something went wrong on the server.', + message: "Something went wrong on the server.", }); }); -server.get('/error-502', (req, res) => { +server.get("/error-502", (req, res) => { res.status(502).json({ - message: 'The server received an invalid response from an upstream server while processing the request.', + message: + "The server received an invalid response from an upstream server while processing the request.", }); }); -server.get('/error-503', (req, res) => { +server.get("/error-503", (req, res) => { res.status(503).json({ - message: 'Server is overloaded with requests. Try again later.', + message: "Server is overloaded with requests. Try again later.", }); }); -server.get('/error-504', (req, res) => { +server.get("/error-504", (req, res) => { res.status(504).json({ - message: 'An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.', + message: + "An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.", }); }); -server.get('/health-check-yellow', (req, res) => { +server.get("/health-check-yellow", (req, res) => { res.status(200).json({ - status: 'yellow', + status: "yellow", }); }); -server.get('/health-check-red', (req, res) => { +server.get("/health-check-red", (req, res) => { res.status(200).json({ - status: 'red', + status: "red", }); }); -server.get('/health-check-green', (req, res) => { +server.get("/health-check-green", (req, res) => { res.status(200).json({ - status: 'green', + status: "green", }); }); -// ... Similarly, add routes for other error codes ... - -// To handle the default behavior, use the router middleware last -server.use(router); - // Middleware to handle not-found items server.use((req, res, next) => { - if (req.method === 'GET' && res.locals.data === null) { - res.status(404).json({ message: 'Item not found' }); + if (req.method === "GET" && res.locals.data === null) { + res.status(404).json({ message: "Item not found" }); } else { next(); } }); -const errorRoutes = [ - '/error-400', - '/error-401', - '/error-403', - '/error-404', - '/error-405', - '/error-409', - '/error-410', - '/error-415', - '/error-423', - '/error-428', - '/error-429', - '/error-500', - '/error-502', - '/error-503', - '/error-504', - '/health-check-yellow', - '/health-check-red', - '/health-check-green', +server.use(router); +const errorRoutes = [ + "/error-400", + "/error-401", + "/error-403", + "/error-404", + "/error-405", + "/error-409", + "/error-410", + "/error-415", + "/error-423", + "/error-428", + "/error-429", + "/error-500", + "/error-502", + "/error-503", + "/error-504", + "/health-check-yellow", + "/health-check-red", + "/health-check-green", ]; server.listen(3050, () => { - console.log(' \\{^_^}/ hi!\n'); - console.log(' Loading mocks/webex-mocks/webex-mock.json'); - console.log(' Done\n'); + console.log(" \\{^_^}/ hi!\n"); + console.log(" Loading mocks/webex-mocks/webex-mock.json"); + console.log(" Done\n"); - console.log(' Resources:'); - const routes = Object.keys(router.db.getState()); + console.log(" Resources:"); + + // Original routes from the database state + const originalRoutes = Object.keys(router.db.getState()); + + // Rewritten routes based on the routes.json rewrites + const rewrittenRoutes = originalRoutes.map((route) => { + for (let key in routesRewrite) { + if (routesRewrite[key] === `/${route}`) { + return key; // returning the custom path + } + } + return `/${route}`; // returning the original path if no custom path found + }); - routes.forEach((route) => { - console.log(` http://localhost:3050/${route}`); + rewrittenRoutes.forEach((route) => { + console.log(` http://localhost:3050${route}`); }); - console.log('\n Error Routes:'); + console.log("\n Error Routes:"); errorRoutes.forEach((route) => { console.log(` ${route}`); }); - console.log('\n Home'); - console.log(' http://localhost:3050'); + console.log("\n Home"); + console.log(" http://localhost:3050"); - console.log('\n Type s + enter at any time to create a snapshot of the database'); - console.log(' Watching...'); + console.log( + "\n Type s + enter at any time to create a snapshot of the database" + ); + console.log(" Watching..."); }); diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json index 7d50e1c5209..d737dd7c7e9 100644 --- a/client/mocks/webex-mocks/webex-mock.json +++ b/client/mocks/webex-mocks/webex-mock.json @@ -1,334 +1,70 @@ { - "conference-links": [ + "conferenceLinks": [ { "id": 1, - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ] + "name": "Karson", + "email": "Pierre_Erdman34@hotmail.com", + "address": "151 Dawson Lights" }, { - "id": "2", - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ] + "id": 2, + "name": "Dell", + "email": "Diana95@yahoo.com", + "address": "327 Kyra Springs" }, { - "id": "3", - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ] + "id": 3, + "name": "Libby", + "email": "Dillon_Pollich56@hotmail.com", + "address": "7687 Kovacek Fork" }, { - "id": "4", - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ] + "id": 4, + "name": "Anastasia", + "email": "Kendall.Dare26@yahoo.com", + "address": "752 Nicholas Underpass" }, { - "id": "5", - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "fakerdomain.com", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ] + "id": 5, + "name": "Velda", + "email": "Sheila.Wehner7@gmail.com", + "address": "9119 Jeremie Grove" }, { - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "fakerdomain.com", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ], - "id": "kN94iPM" + "id": 6, + "name": "Jillian", + "email": "Albertha_Parker47@hotmail.com", + "address": "151 Hyman Orchard" }, { - "title": "CASEFLOW_MOCK_SERVICE_<>", - "start": "2019-11-01 20:00:00", - "end": "2019-11-01 21:00:00", - "timezone": "Asia/Shanghai", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "enabledJoinBeforeHost": false, - "enableConnectAudioBeforeHost": false, - "joinBeforeHostMinutes": 0, - "excludePassword": false, - "publicMeeting": false, - "reminderTime": 0, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "enabledWebCastView": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 0, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "sendEmail": false, - "siteUrl": "fakerdomain.com", - "meetingOptions": [ - { - "enabledChat": true, - "enableVideo": true - } - ], - "attendeePrivileges": { - "enableShareContent": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": [ - { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudianceCallBack": false, - "entryAndExitTone": "beep", - "allowHosttoUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - ], - "id": "mv06qEy" - } - ], - "comments": [ + "id": 7, + "name": "Ruthe", + "email": "Jamar.Bins@yahoo.com", + "address": "479 Larue Stravenue" + }, { - "id": 1, - "body": "some comment", - "postId": 1 + "id": 8, + "name": "Cristal", + "email": "Oswald54@hotmail.com", + "address": "904 Nikolaus Canyon" }, { - "id": 2, - "body": "some comment", - "postId": 1 + "id": 9, + "name": "Bernita", + "email": "Stella.Schumm@yahoo.com", + "address": "824 Jena Unions" + }, + { + "id": 10, + "name": "Alexzander", + "email": "Mavis59@gmail.com", + "address": "7734 Burdette Forest" + }, + { + "id": 20, + "name": "Karson", + "email": "Pierre_Erdman34@hotmail.com", + "address": "151 Dawson Lights" } - ], - "profile": { - "name": "typicode" - } + ] } \ No newline at end of file diff --git a/client/package.json b/client/package.json index 1efdc7c44f0..2c59c1ca2a0 100644 --- a/client/package.json +++ b/client/package.json @@ -26,7 +26,8 @@ "dev:hot": "webpack-dev-server", "storybook": "start-storybook -p 6006", "build:storybook": "build-storybook -o ../public/storybook", - "webex-server": "node mocks/webex-mocks/webex-mock-server" + "webex-server": "node mocks/webex-mocks/webex-mock-server", + "generate-webex": "node mocks/webex-mocks/webex-mock-generator.js" }, "cacheDirectories": [ "node_modules", diff --git a/lib/fakes/webex_service.rb b/lib/fakes/webex_service.rb deleted file mode 100644 index 1b4a586abe0..00000000000 --- a/lib/fakes/webex_service.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true - -class Fakes::WebexService < ExternalApi::WebexService - COMMUNICATION_PACKAGE_UUID = "24eb6a66-3833-4de6-bea4-4b614e55d5ac" - DISTRIBUTION_UUID = "201cef13-49ba-4f40-8741-97d06cee0270" - - class << self - def send_communication_package_request(file_number, name, document_references) - fake_package_request(file_number, name, document_references) - end - - def send_distribution_request(package_id, recipient, destinations) - [fake_distribution_request(package_id, recipient, destinations)] - end - - def get_distribution_request(distribution_uuid) - distribution = VbmsDistribution.find_by(uuid: distribution_uuid) - - return distribution_not_found_response unless distribution - - fake_distribution_response(distribution.uuid) - end - - private - - def bad_request_response - HTTPI::Response.new( - 400, - {}, - { - "error": "BadRequestError", - "message": "Id is not valid" - }.with_indifferent_access - ) - end - - def bad_access_response - HTTPI::Response.new( - 403, - {}, - { - "error": "BadRequestError", - "message": "Conference link cannot be created due to insufficient privileges" - }.with_indifferent_access - ) - end - - def distribution_not_found_response - HTTPI::Response.new( - 404, - {}, - { - "error": "BadRequestError", - "message": "Conference link does not exist at this time" - }.with_indifferent_access - ) - end - - # POST: /package-manager-service/communication-package - def fake_package_request(file_number, name, document_references) - HTTPI::Response.new( - 201, - {}, - { - "id" => COMMUNICATION_PACKAGE_UUID, - "fileNumber": file_number, - "name": name, - "documentReferences": document_references, - "status": "NEW", - "createDate": "" - }.with_indifferent_access - ) - end - - # POST: /package-manager-service/distribution - def fake_distribution_request(package_id, recipient, destinations) - HTTPI::Response.new( - 201, - {}, - { - - }.with_indifferent_access - ) - end - - # rubocop:disable Metrics/MethodLength - # GET: /package-manager-service/distribution/{id} - def webex_conference_response(_distribution_id) - HTTPI::Response.new( - 200, - {}, - { - 'fake_key': 'fake_value' - }.with_indifferent_access - ) - end - # rubocop:enable Metrics/MethodLength - end -end From 8cf78566cfbd5b9fcd11d1d7291a87e41d481865 Mon Sep 17 00:00:00 2001 From: breedbah Date: Thu, 17 Aug 2023 14:56:24 -0400 Subject: [PATCH 07/28] APPEALS-28105 Updated error handling --- client/mocks/webex-mocks/routes.json | 8 +- client/mocks/webex-mocks/webex-mock-server.js | 188 +++++++++++------- 2 files changed, 121 insertions(+), 75 deletions(-) diff --git a/client/mocks/webex-mocks/routes.json b/client/mocks/webex-mocks/routes.json index ce5c6a6006d..c4ab9b3de57 100644 --- a/client/mocks/webex-mocks/routes.json +++ b/client/mocks/webex-mocks/routes.json @@ -1,6 +1,4 @@ -{ - - "/api/conference-links/:id": "/conferencelinks/:id", - "/api/conference-links": "/conferenceLinks" -} +{ + "/api/conference-links": "/conferenceLinks" + } diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index cd75f624f1a..419720b5882 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -1,11 +1,11 @@ -const jsonServer = require("json-server"); +const jsonServer = require('json-server'); const server = jsonServer.create(); -const path = require("path"); +const path = require('path'); const router = jsonServer.router( - path.join("mocks/webex-mocks/webex-mock.json") + path.join('mocks/webex-mocks/webex-mock.json') ); const middlewares = jsonServer.defaults(); -const routesRewrite = require("./routes.json"); +const routesRewrite = require('./routes.json'); server.use(middlewares); server.use(jsonServer.bodyParser); @@ -14,154 +14,202 @@ server.use(jsonServer.bodyParser); server.use(jsonServer.rewriter(routesRewrite)); // Custom error routes and handlers -server.get("/error-400", (req, res) => { +server.get('/error-400', (req, res) => { res.status(400).json({ - message: "The request was invalid or cannot be otherwise served.", + message: 'The request was invalid or cannot be otherwise served.', }); }); -server.get("/error-401", (req, res) => { +server.get('/error-401', (req, res) => { res.status(401).json({ - message: "Authentication credentials were missing or incorrect.", + message: 'Authentication credentials were missing or incorrect.', }); }); -server.get("/error-403", (req, res) => { +server.get('/error-403', (req, res) => { res.status(403).json({ message: - "The request is understood, but it has been refused or access is not allowed", + 'The request is understood, but it has been refused or access is not allowed', }); }); -server.get("/error-405", (req, res) => { +server.get('/error-405', (req, res) => { res.status(405).json({ message: - "The request was made to a resource using an HTTP request method that is not supported.", + 'The request was made to a resource using an HTTP request method that is not supported.', }); }); -server.get("/error-409", (req, res) => { +server.get('/error-409', (req, res) => { res.status(409).json({ message: - "The request could not be processed because it conflicts with some established rule of the system.", + 'The request could not be processed because it conflicts with some established rule of the system.', }); }); -server.get("/error-410", (req, res) => { +server.get('/error-410', (req, res) => { res.status(410).json({ - message: "The requested resource is no longer available.", + message: 'The requested resource is no longer available.', }); }); -server.get("/error-415", (req, res) => { +server.get('/error-415', (req, res) => { res.status(415).json({ message: - "The request was made to a resource without specifying a media type or used a media type that is not supported.", + 'The request was made to a resource without specifying a media type or used a media type that is not supported.', }); }); -server.get("/error-423", (req, res) => { +server.get('/error-423', (req, res) => { res.status(423).json({ - message: "The requested resource is temporarily unavailable", + message: 'The requested resource is temporarily unavailable', }); }); -server.get("/error-428", (req, res) => { +server.get('/error-428', (req, res) => { res.status(428).json({ message: - "File(s) cannot be scanned for malware and need to be force downloaded.", + 'File(s) cannot be scanned for malware and need to be force downloaded.', }); }); -server.get("/error-429", (req, res) => { +server.get('/error-429', (req, res) => { res.status(429).json({ message: - "Too many requests have been sent in a given amount of time and the request has been rate limited.", + 'Too many requests have been sent in a given amount of time and the request has been rate limited.', }); }); -server.get("/error-500", (req, res) => { +server.get('/error-500', (req, res) => { res.status(500).json({ - message: "Something went wrong on the server.", + message: 'Something went wrong on the server.', }); }); -server.get("/error-502", (req, res) => { +server.get('/error-502', (req, res) => { res.status(502).json({ message: - "The server received an invalid response from an upstream server while processing the request.", + 'The server received an invalid response from an upstream server while processing the request.', }); }); -server.get("/error-503", (req, res) => { +server.get('/error-503', (req, res) => { res.status(503).json({ - message: "Server is overloaded with requests. Try again later.", + message: 'Server is overloaded with requests. Try again later.', }); }); -server.get("/error-504", (req, res) => { +server.get('/error-504', (req, res) => { res.status(504).json({ message: - "An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.", + 'An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it.', }); }); -server.get("/health-check-yellow", (req, res) => { +server.get('/health-check-yellow', (req, res) => { res.status(200).json({ - status: "yellow", + status: 'yellow', }); }); -server.get("/health-check-red", (req, res) => { +server.get('/health-check-red', (req, res) => { res.status(200).json({ - status: "red", + status: 'red', }); }); -server.get("/health-check-green", (req, res) => { +server.get('/health-check-green', (req, res) => { res.status(200).json({ - status: "green", + status: 'green', }); }); -// Middleware to handle not-found items +// Middleware to handle duplication and not-found items server.use((req, res, next) => { - if (req.method === "GET" && res.locals.data === null) { - res.status(404).json({ message: "Item not found" }); - } else { - next(); + const db = router.db; // Get the lowdb instance + + // Handle POST requests: Check for duplicate items by ID across all collections + if (req.method === 'POST') { + const collections = Object.keys(db.getState()); + + for (const collectionName of collections) { + const collection = db.get(collectionName); + const existingItem = collection.find({ id: req.body.id }).value(); + + if (existingItem) { + res.status(409).json({ + error: true, + message: `Item with the same id already exists in ${collectionName}` + }); + + return; + } + } } + + // Handle GET requests: Check if the item exists across all collections + if (req.method === 'GET') { + // Extract the id from the path. This assumes the path format is always consistent. + const pathParts = req.path.split('/'); + const potentialId = parseInt(pathParts.pop()); + + if (!isNaN(potentialId)) { + const collections = Object.keys(db.getState()); + let itemFound = false; + + for (const collectionName of collections) { + const collection = db.get(collectionName); + const item = collection.find({ id: potentialId }).value(); + + if (item) { + itemFound = true; + break; + } + } + + if (!itemFound) { + res.status(404).json({ + error: true, + message: 'Item not found' + }); + + return; + } + } + } + + next(); }); server.use(router); const errorRoutes = [ - "/error-400", - "/error-401", - "/error-403", - "/error-404", - "/error-405", - "/error-409", - "/error-410", - "/error-415", - "/error-423", - "/error-428", - "/error-429", - "/error-500", - "/error-502", - "/error-503", - "/error-504", - "/health-check-yellow", - "/health-check-red", - "/health-check-green", + '/error-400', + '/error-401', + '/error-403', + '/error-404', + '/error-405', + '/error-409', + '/error-410', + '/error-415', + '/error-423', + '/error-428', + '/error-429', + '/error-500', + '/error-502', + '/error-503', + '/error-504', + '/health-check-yellow', + '/health-check-red', + '/health-check-green', ]; server.listen(3050, () => { - console.log(" \\{^_^}/ hi!\n"); - console.log(" Loading mocks/webex-mocks/webex-mock.json"); - console.log(" Done\n"); + console.log(' \\{^_^}/ hi!\n'); + console.log(' Loading mocks/webex-mocks/webex-mock.json'); + console.log(' Done\n'); - console.log(" Resources:"); + console.log( ' Resources:'); // Original routes from the database state const originalRoutes = Object.keys(router.db.getState()); @@ -180,16 +228,16 @@ server.listen(3050, () => { console.log(` http://localhost:3050${route}`); }); - console.log("\n Error Routes:"); + console.log('\n Error Routes:'); errorRoutes.forEach((route) => { console.log(` ${route}`); }); - console.log("\n Home"); - console.log(" http://localhost:3050"); + console.log('\n Home'); + console.log(' http://localhost:3050'); console.log( - "\n Type s + enter at any time to create a snapshot of the database" + '\n Type s + enter at any time to create a snapshot of the database' ); - console.log(" Watching..."); + console.log( 'Watching...'); }); From 1a55e14ed63cbe5db90a14f0a753e1471fca7d0a Mon Sep 17 00:00:00 2001 From: breedbah Date: Thu, 17 Aug 2023 15:06:06 -0400 Subject: [PATCH 08/28] APPEALS-28105 Updated routes --- client/mocks/webex-mocks/routes.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/mocks/webex-mocks/routes.json b/client/mocks/webex-mocks/routes.json index c4ab9b3de57..76516817fb9 100644 --- a/client/mocks/webex-mocks/routes.json +++ b/client/mocks/webex-mocks/routes.json @@ -1,4 +1,5 @@ { - "/api/conference-links": "/conferenceLinks" + "/api/v1/conference-links": "/conferenceLinks", + "/api/v1/conference-links/:id": "/conferenceLinks/:id" } From e2858be3abb03fe4f1d5fcac5963c407b67e0b75 Mon Sep 17 00:00:00 2001 From: breedbah Date: Fri, 18 Aug 2023 13:21:47 -0400 Subject: [PATCH 09/28] APPEALS-28105 Got the api webex-generation working --- client/mocks/webex-mocks/README.md | 10 + .../mocks/webex-mocks/webex-mock-generator.js | 104 +- client/mocks/webex-mocks/webex-mock-server.js | 194 +++- client/mocks/webex-mocks/webex-mock.json | 946 +++++++++++++++++- 4 files changed, 1148 insertions(+), 106 deletions(-) diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index a51a05d8554..391d8c8fdd3 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -24,3 +24,13 @@ step 5: Open a browser window in chrome and navigate to localhost:3050 [You will Tutorial Resources: [https://www.youtube.com/watch?v=_1kNqAybxW0&list=PLC3y8-rFHvwhc9YZIdqNL5sWeTCGxF4ya&index=1] + +To create a meeting the request body must have all of the keys and hit this endpoint? +[http://localhost:3050/fake.api-usgov.webex.com/v1/meetings] + +Get all conferencelinks with this endpoint +[http://localhost:3050/api/v1/conference-links] + + + + diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index b4cec01d566..1417f290709 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -2,19 +2,107 @@ const fs = require("fs"); const faker = require("faker"); const generateConferenceLinks = () => { - let users = []; + let webexLinks = []; for (let id = 1; id <= 10; id++) { - users.push({ - id: id, - name: faker.name.firstName(), - email: faker.internet.email(), - address: faker.address.streetAddress(), - // ... other fields + webexLinks.push({ + id: faker.random.uuid(), + meetingNumber: faker.random.number(), + title: faker.company.catchPhrase(), + password: faker.internet.password(), + meetingType: "meetingSeries", + state: "active", + timezone: "Asia/Shanghai", + start: "2023-11-01T20:00:00+08:00", + end: "2023-11-01T21:00:00+08:00", + hostUserId: faker.finance.account(), + hostDisplayName: faker.name.findName(), + hostEmail: faker.internet.email(), + hostKey: faker.random.number(), + siteUrl: "ciscofedsales.webex.com", + webLink: faker.internet.url(), + sipAddress: faker.internet.email(), + dialInIpAddress: faker.internet.ip(), + enabledAutoRecordMeeting: faker.random.boolean(), + allowAnyUserToBeCoHost: faker.random.boolean(), + allowFirstUserToBeCoHost: faker.random.boolean(), + allowAuthenticatedDevices: faker.random.boolean(), + enabledJoinBeforeHost: faker.random.boolean(), + joinBeforeHostMinutes: faker.random.number({ min: 0, max: 10 }), + enableConnectAudioBeforeHost: faker.random.boolean(), + excludePassword: faker.random.boolean(), + publicMeeting: faker.random.boolean(), + enableAutomaticLock: faker.random.boolean(), + automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), + unlockedMeetingJoinSecurity: "allowJoinWithLobby", + telephony: { + accessCode: faker.random + .number({ min: 100000, max: 999999 }) + .toString(), + callInNumbers: [ + { + label: "United States Toll", + callInNumber: "+1-415-527-5035", + tollType: "toll", + }, + { + label: "United States Toll (Washington D.C.)", + callInNumber: "+1-202-600-2533", + tollType: "toll", + }, + ], + links: [ + { + rel: "globalCallinNumbers", + href: + "/v1/meetings/" + faker.random.uuid() + "/globalCallinNumbers", + method: "GET", + }, + ], + }, + meetingOptions: { + enabledChat: faker.random.boolean(), + enabledVideo: faker.random.boolean(), + enabledNote: faker.random.boolean(), + noteType: "allowAll", + enabledFileTransfer: faker.random.boolean(), + enabledUCFRichMedia: faker.random.boolean(), + }, + attendeePrivileges: { + enabledShareContent: faker.random.boolean(), + enabledSaveDocument: faker.random.boolean(), + enabledPrintDocument: faker.random.boolean(), + enabledAnnotate: faker.random.boolean(), + enabledViewParticipantList: faker.random.boolean(), + enabledViewThumbnails: faker.random.boolean(), + enabledRemoteControl: faker.random.boolean(), + enabledViewAnyDocument: faker.random.boolean(), + enabledViewAnyPage: faker.random.boolean(), + enabledContactOperatorPrivately: faker.random.boolean(), + enabledChatHost: faker.random.boolean(), + enabledChatPresenter: faker.random.boolean(), + enabledChatOtherParticipants: faker.random.boolean(), + }, + sessionTypeId: faker.random.number({ min: 1, max: 5 }), + scheduledType: "meeting", + simultaneousInterpretation: { + enabled: faker.random.boolean(), + }, + enabledBreakoutSessions: faker.random.boolean(), + audioConnectionOptions: { + audioConnectionType: "webexAudio", + enabledTollFreeCallIn: faker.random.boolean(), + enabledGlobalCallIn: faker.random.boolean(), + enabledAudienceCallBack: faker.random.boolean(), + entryAndExitTone: "beep", + allowHostToUnmuteParticipants: faker.random.boolean(), + allowAttendeeToUnmuteSelf: faker.random.boolean(), + muteAttendeeUponEntry: faker.random.boolean(), + }, }); } - return users; + return webexLinks; }; // Generate the data diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 419720b5882..91d1be7e9a3 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -4,8 +4,10 @@ const path = require('path'); const router = jsonServer.router( path.join('mocks/webex-mocks/webex-mock.json') ); + const middlewares = jsonServer.defaults(); const routesRewrite = require('./routes.json'); +const faker = require("faker"); server.use(middlewares); server.use(jsonServer.bodyParser); @@ -124,62 +126,150 @@ server.get('/health-check-green', (req, res) => { }); }); -// Middleware to handle duplication and not-found items -server.use((req, res, next) => { - const db = router.db; // Get the lowdb instance - - // Handle POST requests: Check for duplicate items by ID across all collections - if (req.method === 'POST') { - const collections = Object.keys(db.getState()); - - for (const collectionName of collections) { - const collection = db.get(collectionName); - const existingItem = collection.find({ id: req.body.id }).value(); - - if (existingItem) { - res.status(409).json({ - error: true, - message: `Item with the same id already exists in ${collectionName}` - }); - - return; - } - } - } - - // Handle GET requests: Check if the item exists across all collections - if (req.method === 'GET') { - // Extract the id from the path. This assumes the path format is always consistent. - const pathParts = req.path.split('/'); - const potentialId = parseInt(pathParts.pop()); - - if (!isNaN(potentialId)) { - const collections = Object.keys(db.getState()); - let itemFound = false; - - for (const collectionName of collections) { - const collection = db.get(collectionName); - const item = collection.find({ id: potentialId }).value(); +const requiredKeys = [ + "title", + "start", + "end", + "timezone", + "enabledAutoRecordMeeting", + "allowAnyUserToBeCoHost", + "enabledJoinBeforeHost", + "enableConnectAudioBeforeHost", + "joinBeforeHostMinutes", + "excludePassword", + "publicMeeting", + "reminderTime", + "unlockedMeetingJoinSecurity", + "enabledWebCastView", + "enableAutomaticLock", + "automaticLockMinutes", + "allowFirstUserToBeCoHost", + "allowAuthenticatedDevices", + "sendEmail", + "siteUrl", + "meetingOptions", + "attendeePrivileges", + "enabledBreakoutSessions", + "audioConnectionOptions", +]; - if (item) { - itemFound = true; - break; +const generateMeetingData = { + id: faker.random.uuid(), + meetingNumber: faker.random.number(), + title: faker.company.catchPhrase(), + password: faker.internet.password(), + meetingType: "meetingSeries", + state: "active", + timezone: "Asia/Shanghai", + start: "2023-11-01T20:00:00+08:00", + end: "2023-11-01T21:00:00+08:00", + hostUserId: faker.finance.account(), + hostDisplayName: faker.name.findName(), + hostEmail: faker.internet.email(), + hostKey: faker.random.number(), + siteUrl: "ciscofedsales.webex.com", + webLink: faker.internet.url(), + sipAddress: faker.internet.email(), + dialInIpAddress: faker.internet.ip(), + enabledAutoRecordMeeting: faker.random.boolean(), + allowAnyUserToBeCoHost: faker.random.boolean(), + allowFirstUserToBeCoHost: faker.random.boolean(), + allowAuthenticatedDevices: faker.random.boolean(), + enabledJoinBeforeHost: faker.random.boolean(), + joinBeforeHostMinutes: faker.random.number({ min: 0, max: 10 }), + enableConnectAudioBeforeHost: faker.random.boolean(), + excludePassword: faker.random.boolean(), + publicMeeting: faker.random.boolean(), + enableAutomaticLock: faker.random.boolean(), + automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), + unlockedMeetingJoinSecurity: "allowJoinWithLobby", + telephony: { + accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), + callInNumbers: [ + { + label: "United States Toll", + callInNumber: "+1-415-527-5035", + tollType: "toll", + }, + { + label: "United States Toll (Washington D.C.)", + callInNumber: "+1-202-600-2533", + tollType: "toll", + }, + ], + links: [ + { + rel: "globalCallinNumbers", + href: "/v1/meetings/" + faker.random.uuid() + "/globalCallinNumbers", + method: "GET", + }, + ], + }, + meetingOptions: { + enabledChat: faker.random.boolean(), + enabledVideo: faker.random.boolean(), + enabledNote: faker.random.boolean(), + noteType: "allowAll", + enabledFileTransfer: faker.random.boolean(), + enabledUCFRichMedia: faker.random.boolean(), + }, + attendeePrivileges: { + enabledShareContent: faker.random.boolean(), + enabledSaveDocument: faker.random.boolean(), + enabledPrintDocument: faker.random.boolean(), + enabledAnnotate: faker.random.boolean(), + enabledViewParticipantList: faker.random.boolean(), + enabledViewThumbnails: faker.random.boolean(), + enabledRemoteControl: faker.random.boolean(), + enabledViewAnyDocument: faker.random.boolean(), + enabledViewAnyPage: faker.random.boolean(), + enabledContactOperatorPrivately: faker.random.boolean(), + enabledChatHost: faker.random.boolean(), + enabledChatPresenter: faker.random.boolean(), + enabledChatOtherParticipants: faker.random.boolean(), + }, + sessionTypeId: faker.random.number({ min: 1, max: 5 }), + scheduledType: "meeting", + simultaneousInterpretation: { + enabled: faker.random.boolean(), + }, + enabledBreakoutSessions: faker.random.boolean(), + audioConnectionOptions: { + audioConnectionType: "webexAudio", + enabledTollFreeCallIn: faker.random.boolean(), + enabledGlobalCallIn: faker.random.boolean(), + enabledAudienceCallBack: faker.random.boolean(), + entryAndExitTone: "beep", + allowHostToUnmuteParticipants: faker.random.boolean(), + allowAttendeeToUnmuteSelf: faker.random.boolean(), + muteAttendeeUponEntry: faker.random.boolean(), + }, +}; + +server.post("/fake.api-usgov.webex.com/v1/meetings", (req, res) => { + const requestBody = req.body; + + // Check if all required keys are present + const missingKeys = requiredKeys.filter((key) => !(key in requestBody)); + + if (missingKeys.length > 0) { + res.status(400).json({ message: "Missing required keys", missingKeys }); + } else { + // Access conferenceLinks from database + const db = router.db; // Get lowdb instance + const conferenceLinks = db.get("conferenceLinks"); + + // Add generateMeetingData object to conferenceLinks + conferenceLinks.push(generateMeetingData).write(); + + res + .status(200) + .json({ message: "Request is valid and data added!" }); } - } - - if (!itemFound) { - res.status(404).json({ - error: true, - message: 'Item not found' - }); +}); - return; - } - } - } +// Sample object to be added - next(); -}); server.use(router); diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json index d737dd7c7e9..6c5fd19657d 100644 --- a/client/mocks/webex-mocks/webex-mock.json +++ b/client/mocks/webex-mocks/webex-mock.json @@ -1,70 +1,924 @@ { "conferenceLinks": [ { - "id": 1, - "name": "Karson", - "email": "Pierre_Erdman34@hotmail.com", - "address": "151 Dawson Lights" + "id": "2bbdaa15-3d32-47bb-9b22-f961515a7f57", + "meetingNumber": 56455, + "title": "Streamlined 5th generation matrices", + "password": "ieIzUkSP6bRDqG0", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "37222262", + "hostDisplayName": "Neil Vandervort", + "hostEmail": "Jay_Hilpert@yahoo.com", + "hostKey": 9307, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://ima.net", + "sipAddress": "Yazmin46@hotmail.com", + "dialInIpAddress": "128.142.68.190", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 4, + "enableConnectAudioBeforeHost": false, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 3, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "720253", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/24bc67b1-f8ec-44b2-a3a9-0afa8b267048/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": false, + "enabledAnnotate": true, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": false, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 2, - "name": "Dell", - "email": "Diana95@yahoo.com", - "address": "327 Kyra Springs" + "id": "3270b6a4-bec5-4fc9-8528-2f555d5872ad", + "meetingNumber": 95282, + "title": "Extended motivating strategy", + "password": "cbNG8fwZQegFOE2", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "30921397", + "hostDisplayName": "Dulce Nikolaus", + "hostEmail": "Berniece.Morar@yahoo.com", + "hostKey": 81643, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://norris.com", + "sipAddress": "Freda19@gmail.com", + "dialInIpAddress": "140.162.243.122", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 5, + "enableConnectAudioBeforeHost": true, + "excludePassword": true, + "publicMeeting": true, + "enableAutomaticLock": false, + "automaticLockMinutes": 10, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "104372", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/bc253dc6-536c-499f-ad98-8e4710811749/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": true, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": false, + "enabledAnnotate": false, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": false, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": true, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } }, { - "id": 3, - "name": "Libby", - "email": "Dillon_Pollich56@hotmail.com", - "address": "7687 Kovacek Fork" + "id": "427d18ba-dd84-4309-9992-2ad4d28a5df3", + "meetingNumber": 32689, + "title": "Compatible radical adapter", + "password": "atmv_B2iZEOSAwQ", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "85649747", + "hostDisplayName": "Taurean McKenzie", + "hostEmail": "Jarvis_Hyatt@gmail.com", + "hostKey": 33023, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://ansley.com", + "sipAddress": "Vanessa.Graham@yahoo.com", + "dialInIpAddress": "17.67.187.244", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 3, + "enableConnectAudioBeforeHost": true, + "excludePassword": false, + "publicMeeting": true, + "enableAutomaticLock": false, + "automaticLockMinutes": 7, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "171528", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/7e93877f-0c41-48fa-876c-0e20323246cd/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": false, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 4, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 4, - "name": "Anastasia", - "email": "Kendall.Dare26@yahoo.com", - "address": "752 Nicholas Underpass" + "id": "907b19d5-d864-44a8-942a-4cba89cc8ba8", + "meetingNumber": 97930, + "title": "Polarised asymmetric policy", + "password": "o8am6PYaXhJUHoN", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "63176565", + "hostDisplayName": "Alta Bruen III", + "hostEmail": "Chaya_Torp@yahoo.com", + "hostKey": 81091, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://nona.net", + "sipAddress": "Zoila_Turcotte@yahoo.com", + "dialInIpAddress": "152.74.55.155", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 2, + "enableConnectAudioBeforeHost": false, + "excludePassword": true, + "publicMeeting": true, + "enableAutomaticLock": false, + "automaticLockMinutes": 1, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "907519", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/c322fa7d-3027-4dcf-9149-7fb7d818ce99/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": true, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": false, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": false, + "enabledChatHost": true, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 3, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": true, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 5, - "name": "Velda", - "email": "Sheila.Wehner7@gmail.com", - "address": "9119 Jeremie Grove" + "id": "54ac78eb-f2c8-4587-8d43-b9a8e6ab4bea", + "meetingNumber": 42165, + "title": "Multi-channelled interactive capability", + "password": "hjsxn41KZT25xXu", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "54834533", + "hostDisplayName": "Jeramie Hoppe", + "hostEmail": "Camila_Lesch@yahoo.com", + "hostKey": 22255, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://charlotte.com", + "sipAddress": "Ryann49@yahoo.com", + "dialInIpAddress": "152.117.169.81", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 9, + "enableConnectAudioBeforeHost": false, + "excludePassword": true, + "publicMeeting": true, + "enableAutomaticLock": true, + "automaticLockMinutes": 4, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "223098", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/3ca8e38a-c2fd-4e6b-8a1b-18f450ca1e4d/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": false, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": false, + "enabledPrintDocument": false, + "enabledAnnotate": false, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": false, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 6, - "name": "Jillian", - "email": "Albertha_Parker47@hotmail.com", - "address": "151 Hyman Orchard" + "id": "c15270ed-e835-4592-b5b9-b4b13b5a2b8c", + "meetingNumber": 9797, + "title": "Mandatory system-worthy Graphical User Interface", + "password": "FeUE8hXE7SYlAwy", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "59184959", + "hostDisplayName": "Orlando Stiedemann", + "hostEmail": "Leila.Hills@gmail.com", + "hostKey": 37898, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://maximilian.info", + "sipAddress": "Jon_Rice@hotmail.com", + "dialInIpAddress": "195.32.68.156", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 2, + "enableConnectAudioBeforeHost": false, + "excludePassword": true, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 9, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "622352", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/ec62ba8b-a145-44f5-9412-3147f1a669e8/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": true, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": false, + "enabledAnnotate": true, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": false, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": false, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 2, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": false + } }, { - "id": 7, - "name": "Ruthe", - "email": "Jamar.Bins@yahoo.com", - "address": "479 Larue Stravenue" + "id": "018862ce-ab6d-41ed-a102-20a136aaf923", + "meetingNumber": 84055, + "title": "Multi-tiered methodical ability", + "password": "oBo3EMXravQsDGE", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "43811862", + "hostDisplayName": "Mr. Kirstin Volkman", + "hostEmail": "Edd_Kihn1@hotmail.com", + "hostKey": 14386, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://gideon.name", + "sipAddress": "Bernhard.Harris15@hotmail.com", + "dialInIpAddress": "116.247.213.104", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 9, + "enableConnectAudioBeforeHost": true, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 7, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "512359", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/f9dbdc29-3741-4277-b6b4-d031e75ea67e/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": true, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": false, + "enabledChatHost": false, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 1, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": true, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 8, - "name": "Cristal", - "email": "Oswald54@hotmail.com", - "address": "904 Nikolaus Canyon" + "id": "9c31787a-e73c-4af4-b08b-e81684d0cbb1", + "meetingNumber": 86831, + "title": "Mandatory dedicated matrix", + "password": "CYvWgC1IQD6ytvD", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "80182230", + "hostDisplayName": "Virgie King", + "hostEmail": "Ari_Volkman37@gmail.com", + "hostKey": 66529, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://ethelyn.com", + "sipAddress": "Wilma.Stroman@hotmail.com", + "dialInIpAddress": "116.242.42.39", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 0, + "enableConnectAudioBeforeHost": false, + "excludePassword": false, + "publicMeeting": true, + "enableAutomaticLock": true, + "automaticLockMinutes": 9, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "471458", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/bea0bc33-a364-47d6-a095-00744d5dc821/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": false, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": false, + "enabledChatHost": false, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": true + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 9, - "name": "Bernita", - "email": "Stella.Schumm@yahoo.com", - "address": "824 Jena Unions" + "id": "8f0b295a-33e6-4989-b874-b5fc5a2ed53d", + "meetingNumber": 22723, + "title": "Stand-alone bi-directional intranet", + "password": "fFWi8yMedJkvKOO", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "19393117", + "hostDisplayName": "Porter Ruecker", + "hostEmail": "Delmer.Koch92@gmail.com", + "hostKey": 33208, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://lenore.info", + "sipAddress": "Giovani.Connelly79@gmail.com", + "dialInIpAddress": "152.226.222.66", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 2, + "enableConnectAudioBeforeHost": false, + "excludePassword": false, + "publicMeeting": true, + "enableAutomaticLock": true, + "automaticLockMinutes": 6, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "919054", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/8c9dd12b-5c9f-4874-aae2-8d745f82039d/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": true, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": false, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": true, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 4, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } }, { - "id": 10, - "name": "Alexzander", - "email": "Mavis59@gmail.com", - "address": "7734 Burdette Forest" - }, - { - "id": 20, - "name": "Karson", - "email": "Pierre_Erdman34@hotmail.com", - "address": "151 Dawson Lights" + "id": "6ed04428-7d9b-4cd6-b7f3-54e348d5c340", + "meetingNumber": 24458, + "title": "Profound multimedia hub", + "password": "ZVn3BBpTl1wxc2w", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "72417773", + "hostDisplayName": "Twila Kuphal", + "hostEmail": "Hillard.Ward85@yahoo.com", + "hostKey": 58387, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://kassandra.net", + "sipAddress": "Alvera.Bergstrom@gmail.com", + "dialInIpAddress": "17.99.142.78", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 3, + "enableConnectAudioBeforeHost": true, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 7, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "432807", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/9c54ed9c-91f7-4e34-a399-53824a954683/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": true, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": false, + "enabledPrintDocument": false, + "enabledAnnotate": true, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": false, + "enabledChatHost": false, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 4, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": false + } } ] } \ No newline at end of file From 38ddb287d8f3f4eebb8247dd1d80485e812e5ea6 Mon Sep 17 00:00:00 2001 From: breedbah Date: Fri, 18 Aug 2023 13:44:59 -0400 Subject: [PATCH 10/28] APPEALS-25108 removed dummy data --- client/mocks/webex-mocks/webex-mock.json | 923 +---------------------- 1 file changed, 2 insertions(+), 921 deletions(-) diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json index 6c5fd19657d..45f026b185e 100644 --- a/client/mocks/webex-mocks/webex-mock.json +++ b/client/mocks/webex-mocks/webex-mock.json @@ -1,924 +1,5 @@ { "conferenceLinks": [ - { - "id": "2bbdaa15-3d32-47bb-9b22-f961515a7f57", - "meetingNumber": 56455, - "title": "Streamlined 5th generation matrices", - "password": "ieIzUkSP6bRDqG0", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "37222262", - "hostDisplayName": "Neil Vandervort", - "hostEmail": "Jay_Hilpert@yahoo.com", - "hostKey": 9307, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://ima.net", - "sipAddress": "Yazmin46@hotmail.com", - "dialInIpAddress": "128.142.68.190", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 4, - "enableConnectAudioBeforeHost": false, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 3, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "720253", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/24bc67b1-f8ec-44b2-a3a9-0afa8b267048/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": false, - "enabledAnnotate": true, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": false, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "3270b6a4-bec5-4fc9-8528-2f555d5872ad", - "meetingNumber": 95282, - "title": "Extended motivating strategy", - "password": "cbNG8fwZQegFOE2", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "30921397", - "hostDisplayName": "Dulce Nikolaus", - "hostEmail": "Berniece.Morar@yahoo.com", - "hostKey": 81643, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://norris.com", - "sipAddress": "Freda19@gmail.com", - "dialInIpAddress": "140.162.243.122", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 5, - "enableConnectAudioBeforeHost": true, - "excludePassword": true, - "publicMeeting": true, - "enableAutomaticLock": false, - "automaticLockMinutes": 10, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "104372", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/bc253dc6-536c-499f-ad98-8e4710811749/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": true, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": false, - "enabledAnnotate": false, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": false, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": true, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - }, - { - "id": "427d18ba-dd84-4309-9992-2ad4d28a5df3", - "meetingNumber": 32689, - "title": "Compatible radical adapter", - "password": "atmv_B2iZEOSAwQ", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "85649747", - "hostDisplayName": "Taurean McKenzie", - "hostEmail": "Jarvis_Hyatt@gmail.com", - "hostKey": 33023, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://ansley.com", - "sipAddress": "Vanessa.Graham@yahoo.com", - "dialInIpAddress": "17.67.187.244", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 3, - "enableConnectAudioBeforeHost": true, - "excludePassword": false, - "publicMeeting": true, - "enableAutomaticLock": false, - "automaticLockMinutes": 7, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "171528", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/7e93877f-0c41-48fa-876c-0e20323246cd/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": false, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 4, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "907b19d5-d864-44a8-942a-4cba89cc8ba8", - "meetingNumber": 97930, - "title": "Polarised asymmetric policy", - "password": "o8am6PYaXhJUHoN", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "63176565", - "hostDisplayName": "Alta Bruen III", - "hostEmail": "Chaya_Torp@yahoo.com", - "hostKey": 81091, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://nona.net", - "sipAddress": "Zoila_Turcotte@yahoo.com", - "dialInIpAddress": "152.74.55.155", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 2, - "enableConnectAudioBeforeHost": false, - "excludePassword": true, - "publicMeeting": true, - "enableAutomaticLock": false, - "automaticLockMinutes": 1, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "907519", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/c322fa7d-3027-4dcf-9149-7fb7d818ce99/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": true, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": false, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": false, - "enabledChatHost": true, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 3, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": true, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "54ac78eb-f2c8-4587-8d43-b9a8e6ab4bea", - "meetingNumber": 42165, - "title": "Multi-channelled interactive capability", - "password": "hjsxn41KZT25xXu", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "54834533", - "hostDisplayName": "Jeramie Hoppe", - "hostEmail": "Camila_Lesch@yahoo.com", - "hostKey": 22255, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://charlotte.com", - "sipAddress": "Ryann49@yahoo.com", - "dialInIpAddress": "152.117.169.81", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 9, - "enableConnectAudioBeforeHost": false, - "excludePassword": true, - "publicMeeting": true, - "enableAutomaticLock": true, - "automaticLockMinutes": 4, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "223098", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/3ca8e38a-c2fd-4e6b-8a1b-18f450ca1e4d/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": false, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": false, - "enabledPrintDocument": false, - "enabledAnnotate": false, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": false, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "c15270ed-e835-4592-b5b9-b4b13b5a2b8c", - "meetingNumber": 9797, - "title": "Mandatory system-worthy Graphical User Interface", - "password": "FeUE8hXE7SYlAwy", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "59184959", - "hostDisplayName": "Orlando Stiedemann", - "hostEmail": "Leila.Hills@gmail.com", - "hostKey": 37898, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://maximilian.info", - "sipAddress": "Jon_Rice@hotmail.com", - "dialInIpAddress": "195.32.68.156", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 2, - "enableConnectAudioBeforeHost": false, - "excludePassword": true, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 9, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "622352", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/ec62ba8b-a145-44f5-9412-3147f1a669e8/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": true, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": false, - "enabledAnnotate": true, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": false, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": false, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 2, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": false - } - }, - { - "id": "018862ce-ab6d-41ed-a102-20a136aaf923", - "meetingNumber": 84055, - "title": "Multi-tiered methodical ability", - "password": "oBo3EMXravQsDGE", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "43811862", - "hostDisplayName": "Mr. Kirstin Volkman", - "hostEmail": "Edd_Kihn1@hotmail.com", - "hostKey": 14386, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://gideon.name", - "sipAddress": "Bernhard.Harris15@hotmail.com", - "dialInIpAddress": "116.247.213.104", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 9, - "enableConnectAudioBeforeHost": true, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 7, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "512359", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/f9dbdc29-3741-4277-b6b4-d031e75ea67e/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": true, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": false, - "enabledChatHost": false, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 1, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": true, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "9c31787a-e73c-4af4-b08b-e81684d0cbb1", - "meetingNumber": 86831, - "title": "Mandatory dedicated matrix", - "password": "CYvWgC1IQD6ytvD", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "80182230", - "hostDisplayName": "Virgie King", - "hostEmail": "Ari_Volkman37@gmail.com", - "hostKey": 66529, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://ethelyn.com", - "sipAddress": "Wilma.Stroman@hotmail.com", - "dialInIpAddress": "116.242.42.39", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 0, - "enableConnectAudioBeforeHost": false, - "excludePassword": false, - "publicMeeting": true, - "enableAutomaticLock": true, - "automaticLockMinutes": 9, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "471458", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/bea0bc33-a364-47d6-a095-00744d5dc821/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": false, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": false, - "enabledChatHost": false, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": true - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "8f0b295a-33e6-4989-b874-b5fc5a2ed53d", - "meetingNumber": 22723, - "title": "Stand-alone bi-directional intranet", - "password": "fFWi8yMedJkvKOO", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "19393117", - "hostDisplayName": "Porter Ruecker", - "hostEmail": "Delmer.Koch92@gmail.com", - "hostKey": 33208, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://lenore.info", - "sipAddress": "Giovani.Connelly79@gmail.com", - "dialInIpAddress": "152.226.222.66", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 2, - "enableConnectAudioBeforeHost": false, - "excludePassword": false, - "publicMeeting": true, - "enableAutomaticLock": true, - "automaticLockMinutes": 6, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "919054", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/8c9dd12b-5c9f-4874-aae2-8d745f82039d/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": true, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": false, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": true, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 4, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - }, - { - "id": "6ed04428-7d9b-4cd6-b7f3-54e348d5c340", - "meetingNumber": 24458, - "title": "Profound multimedia hub", - "password": "ZVn3BBpTl1wxc2w", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "72417773", - "hostDisplayName": "Twila Kuphal", - "hostEmail": "Hillard.Ward85@yahoo.com", - "hostKey": 58387, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://kassandra.net", - "sipAddress": "Alvera.Bergstrom@gmail.com", - "dialInIpAddress": "17.99.142.78", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 3, - "enableConnectAudioBeforeHost": true, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 7, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "432807", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/9c54ed9c-91f7-4e34-a399-53824a954683/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": true, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": false, - "enabledPrintDocument": false, - "enabledAnnotate": true, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": false, - "enabledChatHost": false, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 4, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": false - } - } + ] -} \ No newline at end of file +} From 28b27ed47126c442440ee5120f4f26ca4865090b Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 10:28:02 -0400 Subject: [PATCH 11/28] APPEALS-28105 return the conference link object --- client/mocks/webex-mocks/webex-mock-server.js | 16 +- client/mocks/webex-mocks/webex-mock.json | 1015 ++++++++++++++++- 2 files changed, 1020 insertions(+), 11 deletions(-) diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 91d1be7e9a3..6684e3731fd 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -255,17 +255,15 @@ server.post("/fake.api-usgov.webex.com/v1/meetings", (req, res) => { if (missingKeys.length > 0) { res.status(400).json({ message: "Missing required keys", missingKeys }); } else { - // Access conferenceLinks from database - const db = router.db; // Get lowdb instance - const conferenceLinks = db.get("conferenceLinks"); + // Access conferenceLinks from database + const db = router.db; // Get lowdb instance + const conferenceLinks = db.get("conferenceLinks"); - // Add generateMeetingData object to conferenceLinks - conferenceLinks.push(generateMeetingData).write(); + // Add generateMeetingData object to conferenceLinks + conferenceLinks.push(generateMeetingData).write(); - res - .status(200) - .json({ message: "Request is valid and data added!" }); - } + res.status(200).json(generateMeetingData); + } }); // Sample object to be added diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json index 45f026b185e..f5af74baabd 100644 --- a/client/mocks/webex-mocks/webex-mock.json +++ b/client/mocks/webex-mocks/webex-mock.json @@ -1,5 +1,1016 @@ { "conferenceLinks": [ - + { + "id": "e3fafcc8-4aac-4b11-822e-bc8e8f55fbab", + "meetingNumber": 47482, + "title": "Phased bifurcated contingency", + "password": "9WcETihSp6EzDFz", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "69728606", + "hostDisplayName": "Cathryn Huel II", + "hostEmail": "Monserrate.Shanahan90@gmail.com", + "hostKey": 72954, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://ariane.net", + "sipAddress": "Lola.Douglas20@hotmail.com", + "dialInIpAddress": "204.13.184.133", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 2, + "enableConnectAudioBeforeHost": true, + "excludePassword": false, + "publicMeeting": true, + "enableAutomaticLock": true, + "automaticLockMinutes": 1, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "793131", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/4a45b8b9-b19c-4e49-886a-4e07cb052124/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": true, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": false, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": false, + "enabledViewThumbnails": true, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": false, + "enabledChatHost": false, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": false + } + }, + { + "id": "e18a14fc-6451-47b7-a66a-114d610d1fb3", + "meetingNumber": 67089, + "title": "Robust non-volatile utilisation", + "password": "YlGyunVBgLF7ybb", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "49632136", + "hostDisplayName": "Reba Johnson", + "hostEmail": "Jensen_Schoen3@yahoo.com", + "hostKey": 29203, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://karine.com", + "sipAddress": "Edison.Senger@hotmail.com", + "dialInIpAddress": "210.145.135.132", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 3, + "enableConnectAudioBeforeHost": false, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 9, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "473819", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/ab413b66-16a0-4176-ac4d-f5d55d15d775/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": true, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": true, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": false, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 1, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + }, + { + "id": "4417685c-5f2b-44b5-9623-e5b500043a0c", + "meetingNumber": 10956, + "title": "Virtual mobile implementation", + "password": "uV4K24gq2zRgtDV", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "90742575", + "hostDisplayName": "Kris Corkery", + "hostEmail": "Dedric.Pagac26@hotmail.com", + "hostKey": 25185, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://emerald.com", + "sipAddress": "Peyton23@hotmail.com", + "dialInIpAddress": "128.170.63.147", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 7, + "enableConnectAudioBeforeHost": true, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 1, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "100945", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/1c2c1e96-1fd5-4ca3-92ea-43db6d56f81c/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": true, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": false, + "enabledAnnotate": true, + "enabledViewParticipantList": true, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 4, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": false + } + }, + { + "id": "f2e00d03-8e9d-4385-822d-73a0b934c6ce", + "meetingNumber": 59205, + "title": "Open-architected even-keeled encryption", + "password": "CiXgRg61OA57ZAT", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "65047964", + "hostDisplayName": "Frieda Collier", + "hostEmail": "Korbin_Kuvalis@hotmail.com", + "hostKey": 21009, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://maynard.net", + "sipAddress": "Destin.Braun@yahoo.com", + "dialInIpAddress": "24.16.174.2", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 10, + "enableConnectAudioBeforeHost": false, + "excludePassword": true, + "publicMeeting": true, + "enableAutomaticLock": false, + "automaticLockMinutes": 7, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "967669", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/2cbdc33e-b179-4b6f-927a-aff6fd1007dc/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": false, + "enabledAnnotate": true, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": false, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": true, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + }, + { + "id": "392c5958-3a92-4e3f-b591-dd80fc1af6d2", + "meetingNumber": 29893, + "title": "Automated stable artificial intelligence", + "password": "GWoP8waZ2azWE2o", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "19263574", + "hostDisplayName": "Augustine Schinner IV", + "hostEmail": "Maurice11@hotmail.com", + "hostKey": 53145, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://wilber.net", + "sipAddress": "Kadin15@gmail.com", + "dialInIpAddress": "116.146.215.231", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 2, + "enableConnectAudioBeforeHost": false, + "excludePassword": true, + "publicMeeting": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 2, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "540893", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/8be32614-1f61-447a-9277-d4ddf50d9e05/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": false, + "enabledPrintDocument": true, + "enabledAnnotate": true, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": false, + "enabledChatHost": false, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 1, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": true, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + }, + { + "id": "56725652-ca96-462a-b213-f7833c4bb496", + "meetingNumber": 37140, + "title": "Reactive client-driven access", + "password": "wWDxYPLLjrARWva", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "48131198", + "hostDisplayName": "Johnathan Conn", + "hostEmail": "Isidro.Morissette63@gmail.com", + "hostKey": 2293, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://domingo.net", + "sipAddress": "Richmond64@gmail.com", + "dialInIpAddress": "40.246.34.158", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 9, + "enableConnectAudioBeforeHost": false, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 2, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "749299", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/35eb7c92-1ed1-4a65-b618-bea5124627e7/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": true, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": true, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": false, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": false, + "enabledChatHost": false, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": true + } + }, + { + "id": "0d3c9510-9634-494f-bf4e-38517813cb74", + "meetingNumber": 78490, + "title": "Advanced client-driven matrices", + "password": "2ELAzEbSkzrPg3b", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "03941178", + "hostDisplayName": "Helene McKenzie", + "hostEmail": "Idella_Ondricka12@hotmail.com", + "hostKey": 15585, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://nikolas.info", + "sipAddress": "Helga_MacGyver96@yahoo.com", + "dialInIpAddress": "160.147.247.171", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 10, + "enableConnectAudioBeforeHost": false, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 9, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "918071", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/756e8261-b660-49a7-9502-b2166767fb1e/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": false, + "enabledViewThumbnails": true, + "enabledRemoteControl": false, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": false, + "enabledChatHost": true, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": true + }, + "enabledBreakoutSessions": true, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": false + } + }, + { + "id": "f5d131ce-c8b3-4e2f-8f61-311d912da8a9", + "meetingNumber": 82623, + "title": "Function-based interactive throughput", + "password": "EESLHbhLMue1et7", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "36075676", + "hostDisplayName": "Enrico Wyman", + "hostEmail": "Buddy.Gislason97@gmail.com", + "hostKey": 1212, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://megane.info", + "sipAddress": "Sid17@yahoo.com", + "dialInIpAddress": "114.88.134.243", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 5, + "enableConnectAudioBeforeHost": false, + "excludePassword": true, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 5, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "442338", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/c20b96a8-dca7-4e26-bffd-5cd6d3579d62/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": false, + "enabledPrintDocument": false, + "enabledAnnotate": false, + "enabledViewParticipantList": false, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": true, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 3, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": true, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": true, + "muteAttendeeUponEntry": true + } + }, + { + "id": "0463e7ab-f5e3-4501-bad4-080b5c1692ba", + "meetingNumber": 52131, + "title": "Synergistic radical capability", + "password": "J3lpVAWwcC9vOPJ", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "27351129", + "hostDisplayName": "Hunter Wilderman Jr.", + "hostEmail": "Leatha.Predovic@yahoo.com", + "hostKey": 76480, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://marlene.net", + "sipAddress": "Abbey_Hills77@yahoo.com", + "dialInIpAddress": "193.211.228.35", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": true, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": true, + "enabledJoinBeforeHost": true, + "joinBeforeHostMinutes": 3, + "enableConnectAudioBeforeHost": true, + "excludePassword": false, + "publicMeeting": false, + "enableAutomaticLock": true, + "automaticLockMinutes": 4, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "308889", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/5ca4c68b-26fd-4a9c-8e70-01f392b483ae/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": false, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": false + }, + "attendeePrivileges": { + "enabledShareContent": true, + "enabledSaveDocument": true, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": true, + "enabledViewThumbnails": false, + "enabledRemoteControl": true, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": false, + "enabledChatHost": true, + "enabledChatPresenter": false, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": true + } + }, + { + "id": "ac5d73a8-5194-4344-9e84-cec7510d5d77", + "meetingNumber": 45733, + "title": "Virtual scalable task-force", + "password": "yxej_vtIadcY3Na", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "14611038", + "hostDisplayName": "Breana Stehr", + "hostEmail": "Dave.Corkery5@hotmail.com", + "hostKey": 47941, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "https://ryleigh.biz", + "sipAddress": "Kevon.Jacobson@gmail.com", + "dialInIpAddress": "162.16.32.58", + "enabledAutoRecordMeeting": false, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": true, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 7, + "enableConnectAudioBeforeHost": true, + "excludePassword": true, + "publicMeeting": false, + "enableAutomaticLock": false, + "automaticLockMinutes": 2, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "897918", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/c771ba6e-2c61-47f7-8a8f-fc2b64e84041/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": false, + "enabledNote": false, + "noteType": "allowAll", + "enabledFileTransfer": true, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": false, + "enabledPrintDocument": true, + "enabledAnnotate": false, + "enabledViewParticipantList": true, + "enabledViewThumbnails": false, + "enabledRemoteControl": false, + "enabledViewAnyDocument": false, + "enabledViewAnyPage": true, + "enabledContactOperatorPrivately": true, + "enabledChatHost": false, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": true + }, + "sessionTypeId": 2, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": true, + "enabledGlobalCallIn": true, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": true, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": true + } + }, + { + "id": "572400cd-1661-4deb-8c9a-8ba0210340de", + "meetingNumber": 74244, + "title": "Fully-configurable homogeneous algorithm", + "password": "HVfUgzMLD9Z8gl8", + "meetingType": "meetingSeries", + "state": "active", + "timezone": "Asia/Shanghai", + "start": "2023-11-01T20:00:00+08:00", + "end": "2023-11-01T21:00:00+08:00", + "hostUserId": "38475615", + "hostDisplayName": "Teresa Walsh", + "hostEmail": "Garnett92@yahoo.com", + "hostKey": 60679, + "siteUrl": "ciscofedsales.webex.com", + "webLink": "http://gertrude.org", + "sipAddress": "Henriette_Parker76@yahoo.com", + "dialInIpAddress": "209.186.73.185", + "enabledAutoRecordMeeting": true, + "allowAnyUserToBeCoHost": false, + "allowFirstUserToBeCoHost": false, + "allowAuthenticatedDevices": false, + "enabledJoinBeforeHost": false, + "joinBeforeHostMinutes": 5, + "enableConnectAudioBeforeHost": true, + "excludePassword": true, + "publicMeeting": true, + "enableAutomaticLock": false, + "automaticLockMinutes": 7, + "unlockedMeetingJoinSecurity": "allowJoinWithLobby", + "telephony": { + "accessCode": "776239", + "callInNumbers": [ + { + "label": "United States Toll", + "callInNumber": "+1-415-527-5035", + "tollType": "toll" + }, + { + "label": "United States Toll (Washington D.C.)", + "callInNumber": "+1-202-600-2533", + "tollType": "toll" + } + ], + "links": [ + { + "rel": "globalCallinNumbers", + "href": "/v1/meetings/bd8a1b5f-5654-4b17-b3cd-91193ede5aac/globalCallinNumbers", + "method": "GET" + } + ] + }, + "meetingOptions": { + "enabledChat": true, + "enabledVideo": false, + "enabledNote": true, + "noteType": "allowAll", + "enabledFileTransfer": false, + "enabledUCFRichMedia": true + }, + "attendeePrivileges": { + "enabledShareContent": false, + "enabledSaveDocument": true, + "enabledPrintDocument": false, + "enabledAnnotate": true, + "enabledViewParticipantList": true, + "enabledViewThumbnails": true, + "enabledRemoteControl": false, + "enabledViewAnyDocument": true, + "enabledViewAnyPage": false, + "enabledContactOperatorPrivately": true, + "enabledChatHost": false, + "enabledChatPresenter": true, + "enabledChatOtherParticipants": false + }, + "sessionTypeId": 5, + "scheduledType": "meeting", + "simultaneousInterpretation": { + "enabled": false + }, + "enabledBreakoutSessions": false, + "audioConnectionOptions": { + "audioConnectionType": "webexAudio", + "enabledTollFreeCallIn": false, + "enabledGlobalCallIn": false, + "enabledAudienceCallBack": false, + "entryAndExitTone": "beep", + "allowHostToUnmuteParticipants": false, + "allowAttendeeToUnmuteSelf": false, + "muteAttendeeUponEntry": true + } + } ] -} +} \ No newline at end of file From fe87289e9d4d829987fa5f2acb134c147f724b74 Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 10:51:36 -0400 Subject: [PATCH 12/28] APPEALS-28105 Removed webex-mock.json file --- client/mocks/webex-mocks/README.md | 6 +- client/mocks/webex-mocks/webex-mock.json | 1016 ---------------------- 2 files changed, 5 insertions(+), 1017 deletions(-) delete mode 100644 client/mocks/webex-mocks/webex-mock.json diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index 391d8c8fdd3..27c1f72f31b 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -6,6 +6,8 @@ Step 2: Navigate to the caseflow/client step 3: Run command: npm install json-server +step 4: Make sure casfelow application is running + step 4: Run command: npm run webex-server step 5: If you would like to autogenerate test data, run this command: npm run generate-webex @@ -21,7 +23,6 @@ step 5: Open a browser window in chrome and navigate to localhost:3050 [You will \*info: reference guides [https://github.com/typicode/json-server/blob/master/README.md] - Tutorial Resources: [https://www.youtube.com/watch?v=_1kNqAybxW0&list=PLC3y8-rFHvwhc9YZIdqNL5sWeTCGxF4ya&index=1] @@ -31,6 +32,9 @@ To create a meeting the request body must have all of the keys and hit this endp Get all conferencelinks with this endpoint [http://localhost:3050/api/v1/conference-links] +Javascript API call Fetch/Axios examples +[https://jsonplaceholder.typicode.com/] + diff --git a/client/mocks/webex-mocks/webex-mock.json b/client/mocks/webex-mocks/webex-mock.json deleted file mode 100644 index f5af74baabd..00000000000 --- a/client/mocks/webex-mocks/webex-mock.json +++ /dev/null @@ -1,1016 +0,0 @@ -{ - "conferenceLinks": [ - { - "id": "e3fafcc8-4aac-4b11-822e-bc8e8f55fbab", - "meetingNumber": 47482, - "title": "Phased bifurcated contingency", - "password": "9WcETihSp6EzDFz", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "69728606", - "hostDisplayName": "Cathryn Huel II", - "hostEmail": "Monserrate.Shanahan90@gmail.com", - "hostKey": 72954, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://ariane.net", - "sipAddress": "Lola.Douglas20@hotmail.com", - "dialInIpAddress": "204.13.184.133", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 2, - "enableConnectAudioBeforeHost": true, - "excludePassword": false, - "publicMeeting": true, - "enableAutomaticLock": true, - "automaticLockMinutes": 1, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "793131", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/4a45b8b9-b19c-4e49-886a-4e07cb052124/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": true, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": false, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": false, - "enabledViewThumbnails": true, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": false, - "enabledChatHost": false, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": false - } - }, - { - "id": "e18a14fc-6451-47b7-a66a-114d610d1fb3", - "meetingNumber": 67089, - "title": "Robust non-volatile utilisation", - "password": "YlGyunVBgLF7ybb", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "49632136", - "hostDisplayName": "Reba Johnson", - "hostEmail": "Jensen_Schoen3@yahoo.com", - "hostKey": 29203, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://karine.com", - "sipAddress": "Edison.Senger@hotmail.com", - "dialInIpAddress": "210.145.135.132", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 3, - "enableConnectAudioBeforeHost": false, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 9, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "473819", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/ab413b66-16a0-4176-ac4d-f5d55d15d775/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": true, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": true, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": false, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 1, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - }, - { - "id": "4417685c-5f2b-44b5-9623-e5b500043a0c", - "meetingNumber": 10956, - "title": "Virtual mobile implementation", - "password": "uV4K24gq2zRgtDV", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "90742575", - "hostDisplayName": "Kris Corkery", - "hostEmail": "Dedric.Pagac26@hotmail.com", - "hostKey": 25185, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://emerald.com", - "sipAddress": "Peyton23@hotmail.com", - "dialInIpAddress": "128.170.63.147", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 7, - "enableConnectAudioBeforeHost": true, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 1, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "100945", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/1c2c1e96-1fd5-4ca3-92ea-43db6d56f81c/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": true, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": false, - "enabledAnnotate": true, - "enabledViewParticipantList": true, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 4, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": false - } - }, - { - "id": "f2e00d03-8e9d-4385-822d-73a0b934c6ce", - "meetingNumber": 59205, - "title": "Open-architected even-keeled encryption", - "password": "CiXgRg61OA57ZAT", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "65047964", - "hostDisplayName": "Frieda Collier", - "hostEmail": "Korbin_Kuvalis@hotmail.com", - "hostKey": 21009, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://maynard.net", - "sipAddress": "Destin.Braun@yahoo.com", - "dialInIpAddress": "24.16.174.2", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 10, - "enableConnectAudioBeforeHost": false, - "excludePassword": true, - "publicMeeting": true, - "enableAutomaticLock": false, - "automaticLockMinutes": 7, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "967669", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/2cbdc33e-b179-4b6f-927a-aff6fd1007dc/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": false, - "enabledAnnotate": true, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": false, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": true, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - }, - { - "id": "392c5958-3a92-4e3f-b591-dd80fc1af6d2", - "meetingNumber": 29893, - "title": "Automated stable artificial intelligence", - "password": "GWoP8waZ2azWE2o", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "19263574", - "hostDisplayName": "Augustine Schinner IV", - "hostEmail": "Maurice11@hotmail.com", - "hostKey": 53145, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://wilber.net", - "sipAddress": "Kadin15@gmail.com", - "dialInIpAddress": "116.146.215.231", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 2, - "enableConnectAudioBeforeHost": false, - "excludePassword": true, - "publicMeeting": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 2, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "540893", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/8be32614-1f61-447a-9277-d4ddf50d9e05/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": false, - "enabledPrintDocument": true, - "enabledAnnotate": true, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": false, - "enabledChatHost": false, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 1, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": true, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - }, - { - "id": "56725652-ca96-462a-b213-f7833c4bb496", - "meetingNumber": 37140, - "title": "Reactive client-driven access", - "password": "wWDxYPLLjrARWva", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "48131198", - "hostDisplayName": "Johnathan Conn", - "hostEmail": "Isidro.Morissette63@gmail.com", - "hostKey": 2293, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://domingo.net", - "sipAddress": "Richmond64@gmail.com", - "dialInIpAddress": "40.246.34.158", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 9, - "enableConnectAudioBeforeHost": false, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 2, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "749299", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/35eb7c92-1ed1-4a65-b618-bea5124627e7/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": true, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": true, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": false, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": false, - "enabledChatHost": false, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": true - } - }, - { - "id": "0d3c9510-9634-494f-bf4e-38517813cb74", - "meetingNumber": 78490, - "title": "Advanced client-driven matrices", - "password": "2ELAzEbSkzrPg3b", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "03941178", - "hostDisplayName": "Helene McKenzie", - "hostEmail": "Idella_Ondricka12@hotmail.com", - "hostKey": 15585, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://nikolas.info", - "sipAddress": "Helga_MacGyver96@yahoo.com", - "dialInIpAddress": "160.147.247.171", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 10, - "enableConnectAudioBeforeHost": false, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 9, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "918071", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/756e8261-b660-49a7-9502-b2166767fb1e/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": false, - "enabledViewThumbnails": true, - "enabledRemoteControl": false, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": false, - "enabledChatHost": true, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": true - }, - "enabledBreakoutSessions": true, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": false - } - }, - { - "id": "f5d131ce-c8b3-4e2f-8f61-311d912da8a9", - "meetingNumber": 82623, - "title": "Function-based interactive throughput", - "password": "EESLHbhLMue1et7", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "36075676", - "hostDisplayName": "Enrico Wyman", - "hostEmail": "Buddy.Gislason97@gmail.com", - "hostKey": 1212, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://megane.info", - "sipAddress": "Sid17@yahoo.com", - "dialInIpAddress": "114.88.134.243", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 5, - "enableConnectAudioBeforeHost": false, - "excludePassword": true, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 5, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "442338", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/c20b96a8-dca7-4e26-bffd-5cd6d3579d62/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": false, - "enabledPrintDocument": false, - "enabledAnnotate": false, - "enabledViewParticipantList": false, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": true, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 3, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": true, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": true, - "muteAttendeeUponEntry": true - } - }, - { - "id": "0463e7ab-f5e3-4501-bad4-080b5c1692ba", - "meetingNumber": 52131, - "title": "Synergistic radical capability", - "password": "J3lpVAWwcC9vOPJ", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "27351129", - "hostDisplayName": "Hunter Wilderman Jr.", - "hostEmail": "Leatha.Predovic@yahoo.com", - "hostKey": 76480, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://marlene.net", - "sipAddress": "Abbey_Hills77@yahoo.com", - "dialInIpAddress": "193.211.228.35", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": true, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": true, - "enabledJoinBeforeHost": true, - "joinBeforeHostMinutes": 3, - "enableConnectAudioBeforeHost": true, - "excludePassword": false, - "publicMeeting": false, - "enableAutomaticLock": true, - "automaticLockMinutes": 4, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "308889", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/5ca4c68b-26fd-4a9c-8e70-01f392b483ae/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": false, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": false - }, - "attendeePrivileges": { - "enabledShareContent": true, - "enabledSaveDocument": true, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": true, - "enabledViewThumbnails": false, - "enabledRemoteControl": true, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": false, - "enabledChatHost": true, - "enabledChatPresenter": false, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": true - } - }, - { - "id": "ac5d73a8-5194-4344-9e84-cec7510d5d77", - "meetingNumber": 45733, - "title": "Virtual scalable task-force", - "password": "yxej_vtIadcY3Na", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "14611038", - "hostDisplayName": "Breana Stehr", - "hostEmail": "Dave.Corkery5@hotmail.com", - "hostKey": 47941, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "https://ryleigh.biz", - "sipAddress": "Kevon.Jacobson@gmail.com", - "dialInIpAddress": "162.16.32.58", - "enabledAutoRecordMeeting": false, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": true, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 7, - "enableConnectAudioBeforeHost": true, - "excludePassword": true, - "publicMeeting": false, - "enableAutomaticLock": false, - "automaticLockMinutes": 2, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "897918", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/c771ba6e-2c61-47f7-8a8f-fc2b64e84041/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": false, - "enabledNote": false, - "noteType": "allowAll", - "enabledFileTransfer": true, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": false, - "enabledPrintDocument": true, - "enabledAnnotate": false, - "enabledViewParticipantList": true, - "enabledViewThumbnails": false, - "enabledRemoteControl": false, - "enabledViewAnyDocument": false, - "enabledViewAnyPage": true, - "enabledContactOperatorPrivately": true, - "enabledChatHost": false, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": true - }, - "sessionTypeId": 2, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": true, - "enabledGlobalCallIn": true, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": true, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": true - } - }, - { - "id": "572400cd-1661-4deb-8c9a-8ba0210340de", - "meetingNumber": 74244, - "title": "Fully-configurable homogeneous algorithm", - "password": "HVfUgzMLD9Z8gl8", - "meetingType": "meetingSeries", - "state": "active", - "timezone": "Asia/Shanghai", - "start": "2023-11-01T20:00:00+08:00", - "end": "2023-11-01T21:00:00+08:00", - "hostUserId": "38475615", - "hostDisplayName": "Teresa Walsh", - "hostEmail": "Garnett92@yahoo.com", - "hostKey": 60679, - "siteUrl": "ciscofedsales.webex.com", - "webLink": "http://gertrude.org", - "sipAddress": "Henriette_Parker76@yahoo.com", - "dialInIpAddress": "209.186.73.185", - "enabledAutoRecordMeeting": true, - "allowAnyUserToBeCoHost": false, - "allowFirstUserToBeCoHost": false, - "allowAuthenticatedDevices": false, - "enabledJoinBeforeHost": false, - "joinBeforeHostMinutes": 5, - "enableConnectAudioBeforeHost": true, - "excludePassword": true, - "publicMeeting": true, - "enableAutomaticLock": false, - "automaticLockMinutes": 7, - "unlockedMeetingJoinSecurity": "allowJoinWithLobby", - "telephony": { - "accessCode": "776239", - "callInNumbers": [ - { - "label": "United States Toll", - "callInNumber": "+1-415-527-5035", - "tollType": "toll" - }, - { - "label": "United States Toll (Washington D.C.)", - "callInNumber": "+1-202-600-2533", - "tollType": "toll" - } - ], - "links": [ - { - "rel": "globalCallinNumbers", - "href": "/v1/meetings/bd8a1b5f-5654-4b17-b3cd-91193ede5aac/globalCallinNumbers", - "method": "GET" - } - ] - }, - "meetingOptions": { - "enabledChat": true, - "enabledVideo": false, - "enabledNote": true, - "noteType": "allowAll", - "enabledFileTransfer": false, - "enabledUCFRichMedia": true - }, - "attendeePrivileges": { - "enabledShareContent": false, - "enabledSaveDocument": true, - "enabledPrintDocument": false, - "enabledAnnotate": true, - "enabledViewParticipantList": true, - "enabledViewThumbnails": true, - "enabledRemoteControl": false, - "enabledViewAnyDocument": true, - "enabledViewAnyPage": false, - "enabledContactOperatorPrivately": true, - "enabledChatHost": false, - "enabledChatPresenter": true, - "enabledChatOtherParticipants": false - }, - "sessionTypeId": 5, - "scheduledType": "meeting", - "simultaneousInterpretation": { - "enabled": false - }, - "enabledBreakoutSessions": false, - "audioConnectionOptions": { - "audioConnectionType": "webexAudio", - "enabledTollFreeCallIn": false, - "enabledGlobalCallIn": false, - "enabledAudienceCallBack": false, - "entryAndExitTone": "beep", - "allowHostToUnmuteParticipants": false, - "allowAttendeeToUnmuteSelf": false, - "muteAttendeeUponEntry": true - } - } - ] -} \ No newline at end of file From 38d701050376db81828d91e5e51a5a89021bcead Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 10:52:20 -0400 Subject: [PATCH 13/28] APPEALS-28105 added the webex-mock.json to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 18884fd4e16..b655037991d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ client/junit.xml !/reports/sql_queries !/reports/.keep credstash.log +client/mocks/webex-mocks/webex-mock.json # Ignore MS Office temp files ~$* From 88a743532f853e682e312236f5a153f2a82cf550 Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 11:09:44 -0400 Subject: [PATCH 14/28] APPEALS-28105 update linting errors --- .../mocks/webex-mocks/webex-mock-generator.js | 52 +++++---- client/mocks/webex-mocks/webex-mock-server.js | 105 +++++++++--------- 2 files changed, 76 insertions(+), 81 deletions(-) diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index 1417f290709..20188273c20 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -1,5 +1,5 @@ -const fs = require("fs"); -const faker = require("faker"); +const fs = require('fs'); +const faker = require('faker'); const generateConferenceLinks = () => { let webexLinks = []; @@ -10,16 +10,16 @@ const generateConferenceLinks = () => { meetingNumber: faker.random.number(), title: faker.company.catchPhrase(), password: faker.internet.password(), - meetingType: "meetingSeries", - state: "active", - timezone: "Asia/Shanghai", - start: "2023-11-01T20:00:00+08:00", - end: "2023-11-01T21:00:00+08:00", + meetingType: 'meetingSeries', + state: 'active', + timezone: 'Asia/Shanghai', + start: '2023-11-01T20:00:00+08:00', + end: '2023-11-01T21:00:00+08:00', hostUserId: faker.finance.account(), hostDisplayName: faker.name.findName(), hostEmail: faker.internet.email(), hostKey: faker.random.number(), - siteUrl: "ciscofedsales.webex.com", + siteUrl: 'ciscofedsales.webex.com', webLink: faker.internet.url(), sipAddress: faker.internet.email(), dialInIpAddress: faker.internet.ip(), @@ -34,29 +34,27 @@ const generateConferenceLinks = () => { publicMeeting: faker.random.boolean(), enableAutomaticLock: faker.random.boolean(), automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), - unlockedMeetingJoinSecurity: "allowJoinWithLobby", + unlockedMeetingJoinSecurity: 'allowJoinWithLobby', telephony: { - accessCode: faker.random - .number({ min: 100000, max: 999999 }) - .toString(), + accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), callInNumbers: [ { - label: "United States Toll", - callInNumber: "+1-415-527-5035", - tollType: "toll", + label: 'United States Toll', + callInNumber: '+1-415-527-5035', + tollType: 'toll', }, { - label: "United States Toll (Washington D.C.)", - callInNumber: "+1-202-600-2533", - tollType: "toll", + label: 'United States Toll (Washington D.C.)', + callInNumber: '+1-202-600-2533', + tollType: 'toll', }, ], links: [ { - rel: "globalCallinNumbers", + rel: 'globalCallinNumbers', href: - "/v1/meetings/" + faker.random.uuid() + "/globalCallinNumbers", - method: "GET", + '/v1/meetings/' + faker.random.uuid() + '/globalCallinNumbers', + method: 'GET', }, ], }, @@ -64,7 +62,7 @@ const generateConferenceLinks = () => { enabledChat: faker.random.boolean(), enabledVideo: faker.random.boolean(), enabledNote: faker.random.boolean(), - noteType: "allowAll", + noteType: 'allowAll', enabledFileTransfer: faker.random.boolean(), enabledUCFRichMedia: faker.random.boolean(), }, @@ -84,17 +82,17 @@ const generateConferenceLinks = () => { enabledChatOtherParticipants: faker.random.boolean(), }, sessionTypeId: faker.random.number({ min: 1, max: 5 }), - scheduledType: "meeting", + scheduledType: 'meeting', simultaneousInterpretation: { enabled: faker.random.boolean(), }, enabledBreakoutSessions: faker.random.boolean(), audioConnectionOptions: { - audioConnectionType: "webexAudio", + audioConnectionType: 'webexAudio', enabledTollFreeCallIn: faker.random.boolean(), enabledGlobalCallIn: faker.random.boolean(), enabledAudienceCallBack: faker.random.boolean(), - entryAndExitTone: "beep", + entryAndExitTone: 'beep', allowHostToUnmuteParticipants: faker.random.boolean(), allowAttendeeToUnmuteSelf: faker.random.boolean(), muteAttendeeUponEntry: faker.random.boolean(), @@ -113,7 +111,7 @@ const data = { // Check if the script is being run directly if (require.main === module) { - fs.writeFileSync("mocks/webex-mocks/webex-mock.json", JSON.stringify(data, null, 2)); - console.log("Generated new data in webex-mock.json"); + fs.writeFileSync('mocks/webex-mocks/webex-mock.json', JSON.stringify(data, null, 2)); + console.log('Generated new data in webex-mock.json'); } diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 6684e3731fd..22493c697c7 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -7,7 +7,7 @@ const router = jsonServer.router( const middlewares = jsonServer.defaults(); const routesRewrite = require('./routes.json'); -const faker = require("faker"); +const faker = require('faker'); server.use(middlewares); server.use(jsonServer.bodyParser); @@ -127,30 +127,30 @@ server.get('/health-check-green', (req, res) => { }); const requiredKeys = [ - "title", - "start", - "end", - "timezone", - "enabledAutoRecordMeeting", - "allowAnyUserToBeCoHost", - "enabledJoinBeforeHost", - "enableConnectAudioBeforeHost", - "joinBeforeHostMinutes", - "excludePassword", - "publicMeeting", - "reminderTime", - "unlockedMeetingJoinSecurity", - "enabledWebCastView", - "enableAutomaticLock", - "automaticLockMinutes", - "allowFirstUserToBeCoHost", - "allowAuthenticatedDevices", - "sendEmail", - "siteUrl", - "meetingOptions", - "attendeePrivileges", - "enabledBreakoutSessions", - "audioConnectionOptions", + 'title', + 'start', + 'end', + 'timezone', + 'enabledAutoRecordMeeting', + 'allowAnyUserToBeCoHost', + 'enabledJoinBeforeHost', + 'enableConnectAudioBeforeHost', + 'joinBeforeHostMinutes', + 'excludePassword', + 'publicMeeting', + 'reminderTime', + 'unlockedMeetingJoinSecurity', + 'enabledWebCastView', + 'enableAutomaticLock', + 'automaticLockMinutes', + 'allowFirstUserToBeCoHost', + 'allowAuthenticatedDevices', + 'sendEmail', + 'siteUrl', + 'meetingOptions', + 'attendeePrivileges', + 'enabledBreakoutSessions', + 'audioConnectionOptions', ]; const generateMeetingData = { @@ -158,16 +158,16 @@ const generateMeetingData = { meetingNumber: faker.random.number(), title: faker.company.catchPhrase(), password: faker.internet.password(), - meetingType: "meetingSeries", - state: "active", - timezone: "Asia/Shanghai", - start: "2023-11-01T20:00:00+08:00", - end: "2023-11-01T21:00:00+08:00", + meetingType: 'meetingSeries', + state: 'active', + timezone: 'Asia/Shanghai', + start: '2023-11-01T20:00:00+08:00', + end: '2023-11-01T21:00:00+08:00', hostUserId: faker.finance.account(), hostDisplayName: faker.name.findName(), hostEmail: faker.internet.email(), hostKey: faker.random.number(), - siteUrl: "ciscofedsales.webex.com", + siteUrl: 'ciscofedsales.webex.com', webLink: faker.internet.url(), sipAddress: faker.internet.email(), dialInIpAddress: faker.internet.ip(), @@ -182,26 +182,26 @@ const generateMeetingData = { publicMeeting: faker.random.boolean(), enableAutomaticLock: faker.random.boolean(), automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), - unlockedMeetingJoinSecurity: "allowJoinWithLobby", + unlockedMeetingJoinSecurity: 'allowJoinWithLobby', telephony: { accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), callInNumbers: [ { - label: "United States Toll", - callInNumber: "+1-415-527-5035", - tollType: "toll", + label: 'United States Toll', + callInNumber: '+1-415-527-5035', + tollType: 'toll', }, { - label: "United States Toll (Washington D.C.)", - callInNumber: "+1-202-600-2533", - tollType: "toll", + label: 'United States Toll (Washington D.C.)', + callInNumber: '+1-202-600-2533', + tollType: 'toll', }, ], links: [ { - rel: "globalCallinNumbers", - href: "/v1/meetings/" + faker.random.uuid() + "/globalCallinNumbers", - method: "GET", + rel: 'globalCallinNumbers', + href: '/v1/meetings/' + faker.random.uuid() + '/globalCallinNumbers', + method: 'GET', }, ], }, @@ -209,7 +209,7 @@ const generateMeetingData = { enabledChat: faker.random.boolean(), enabledVideo: faker.random.boolean(), enabledNote: faker.random.boolean(), - noteType: "allowAll", + noteType: 'allowAll', enabledFileTransfer: faker.random.boolean(), enabledUCFRichMedia: faker.random.boolean(), }, @@ -229,35 +229,35 @@ const generateMeetingData = { enabledChatOtherParticipants: faker.random.boolean(), }, sessionTypeId: faker.random.number({ min: 1, max: 5 }), - scheduledType: "meeting", + scheduledType: 'meeting', simultaneousInterpretation: { enabled: faker.random.boolean(), }, enabledBreakoutSessions: faker.random.boolean(), audioConnectionOptions: { - audioConnectionType: "webexAudio", + audioConnectionType: 'webexAudio', enabledTollFreeCallIn: faker.random.boolean(), enabledGlobalCallIn: faker.random.boolean(), enabledAudienceCallBack: faker.random.boolean(), - entryAndExitTone: "beep", + entryAndExitTone: 'beep', allowHostToUnmuteParticipants: faker.random.boolean(), allowAttendeeToUnmuteSelf: faker.random.boolean(), muteAttendeeUponEntry: faker.random.boolean(), }, }; -server.post("/fake.api-usgov.webex.com/v1/meetings", (req, res) => { +server.post('/fake.api-usgov.webex.com/v1/meetings', (req, res) => { const requestBody = req.body; // Check if all required keys are present const missingKeys = requiredKeys.filter((key) => !(key in requestBody)); if (missingKeys.length > 0) { - res.status(400).json({ message: "Missing required keys", missingKeys }); + res.status(400).json({ message: 'Missing required keys', missingKeys }); } else { // Access conferenceLinks from database - const db = router.db; // Get lowdb instance - const conferenceLinks = db.get("conferenceLinks"); + const db = router.db; + const conferenceLinks = db.get('conferenceLinks'); // Add generateMeetingData object to conferenceLinks conferenceLinks.push(generateMeetingData).write(); @@ -266,9 +266,6 @@ server.post("/fake.api-usgov.webex.com/v1/meetings", (req, res) => { } }); -// Sample object to be added - - server.use(router); const errorRoutes = [ @@ -297,7 +294,7 @@ server.listen(3050, () => { console.log(' Loading mocks/webex-mocks/webex-mock.json'); console.log(' Done\n'); - console.log( ' Resources:'); + console.log(' Resources:'); // Original routes from the database state const originalRoutes = Object.keys(router.db.getState()); @@ -327,5 +324,5 @@ server.listen(3050, () => { console.log( '\n Type s + enter at any time to create a snapshot of the database' ); - console.log( 'Watching...'); + console.log('Watching...'); }); From a45deef07ab569b526fdd50756de961a3c6054f6 Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 11:16:41 -0400 Subject: [PATCH 15/28] APPEALS-28105 Completed addressing linting errors --- client/mocks/webex-mocks/webex-mock-generator.js | 3 ++- client/mocks/webex-mocks/webex-mock-server.js | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index 20188273c20..d158432cbea 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -53,7 +53,7 @@ const generateConferenceLinks = () => { { rel: 'globalCallinNumbers', href: - '/v1/meetings/' + faker.random.uuid() + '/globalCallinNumbers', + `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, method: 'GET', }, ], @@ -112,6 +112,7 @@ const data = { // Check if the script is being run directly if (require.main === module) { fs.writeFileSync('mocks/webex-mocks/webex-mock.json', JSON.stringify(data, null, 2)); + // eslint-disable-next-line no-console console.log('Generated new data in webex-mock.json'); } diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 22493c697c7..a28df013a16 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -200,7 +200,7 @@ const generateMeetingData = { links: [ { rel: 'globalCallinNumbers', - href: '/v1/meetings/' + faker.random.uuid() + '/globalCallinNumbers', + href: `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, method: 'GET', }, ], @@ -290,6 +290,7 @@ const errorRoutes = [ ]; server.listen(3050, () => { + /* eslint-disable no-console */ console.log(' \\{^_^}/ hi!\n'); console.log(' Loading mocks/webex-mocks/webex-mock.json'); console.log(' Done\n'); @@ -303,10 +304,12 @@ server.listen(3050, () => { const rewrittenRoutes = originalRoutes.map((route) => { for (let key in routesRewrite) { if (routesRewrite[key] === `/${route}`) { - return key; // returning the custom path + // returning the custom path + return key; } } - return `/${route}`; // returning the original path if no custom path found + + return `/${route}`; }); rewrittenRoutes.forEach((route) => { @@ -325,4 +328,5 @@ server.listen(3050, () => { '\n Type s + enter at any time to create a snapshot of the database' ); console.log('Watching...'); + /* eslint-enable no-console */ }); From 6802591043eff30f1553d5b3e2142f42f9a46a4c Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 12:19:22 -0400 Subject: [PATCH 16/28] APPEALS-28105 Updated the Readme.md --- client/mocks/webex-mocks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index 27c1f72f31b..6ba50ab12c7 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -10,7 +10,7 @@ step 4: Make sure casfelow application is running step 4: Run command: npm run webex-server -step 5: If you would like to autogenerate test data, run this command: npm run generate-webex +step 5: Autogenerate test data, run this command: npm run generate-webex(This will also create the json file) \*info: You will recieve all available routes within the terminal under 'Resources' From 94719fe178877a4756d34c32c83e807767922eb3 Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 13:03:43 -0400 Subject: [PATCH 17/28] APPEALS-28105 Addressed Code Climate errors --- client/mocks/webex-mocks/meetingData.js | 96 +++++++++++++++++++ .../mocks/webex-mocks/webex-mock-generator.js | 96 +------------------ client/mocks/webex-mocks/webex-mock-server.js | 96 +------------------ 3 files changed, 100 insertions(+), 188 deletions(-) create mode 100644 client/mocks/webex-mocks/meetingData.js diff --git a/client/mocks/webex-mocks/meetingData.js b/client/mocks/webex-mocks/meetingData.js new file mode 100644 index 00000000000..cea2a5a8804 --- /dev/null +++ b/client/mocks/webex-mocks/meetingData.js @@ -0,0 +1,96 @@ +const faker = require("faker"); + +const generateMeetingData = { + id: faker.random.uuid(), + meetingNumber: faker.random.number(), + title: faker.company.catchPhrase(), + password: faker.internet.password(), + meetingType: "meetingSeries", + state: "active", + timezone: "Asia/Shanghai", + start: "2023-11-01T20:00:00+08:00", + end: "2023-11-01T21:00:00+08:00", + hostUserId: faker.finance.account(), + hostDisplayName: faker.name.findName(), + hostEmail: faker.internet.email(), + hostKey: faker.random.number(), + siteUrl: "ciscofedsales.webex.com", + webLink: faker.internet.url(), + sipAddress: faker.internet.email(), + dialInIpAddress: faker.internet.ip(), + enabledAutoRecordMeeting: faker.random.boolean(), + allowAnyUserToBeCoHost: faker.random.boolean(), + allowFirstUserToBeCoHost: faker.random.boolean(), + allowAuthenticatedDevices: faker.random.boolean(), + enabledJoinBeforeHost: faker.random.boolean(), + joinBeforeHostMinutes: faker.random.number({ min: 0, max: 10 }), + enableConnectAudioBeforeHost: faker.random.boolean(), + excludePassword: faker.random.boolean(), + publicMeeting: faker.random.boolean(), + enableAutomaticLock: faker.random.boolean(), + automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), + unlockedMeetingJoinSecurity: "allowJoinWithLobby", + telephony: { + accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), + callInNumbers: [ + { + label: "United States Toll", + callInNumber: "+1-415-527-5035", + tollType: "toll", + }, + { + label: "United States Toll (Washington D.C.)", + callInNumber: "+1-202-600-2533", + tollType: "toll", + }, + ], + links: [ + { + rel: "globalCallinNumbers", + href: `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, + method: "GET", + }, + ], + }, + meetingOptions: { + enabledChat: faker.random.boolean(), + enabledVideo: faker.random.boolean(), + enabledNote: faker.random.boolean(), + noteType: "allowAll", + enabledFileTransfer: faker.random.boolean(), + enabledUCFRichMedia: faker.random.boolean(), + }, + attendeePrivileges: { + enabledShareContent: faker.random.boolean(), + enabledSaveDocument: faker.random.boolean(), + enabledPrintDocument: faker.random.boolean(), + enabledAnnotate: faker.random.boolean(), + enabledViewParticipantList: faker.random.boolean(), + enabledViewThumbnails: faker.random.boolean(), + enabledRemoteControl: faker.random.boolean(), + enabledViewAnyDocument: faker.random.boolean(), + enabledViewAnyPage: faker.random.boolean(), + enabledContactOperatorPrivately: faker.random.boolean(), + enabledChatHost: faker.random.boolean(), + enabledChatPresenter: faker.random.boolean(), + enabledChatOtherParticipants: faker.random.boolean(), + }, + sessionTypeId: faker.random.number({ min: 1, max: 5 }), + scheduledType: "meeting", + simultaneousInterpretation: { + enabled: faker.random.boolean(), + }, + enabledBreakoutSessions: faker.random.boolean(), + audioConnectionOptions: { + audioConnectionType: "webexAudio", + enabledTollFreeCallIn: faker.random.boolean(), + enabledGlobalCallIn: faker.random.boolean(), + enabledAudienceCallBack: faker.random.boolean(), + entryAndExitTone: "beep", + allowHostToUnmuteParticipants: faker.random.boolean(), + allowAttendeeToUnmuteSelf: faker.random.boolean(), + muteAttendeeUponEntry: faker.random.boolean(), + }, +}; + +module.exports = generateMeetingData; diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index d158432cbea..985894425d5 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -1,103 +1,11 @@ const fs = require('fs'); -const faker = require('faker'); +const generateMeetingData = require("./meetingData.js"); const generateConferenceLinks = () => { let webexLinks = []; for (let id = 1; id <= 10; id++) { - webexLinks.push({ - id: faker.random.uuid(), - meetingNumber: faker.random.number(), - title: faker.company.catchPhrase(), - password: faker.internet.password(), - meetingType: 'meetingSeries', - state: 'active', - timezone: 'Asia/Shanghai', - start: '2023-11-01T20:00:00+08:00', - end: '2023-11-01T21:00:00+08:00', - hostUserId: faker.finance.account(), - hostDisplayName: faker.name.findName(), - hostEmail: faker.internet.email(), - hostKey: faker.random.number(), - siteUrl: 'ciscofedsales.webex.com', - webLink: faker.internet.url(), - sipAddress: faker.internet.email(), - dialInIpAddress: faker.internet.ip(), - enabledAutoRecordMeeting: faker.random.boolean(), - allowAnyUserToBeCoHost: faker.random.boolean(), - allowFirstUserToBeCoHost: faker.random.boolean(), - allowAuthenticatedDevices: faker.random.boolean(), - enabledJoinBeforeHost: faker.random.boolean(), - joinBeforeHostMinutes: faker.random.number({ min: 0, max: 10 }), - enableConnectAudioBeforeHost: faker.random.boolean(), - excludePassword: faker.random.boolean(), - publicMeeting: faker.random.boolean(), - enableAutomaticLock: faker.random.boolean(), - automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), - unlockedMeetingJoinSecurity: 'allowJoinWithLobby', - telephony: { - accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), - callInNumbers: [ - { - label: 'United States Toll', - callInNumber: '+1-415-527-5035', - tollType: 'toll', - }, - { - label: 'United States Toll (Washington D.C.)', - callInNumber: '+1-202-600-2533', - tollType: 'toll', - }, - ], - links: [ - { - rel: 'globalCallinNumbers', - href: - `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, - method: 'GET', - }, - ], - }, - meetingOptions: { - enabledChat: faker.random.boolean(), - enabledVideo: faker.random.boolean(), - enabledNote: faker.random.boolean(), - noteType: 'allowAll', - enabledFileTransfer: faker.random.boolean(), - enabledUCFRichMedia: faker.random.boolean(), - }, - attendeePrivileges: { - enabledShareContent: faker.random.boolean(), - enabledSaveDocument: faker.random.boolean(), - enabledPrintDocument: faker.random.boolean(), - enabledAnnotate: faker.random.boolean(), - enabledViewParticipantList: faker.random.boolean(), - enabledViewThumbnails: faker.random.boolean(), - enabledRemoteControl: faker.random.boolean(), - enabledViewAnyDocument: faker.random.boolean(), - enabledViewAnyPage: faker.random.boolean(), - enabledContactOperatorPrivately: faker.random.boolean(), - enabledChatHost: faker.random.boolean(), - enabledChatPresenter: faker.random.boolean(), - enabledChatOtherParticipants: faker.random.boolean(), - }, - sessionTypeId: faker.random.number({ min: 1, max: 5 }), - scheduledType: 'meeting', - simultaneousInterpretation: { - enabled: faker.random.boolean(), - }, - enabledBreakoutSessions: faker.random.boolean(), - audioConnectionOptions: { - audioConnectionType: 'webexAudio', - enabledTollFreeCallIn: faker.random.boolean(), - enabledGlobalCallIn: faker.random.boolean(), - enabledAudienceCallBack: faker.random.boolean(), - entryAndExitTone: 'beep', - allowHostToUnmuteParticipants: faker.random.boolean(), - allowAttendeeToUnmuteSelf: faker.random.boolean(), - muteAttendeeUponEntry: faker.random.boolean(), - }, - }); + webexLinks.push(generateMeetingData); } return webexLinks; diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index a28df013a16..1e235028a3d 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -4,10 +4,11 @@ const path = require('path'); const router = jsonServer.router( path.join('mocks/webex-mocks/webex-mock.json') ); +const generateMeetingData = require('./meetingData.js'); const middlewares = jsonServer.defaults(); const routesRewrite = require('./routes.json'); -const faker = require('faker'); +// const faker = require('faker'); server.use(middlewares); server.use(jsonServer.bodyParser); @@ -153,99 +154,6 @@ const requiredKeys = [ 'audioConnectionOptions', ]; -const generateMeetingData = { - id: faker.random.uuid(), - meetingNumber: faker.random.number(), - title: faker.company.catchPhrase(), - password: faker.internet.password(), - meetingType: 'meetingSeries', - state: 'active', - timezone: 'Asia/Shanghai', - start: '2023-11-01T20:00:00+08:00', - end: '2023-11-01T21:00:00+08:00', - hostUserId: faker.finance.account(), - hostDisplayName: faker.name.findName(), - hostEmail: faker.internet.email(), - hostKey: faker.random.number(), - siteUrl: 'ciscofedsales.webex.com', - webLink: faker.internet.url(), - sipAddress: faker.internet.email(), - dialInIpAddress: faker.internet.ip(), - enabledAutoRecordMeeting: faker.random.boolean(), - allowAnyUserToBeCoHost: faker.random.boolean(), - allowFirstUserToBeCoHost: faker.random.boolean(), - allowAuthenticatedDevices: faker.random.boolean(), - enabledJoinBeforeHost: faker.random.boolean(), - joinBeforeHostMinutes: faker.random.number({ min: 0, max: 10 }), - enableConnectAudioBeforeHost: faker.random.boolean(), - excludePassword: faker.random.boolean(), - publicMeeting: faker.random.boolean(), - enableAutomaticLock: faker.random.boolean(), - automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), - unlockedMeetingJoinSecurity: 'allowJoinWithLobby', - telephony: { - accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), - callInNumbers: [ - { - label: 'United States Toll', - callInNumber: '+1-415-527-5035', - tollType: 'toll', - }, - { - label: 'United States Toll (Washington D.C.)', - callInNumber: '+1-202-600-2533', - tollType: 'toll', - }, - ], - links: [ - { - rel: 'globalCallinNumbers', - href: `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, - method: 'GET', - }, - ], - }, - meetingOptions: { - enabledChat: faker.random.boolean(), - enabledVideo: faker.random.boolean(), - enabledNote: faker.random.boolean(), - noteType: 'allowAll', - enabledFileTransfer: faker.random.boolean(), - enabledUCFRichMedia: faker.random.boolean(), - }, - attendeePrivileges: { - enabledShareContent: faker.random.boolean(), - enabledSaveDocument: faker.random.boolean(), - enabledPrintDocument: faker.random.boolean(), - enabledAnnotate: faker.random.boolean(), - enabledViewParticipantList: faker.random.boolean(), - enabledViewThumbnails: faker.random.boolean(), - enabledRemoteControl: faker.random.boolean(), - enabledViewAnyDocument: faker.random.boolean(), - enabledViewAnyPage: faker.random.boolean(), - enabledContactOperatorPrivately: faker.random.boolean(), - enabledChatHost: faker.random.boolean(), - enabledChatPresenter: faker.random.boolean(), - enabledChatOtherParticipants: faker.random.boolean(), - }, - sessionTypeId: faker.random.number({ min: 1, max: 5 }), - scheduledType: 'meeting', - simultaneousInterpretation: { - enabled: faker.random.boolean(), - }, - enabledBreakoutSessions: faker.random.boolean(), - audioConnectionOptions: { - audioConnectionType: 'webexAudio', - enabledTollFreeCallIn: faker.random.boolean(), - enabledGlobalCallIn: faker.random.boolean(), - enabledAudienceCallBack: faker.random.boolean(), - entryAndExitTone: 'beep', - allowHostToUnmuteParticipants: faker.random.boolean(), - allowAttendeeToUnmuteSelf: faker.random.boolean(), - muteAttendeeUponEntry: faker.random.boolean(), - }, -}; - server.post('/fake.api-usgov.webex.com/v1/meetings', (req, res) => { const requestBody = req.body; From 45e6eed8509993e7f7625a232219246d14c06815 Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 21 Aug 2023 13:07:56 -0400 Subject: [PATCH 18/28] APPEALS-28105 Addressed linting errors --- client/mocks/webex-mocks/meetingData.js | 40 +++++++++---------- .../mocks/webex-mocks/webex-mock-generator.js | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/client/mocks/webex-mocks/meetingData.js b/client/mocks/webex-mocks/meetingData.js index cea2a5a8804..34afb658f9c 100644 --- a/client/mocks/webex-mocks/meetingData.js +++ b/client/mocks/webex-mocks/meetingData.js @@ -1,20 +1,20 @@ -const faker = require("faker"); +const faker = require('faker'); const generateMeetingData = { id: faker.random.uuid(), meetingNumber: faker.random.number(), title: faker.company.catchPhrase(), password: faker.internet.password(), - meetingType: "meetingSeries", - state: "active", - timezone: "Asia/Shanghai", - start: "2023-11-01T20:00:00+08:00", - end: "2023-11-01T21:00:00+08:00", + meetingType: 'meetingSeries', + state: 'active', + timezone: 'Asia/Shanghai', + start: '2023-11-01T20:00:00+08:00', + end: '2023-11-01T21:00:00+08:00', hostUserId: faker.finance.account(), hostDisplayName: faker.name.findName(), hostEmail: faker.internet.email(), hostKey: faker.random.number(), - siteUrl: "ciscofedsales.webex.com", + siteUrl: 'ciscofedsales.webex.com', webLink: faker.internet.url(), sipAddress: faker.internet.email(), dialInIpAddress: faker.internet.ip(), @@ -29,26 +29,26 @@ const generateMeetingData = { publicMeeting: faker.random.boolean(), enableAutomaticLock: faker.random.boolean(), automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), - unlockedMeetingJoinSecurity: "allowJoinWithLobby", + unlockedMeetingJoinSecurity: 'allowJoinWithLobby', telephony: { accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), callInNumbers: [ { - label: "United States Toll", - callInNumber: "+1-415-527-5035", - tollType: "toll", + label: 'United States Toll', + callInNumber: '+1-415-527-5035', + tollType: 'toll', }, { - label: "United States Toll (Washington D.C.)", - callInNumber: "+1-202-600-2533", - tollType: "toll", + label: 'United States Toll (Washington D.C.)', + callInNumber: '+1-202-600-2533', + tollType: 'toll', }, ], links: [ { - rel: "globalCallinNumbers", + rel: 'globalCallinNumbers', href: `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, - method: "GET", + method: 'GET', }, ], }, @@ -56,7 +56,7 @@ const generateMeetingData = { enabledChat: faker.random.boolean(), enabledVideo: faker.random.boolean(), enabledNote: faker.random.boolean(), - noteType: "allowAll", + noteType: 'allowAll', enabledFileTransfer: faker.random.boolean(), enabledUCFRichMedia: faker.random.boolean(), }, @@ -76,17 +76,17 @@ const generateMeetingData = { enabledChatOtherParticipants: faker.random.boolean(), }, sessionTypeId: faker.random.number({ min: 1, max: 5 }), - scheduledType: "meeting", + scheduledType: 'meeting', simultaneousInterpretation: { enabled: faker.random.boolean(), }, enabledBreakoutSessions: faker.random.boolean(), audioConnectionOptions: { - audioConnectionType: "webexAudio", + audioConnectionType: 'webexAudio', enabledTollFreeCallIn: faker.random.boolean(), enabledGlobalCallIn: faker.random.boolean(), enabledAudienceCallBack: faker.random.boolean(), - entryAndExitTone: "beep", + entryAndExitTone: 'beep', allowHostToUnmuteParticipants: faker.random.boolean(), allowAttendeeToUnmuteSelf: faker.random.boolean(), muteAttendeeUponEntry: faker.random.boolean(), diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index 985894425d5..9d4d9c98423 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -1,5 +1,5 @@ const fs = require('fs'); -const generateMeetingData = require("./meetingData.js"); +const generateMeetingData = require('./meetingData.js'); const generateConferenceLinks = () => { let webexLinks = []; From 55c641053c95ead6033c78ecde1ab4505e06aaf5 Mon Sep 17 00:00:00 2001 From: breedbah Date: Tue, 22 Aug 2023 08:16:41 -0400 Subject: [PATCH 19/28] APPEALS-28105 removed commented code --- client/mocks/webex-mocks/webex-mock-server.js | 1 - 1 file changed, 1 deletion(-) diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 1e235028a3d..b7d6c50dd74 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -8,7 +8,6 @@ const generateMeetingData = require('./meetingData.js'); const middlewares = jsonServer.defaults(); const routesRewrite = require('./routes.json'); -// const faker = require('faker'); server.use(middlewares); server.use(jsonServer.bodyParser); From e4bb5f34e1c1a1da2b51ef8d4f1e4d6f3fedfb9f Mon Sep 17 00:00:00 2001 From: breedbah Date: Wed, 23 Aug 2023 13:09:22 -0400 Subject: [PATCH 20/28] APPEALS-28105 Updated readme.md with installation resolution --- client/mocks/webex-mocks/README.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index 6ba50ab12c7..cca7ce34640 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -4,19 +4,38 @@ Step 1: Open a terminal Step 2: Navigate to the caseflow/client -step 3: Run command: npm install json-server +step 3: Run command: [npm install json-server] or [yarn add json-server] -step 4: Make sure casfelow application is running +If the [npm install json-server] or [yarn add json-server] returns an error that resembles: + +error standard@17.1.0: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "15.1.0" + +extra steps may need to be taken. + +for brevity These instructions will follow the happy path. While in the client directory in terminal: +[nodenv install 14.21.2] +[nodenv local 14.21.2] + +If for any reason you want to go back to the original nodenv that was used prior to this change you can run, [nodenv local 12.13.0] -step 4: Run command: npm run webex-server +If it all succeeds you can attempt the [npm install json-server] or [yarn add json-server] once again. + +This time with no issue. +given that the install goes as expected you can continue following the rest of the directions. + +If there are still issues in getting this to operate as expected, See your tech lead for asssisstance. + +step 4: Make sure casfelow application is running step 5: Autogenerate test data, run this command: npm run generate-webex(This will also create the json file) +step 6: Run command: npm run webex-server + \*info: You will recieve all available routes within the terminal under 'Resources' \*info: port must be set on a different port to run due to caseflow running on port 3000 -step 5: Open a browser window in chrome and navigate to localhost:3050 [You will get the default page] +step 7: Open a browser window in chrome and navigate to localhost:3050 [You will get the default page] \*info: You can use any api endpoint software you want like Postman, but a good lightweight vs code ext. is [Thunder Client] From 75f563d762edffdf0fc99ff33b80c832bf8c3820 Mon Sep 17 00:00:00 2001 From: breedbah Date: Thu, 24 Aug 2023 15:55:23 -0400 Subject: [PATCH 21/28] APPEALS-28105 Revert back to Addressed lint errors --- app/controllers/application_controller.rb | 5 - .../organizations/users_controller.rb | 9 ++ .../virtual_hearings/conference_client.rb | 29 ++++ app/jobs/virtual_hearings/conference_job.rb | 2 +- .../virtual_hearings/create_conference_job.rb | 16 +- app/jobs/virtual_hearings/pexip_client.rb | 13 -- app/models/organizations_user.rb | 6 + .../administered_user_serializer.rb | 1 + app/views/queue/index.html.erb | 4 +- app/views/reader/appeal/index.html.erb | 1 - client/COPY.json | 1 + client/app/queue/OrganizationUsers.jsx | 55 +++++-- client/app/queue/QueueApp.jsx | 29 ++-- .../queue/SelectConferenceTypeRadioField.jsx | 48 ++++++ client/app/queue/uiReducer/uiActions.js | 7 + client/app/queue/uiReducer/uiConstants.js | 1 + client/app/queue/uiReducer/uiReducer.js | 4 + client/app/reader/DecisionReviewer.jsx | 2 - .../DocumentList/DocumentListActions.js | 7 +- .../DocumentList/DocumentListReducer.js | 6 +- client/app/reader/LastRetrievalAlert.jsx | 38 ++--- client/app/reader/LastRetrievalInfo.jsx | 13 +- client/app/reader/PdfListView.jsx | 8 +- client/mocks/webex-mocks/README.md | 27 +++- client/mocks/webex-mocks/webex-mock-server.js | 1 - .../SelectConferenceTypeRadioField.test.js | 80 ++++++++++ ...electConferenceTypeRadioField.test.js.snap | 55 +++++++ .../OrganizationUsers.test.js | 122 ++++++++++++++ config/environments/demo.rb | 3 - config/initializers/pexip.rb | 2 +- ...0230726201514_add_meeting_type_to_users.rb | 9 ++ ...30_add_meeting_type_to_virtual_hearings.rb | 9 ++ ...50_add_meeting_type_to_conference_links.rb | 9 ++ db/schema.rb | 33 ++++ lib/caseflow/error.rb | 7 +- spec/feature/dispatch/establish_claim_spec.rb | 12 +- .../substitute_appellant_task_copy_spec.rb | 149 ------------------ .../create_conference_job_spec.rb | 12 ++ spec/models/docket_spec.rb | 3 +- spec/models/idt/token_spec.rb | 8 +- spec/models/organizations_user_spec.rb | 14 ++ spec/models/user_spec.rb | 3 +- 42 files changed, 605 insertions(+), 258 deletions(-) create mode 100644 app/jobs/virtual_hearings/conference_client.rb delete mode 100644 app/jobs/virtual_hearings/pexip_client.rb create mode 100644 client/app/queue/SelectConferenceTypeRadioField.jsx create mode 100644 client/test/app/queue/SelectConferenceTypeRadioField.test.js create mode 100644 client/test/app/queue/__snapshots__/SelectConferenceTypeRadioField.test.js.snap create mode 100644 client/test/app/queue/organizationUsers/OrganizationUsers.test.js create mode 100644 db/migrate/20230726201514_add_meeting_type_to_users.rb create mode 100644 db/migrate/20230726203030_add_meeting_type_to_virtual_hearings.rb create mode 100644 db/migrate/20230726203750_add_meeting_type_to_conference_links.rb delete mode 100644 spec/feature/queue/substitute_appellant/substitute_appellant_task_copy_spec.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bb3e4cc7797..f1e67283d53 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -380,11 +380,6 @@ def feedback_url end helper_method :feedback_url - def efolder_express_url - Rails.application.config.efolder_url.to_s - end - helper_method :efolder_express_url - def help_url { "certification" => certification_help_path, diff --git a/app/controllers/organizations/users_controller.rb b/app/controllers/organizations/users_controller.rb index 6a125576a84..4d6cd9eb2a5 100644 --- a/app/controllers/organizations/users_controller.rb +++ b/app/controllers/organizations/users_controller.rb @@ -32,6 +32,7 @@ def update adjust_admin_rights end + update_user_meeting_type render json: { users: json_administered_users([user_to_modify]) }, status: :ok end @@ -67,6 +68,14 @@ def adjust_admin_rights end end + def update_user_meeting_type + new_meeting_type = params.dig(:attributes, :meeting_type) + + if organization["url"] == HearingsManagement.singleton.url && new_meeting_type + OrganizationsUser.update_user_conference_type(user_to_modify, new_meeting_type) + end + end + def organization_url params[:organization_url] end diff --git a/app/jobs/virtual_hearings/conference_client.rb b/app/jobs/virtual_hearings/conference_client.rb new file mode 100644 index 00000000000..3b2d79e27dc --- /dev/null +++ b/app/jobs/virtual_hearings/conference_client.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +module VirtualHearings::ConferenceClient + def client + case RequestStore.store[:current_user].meeting_type + when "pexip" + @client ||= PexipService.new( + host: ENV["PEXIP_MANAGEMENT_NODE_HOST"], + port: ENV["PEXIP_MANAGEMENT_NODE_PORT"], + user_name: ENV["PEXIP_USERNAME"], + password: ENV["PEXIP_PASSWORD"], + client_host: ENV["PEXIP_CLIENT_HOST"] + ) + when "webex" + msg = "You hit the Webex Service!" + fail Caseflow::Error::WebexApiError, message: msg + # @client ||= WebexService.new( + # host: ENV["WEBEX_MANAGEMENT_NODE_HOST"], + # port: ENV["WEBEX_MANAGEMENT_NODE_PORT"], + # user_name: ENV["WEBEX_USERNAME"], + # password: ENV["WEBEX_PASSWORD"], + # client_host: ENV["WEBEX_CLIENT_HOST"] + # ) + else + msg = "Meeting type for the user is invalid" + fail Caseflow::Error::MeetingTypeNotFoundError, message: msg + end + end +end diff --git a/app/jobs/virtual_hearings/conference_job.rb b/app/jobs/virtual_hearings/conference_job.rb index 6bdc9ca03db..c92dbde5345 100644 --- a/app/jobs/virtual_hearings/conference_job.rb +++ b/app/jobs/virtual_hearings/conference_job.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class VirtualHearings::ConferenceJob < ApplicationJob - include VirtualHearings::PexipClient + include VirtualHearings::ConferenceClient private diff --git a/app/jobs/virtual_hearings/create_conference_job.rb b/app/jobs/virtual_hearings/create_conference_job.rb index 36d04423091..a16e0f1674e 100644 --- a/app/jobs/virtual_hearings/create_conference_job.rb +++ b/app/jobs/virtual_hearings/create_conference_job.rb @@ -138,12 +138,12 @@ def create_conference "[#{virtual_hearing.hearing_id}])..." ) - pexip_response = create_pexip_conference + create_conference_response = create_new_conference - Rails.logger.info("Pexip response: #{pexip_response.inspect}") + Rails.logger.info("Create Conference Response: #{create_conference_response.inspect}") - if pexip_response.error - error_display = pexip_error_display(pexip_response) + if create_conference_response.error + error_display = error_display(create_conference_response) Rails.logger.error("CreateConferenceJob failed: #{error_display}") @@ -151,12 +151,12 @@ def create_conference DataDogService.increment_counter(metric_name: "created_conference.failed", **create_conference_datadog_tags) - fail pexip_response.error + fail create_conference_response.error end DataDogService.increment_counter(metric_name: "created_conference.successful", **create_conference_datadog_tags) - virtual_hearing.update(conference_id: pexip_response.data[:conference_id]) + virtual_hearing.update(conference_id: create_conference_response.data[:conference_id]) end end @@ -172,11 +172,11 @@ def send_emails(email_type) end end - def pexip_error_display(response) + def error_display(response) "(#{response.error.code}) #{response.error.message}" end - def create_pexip_conference + def create_new_conference client.create_conference( host_pin: virtual_hearing.host_pin, guest_pin: virtual_hearing.guest_pin, diff --git a/app/jobs/virtual_hearings/pexip_client.rb b/app/jobs/virtual_hearings/pexip_client.rb deleted file mode 100644 index 70e5023f662..00000000000 --- a/app/jobs/virtual_hearings/pexip_client.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module VirtualHearings::PexipClient - def client - @client ||= PexipService.new( - host: ENV["PEXIP_MANAGEMENT_NODE_HOST"], - port: ENV["PEXIP_MANAGEMENT_NODE_PORT"], - user_name: ENV["PEXIP_USERNAME"], - password: ENV["PEXIP_PASSWORD"], - client_host: ENV["PEXIP_CLIENT_HOST"] - ) - end -end diff --git a/app/models/organizations_user.rb b/app/models/organizations_user.rb index 189d98de647..23ce4f1c4b4 100644 --- a/app/models/organizations_user.rb +++ b/app/models/organizations_user.rb @@ -28,6 +28,12 @@ def remove_admin_rights_from_user(user, organization) existing_record(user, organization)&.update!(admin: false) end + def update_user_conference_type(user, new_meeting_type) + if user.meeting_type + user.update!(meeting_type: new_meeting_type) + end + end + def remove_user_from_organization(user, organization) if user_is_judge_of_team?(user, organization) fail Caseflow::Error::ActionForbiddenError, message: COPY::JUDGE_TEAM_REMOVE_JUDGE_ERROR diff --git a/app/models/serializers/work_queue/administered_user_serializer.rb b/app/models/serializers/work_queue/administered_user_serializer.rb index 61b86097292..f4ffcf0e3a9 100644 --- a/app/models/serializers/work_queue/administered_user_serializer.rb +++ b/app/models/serializers/work_queue/administered_user_serializer.rb @@ -11,4 +11,5 @@ class WorkQueue::AdministeredUserSerializer < WorkQueue::UserSerializer params[:organization].dvc&.eql?(object) end end + attribute :meeting_type end diff --git a/app/views/queue/index.html.erb b/app/views/queue/index.html.erb index e0ba7a1038a..507e51addaa 100644 --- a/app/views/queue/index.html.erb +++ b/app/views/queue/index.html.erb @@ -24,6 +24,7 @@ canEditCavcDashboards: current_user.can_edit_cavc_dashboards?, canViewCavcDashboards: current_user.can_view_cavc_dashboards?, userIsCobAdmin: ClerkOfTheBoard.singleton.admins.include?(current_user), + meetingType: current_user.meeting_type, featureToggles: { collect_video_and_central_emails: FeatureToggle.enabled?(:collect_video_and_central_emails, user: current_user), enable_hearing_time_slots: FeatureToggle.enabled?(:enable_hearing_time_slots, user: current_user), @@ -53,7 +54,8 @@ cavc_remand_granted_substitute_appellant: FeatureToggle.enabled?(:cavc_remand_granted_substitute_appellant, user: current_user), cavc_dashboard_workflow: FeatureToggle.enabled?(:cavc_dashboard_workflow, user: current_user), cc_appeal_workflow: FeatureToggle.enabled?(:cc_appeal_workflow, user: current_user), - cc_vacatur_visibility: FeatureToggle.enabled?(:cc_vacatur_visibility, user: current_user) + cc_vacatur_visibility: FeatureToggle.enabled?(:cc_vacatur_visibility, user: current_user), + conference_selection_visibility: FeatureToggle.enabled?(:conference_selection_visibility,user: current_user) } }) %> <% end %> diff --git a/app/views/reader/appeal/index.html.erb b/app/views/reader/appeal/index.html.erb index f57c2c57ca4..7c65fbd45f0 100644 --- a/app/views/reader/appeal/index.html.erb +++ b/app/views/reader/appeal/index.html.erb @@ -7,7 +7,6 @@ applicationUrls: application_urls, page: "DecisionReviewer", feedbackUrl: feedback_url, - efolderExpressUrl: efolder_express_url, featureToggles: { interfaceVersion2: FeatureToggle.enabled?(:interface_version_2, user: current_user), windowSlider: FeatureToggle.enabled?(:window_slider, user: current_user), diff --git a/client/COPY.json b/client/COPY.json index 9bd85705be1..f02e14b0e86 100644 --- a/client/COPY.json +++ b/client/COPY.json @@ -772,6 +772,7 @@ "USER_MANAGEMENT_GIVE_USER_ADMIN_RIGHTS_BUTTON_TEXT": "Add admin rights", "USER_MANAGEMENT_REMOVE_USER_ADMIN_RIGHTS_BUTTON_TEXT": "Remove admin rights", "USER_MANAGEMENT_REMOVE_USER_FROM_ORG_BUTTON_TEXT": "Remove from team", + "USER_MANAGEMENT_SELECT_HEARINGS_CONFERENCE_TYPE": "Schedule hearings using:", "MEMBERSHIP_REQUEST_ACTION_SUCCESS_TITLE": "You successfully %s %s's request", "MEMBERSHIP_REQUEST_ACTION_SUCCESS_MESSAGE": "The user was %s regular member access to %s.", "VHA_MEMBERSHIP_REQUEST_AUTOMATIC_VHA_ACCESS_NOTE": "Note: If you are requesting specialized access and are not a member of the general VHA group, you will automatically be given access to the general VHA group if your request is approved.", diff --git a/client/app/queue/OrganizationUsers.jsx b/client/app/queue/OrganizationUsers.jsx index 3497cf30792..12b38c018c0 100644 --- a/client/app/queue/OrganizationUsers.jsx +++ b/client/app/queue/OrganizationUsers.jsx @@ -16,6 +16,7 @@ import { LOGO_COLORS } from '../constants/AppConstants'; import COPY from '../../COPY'; import LoadingDataDisplay from '../components/LoadingDataDisplay'; import MembershipRequestTable from './MembershipRequestTable'; +import SelectConferenceTypeRadioField from './SelectConferenceTypeRadioField'; const userStyle = css({ margin: '.5rem 0 .5rem', @@ -38,11 +39,17 @@ const buttonStyle = css({ const buttonContainerStyle = css({ borderBottom: '1rem solid gray', borderWidth: '1px', - padding: '.5rem 0 2rem', + padding: '.5rem 7rem 2rem 0', + display: 'flex', + justifyContent: 'space-between', + flexWrap: 'wrap' }); const listStyle = css({ listStyle: 'none' }); +const radioContainerStyle = css({ + padding: '-5rem 5rem 2rem 2rem', +}); export default class OrganizationUsers extends React.PureComponent { constructor(props) { @@ -248,18 +255,34 @@ export default class OrganizationUsers extends React.PureComponent { const style = i === 0 ? topUserStyle : userStyle; return -
  • {this.formatName(user)} - { judgeTeam && admin && ( {COPY.USER_MANAGEMENT_JUDGE_LABEL} ) } - { dvcTeam && dvc && ( {COPY.USER_MANAGEMENT_DVC_LABEL} ) } - { judgeTeam && !admin && ( {COPY.USER_MANAGEMENT_ATTORNEY_LABEL} ) } - { (judgeTeam || dvcTeam) && admin && ( {COPY.USER_MANAGEMENT_ADMIN_LABEL} ) } -
  • - { (judgeTeam || dvcTeam) && admin ? -
    : -
    - { (judgeTeam || dvcTeam) ? '' : this.adminButton(user, admin) } - { this.removeUserButton(user) } -
    } +
    +
      +
    • {this.formatName(user)} + { judgeTeam && admin && ( {COPY.USER_MANAGEMENT_JUDGE_LABEL} ) } + { dvcTeam && dvc && ( {COPY.USER_MANAGEMENT_DVC_LABEL} ) } + { judgeTeam && !admin && ( {COPY.USER_MANAGEMENT_ATTORNEY_LABEL} ) } + { (judgeTeam || dvcTeam) && admin && ( {COPY.USER_MANAGEMENT_ADMIN_LABEL} ) } +
    • + { (judgeTeam || dvcTeam) && admin ? +
      : +
      +
      + { (judgeTeam || dvcTeam) ? '' : this.adminButton(user, admin) } + { this.removeUserButton(user) } +
      + { this.state.organizationName === 'Hearings Management' && +
      + +
      + } +
      } +
    +
    ; }); @@ -285,10 +308,10 @@ export default class OrganizationUsers extends React.PureComponent {

    {COPY.USER_MANAGEMENT_EDIT_USER_IN_ORG_LABEL}

      - { (judgeTeam || dvcTeam) ? '' :
    • {COPY.USER_MANAGEMENT_ADMIN_RIGHTS_HEADING}{COPY.USER_MANAGEMENT_ADMIN_RIGHTS_DESCRIPTION}
    • } -
    • {COPY.USER_MANAGEMENT_REMOVE_USER_HEADING}{ judgeTeam ? + { (judgeTeam || dvcTeam) ? '' :
      • {COPY.USER_MANAGEMENT_ADMIN_RIGHTS_HEADING}{COPY.USER_MANAGEMENT_ADMIN_RIGHTS_DESCRIPTION}
      } +
      • {COPY.USER_MANAGEMENT_REMOVE_USER_HEADING}{ judgeTeam ? COPY.USER_MANAGEMENT_JUDGE_TEAM_REMOVE_USER_DESCRIPTION : - COPY.USER_MANAGEMENT_REMOVE_USER_DESCRIPTION }
      • + COPY.USER_MANAGEMENT_REMOVE_USER_DESCRIPTION }
      {listOfUsers}
    diff --git a/client/app/queue/QueueApp.jsx b/client/app/queue/QueueApp.jsx index f1b6d83a52c..3875a82e704 100644 --- a/client/app/queue/QueueApp.jsx +++ b/client/app/queue/QueueApp.jsx @@ -17,6 +17,7 @@ import { setCanEditCavcDashboards, setCanViewCavcDashboards, setFeatureToggles, + setMeetingType, setUserId, setUserRole, setUserCssId, @@ -111,6 +112,7 @@ class QueueApp extends React.PureComponent { this.props.setCanEditAod(this.props.canEditAod); this.props.setCanEditNodDate(this.props.userCanViewEditNodDate); this.props.setUserIsCobAdmin(this.props.userIsCobAdmin); + this.props.setMeetingType(this.props.meetingType); this.props.setCanEditCavcRemands(this.props.canEditCavcRemands); this.props.setCanEditCavcDashboards(this.props.canEditCavcDashboards); this.props.setCanViewCavcDashboards(this.props.canViewCavcDashboards); @@ -582,7 +584,9 @@ class QueueApp extends React.PureComponent { }; routedOrganizationUsers = (props) => ( - + ); routedTeamManagement = (props) => ; @@ -755,15 +759,15 @@ class QueueApp extends React.PureComponent { // eslint-disable-next-line default-case switch (this.props.reviewActionType) { - case DECISION_TYPES.OMO_REQUEST: - reviewActionType = 'OMO'; - break; - case DECISION_TYPES.DRAFT_DECISION: - reviewActionType = 'Draft Decision'; - break; - case DECISION_TYPES.DISPATCH: - reviewActionType = 'to Dispatch'; - break; + case DECISION_TYPES.OMO_REQUEST: + reviewActionType = 'OMO'; + break; + case DECISION_TYPES.DRAFT_DECISION: + reviewActionType = 'Draft Decision'; + break; + case DECISION_TYPES.DISPATCH: + reviewActionType = 'to Dispatch'; + break; } return `Draft Decision | Submit ${reviewActionType}`; @@ -1215,7 +1219,7 @@ class QueueApp extends React.PureComponent { /> ({ @@ -1430,6 +1436,7 @@ const mapDispatchToProps = (dispatch) => setCanEditAod, setCanEditNodDate, setUserIsCobAdmin, + setMeetingType, setCanEditCavcRemands, setCanEditCavcDashboards, setCanViewCavcDashboards, diff --git a/client/app/queue/SelectConferenceTypeRadioField.jsx b/client/app/queue/SelectConferenceTypeRadioField.jsx new file mode 100644 index 00000000000..805c88f26c1 --- /dev/null +++ b/client/app/queue/SelectConferenceTypeRadioField.jsx @@ -0,0 +1,48 @@ +import React, { useState } from 'react'; +import PropTypes from 'prop-types'; +import ApiUtil from '../util/ApiUtil'; + +import RadioField from '../components/RadioField'; +import COPY from '../../COPY'; + +const radioOptions = [ + { displayText: 'Pexip', + value: 'pexip' }, + { displayText: 'Webex', + value: 'webex' } +]; + +const SelectConferenceTypeRadioField = ({ name, meetingType, organization, user }) => { + const [value, setValue] = useState(meetingType); + + const modifyConferenceType = (newMeetingType) => { + const payload = { data: { ...user, attributes: { ...user.attributes, meeting_type: newMeetingType } } }; + + ApiUtil.patch(`/organizations/${organization}/users/${user.id}`, payload); + }; + + return ( + <> + setValue(newValue) || modifyConferenceType(newValue))} + vertical + /> + ); +}; + +SelectConferenceTypeRadioField.propTypes = { + name: PropTypes.string, + onClick: PropTypes.func, + meetingType: PropTypes.string, + organization: PropTypes.string, + user: PropTypes.shape({ + id: PropTypes.string, + attributes: PropTypes.object + }) +}; + +export default SelectConferenceTypeRadioField; diff --git a/client/app/queue/uiReducer/uiActions.js b/client/app/queue/uiReducer/uiActions.js index c428b105da2..1cabce79991 100644 --- a/client/app/queue/uiReducer/uiActions.js +++ b/client/app/queue/uiReducer/uiActions.js @@ -48,6 +48,13 @@ export const setUserIsCobAdmin = (userIsCobAdmin) => ({ } }); +export const setMeetingType = (meetingType) => ({ + type: ACTIONS.SET_MEETING_TYPE, + payload: { + meetingType + } +}); + export const setCanViewOvertimeStatus = (canViewOvertimeStatus) => ({ type: ACTIONS.SET_CAN_VIEW_OVERTIME_STATUS, payload: { diff --git a/client/app/queue/uiReducer/uiConstants.js b/client/app/queue/uiReducer/uiConstants.js index 212902a93d2..7b6c9d8743b 100644 --- a/client/app/queue/uiReducer/uiConstants.js +++ b/client/app/queue/uiReducer/uiConstants.js @@ -8,6 +8,7 @@ export const ACTIONS = { SET_FEEDBACK_URL: 'SET_FEEDBACK_URL', SET_TARGET_USER: 'SET_TARGET_USER', + SET_MEETING_TYPE: 'SET_MEETING_TYPE', HIGHLIGHT_INVALID_FORM_ITEMS: 'HIGHLIGHT_INVALID_FORM_ITEMS', RESET_ERROR_MESSAGES: 'RESET_ERROR_MESSAGES', diff --git a/client/app/queue/uiReducer/uiReducer.js b/client/app/queue/uiReducer/uiReducer.js index 2fbbf3871b4..711ff4e750d 100644 --- a/client/app/queue/uiReducer/uiReducer.js +++ b/client/app/queue/uiReducer/uiReducer.js @@ -99,6 +99,10 @@ const workQueueUiReducer = (state = initialState, action = {}) => { return update(state, { userIsCobAdmin: { $set: action.payload.userIsCobAdmin } }); + case ACTIONS.SET_MEETING_TYPE: + return update(state, { + meetingType: { $set: action.payload.meetingType } + }); case ACTIONS.SET_CAN_EDIT_CAVC_REMANDS: return update(state, { canEditCavcRemands: { $set: action.payload.canEditCavcRemands } diff --git a/client/app/reader/DecisionReviewer.jsx b/client/app/reader/DecisionReviewer.jsx index dcbda91528a..2d676eb5e62 100644 --- a/client/app/reader/DecisionReviewer.jsx +++ b/client/app/reader/DecisionReviewer.jsx @@ -92,7 +92,6 @@ export class DecisionReviewer extends React.PureComponent { annotations={this.props.annotations} vacolsId={vacolsId}> ({ } }); -export const onReceiveManifests = (manifestVbmsFetchedAt) => ({ +export const onReceiveManifests = (manifestVbmsFetchedAt, manifestVvaFetchedAt) => ({ type: Constants.RECEIVE_MANIFESTS, - payload: { - manifestVbmsFetchedAt - } + payload: { manifestVbmsFetchedAt, + manifestVvaFetchedAt } }); diff --git a/client/app/reader/DocumentList/DocumentListReducer.js b/client/app/reader/DocumentList/DocumentListReducer.js index 1107e7cea8b..dd96cc2539e 100644 --- a/client/app/reader/DocumentList/DocumentListReducer.js +++ b/client/app/reader/DocumentList/DocumentListReducer.js @@ -54,7 +54,8 @@ const initialState = { category: false } }, - manifestVbmsFetchedAt: null + manifestVbmsFetchedAt: null, + manifestVvaFetchedAt: null }; const documentListReducer = (state = initialState, action = {}) => { @@ -180,6 +181,9 @@ const documentListReducer = (state = initialState, action = {}) => { return update(state, { manifestVbmsFetchedAt: { $set: action.payload.manifestVbmsFetchedAt + }, + manifestVvaFetchedAt: { + $set: action.payload.manifestVvaFetchedAt } }); case Constants.UPDATE_FILTERED_RESULTS: diff --git a/client/app/reader/LastRetrievalAlert.jsx b/client/app/reader/LastRetrievalAlert.jsx index e5a3d341f27..880296536b5 100644 --- a/client/app/reader/LastRetrievalAlert.jsx +++ b/client/app/reader/LastRetrievalAlert.jsx @@ -1,7 +1,6 @@ import _ from 'lodash'; import moment from 'moment'; import React from 'react'; -import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import Alert from '../components/Alert'; import { css } from 'glamor'; @@ -16,33 +15,34 @@ class LastRetrievalAlert extends React.PureComponent { render() { - // Check that document manifests have been recieved from VBMS -- red banner - if (!this.props.manifestVbmsFetchedAt) { + // Check that document manifests have been recieved from VVA and VBMS + if (!this.props.manifestVbmsFetchedAt || !this.props.manifestVvaFetchedAt) { return
    - Some of {this.props.appeal.veteran_full_name}'s documents are unavailable at the moment due to - a loading error from their eFolder. As a result, you may be viewing a partial list of eFolder documents. + Some of {this.props.appeal.veteran_full_name}'s documents are not available at the moment due to + a loading error from VBMS or VVA. As a result, you may be viewing a partial list of claims folder documents.
    - Please visit eFolder Express to fetch the - latest list of documents or submit a support ticket to sync their eFolder with Reader. +
    + Please refresh your browser at a later point to view a complete list of documents in the claims + folder.
    ; } const staleCacheTime = moment().subtract(CACHE_TIMEOUT_HOURS, 'h'), - vbmsManifestTimestamp = moment(this.props.manifestVbmsFetchedAt, 'MM/DD/YY HH:mma Z'); + vbmsManifestTimestamp = moment(this.props.manifestVbmsFetchedAt, 'MM/DD/YY HH:mma Z'), + vvaManifestTimestamp = moment(this.props.manifestVvaFetchedAt, 'MM/DD/YY HH:mma Z'); - // Check that manifest results are fresh -- yellow banner - if (vbmsManifestTimestamp.isBefore(staleCacheTime)) { + // Check that manifest results are fresh + if (vbmsManifestTimestamp.isBefore(staleCacheTime) || vvaManifestTimestamp.isBefore(staleCacheTime)) { const now = moment(), - vbmsDiff = now.diff(vbmsManifestTimestamp, 'hours'); + vbmsDiff = now.diff(vbmsManifestTimestamp, 'hours'), + vvaDiff = now.diff(vvaManifestTimestamp, 'hours'); return
    - Reader last synced the list of documents with {this.props.appeal.veteran_full_name}'s eFolder - {vbmsDiff} hours ago. If you'd like to view documents in Reader uploaded to their eFolder since - the last sync, please visit eFolder Express - to fetch the latest list of documents or submit a support ticket to sync their eFolder with Reader. + We last synced with VBMS and VVA {Math.max(vbmsDiff, vvaDiff)} hours ago. If you'd like to check for new + documents, refresh the page.
    ; } @@ -51,12 +51,6 @@ class LastRetrievalAlert extends React.PureComponent { } } -LastRetrievalAlert.propTypes = { - manifestVbmsFetchedAt: PropTypes.string, - efolderExpressUrl: PropTypes.string, - appeal: PropTypes.object, -}; - export default connect( - (state) => _.pick(state.documentList, 'manifestVbmsFetchedAt') + (state) => _.pick(state.documentList, ['manifestVvaFetchedAt', 'manifestVbmsFetchedAt']) )(LastRetrievalAlert); diff --git a/client/app/reader/LastRetrievalInfo.jsx b/client/app/reader/LastRetrievalInfo.jsx index 845929f2076..01e43efda38 100644 --- a/client/app/reader/LastRetrievalInfo.jsx +++ b/client/app/reader/LastRetrievalInfo.jsx @@ -7,15 +7,22 @@ class UnconnectedLastRetrievalInfo extends React.PureComponent { return [ this.props.manifestVbmsFetchedAt ?
    - Last synced with {this.props.appeal.veteran_full_name}'s eFolder: {this.props.manifestVbmsFetchedAt.slice(0, -5)} + Last VBMS retrieval: {this.props.manifestVbmsFetchedAt.slice(0, -5)}
    :
    - Unable to display eFolder documents at this time + Unable to display VBMS documents at this time +
    , + this.props.manifestVvaFetchedAt ? +
    + Last VVA retrieval: {this.props.manifestVvaFetchedAt.slice(0, -5)} +
    : +
    + Unable to display VVA documents at this time
    ]; } } export default connect( - (state) => _.pick(state.documentList, 'manifestVbmsFetchedAt') + (state) => _.pick(state.documentList, ['manifestVvaFetchedAt', 'manifestVbmsFetchedAt']) )(UnconnectedLastRetrievalInfo); diff --git a/client/app/reader/PdfListView.jsx b/client/app/reader/PdfListView.jsx index 4a2c907bd45..8ac596eba42 100644 --- a/client/app/reader/PdfListView.jsx +++ b/client/app/reader/PdfListView.jsx @@ -68,7 +68,7 @@ export class PdfListView extends React.Component {
    - + - +
    ; } } @@ -108,8 +108,6 @@ export default connect( PdfListView.propTypes = { documents: PropTypes.arrayOf(PropTypes.object).isRequired, - efolderExpressUrl: PropTypes.string, onJumpToComment: PropTypes.func, - sortBy: PropTypes.string, - appeal: PropTypes.object, + sortBy: PropTypes.string }; diff --git a/client/mocks/webex-mocks/README.md b/client/mocks/webex-mocks/README.md index 6ba50ab12c7..cca7ce34640 100644 --- a/client/mocks/webex-mocks/README.md +++ b/client/mocks/webex-mocks/README.md @@ -4,19 +4,38 @@ Step 1: Open a terminal Step 2: Navigate to the caseflow/client -step 3: Run command: npm install json-server +step 3: Run command: [npm install json-server] or [yarn add json-server] -step 4: Make sure casfelow application is running +If the [npm install json-server] or [yarn add json-server] returns an error that resembles: + +error standard@17.1.0: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "15.1.0" + +extra steps may need to be taken. + +for brevity These instructions will follow the happy path. While in the client directory in terminal: +[nodenv install 14.21.2] +[nodenv local 14.21.2] + +If for any reason you want to go back to the original nodenv that was used prior to this change you can run, [nodenv local 12.13.0] -step 4: Run command: npm run webex-server +If it all succeeds you can attempt the [npm install json-server] or [yarn add json-server] once again. + +This time with no issue. +given that the install goes as expected you can continue following the rest of the directions. + +If there are still issues in getting this to operate as expected, See your tech lead for asssisstance. + +step 4: Make sure casfelow application is running step 5: Autogenerate test data, run this command: npm run generate-webex(This will also create the json file) +step 6: Run command: npm run webex-server + \*info: You will recieve all available routes within the terminal under 'Resources' \*info: port must be set on a different port to run due to caseflow running on port 3000 -step 5: Open a browser window in chrome and navigate to localhost:3050 [You will get the default page] +step 7: Open a browser window in chrome and navigate to localhost:3050 [You will get the default page] \*info: You can use any api endpoint software you want like Postman, but a good lightweight vs code ext. is [Thunder Client] diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 1e235028a3d..b7d6c50dd74 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -8,7 +8,6 @@ const generateMeetingData = require('./meetingData.js'); const middlewares = jsonServer.defaults(); const routesRewrite = require('./routes.json'); -// const faker = require('faker'); server.use(middlewares); server.use(jsonServer.bodyParser); diff --git a/client/test/app/queue/SelectConferenceTypeRadioField.test.js b/client/test/app/queue/SelectConferenceTypeRadioField.test.js new file mode 100644 index 00000000000..dd36e4f4343 --- /dev/null +++ b/client/test/app/queue/SelectConferenceTypeRadioField.test.js @@ -0,0 +1,80 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import ApiUtil from 'app/util/ApiUtil'; + +import SelectConferenceTypeRadioField from 'app/queue/SelectConferenceTypeRadioField'; + +const createSpy = () => jest.spyOn(ApiUtil, 'patch'). + mockImplementation(() => jest.fn(() => Promise.resolve( + { + body: { } + } + ))); + +const defaults = { + name: 'field1', + value: '1', + options: [ + { displayText: 'Pexip', + value: 'pexip' }, + { displayText: 'Webex', + value: 'webex' }, + ], +}; + +describe('SelectConferenceTypeRadioField', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + const setupComponent = (props = { + user: { + attributes: { + id: 1 + } + }, + meetingType: 'pexip', + organization: 'my org' + }) => { + const utils = render( + + ); + const inputs = utils.getAllByRole('radio'); + + return { + inputs, + ...utils, + }; + }; + + it('renders correctly', async () => { + const { container } = setupComponent(); + + expect(container).toMatchSnapshot(); + }); + + it('changes values by radio button selected', () => { + let requestPatchSpy = createSpy(); + + setupComponent(); + + const webexRadioButton = screen.getByRole('radio', { name: 'Webex' }); + const pexipRadioButton = screen.getByRole('radio', { name: 'Pexip' }); + + expect(webexRadioButton).not.toHaveAttribute('checked', ''); + expect(pexipRadioButton).toHaveAttribute('checked', ''); + + userEvent.click(webexRadioButton); + + expect(requestPatchSpy.mock.calls[0][1].data.attributes.meeting_type).toBe('webex'); + + userEvent.click(pexipRadioButton); + + expect(requestPatchSpy.mock.calls[1][1].data.attributes.meeting_type).toBe('pexip'); + }); +}); diff --git a/client/test/app/queue/__snapshots__/SelectConferenceTypeRadioField.test.js.snap b/client/test/app/queue/__snapshots__/SelectConferenceTypeRadioField.test.js.snap new file mode 100644 index 00000000000..40d135d3387 --- /dev/null +++ b/client/test/app/queue/__snapshots__/SelectConferenceTypeRadioField.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`SelectConferenceTypeRadioField renders correctly 1`] = ` +
    +
    + + + Schedule hearings using: + + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +`; diff --git a/client/test/app/queue/organizationUsers/OrganizationUsers.test.js b/client/test/app/queue/organizationUsers/OrganizationUsers.test.js new file mode 100644 index 00000000000..9eee34d1726 --- /dev/null +++ b/client/test/app/queue/organizationUsers/OrganizationUsers.test.js @@ -0,0 +1,122 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import '@testing-library/jest-dom/extend-expect'; +import OrganizationUsers from 'app/queue/OrganizationUsers'; +import ApiUtil from 'app/util/ApiUtil'; + +jest.mock('app/util/ApiUtil'); + +describe('Conference Selection Visibility Feature Toggle', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + ApiUtil.get.mockResolvedValue({ + body: { + organization_name: 'Hearing Admin', + judge_team: false, + dvc_team: false, + organization_users: { + data: [ + { + id: '126', + type: 'administered_user', + attributes: { + css_id: 'BVASORANGE', + full_name: 'Felicia BuildAndEditHearingSchedule Orange', + email: null, + admin: false, + dvc: null, + }, + }, + { + id: '2000001601', + type: 'administered_user', + attributes: { + css_id: 'AMBRISVACO', + full_name: 'Gail Maggio V', + email: 'juli@stroman-kertzmann.net', + admin: true, + dvc: null, + }, + }, + ], + }, + membership_requests: [], + isVhaOrg: false, + }, + }); + it('Finds component by Text when conferenceSelectionVisibility is false', async () => { + const conferenceSelectionVisibilityValue = false; + + const { findAllByText } = render( + + ); + const nestedText = await findAllByText('Webex'); + + expect(nestedText[0]).toBeInTheDocument(); + }); + + it('Component does not render when conferenceSelectionVisibility is true', async () => { + const conferenceSelectionVisibilityValue = true; + + const { queryAllByText } = render( + + ); + const nestedText = await queryAllByText('Webex'); + + expect(nestedText).toHaveLength(0); + }); + + it('Component does not render when orginization_name is not Hearing Admin', async () => { + const conferenceSelectionVisibilityValue = false; + + ApiUtil.get.mockResolvedValue({ + body: { + organization_name: 'Hearing Management', + judge_team: false, + dvc_team: false, + organization_users: { + data: [ + { + id: '126', + type: 'administered_user', + attributes: { + css_id: 'BVASORANGE', + full_name: 'Felicia BuildAndEditHearingSchedule Orange', + email: null, + admin: false, + dvc: null, + }, + }, + { + id: '2000001601', + type: 'administered_user', + attributes: { + css_id: 'AMBRISVACO', + full_name: 'Gail Maggio V', + email: 'juli@stroman-kertzmann.net', + admin: true, + dvc: null, + }, + }, + ], + }, + membership_requests: [], + isVhaOrg: false, + }, + }); + + const { queryAllByText } = render( + + ); + const nestedTextWebex = await queryAllByText('Webex'); + + expect(nestedTextWebex).toHaveLength(0); + }); +}); diff --git a/config/environments/demo.rb b/config/environments/demo.rb index e937ce9b7ff..f6d7574b65f 100644 --- a/config/environments/demo.rb +++ b/config/environments/demo.rb @@ -82,9 +82,6 @@ ENV["DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL"] ||= "true" - # eFolder Express URL for demo environment used as a mock link - ENV["EFOLDER_EXPRESS_URL"] ||= "http://localhost:4000" - # Setup S3 config.s3_enabled = ENV["AWS_BUCKET_NAME"].present? config.s3_bucket_name = ENV["AWS_BUCKET_NAME"] diff --git a/config/initializers/pexip.rb b/config/initializers/pexip.rb index 0b84da94fb0..0cc6eb3bd58 100644 --- a/config/initializers/pexip.rb +++ b/config/initializers/pexip.rb @@ -1 +1 @@ -PexipService = (!ApplicationController.dependencies_faked? ? ExternalApi::PexipService : Fakes::PexipService) +PexipService = (ApplicationController.dependencies_faked? ? Fakes::PexipService : ExternalApi::PexipService) diff --git a/db/migrate/20230726201514_add_meeting_type_to_users.rb b/db/migrate/20230726201514_add_meeting_type_to_users.rb new file mode 100644 index 00000000000..b07b732c95f --- /dev/null +++ b/db/migrate/20230726201514_add_meeting_type_to_users.rb @@ -0,0 +1,9 @@ +class AddMeetingTypeToUsers < Caseflow::Migration + def up + add_column :users, :meeting_type, :varChar, default: "pexip", comment: "Video Conferencing Application Type" + end + + def down + remove_column :users, :meeting_type + end +end diff --git a/db/migrate/20230726203030_add_meeting_type_to_virtual_hearings.rb b/db/migrate/20230726203030_add_meeting_type_to_virtual_hearings.rb new file mode 100644 index 00000000000..6b8f6b1e1c6 --- /dev/null +++ b/db/migrate/20230726203030_add_meeting_type_to_virtual_hearings.rb @@ -0,0 +1,9 @@ +class AddMeetingTypeToVirtualHearings < Caseflow::Migration + def up + add_column :virtual_hearings, :meeting_type, :varChar, default: "pexip", comment: "Video Conferencing Application Type" + end + + def down + remove_column :virtual_hearings, :meeting_type + end +end diff --git a/db/migrate/20230726203750_add_meeting_type_to_conference_links.rb b/db/migrate/20230726203750_add_meeting_type_to_conference_links.rb new file mode 100644 index 00000000000..dc0713e3f35 --- /dev/null +++ b/db/migrate/20230726203750_add_meeting_type_to_conference_links.rb @@ -0,0 +1,9 @@ +class AddMeetingTypeToConferenceLinks < Caseflow::Migration + def up + add_column :conference_links, :meeting_type, :varChar, default: "pexip", comment: "Video Conferencing Application Type" + end + + def down + remove_column :conference_links, :meeting_type + end +end diff --git a/db/schema.rb b/db/schema.rb index 2f02f9c82e3..06240150d9a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -556,6 +556,7 @@ t.string "host_link", comment: "Conference link generated from external conference service" t.integer "host_pin", comment: "Pin for the host of the conference to get into the conference" t.string "host_pin_long", limit: 8, comment: "Generated host pin stored as a string" + t.string "meeting_type", default: "pexip", comment: "Video Conferencing Application Type" t.datetime "updated_at", comment: "Date and Time record was last updated" t.bigint "updated_by_id", comment: "user id of the user to last update the record. FK on the User table" t.index ["created_by_id"], name: "index_created_by_id" @@ -597,6 +598,8 @@ t.string "diagnostic_code", comment: "If a decision resulted in a rating, this is the rating issue's diagnostic code." t.string "disposition", comment: "The disposition for a decision issue. Dispositions made in Caseflow and dispositions made in VBMS can have different values." t.date "end_product_last_action_date", comment: "After an end product gets synced with a status of CLR (cleared), the end product's last_action_date is saved on any decision issues that are created as a result. This is used as a proxy for decision date for non-rating issues that are processed in VBMS because they don't have a rating profile date, and the exact decision date is not available." + t.boolean "mst_status", default: false, comment: "Indicates if decision issue is related to Military Sexual Trauma (MST)" + t.boolean "pact_status", default: false, comment: "Indicates if decision issue is related to Promise to Address Comprehensive Toxics (PACT) Act" t.string "participant_id", null: false, comment: "The Veteran's participant id." t.string "percent_number", comment: "percent_number from RatingIssue (prcntNo from Rating Profile)" t.string "rating_issue_reference_id", comment: "Identifies the specific issue on the rating that resulted from the decision issue (a rating issue can be connected to multiple contentions)." @@ -1472,9 +1475,13 @@ t.string "ineligible_reason", comment: "The reason for a Request Issue being ineligible. If a Request Issue has an ineligible_reason, it is still captured, but it will not get a contention in VBMS or a decision." t.boolean "is_predocket_needed", comment: "Indicates whether or not an issue has been selected to go to the pre-docket queue opposed to normal docketing." t.boolean "is_unidentified", comment: "Indicates whether a Request Issue is unidentified, meaning it wasn't found in the list of contestable issues, and is not a new nonrating issue. Contentions for unidentified issues are created on a rating End Product if processed in VBMS but without the issue description, and someone is required to edit it in Caseflow before proceeding with the decision." + t.boolean "mst_status", default: false, comment: "Indicates if issue is related to Military Sexual Trauma (MST)" + t.text "mst_status_update_reason_notes", comment: "The reason for why Request Issue is Military Sexual Trauma (MST)" t.string "nonrating_issue_category", comment: "The category selected for nonrating request issues. These vary by business line." t.string "nonrating_issue_description", comment: "The user entered description if the issue is a nonrating issue" t.text "notes", comment: "Notes added by the Claims Assistant when adding request issues. This may be used to capture handwritten notes on the form, or other comments the CA wants to capture." + t.boolean "pact_status", default: false, comment: "Indicates if issue is related to Promise to Address Comprehensive Toxics (PACT) Act" + t.text "pact_status_update_reason_notes", comment: "The reason for why Request Issue is Promise to Address Comprehensive Toxics (PACT) Act" t.string "ramp_claim_id", comment: "If a rating issue was created as a result of an issue intaken for a RAMP Review, it will be connected to the former RAMP issue by its End Product's claim ID." t.datetime "rating_issue_associated_at", comment: "Timestamp when a contention and its contested rating issue are associated in VBMS." t.string "split_issue_status", comment: "If a request issue is part of a split, on_hold status applies to the original request issues while active are request issues on splitted appeals" @@ -1485,6 +1492,8 @@ t.datetime "updated_at", comment: "Automatic timestamp whenever the record changes." t.string "vacols_id", comment: "The vacols_id of the legacy appeal that had an issue found to match the request issue." t.integer "vacols_sequence_id", comment: "The vacols_sequence_id, for the specific issue on the legacy appeal which the Claims Assistant determined to match the request issue on the Decision Review. A combination of the vacols_id (for the legacy appeal), and vacols_sequence_id (for which issue on the legacy appeal), is required to identify the issue being opted-in." + t.boolean "vbms_mst_status", default: false, comment: "Indicates if issue is related to Military Sexual Trauma (MST) and was imported from VBMS" + t.boolean "vbms_pact_status", default: false, comment: "Indicates if issue is related to Promise to Address Comprehensive Toxics (PACT) Act and was imported from VBMS" t.boolean "verified_unidentified_issue", comment: "A verified unidentified issue allows an issue whose rating data is missing to be intaken as a regular rating issue. In order to be marked as verified, a VSR needs to confirm that they were able to find the record of the decision for the issue." t.string "veteran_participant_id", comment: "The veteran participant ID. This should be unique in upstream systems and used in the future to reconcile duplicates." t.index ["closed_at"], name: "index_request_issues_on_closed_at" @@ -1510,6 +1519,8 @@ t.integer "edited_request_issue_ids", comment: "An array of the request issue IDs that were edited during this request issues update", array: true t.string "error", comment: "The error message if the last attempt at processing the request issues update was not successful." t.datetime "last_submitted_at", comment: "Timestamp for when the processing for the request issues update was last submitted. Used to determine how long to continue retrying the processing job. Can be reset to allow for additional retries." + t.integer "mst_edited_request_issue_ids", comment: "An array of the request issue IDs that were updated to be associated with MST in request issues update", array: true + t.integer "pact_edited_request_issue_ids", comment: "An array of the request issue IDs that were updated to be associated with PACT in request issues update", array: true t.datetime "processed_at", comment: "Timestamp for when the request issue update successfully completed processing." t.bigint "review_id", null: false, comment: "The ID of the decision review edited." t.string "review_type", null: false, comment: "The type of the decision review edited." @@ -1558,6 +1569,26 @@ t.index ["sent_by_id"], name: "index_sent_hearing_email_events_on_sent_by_id" end + create_table "special_issue_changes", force: :cascade do |t| + t.bigint "appeal_id", null: false, comment: "AMA or Legacy Appeal ID that the issue is tied to" + t.string "appeal_type", null: false, comment: "Appeal Type (Appeal or LegacyAppeal)" + t.string "change_category", null: false, comment: "Type of change that occured to the issue (Established Issue, Added Issue, Edited Issue, Removed Issue)" + t.datetime "created_at", null: false, comment: "Date the special issue change was made" + t.string "created_by_css_id", null: false, comment: "CSS ID of the user that made the special issue change" + t.bigint "created_by_id", null: false, comment: "User ID of the user that made the special issue change" + t.bigint "decision_issue_id", comment: "ID of the decision issue that had a special issue change from its corresponding request issue" + t.bigint "issue_id", null: false, comment: "ID of the issue that was changed" + t.boolean "mst_from_vbms", comment: "Indication that the MST status originally came from VBMS on intake" + t.string "mst_reason_for_change", comment: "Reason for changing the MST status on an issue" + t.boolean "original_mst_status", null: false, comment: "Original MST special issue status of the issue" + t.boolean "original_pact_status", null: false, comment: "Original PACT special issue status of the issue" + t.boolean "pact_from_vbms" + t.string "pact_reason_for_change", comment: "Reason for changing the PACT status on an issue" + t.bigint "task_id", null: false, comment: "Task ID of the IssueUpdateTask or EstablishmentTask used to log this issue in the case timeline" + t.boolean "updated_mst_status", comment: "Updated MST special issue status of the issue" + t.boolean "updated_pact_status", comment: "Updated PACT special issue status of the issue" + end + create_table "special_issue_lists", comment: "Associates special issues to an AMA or legacy appeal for Caseflow Queue. Caseflow Dispatch uses special issues stored in legacy_appeals. They are intentionally disconnected.", force: :cascade do |t| t.bigint "appeal_id", comment: "The ID of the appeal associated with this record" t.string "appeal_type", comment: "The type of appeal associated with this record" @@ -1779,6 +1810,7 @@ t.string "email" t.string "full_name" t.datetime "last_login_at", comment: "The last time the user-agent (browser) provided session credentials; see User.from_session for precision" + t.string "meeting_type", default: "pexip", comment: "Video Conferencing Application Type" t.string "roles", array: true t.string "selected_regional_office" t.string "station_id", null: false @@ -1944,6 +1976,7 @@ t.string "host_pin_long", limit: 8, comment: "Change the host pin to store a longer pin with the # sign trailing" t.string "judge_email", comment: "Judge's email address" t.boolean "judge_email_sent", default: false, null: false, comment: "Whether or not a notification email was sent to the judge" + t.string "meeting_type", default: "pexip", comment: "Video Conferencing Application Type" t.string "representative_email", comment: "Veteran's representative's email address" t.boolean "representative_email_sent", default: false, null: false, comment: "Whether or not a notification email was sent to the veteran's representative" t.datetime "representative_reminder_sent_at", comment: "The datetime the last reminder email was sent to the representative." diff --git a/lib/caseflow/error.rb b/lib/caseflow/error.rb index df77673dd3b..70f85bd5d25 100644 --- a/lib/caseflow/error.rb +++ b/lib/caseflow/error.rb @@ -405,11 +405,16 @@ class MissingRequiredFieldError < VacolsRepositoryError; end class IdtApiError < StandardError; end class InvalidOneTimeKey < IdtApiError; end - class PexipApiError < SerializableError; end + class ConferenceCreationError < SerializableError; end + class MeetingTypeNotFoundError < ConferenceCreationError; end + + class PexipApiError < ConferenceCreationError; end class PexipNotFoundError < PexipApiError; end class PexipBadRequestError < PexipApiError; end class PexipMethodNotAllowedError < PexipApiError; end + class WebexApiError < ConferenceCreationError; end + class WorkModeCouldNotUpdateError < StandardError; end class VirtualHearingConversionFailed < SerializableError diff --git a/spec/feature/dispatch/establish_claim_spec.rb b/spec/feature/dispatch/establish_claim_spec.rb index 15442585c9a..02cab5c7992 100644 --- a/spec/feature/dispatch/establish_claim_spec.rb +++ b/spec/feature/dispatch/establish_claim_spec.rb @@ -141,6 +141,7 @@ end visit "/dispatch/work-assignments" + expect(page).to have_content("1.\nJanet Smith\n0 0 1 1 3") expect(page).to have_content("2.\nJune Smith\n1 0 0 1 2") expect(page).to have_content("3.\nJeffers Smith\n0 1 0 1 2") @@ -544,6 +545,7 @@ click_label("confirmNote") click_on "Finish routing claim" + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(page).to have_content("Reviewed Full Grant decision") expect(page).to have_content("Established EP: 070BVAGR - BVA Grant (070) for Station 351 - Muskogee") @@ -579,6 +581,7 @@ click_on "Finish routing claim" # Confirmation Page + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(page).to have_content("Added VBMS Note on Rice Compliance") @@ -623,7 +626,7 @@ ) end - scenario "Assigning it to complete the claims establishment", skip: "flakey hang" do + scenario "Assigning it to complete the claims establishment" do visit "/dispatch/establish-claim" click_on "Establish next claim" @@ -631,8 +634,9 @@ expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Route Claim") expect(page).to have_selector(:link_or_button, "Assign to Claim") - click_on "Assign to Claim" # unknown reason sometimes hangs here + click_on "Assign to Claim" + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(task.reload.outgoing_reference_id).to eq(end_product.claim_id) @@ -671,6 +675,7 @@ click_on "Create End Product" # Confirmation Page + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(page).to have_content("Established EP: 070RMBVAGARC - ARC Remand with BVA Grant for Station 397 - ARC") expect(page).to have_content("VACOLS Updated: Changed Location to 98") @@ -768,6 +773,7 @@ safe_click "#button-Finish-routing-claim" + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(page).to have_content("VACOLS Updated: Changed Location to 50") expect(page).to have_content("Added VBMS Note on Rice Compliance") @@ -824,6 +830,7 @@ click_on "Finish routing claim" + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(task.reload.completion_status).to eq("special_issue_vacols_routed") end @@ -855,6 +862,7 @@ click_on "Create new EP" click_on "Create End Product" + expect(page).to have_current_path("/dispatch/establish-claim/#{task.id}") expect(page).to have_content("Success!") expect(Fakes::VBMSService).to have_received(:establish_claim!).with( diff --git a/spec/feature/queue/substitute_appellant/substitute_appellant_task_copy_spec.rb b/spec/feature/queue/substitute_appellant/substitute_appellant_task_copy_spec.rb deleted file mode 100644 index 30b7536c417..00000000000 --- a/spec/feature/queue/substitute_appellant/substitute_appellant_task_copy_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -# frozen_string_literal: true - -def wait_for_page_render - # This find forces a wait for the page to render. Without it, a test asserting presence or absence of content - # may pass whether the content is present or not! - find("div", id: "caseTitleDetailsSubheader") -end - -def select_task_ids_in_ui(task_ids) - visit "/queue" - visit "/queue/appeals/#{appeal.uuid}" - wait_for_page_render - - click_on "+ Add Substitute" - - fill_in("substitutionDate", with: Time.zone.parse("2021-01-01")) - find("label", text: "Bob Vance, Spouse").click - click_on "Continue" - - # Uncomment this if you wish to use demo specific selections in the browser - # binding.pry - # appeal.treee - - task_ids.each do |task_id| - find("div", class: "checkbox-wrapper-taskIds[#{task_id}]").find("label").click - end - click_on "Continue" - click_on "Confirm" - wait_for_page_render -end - -# Since the appeal is imported from JSON, the IDs here are always the below values. -# Give them friendly names for easier access -TASKS = { - distribution: 2_000_758_353, - schedule_hearing: 2_000_758_355, - assign_hearing_disposition: 2_001_178_199, - address_verify: 2_001_143_838, - transcription: 2_001_233_993, - evidence_submission_window: 2_001_233_994, - evidence_or_argument_mail: 2_001_578_851 -}.freeze - -note = "This test is only used to aid manual testing/demonstration." -RSpec.feature "CASEFLOW-1501 Substitute appellant behavior", :postgres, skip: note do - describe "Substitute Appellant appeal creation" do - before do - cob_user = create(:user, css_id: "COB_USER", station_id: "101") - ClerkOfTheBoard.singleton.add_user(cob_user) - OrganizationsUser.make_user_admin(cob_user, ClerkOfTheBoard.singleton) - User.authenticate!(user: cob_user) - end - - let!(:appeal) do - sji = SanitizedJsonImporter.from_file( - "db/seeds/sanitized_json/b5eba21a-9baf-41a3-ac1c-08470c2b79c4.json", - verbosity: 0 - ) - sji.import - sji.imported_records[Appeal.table_name].first - end - - let(:new_appeal) do - appellant_substitution = AppellantSubstitution.find_by(source_appeal_id: appeal.id) - appellant_substitution.target_appeal - end - - context "with an EvidenceSubmissionWindowTask selected" do - before do - select_task_ids_in_ui([TASKS[:evidence_submission_window]]) - end - - it "show a success message" do - expect(page).to have_content("You have successfully added a substitute appellant") - end - - it "prints the generated task tree" do - new_appeal.treee - end - end - - context "with a ScheduleHearingTask selected" do - before do - select_task_ids_in_ui([TASKS[:schedule_hearing]]) - end - - it "prints a task tree" do - new_appeal.treee - end - end - - context "with a HearingAdminActionVerifyAddressTask selected" do - before do - select_task_ids_in_ui([TASKS[:address_verify]]) - end - - it "creates a proper task tree" do - new_appeal.treee - - sht = ScheduleHearingTask.find_by(appeal_id: new_appeal.id) - expect(sht.status).to eq "on_hold" - - haavat = HearingAdminActionVerifyAddressTask.find_by(appeal_id: new_appeal.id) - expect(haavat.status).to eq "assigned" - expect(haavat.assigned_to.type).to eq "HearingsManagement" - end - end - - context "with an AssignHearingDispositionTask selected" do - before do - select_task_ids_in_ui([TASKS[:assign_hearing_disposition]]) - end - - it "prints a task tree" do - new_appeal.treee - end - end - - context "with a TranscriptionTask selected" do - before do - select_task_ids_in_ui([TASKS[:transcription]]) - end - - it "prints a task tree" do - new_appeal.treee - end - end - - context "with EvidenceSubmissionWindow and Transcription selected" do - before do - select_task_ids_in_ui([TASKS[:evidence_submission_window], TASKS[:transcription]]) - end - - it "prints a task tree" do - new_appeal.treee - end - end - - context "with Verify Address and Schedule Hearing selected" do - before do - select_task_ids_in_ui([TASKS[:address_verify], TASKS[:schedule_hearing]]) - end - - it "prints a task tree" do - new_appeal.treee - end - end - end -end diff --git a/spec/jobs/virtual_hearings/create_conference_job_spec.rb b/spec/jobs/virtual_hearings/create_conference_job_spec.rb index ea4297cedfb..db5d7384523 100644 --- a/spec/jobs/virtual_hearings/create_conference_job_spec.rb +++ b/spec/jobs/virtual_hearings/create_conference_job_spec.rb @@ -97,6 +97,18 @@ expect(virtual_hearing.guest_pin.to_s.length).to eq(11) end + it "fails when meeting type is webex" do + current_user.update!(meeting_type: "webex") + + expect { subject.perform_now }.to raise_exception(Caseflow::Error::WebexApiError) + end + + it "fails when a meeting type is neither pexip nor webex" do + current_user.update!(meeting_type: "say whaaaat") + + expect { subject.perform_now }.to raise_exception(Caseflow::Error::MeetingTypeNotFoundError) + end + include_examples "confirmation emails are sent" include_examples "sent email event objects are created" diff --git a/spec/models/docket_spec.rb b/spec/models/docket_spec.rb index 78e6734650b..fe65466a522 100644 --- a/spec/models/docket_spec.rb +++ b/spec/models/docket_spec.rb @@ -553,12 +553,11 @@ end it "sets the case ids when a redistribution occurs" do - distributed_case.id ymd = Time.zone.today.strftime("%F") result = subject expect(DistributedCase.find(distributed_case.id).case_id).to eq("#{distributed_appeal.uuid}-redistributed-#{ymd}") - expect(result[0].case_id).to eq(distributed_appeal.uuid) + expect(result.any? { |item| item.case_id == distributed_appeal.uuid }).to be_truthy end end diff --git a/spec/models/idt/token_spec.rb b/spec/models/idt/token_spec.rb index 90a17bf2c1b..6401aecfa79 100644 --- a/spec/models/idt/token_spec.rb +++ b/spec/models/idt/token_spec.rb @@ -7,6 +7,7 @@ let(:css_id) { "TEST_ID" } let(:key_token_pair) { Idt::Token.generate_one_time_key_and_proposed_token } + # rubocop:disable Metrics/LineLength let(:invalid_token) { "9373a256a2ac3c3bd320adeeb8a1e4d996ef064d1332357954410f25740bf0c17b6565e152760c461a85587e6a6845457f955ccfa20a8e462a77b776eb10b72c" } # rubocop:enable Metrics/LineLength @@ -50,7 +51,12 @@ expect(Idt::Token.active?(invalid_token)).to eq(false) end - xit "returns false after a token expires" do + it "returns false after a token expires" do + key, token = key_token_pair + Idt::Token.activate_proposed_token(key, css_id) + expect(Idt::Token.active?(token)).to eq(true) + Idt::Token.client.expire("valid_tokens_key" + token, -1) + expect(Idt::Token.active?(token)).to eq(false) end end end diff --git a/spec/models/organizations_user_spec.rb b/spec/models/organizations_user_spec.rb index bc148bd7a4f..f68b294517d 100644 --- a/spec/models/organizations_user_spec.rb +++ b/spec/models/organizations_user_spec.rb @@ -114,4 +114,18 @@ end end end + + describe ".update_user_conference_type" do + let(:meeting_type) { user.meeting_type } + let(:new_meeting_type) { "webex" } + + subject { OrganizationsUser.update_user_conference_type(user, new_meeting_type) } + + context "when meeting type exists" do + it "should set meeting type to equal new meeting type" do + subject + expect(meeting_type).to eq(new_meeting_type) + end + end + end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 7b25a645c36..6c5b35355d5 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -158,7 +158,8 @@ :display_name => css_id.upcase, "name" => "Tom Brady", "status" => Constants.USER_STATUSES.active, - "status_updated_at" => nil + "status_updated_at" => nil, + "meeting_type" => "pexip" } end From 99c1ee912c1e0f20f4a2cabec774499ab37810e0 Mon Sep 17 00:00:00 2001 From: breedbah Date: Fri, 25 Aug 2023 10:43:49 -0400 Subject: [PATCH 22/28] APPEALS-28105 cleaned up and completed mock server update --- client/app/queue/OrganizationUsers.jsx | 1 - client/mocks/webex-mocks/meetingData.js | 134 ++++++------------ .../mocks/webex-mocks/webex-mock-generator.js | 2 +- client/mocks/webex-mocks/webex-mock-server.js | 48 +++---- 4 files changed, 66 insertions(+), 119 deletions(-) diff --git a/client/app/queue/OrganizationUsers.jsx b/client/app/queue/OrganizationUsers.jsx index 2f60f308d57..1453040d758 100644 --- a/client/app/queue/OrganizationUsers.jsx +++ b/client/app/queue/OrganizationUsers.jsx @@ -17,7 +17,6 @@ import COPY from '../../COPY'; import LoadingDataDisplay from '../components/LoadingDataDisplay'; import MembershipRequestTable from './MembershipRequestTable'; import SelectConferenceTypeRadioField from './SelectConferenceTypeRadioField'; -import SelectConferenceTypeRadioField from './SelectConferenceTypeRadioField'; const userStyle = css({ margin: '.5rem 0 .5rem', diff --git a/client/mocks/webex-mocks/meetingData.js b/client/mocks/webex-mocks/meetingData.js index 34afb658f9c..377317996b9 100644 --- a/client/mocks/webex-mocks/meetingData.js +++ b/client/mocks/webex-mocks/meetingData.js @@ -1,96 +1,50 @@ const faker = require('faker'); -const generateMeetingData = { - id: faker.random.uuid(), - meetingNumber: faker.random.number(), - title: faker.company.catchPhrase(), - password: faker.internet.password(), - meetingType: 'meetingSeries', - state: 'active', - timezone: 'Asia/Shanghai', - start: '2023-11-01T20:00:00+08:00', - end: '2023-11-01T21:00:00+08:00', - hostUserId: faker.finance.account(), - hostDisplayName: faker.name.findName(), - hostEmail: faker.internet.email(), - hostKey: faker.random.number(), - siteUrl: 'ciscofedsales.webex.com', - webLink: faker.internet.url(), - sipAddress: faker.internet.email(), - dialInIpAddress: faker.internet.ip(), - enabledAutoRecordMeeting: faker.random.boolean(), - allowAnyUserToBeCoHost: faker.random.boolean(), - allowFirstUserToBeCoHost: faker.random.boolean(), - allowAuthenticatedDevices: faker.random.boolean(), - enabledJoinBeforeHost: faker.random.boolean(), - joinBeforeHostMinutes: faker.random.number({ min: 0, max: 10 }), - enableConnectAudioBeforeHost: faker.random.boolean(), - excludePassword: faker.random.boolean(), - publicMeeting: faker.random.boolean(), - enableAutomaticLock: faker.random.boolean(), - automaticLockMinutes: faker.random.number({ min: 1, max: 10 }), - unlockedMeetingJoinSecurity: 'allowJoinWithLobby', - telephony: { - accessCode: faker.random.number({ min: 100000, max: 999999 }).toString(), - callInNumbers: [ - { - label: 'United States Toll', - callInNumber: '+1-415-527-5035', - tollType: 'toll', - }, - { - label: 'United States Toll (Washington D.C.)', - callInNumber: '+1-202-600-2533', - tollType: 'toll', - }, - ], - links: [ - { - rel: 'globalCallinNumbers', - href: `/v1/meetings/${faker.random.uuid()}/globalCallinNumbers`, - method: 'GET', +const generateMeetingData = (subject, startTime, endTime) => { + const undefinedValue = undefined; + + if ( + startTime === undefinedValue && + endTime === undefinedValue && + subject === undefinedValue + ) { + startTime = faker.date.recent().toTimeString(). + split(' ')[0]; + endTime = faker.date.future().toTimeString(). + split(' ')[0]; + subject = faker.lorem.words(); + } + + return { + id: faker.random.uuid(), + jwt: { + sub: subject, + Nbf: startTime, + Exp: endTime, + flow: { + id: faker.random.uuid(), + data: [ + { + uri: `${faker.internet.userName()}@intadmin.room.wbx2.com`, + }, + { + uri: `${faker.internet.userName()}@intadmin.room.wbx2.com`, + }, + ], }, - ], - }, - meetingOptions: { - enabledChat: faker.random.boolean(), - enabledVideo: faker.random.boolean(), - enabledNote: faker.random.boolean(), - noteType: 'allowAll', - enabledFileTransfer: faker.random.boolean(), - enabledUCFRichMedia: faker.random.boolean(), - }, - attendeePrivileges: { - enabledShareContent: faker.random.boolean(), - enabledSaveDocument: faker.random.boolean(), - enabledPrintDocument: faker.random.boolean(), - enabledAnnotate: faker.random.boolean(), - enabledViewParticipantList: faker.random.boolean(), - enabledViewThumbnails: faker.random.boolean(), - enabledRemoteControl: faker.random.boolean(), - enabledViewAnyDocument: faker.random.boolean(), - enabledViewAnyPage: faker.random.boolean(), - enabledContactOperatorPrivately: faker.random.boolean(), - enabledChatHost: faker.random.boolean(), - enabledChatPresenter: faker.random.boolean(), - enabledChatOtherParticipants: faker.random.boolean(), - }, - sessionTypeId: faker.random.number({ min: 1, max: 5 }), - scheduledType: 'meeting', - simultaneousInterpretation: { - enabled: faker.random.boolean(), - }, - enabledBreakoutSessions: faker.random.boolean(), - audioConnectionOptions: { - audioConnectionType: 'webexAudio', - enabledTollFreeCallIn: faker.random.boolean(), - enabledGlobalCallIn: faker.random.boolean(), - enabledAudienceCallBack: faker.random.boolean(), - entryAndExitTone: 'beep', - allowHostToUnmuteParticipants: faker.random.boolean(), - allowAttendeeToUnmuteSelf: faker.random.boolean(), - muteAttendeeUponEntry: faker.random.boolean(), - }, + }, + aud: faker.random.uuid(), + numGuest: faker.random.number({ min: 1, max: 10 }), + numHost: 1, + provideShortUrls: faker.random.boolean(), + verticalType: faker.company.catchPhrase(), + loginUrlForHost: faker.random.boolean(), + jweAlg: 'PBES2-HS512+A256KW', + saltLength: faker.random.number({ min: 1, max: 16 }), + iterations: faker.random.number({ min: 500, max: 2000 }), + enc: 'A256GCM', + jwsAlg: 'HS512', + }; }; module.exports = generateMeetingData; diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index 9d4d9c98423..57d4fa640f0 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -5,7 +5,7 @@ const generateConferenceLinks = () => { let webexLinks = []; for (let id = 1; id <= 10; id++) { - webexLinks.push(generateMeetingData); + webexLinks.push(generateMeetingData()); } return webexLinks; diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index b7d6c50dd74..3d72cbb894b 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -127,30 +127,18 @@ server.get('/health-check-green', (req, res) => { }); const requiredKeys = [ - 'title', - 'start', - 'end', - 'timezone', - 'enabledAutoRecordMeeting', - 'allowAnyUserToBeCoHost', - 'enabledJoinBeforeHost', - 'enableConnectAudioBeforeHost', - 'joinBeforeHostMinutes', - 'excludePassword', - 'publicMeeting', - 'reminderTime', - 'unlockedMeetingJoinSecurity', - 'enabledWebCastView', - 'enableAutomaticLock', - 'automaticLockMinutes', - 'allowFirstUserToBeCoHost', - 'allowAuthenticatedDevices', - 'sendEmail', - 'siteUrl', - 'meetingOptions', - 'attendeePrivileges', - 'enabledBreakoutSessions', - 'audioConnectionOptions', + 'jwt', + 'aud', + 'numGuest', + 'numHost', + 'provideShortUrls', + 'verticalType', + 'loginUrlForHost', + 'jweAlg', + 'saltLength', + 'iterations', + 'enc', + 'jwsAlg' ]; server.post('/fake.api-usgov.webex.com/v1/meetings', (req, res) => { @@ -167,9 +155,15 @@ server.post('/fake.api-usgov.webex.com/v1/meetings', (req, res) => { const conferenceLinks = db.get('conferenceLinks'); // Add generateMeetingData object to conferenceLinks - conferenceLinks.push(generateMeetingData).write(); - - res.status(200).json(generateMeetingData); + conferenceLinks.push( + generateMeetingData( + requestBody.jwt.sub, + requestBody.jwt.Nbf, + requestBody.jwt.Exp + ) + ).write(); + + res.status(200).json(generateMeetingData(requestBody.jwt.sub, requestBody.jwt.Nbf, requestBody.jwt.Exp)); } }); From ffef0dbe357c5406f40e90877d290936fd03f6a7 Mon Sep 17 00:00:00 2001 From: breedbah Date: Fri, 25 Aug 2023 12:35:19 -0400 Subject: [PATCH 23/28] APPEALS-28105 Updated and modified meeting data --- client/mocks/webex-mocks/meetingData.js | 21 +++--------- .../mocks/webex-mocks/webex-mock-generator.js | 32 ++++++++++++++++--- client/mocks/webex-mocks/webex-mock-server.js | 18 +++++------ 3 files changed, 40 insertions(+), 31 deletions(-) diff --git a/client/mocks/webex-mocks/meetingData.js b/client/mocks/webex-mocks/meetingData.js index 377317996b9..0ed5772a76e 100644 --- a/client/mocks/webex-mocks/meetingData.js +++ b/client/mocks/webex-mocks/meetingData.js @@ -1,26 +1,13 @@ const faker = require('faker'); -const generateMeetingData = (subject, startTime, endTime) => { - const undefinedValue = undefined; - - if ( - startTime === undefinedValue && - endTime === undefinedValue && - subject === undefinedValue - ) { - startTime = faker.date.recent().toTimeString(). - split(' ')[0]; - endTime = faker.date.future().toTimeString(). - split(' ')[0]; - subject = faker.lorem.words(); - } +const generateMeetingData = (response) => { return { id: faker.random.uuid(), jwt: { - sub: subject, - Nbf: startTime, - Exp: endTime, + sub: response.jwt.sub, + Nbf: response.jwt.Nbf, + Exp: response.jwt.Exp, flow: { id: faker.random.uuid(), data: [ diff --git a/client/mocks/webex-mocks/webex-mock-generator.js b/client/mocks/webex-mocks/webex-mock-generator.js index 57d4fa640f0..6f8a108f5ee 100644 --- a/client/mocks/webex-mocks/webex-mock-generator.js +++ b/client/mocks/webex-mocks/webex-mock-generator.js @@ -1,11 +1,33 @@ const fs = require('fs'); +const faker = require('faker'); const generateMeetingData = require('./meetingData.js'); const generateConferenceLinks = () => { let webexLinks = []; for (let id = 1; id <= 10; id++) { - webexLinks.push(generateMeetingData()); + const startDate = new Date('2021-01-01T00:00:00Z'); + const endDate = new Date('2023-01-01T00:00:00Z'); + + const randomStartDate = faker.date.between(startDate, endDate); + const randomEndDate = new Date(randomStartDate.getTime()); + + randomEndDate.setHours(randomEndDate.getHours() + 1); + + let startTime = randomStartDate.toISOString().replace('Z', ''); + let endTime = randomEndDate.toISOString().replace('Z', ''); + + let subject = faker.lorem.words(); + + let updatedValues = { + jwt: { + sub: subject, + Nbf: startTime, + Exp: endTime + } + }; + + webexLinks.push(generateMeetingData(updatedValues)); } return webexLinks; @@ -19,8 +41,10 @@ const data = { // Check if the script is being run directly if (require.main === module) { - fs.writeFileSync('mocks/webex-mocks/webex-mock.json', JSON.stringify(data, null, 2)); + fs.writeFileSync( + 'mocks/webex-mocks/webex-mock.json', + JSON.stringify(data, null, 2) + ); // eslint-disable-next-line no-console - console.log('Generated new data in webex-mock.json'); + console.log("Generated new data in webex-mock.json"); } - diff --git a/client/mocks/webex-mocks/webex-mock-server.js b/client/mocks/webex-mocks/webex-mock-server.js index 3d72cbb894b..884bf9b2810 100644 --- a/client/mocks/webex-mocks/webex-mock-server.js +++ b/client/mocks/webex-mocks/webex-mock-server.js @@ -149,21 +149,19 @@ server.post('/fake.api-usgov.webex.com/v1/meetings', (req, res) => { if (missingKeys.length > 0) { res.status(400).json({ message: 'Missing required keys', missingKeys }); + } else if (!requestBody.jwt.sub || !requestBody.jwt.Nbf || !requestBody.jwt.Exp) { + res.status(400).json({ + message: 'Missing required params', + }); } else { - // Access conferenceLinks from database + const db = router.db; const conferenceLinks = db.get('conferenceLinks'); // Add generateMeetingData object to conferenceLinks - conferenceLinks.push( - generateMeetingData( - requestBody.jwt.sub, - requestBody.jwt.Nbf, - requestBody.jwt.Exp - ) - ).write(); - - res.status(200).json(generateMeetingData(requestBody.jwt.sub, requestBody.jwt.Nbf, requestBody.jwt.Exp)); + conferenceLinks.push(generateMeetingData(requestBody)).write(); + + res.status(200).json(generateMeetingData(requestBody)); } }); From c69cb9c8dc63f998398de137f88d9f91f0ee5fed Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 28 Aug 2023 14:09:48 -0400 Subject: [PATCH 24/28] resolve conflict --- client/app/queue/OrganizationUsers.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app/queue/OrganizationUsers.jsx b/client/app/queue/OrganizationUsers.jsx index 1453040d758..1a97b037d89 100644 --- a/client/app/queue/OrganizationUsers.jsx +++ b/client/app/queue/OrganizationUsers.jsx @@ -280,7 +280,7 @@ export default class OrganizationUsers extends React.PureComponent { user={user} /> } - } + } ; From d79c0c5290f2620c6d967cec35a9e463561c3ecc Mon Sep 17 00:00:00 2001 From: breedbah Date: Mon, 28 Aug 2023 14:53:06 -0400 Subject: [PATCH 25/28] APPEALS-28105 removed space routes.json --- client/mocks/webex-mocks/routes.json | 1 - 1 file changed, 1 deletion(-) diff --git a/client/mocks/webex-mocks/routes.json b/client/mocks/webex-mocks/routes.json index 76516817fb9..77567effdf6 100644 --- a/client/mocks/webex-mocks/routes.json +++ b/client/mocks/webex-mocks/routes.json @@ -1,4 +1,3 @@ - { "/api/v1/conference-links": "/conferenceLinks", "/api/v1/conference-links/:id": "/conferenceLinks/:id" From ce501b0a4f3032c8c6f0234bcc38290efb07fb30 Mon Sep 17 00:00:00 2001 From: breedbah Date: Tue, 29 Aug 2023 09:54:04 -0400 Subject: [PATCH 26/28] APPEALS-28105 fixed conferenceSelectionVisibility --- client/app/queue/OrganizationUsers.jsx | 75 +++++++++++++++----------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/client/app/queue/OrganizationUsers.jsx b/client/app/queue/OrganizationUsers.jsx index e24ecbddcb9..536cdd1bed0 100644 --- a/client/app/queue/OrganizationUsers.jsx +++ b/client/app/queue/OrganizationUsers.jsx @@ -253,37 +253,52 @@ export default class OrganizationUsers extends React.PureComponent { const listOfUsers = this.state.organizationUsers.map((user, i) => { const { dvc, admin } = user.attributes; const style = i === 0 ? topUserStyle : userStyle; - - return -
    -
      -
    • {this.formatName(user)} - {judgeTeam && admin && ( {COPY.USER_MANAGEMENT_JUDGE_LABEL} )} - {dvcTeam && dvc && ( {COPY.USER_MANAGEMENT_DVC_LABEL} )} - {judgeTeam && !admin && ( {COPY.USER_MANAGEMENT_ATTORNEY_LABEL} )} - {(judgeTeam || dvcTeam) && admin && ( {COPY.USER_MANAGEMENT_ADMIN_LABEL} )} -
    • - {(judgeTeam || dvcTeam) && admin ? -
      : -
      -
      - {(judgeTeam || dvcTeam) ? '' : this.adminButton(user, admin)} - {this.removeUserButton(user)} -
      - {this.state.organizationName === 'Hearings Management' && -
      - + const { conferenceSelectionVisibility } = this.props; + + return ( + +
      +
        +
      • + {this.formatName(user)} + {judgeTeam && admin && ( + ( {COPY.USER_MANAGEMENT_JUDGE_LABEL} ) + )} + {dvcTeam && dvc && ( + ( {COPY.USER_MANAGEMENT_DVC_LABEL} ) + )} + {judgeTeam && !admin && ( + ( {COPY.USER_MANAGEMENT_ATTORNEY_LABEL} ) + )} + {(judgeTeam || dvcTeam) && admin && ( + ( {COPY.USER_MANAGEMENT_ADMIN_LABEL} ) + )} +
      • + {(judgeTeam || dvcTeam) && admin ? ( +
        + ) : ( +
        +
        + {judgeTeam || dvcTeam ? '' : this.adminButton(user, admin)} + {this.removeUserButton(user)}
        - } -
        } -
      -
      -
      ; + {this.state.organizationName === 'Hearing Admin' && + !conferenceSelectionVisibility && ( +
      + +
      + )} +
      + )} +
    +
    +
    + ); }); return From 5944f05edc25b621495d0a397bb5e750a6013956 Mon Sep 17 00:00:00 2001 From: breedbah Date: Tue, 29 Aug 2023 10:16:56 -0400 Subject: [PATCH 27/28] APPEALS-28105 corrected radio button page display --- client/app/queue/OrganizationUsers.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app/queue/OrganizationUsers.jsx b/client/app/queue/OrganizationUsers.jsx index 536cdd1bed0..4ac2c1b5c0f 100644 --- a/client/app/queue/OrganizationUsers.jsx +++ b/client/app/queue/OrganizationUsers.jsx @@ -282,7 +282,7 @@ export default class OrganizationUsers extends React.PureComponent { {judgeTeam || dvcTeam ? '' : this.adminButton(user, admin)} {this.removeUserButton(user)} - {this.state.organizationName === 'Hearing Admin' && + {this.state.organizationName === 'Hearings Management' && !conferenceSelectionVisibility && (
    Date: Tue, 29 Aug 2023 10:18:33 -0400 Subject: [PATCH 28/28] APPEALS-28105 updated jest test for correct organization --- .../test/app/queue/organizationUsers/OrganizationUsers.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/test/app/queue/organizationUsers/OrganizationUsers.test.js b/client/test/app/queue/organizationUsers/OrganizationUsers.test.js index 9eee34d1726..65f8dbd38b7 100644 --- a/client/test/app/queue/organizationUsers/OrganizationUsers.test.js +++ b/client/test/app/queue/organizationUsers/OrganizationUsers.test.js @@ -12,7 +12,7 @@ describe('Conference Selection Visibility Feature Toggle', () => { }); ApiUtil.get.mockResolvedValue({ body: { - organization_name: 'Hearing Admin', + organization_name: 'Hearings Management', judge_team: false, dvc_team: false, organization_users: {