From a210a80c1525367e9149c159e8e30db5c5b2b926 Mon Sep 17 00:00:00 2001 From: William-Edwards-STFC Date: Tue, 17 Dec 2024 18:55:44 +0000 Subject: [PATCH] Changes to mock data objects --- src/mockserver.js | 117 ++++++++---------- .../getBasicPeopleDetailsFromSurname.json | 18 +++ .../user/getBasicPeopleDetailsFromSurname.xml | 1 - .../user/getBasicPersonDetails/0.json | 35 +++--- .../user/getBasicPersonDetails/1.json | 34 ++--- .../user/getBasicPersonDetails/2.json | 45 +++---- .../user/getBasicPersonDetails/3.json | 34 ++--- .../user/getBasicPersonDetails/4.json | 34 ++--- .../user/getBasicPersonDetails/5.json | 40 +++--- .../user/getBasicPersonDetails/6.json | 40 +++--- .../user/getBasicPersonDetails/7.json | 34 ++--- .../user/getBasicPersonDetails/Beckley.json | 40 +++--- .../user/getBasicPersonDetails/Carlsson.json | 34 ++--- .../user/getBasicPersonDetails/Nilsson.json | 34 ++--- .../user/getPersonDetailsFromSessionId/1.json | 18 +++ .../user/getPersonDetailsFromSessionId/1.xml | 1 - .../user/getPersonDetailsFromSessionId/2.json | 18 +++ .../user/getPersonDetailsFromSessionId/2.xml | 1 - .../user/getPersonDetailsFromSessionId/3.json | 18 +++ .../user/getPersonDetailsFromSessionId/3.xml | 1 - .../user/getPersonDetailsFromSessionId/4.json | 18 +++ .../user/getPersonDetailsFromSessionId/4.xml | 1 - .../user/getPersonDetailsFromSessionId/5.json | 21 ++++ .../user/getPersonDetailsFromSessionId/5.xml | 1 - .../user/getPersonDetailsFromSessionId/6.json | 21 ++++ .../user/getPersonDetailsFromSessionId/6.xml | 1 - src/responses/user/getRolesForUser/1.json | 17 +++ src/responses/user/getRolesForUser/1.xml | 1 - src/responses/user/getRolesForUser/2.json | 5 + src/responses/user/getRolesForUser/2.xml | 1 - src/responses/user/getRolesForUser/3.json | 8 ++ src/responses/user/getRolesForUser/3.xml | 1 - src/responses/user/getRolesForUser/4.json | 20 +++ src/responses/user/getRolesForUser/4.xml | 1 - src/responses/user/getRolesForUser/5.json | 5 + src/responses/user/getRolesForUser/5.xml | 1 - src/responses/user/getRolesForUser/6.json | 8 ++ src/responses/user/getRolesForUser/6.xml | 1 - .../getSearchableBasicPersonDetails/0.json | 19 +++ .../getSearchableBasicPersonDetails/0.xml | 1 - .../getSearchableBasicPersonDetails/1.json | 18 +++ .../getSearchableBasicPersonDetails/1.xml | 1 - .../getSearchableBasicPersonDetails/2.json | 18 +++ .../getSearchableBasicPersonDetails/2.xml | 1 - .../getSearchableBasicPersonDetails/3.json | 18 +++ .../getSearchableBasicPersonDetails/3.xml | 1 - .../getSearchableBasicPersonDetails/4.json | 18 +++ .../getSearchableBasicPersonDetails/4.xml | 1 - .../getSearchableBasicPersonDetails/5.json | 21 ++++ .../getSearchableBasicPersonDetails/5.xml | 1 - .../getSearchableBasicPersonDetails/6.json | 21 ++++ .../getSearchableBasicPersonDetails/6.xml | 1 - .../getSearchableBasicPersonDetails/7.json | 18 +++ .../getSearchableBasicPersonDetails/7.xml | 1 - .../Aaron_Harris49@gmail.com.json | 5 + .../Aaron_Harris49@gmail.com.xml | 1 - .../ben@inbox.com.json | 17 +++ .../ben@inbox.com.xml | 1 - .../unverified-user@example.com.json | 17 +++ .../unverified-user@example.com.xml | 1 - src/responses/user/isTokenValid.json | 3 + src/responses/user/isTokenValid.xml | 7 -- src/responses/user/logout.json | 3 + src/responses/user/logout.xml | 1 - src/responses/user/notEmptyResponse.json | 53 ++++++++ src/responses/user/notEmptyResponse.xml | 1 - 66 files changed, 702 insertions(+), 296 deletions(-) create mode 100644 src/responses/user/getBasicPeopleDetailsFromSurname.json delete mode 100644 src/responses/user/getBasicPeopleDetailsFromSurname.xml create mode 100644 src/responses/user/getPersonDetailsFromSessionId/1.json delete mode 100644 src/responses/user/getPersonDetailsFromSessionId/1.xml create mode 100644 src/responses/user/getPersonDetailsFromSessionId/2.json delete mode 100644 src/responses/user/getPersonDetailsFromSessionId/2.xml create mode 100644 src/responses/user/getPersonDetailsFromSessionId/3.json delete mode 100644 src/responses/user/getPersonDetailsFromSessionId/3.xml create mode 100644 src/responses/user/getPersonDetailsFromSessionId/4.json delete mode 100644 src/responses/user/getPersonDetailsFromSessionId/4.xml create mode 100644 src/responses/user/getPersonDetailsFromSessionId/5.json delete mode 100644 src/responses/user/getPersonDetailsFromSessionId/5.xml create mode 100644 src/responses/user/getPersonDetailsFromSessionId/6.json delete mode 100644 src/responses/user/getPersonDetailsFromSessionId/6.xml create mode 100644 src/responses/user/getRolesForUser/1.json delete mode 100644 src/responses/user/getRolesForUser/1.xml create mode 100644 src/responses/user/getRolesForUser/2.json delete mode 100644 src/responses/user/getRolesForUser/2.xml create mode 100644 src/responses/user/getRolesForUser/3.json delete mode 100644 src/responses/user/getRolesForUser/3.xml create mode 100644 src/responses/user/getRolesForUser/4.json delete mode 100644 src/responses/user/getRolesForUser/4.xml create mode 100644 src/responses/user/getRolesForUser/5.json delete mode 100644 src/responses/user/getRolesForUser/5.xml create mode 100644 src/responses/user/getRolesForUser/6.json delete mode 100644 src/responses/user/getRolesForUser/6.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/0.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/0.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/1.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/1.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/2.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/2.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/3.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/3.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/4.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/4.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/5.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/5.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/6.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/6.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/7.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/7.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.xml create mode 100644 src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.json delete mode 100644 src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.xml create mode 100644 src/responses/user/isTokenValid.json delete mode 100644 src/responses/user/isTokenValid.xml create mode 100644 src/responses/user/logout.json delete mode 100644 src/responses/user/logout.xml create mode 100644 src/responses/user/notEmptyResponse.json delete mode 100644 src/responses/user/notEmptyResponse.xml diff --git a/src/mockserver.js b/src/mockserver.js index 4ba96e8..b1472b4 100644 --- a/src/mockserver.js +++ b/src/mockserver.js @@ -35,80 +35,68 @@ async function mockserver() { } const respondToPostRequest = function (request) { - const { method, path, body } = request; + if (request.method !== 'POST') { + return; + } + + let responsePath; + let requestBody; - if (method !== 'POST') { + try { + // Parse JSON body + console.log("request body before parse = ", request.body); + requestBody = JSON.parse(request.body); + console.log("Request body after parse = ", requestBody) + } catch (error) { + logger.logError('Invalid JSON in request body', { error }); return { - statusCode: 405, - body: JSON.stringify({ error: 'Method not allowed' }), + statusCode: 400, + body: JSON.stringify({ error: 'Invalid JSON in request body' }), }; } - try { - const requestBody = JSON.parse(body); - let responsePath; - - switch (path) { - case '/users-service/getbasicpersondetails': - if (requestBody.userNumber) { - responsePath = `src/responses/user/getbasicpersondetails/${requestBody.userNumber}.json`; - } - break; - - case '/users-service/getsearchablebasicpersondetails': - if (requestBody.userNumbers) { - responsePath = `src/responses/user/getsearchablebasicpersondetails/${requestBody.userNumbers}.json`; - } - break; - - case '/users-service/getrolesforuser': - if (requestBody.userNumber) { - responsePath = `src/responses/user/getrolesforuser/${requestBody.userNumber}.json`; - } - break; - - case '/users-service/getpersondetailsfromsessionid': - if (requestBody.sessionId) { - responsePath = `src/responses/user/getpersondetailsfromsessionid/${requestBody.sessionId}.json`; - } - break; - - default: - return { - statusCode: 404, - body: JSON.stringify({ error: 'Endpoint not found' }), - }; + // Handle different REST API methods + if (requestBody.method === 'getBasicPersonDetails') { + const { userNumber } = requestBody; + if (userNumber) { + responsePath = `src/responses/user/getbasicpersondetails/${userNumber}.json`; } - - if (!responsePath || !fs.existsSync(responsePath)) { - logger.logError('Response file does not exist', { responsePath }); - return { - statusCode: 404, - body: JSON.stringify({ error: 'Resource not found' }), - }; + } else if (requestBody.method === 'getSearchableBasicPeopleDetails') { + const { userNumbers } = requestBody; + if (userNumbers && Array.isArray(userNumbers)) { + responsePath = `src/responses/user/getsearchablebasicpersondetails/${userNumbers.join('-')}.json`; + } + } else if (requestBody.method === 'getPersonDetailsFromSessionId') { + const { sessionId } = requestBody; + if (sessionId) { + responsePath = `src/responses/user/getpersondetailsfromsessionid/${sessionId}.json`; } + } else if (requestBody.method === 'getRolesForUser') { + const { userNumber } = requestBody; + if (userNumber) { + responsePath = `src/responses/user/getrolesforuser/${userNumber}.json`; + } + } - const file = fs.readFileSync(responsePath, 'utf8'); - logger.logInfo('Returning response file', { responsePath }); + if (!responsePath || !fs.existsSync(responsePath)) { + logger.logError('Response file does not exist', { responsePath }); return { - statusCode: 200, - body: file, - }; - } catch (error) { - logger.logError('Error handling request', { error }); - return { - statusCode: 400, - body: JSON.stringify({ error: 'Invalid request body' }), + statusCode: 404, + body: JSON.stringify({ error: 'Resource not found' }), }; } + + const file = fs.readFileSync(responsePath, 'utf8'); + logger.logInfo('Returning response file', { responsePath }); + + return { + statusCode: 200, + body: file, + }; }; - const endpoints = [ - '/users-service/getbasicpersondetails', - '/users-service/getsearchablebasicpersondetails', - '/users-service/getrolesforuser', - '/users-service/getpersondetailsfromsessionid', - ]; + // Define the REST endpoints + const endpoints = ['/ws/UserOfficeWebService']; endpoints.forEach((endpoint) => { mockServerClient('mockServer', 1080) @@ -121,11 +109,8 @@ async function mockserver() { { unlimited: true } ) .then( - () => logger.logInfo(`Created callback for POST ${endpoint}`, {}), - (error) => - logger.logError(`Error while creating callback for ${endpoint}`, { - error, - }) + () => logger.logInfo('Created callback for POST requests', {}), + (error) => logger.logError('Error while creating callback for POST requests', { error }) ); }); } diff --git a/src/responses/user/getBasicPeopleDetailsFromSurname.json b/src/responses/user/getBasicPeopleDetailsFromSurname.json new file mode 100644 index 0000000..4560fbc --- /dev/null +++ b/src/responses/user/getBasicPeopleDetailsFromSurname.json @@ -0,0 +1,18 @@ +{ + "personDetails": { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Carl Carlsson", + "email": "Javon4@hotmail.com", + "establishmentId": 5, + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": 1 + } +} \ No newline at end of file diff --git a/src/responses/user/getBasicPeopleDetailsFromSurname.xml b/src/responses/user/getBasicPeopleDetailsFromSurname.xml deleted file mode 100644 index 0db3fac..0000000 --- a/src/responses/user/getBasicPeopleDetailsFromSurname.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingCarl CarlssonJavon4@hotmail.com5CarlssonCarlMr Carl CarlssonCarlCSTFCMr1 \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/0.json b/src/responses/user/getBasicPersonDetails/0.json index 19951c6..3e2c58e 100644 --- a/src/responses/user/getBasicPersonDetails/0.json +++ b/src/responses/user/getBasicPersonDetails/0.json @@ -1,16 +1,19 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Carl Carlsson", - "email": "Javon4@hotmail.com", - "establishmentId": "5", - "familyName": "Carlsson", - "firstNameKnownAs": "Carl", - "fullName": "Mr Carl Carlsson", - "givenName": "Carl", - "initials": "C", - "orgName": "STFC", - "title": "Miss", - "userNumber": "0" -} \ No newline at end of file +[ + { + "userNumber": "12345", + "country": "fake", + "deptName": "fake", + "displayName": "fake", + "email": "valid", + "establishmentId": "fake", + "familyName": "fake", + "firstNameKnownAs": "fake", + "fullName": "fake", + "givenName": "fake", + "initials": "fake", + "orgName": "fake", + "orgId": "fake", + "title": "fake", + "workPhone": "fake" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/1.json b/src/responses/user/getBasicPersonDetails/1.json index 58b7ee8..6a618d6 100644 --- a/src/responses/user/getBasicPersonDetails/1.json +++ b/src/responses/user/getBasicPersonDetails/1.json @@ -1,16 +1,18 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Carl Carlsson", - "email": "Javon4@hotmail.com", - "establishmentId": "5", - "familyName": "Carlsson", - "firstNameKnownAs": "Carl", - "fullName": "Mr Carl Carlsson", - "givenName": "Carl", - "initials": "C", - "orgName": "STFC", - "title": "Mr", - "userNumber": "1" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Carl Carlsson", + "email": "Javon4@hotmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "1" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/2.json b/src/responses/user/getBasicPersonDetails/2.json index 21d3537..9b3c7be 100644 --- a/src/responses/user/getBasicPersonDetails/2.json +++ b/src/responses/user/getBasicPersonDetails/2.json @@ -1,29 +1,18 @@ -{ - "Envelope": { - "Body": { - "getBasicPeopleDetailsFromUserNumbersResponse": { - "return": { - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Anders Andersson", - "email": "Aaron_Harris49@gmail.com", - "establishmentId": "5", - "familyName": "Carlsson", - "firstNameKnownAs": "Carl", - "fullName": "Mr Carl Carlsson", - "givenName": "Carl", - "initials": "C", - "orgName": "STFC", - "title": "Mr", - "userNumber": "2" - }, - "_xmlns:ns2": "http://webservice.UserOffice.stfc.com/", - "__prefix": "ns2" - }, - "__prefix": "soap" - }, - "_xmlns:soap": "http://schemas.xmlsoap.org/soap/envelope/", - "__prefix": "soap" +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Anders Andersson", + "email": "Aaron_Harris49@gmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "2" } -} \ No newline at end of file +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/3.json b/src/responses/user/getBasicPersonDetails/3.json index 3faa6d0..4805470 100644 --- a/src/responses/user/getBasicPersonDetails/3.json +++ b/src/responses/user/getBasicPersonDetails/3.json @@ -1,16 +1,18 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Nils", - "email": "nils@ess.se", - "establishmentId": "5", - "familyName": "Nilsson", - "firstNameKnownAs": "Nils", - "fullName": "Mr Nils Nilsson", - "givenName": "Nils", - "initials": "N", - "orgName": "STFC", - "title": "Mr", - "userNumber": "3" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Nils", + "email": "nils@ess.se", + "establishmentId": "5", + "familyName": "Nilsson", + "firstNameKnownAs": "Nils", + "fullName": "Mr Nils Nilsson", + "givenName": "Nils", + "initials": "N", + "orgName": "STFC", + "title": "Mr", + "userNumber": "3" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/4.json b/src/responses/user/getBasicPersonDetails/4.json index 31f0bec..a239866 100644 --- a/src/responses/user/getBasicPersonDetails/4.json +++ b/src/responses/user/getBasicPersonDetails/4.json @@ -1,16 +1,18 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Benjamin Beckley", - "email": "ben@inbox.com", - "establishmentId": "7", - "familyName": "Beckley", - "firstNameKnownAs": "Ben", - "fullName": "Mr Benjamin Beckley", - "givenName": "Benjamin", - "initials": "B", - "orgName": "STFC", - "title": "Mr", - "userNumber": "4" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "7", + "familyName": "Beckley", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr", + "userNumber": "4" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/5.json b/src/responses/user/getBasicPersonDetails/5.json index 7392274..80b6968 100644 --- a/src/responses/user/getBasicPersonDetails/5.json +++ b/src/responses/user/getBasicPersonDetails/5.json @@ -1,19 +1,21 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Benjamin Beckley", - "email": "ben@inbox.com", - "establishmentId": "5", - "familyName": "Benjamin", - "fedId": "puf57046", - "firstNameKnownAs": "Ben", - "fullName": "Mr Benjamin Bryson Beckley", - "givenName": "Benjamin", - "initials": "B", - "mobilePhone": "085793668438", - "orgName": "None STFC", - "status": "Undergraduate Student", - "title": "Mr", - "userNumber": "5" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "5", + "familyName": "Benjamin", + "fedId": "puf57046", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Bryson Beckley", + "givenName": "Benjamin", + "initials": "B", + "mobilePhone": "085793668438", + "orgName": "None STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "5" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/6.json b/src/responses/user/getBasicPersonDetails/6.json index 99b18df..24da78c 100644 --- a/src/responses/user/getBasicPersonDetails/6.json +++ b/src/responses/user/getBasicPersonDetails/6.json @@ -1,19 +1,21 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "David Dawson", - "email": "david@teleworm.us", - "establishmentId": "5", - "familyName": "Dawson", - "fedId": "abc12345", - "firstNameKnownAs": "", - "fullName": "Mr David Dawson", - "givenName": "David", - "initials": "DD", - "mobilePhone": "08579366828", - "orgName": "STFC", - "status": "Undergraduate Student", - "title": "Mr", - "userNumber": "6" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "David Dawson", + "email": "david@teleworm.us", + "establishmentId": "5", + "familyName": "Dawson", + "fedId": "abc12345", + "firstNameKnownAs": "", + "fullName": "Mr David Dawson", + "givenName": "David", + "initials": "DD", + "mobilePhone": "08579366828", + "orgName": "STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "6" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/7.json b/src/responses/user/getBasicPersonDetails/7.json index 2b2fb8c..425307e 100644 --- a/src/responses/user/getBasicPersonDetails/7.json +++ b/src/responses/user/getBasicPersonDetails/7.json @@ -1,16 +1,18 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Benjamin Beckley", - "email": "ben@inbox.com", - "establishmentId": "7", - "familyName": "Beckley", - "firstNameKnownAs": "Benjamin", - "fullName": "Mr Benjamin Beckley", - "givenName": "Benjamin", - "initials": "B", - "orgName": "STFC", - "title": "Mr", - "userNumber": "7" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "7", + "familyName": "Beckley", + "firstNameKnownAs": "Benjamin", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr", + "userNumber": "7" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/Beckley.json b/src/responses/user/getBasicPersonDetails/Beckley.json index 66a0a30..e274b17 100644 --- a/src/responses/user/getBasicPersonDetails/Beckley.json +++ b/src/responses/user/getBasicPersonDetails/Beckley.json @@ -1,19 +1,21 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Benjamin Beckley", - "email": "ben@inbox.com", - "establishmentId": "5", - "familyName": "Beckley", - "fedId": "puf57046", - "firstNameKnownAs": "Ben", - "fullName": "Mr Benjamin Bryson Beckley", - "givenName": "Benjamin", - "initials": "B", - "mobilePhone": "085793668438", - "orgName": "None STFC", - "status": "Undergraduate Student", - "title": "Mr", - "userNumber": "4" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "5", + "familyName": "Beckley", + "fedId": "puf57046", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Bryson Beckley", + "givenName": "Benjamin", + "initials": "B", + "mobilePhone": "085793668438", + "orgName": "None STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "4" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/Carlsson.json b/src/responses/user/getBasicPersonDetails/Carlsson.json index 58b7ee8..6a618d6 100644 --- a/src/responses/user/getBasicPersonDetails/Carlsson.json +++ b/src/responses/user/getBasicPersonDetails/Carlsson.json @@ -1,16 +1,18 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Carl Carlsson", - "email": "Javon4@hotmail.com", - "establishmentId": "5", - "familyName": "Carlsson", - "firstNameKnownAs": "Carl", - "fullName": "Mr Carl Carlsson", - "givenName": "Carl", - "initials": "C", - "orgName": "STFC", - "title": "Mr", - "userNumber": "1" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Carl Carlsson", + "email": "Javon4@hotmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "1" + } +] \ No newline at end of file diff --git a/src/responses/user/getBasicPersonDetails/Nilsson.json b/src/responses/user/getBasicPersonDetails/Nilsson.json index 3faa6d0..4805470 100644 --- a/src/responses/user/getBasicPersonDetails/Nilsson.json +++ b/src/responses/user/getBasicPersonDetails/Nilsson.json @@ -1,16 +1,18 @@ -{ - "country": "UNITED KINGDOM", - "deptAcronym": "SCD", - "deptName": "Scientific Computing", - "displayName": "Nils", - "email": "nils@ess.se", - "establishmentId": "5", - "familyName": "Nilsson", - "firstNameKnownAs": "Nils", - "fullName": "Mr Nils Nilsson", - "givenName": "Nils", - "initials": "N", - "orgName": "STFC", - "title": "Mr", - "userNumber": "3" -} \ No newline at end of file +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Nils", + "email": "nils@ess.se", + "establishmentId": "5", + "familyName": "Nilsson", + "firstNameKnownAs": "Nils", + "fullName": "Mr Nils Nilsson", + "givenName": "Nils", + "initials": "N", + "orgName": "STFC", + "title": "Mr", + "userNumber": "3" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/1.json b/src/responses/user/getPersonDetailsFromSessionId/1.json new file mode 100644 index 0000000..6a618d6 --- /dev/null +++ b/src/responses/user/getPersonDetailsFromSessionId/1.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Carl Carlsson", + "email": "Javon4@hotmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "1" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/1.xml b/src/responses/user/getPersonDetailsFromSessionId/1.xml deleted file mode 100644 index 703fbfc..0000000 --- a/src/responses/user/getPersonDetailsFromSessionId/1.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingCarl CarlssonJavon4@hotmail.com5Carlssonpuf57045CarlMr Carl CarlssonCarlC08579366828STFCUndergraduate StudentMr1 \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/2.json b/src/responses/user/getPersonDetailsFromSessionId/2.json new file mode 100644 index 0000000..9b3c7be --- /dev/null +++ b/src/responses/user/getPersonDetailsFromSessionId/2.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Anders Andersson", + "email": "Aaron_Harris49@gmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "2" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/2.xml b/src/responses/user/getPersonDetailsFromSessionId/2.xml deleted file mode 100644 index 22e8521..0000000 --- a/src/responses/user/getPersonDetailsFromSessionId/2.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingAnders AnderssonJavon4@hotmail.com5Carlssonpuf57045CarlMr Carl CarlssonCarlC08579366828STFCUndergraduate StudentMr2 \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/3.json b/src/responses/user/getPersonDetailsFromSessionId/3.json new file mode 100644 index 0000000..4805470 --- /dev/null +++ b/src/responses/user/getPersonDetailsFromSessionId/3.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Nils", + "email": "nils@ess.se", + "establishmentId": "5", + "familyName": "Nilsson", + "firstNameKnownAs": "Nils", + "fullName": "Mr Nils Nilsson", + "givenName": "Nils", + "initials": "N", + "orgName": "STFC", + "title": "Mr", + "userNumber": "3" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/3.xml b/src/responses/user/getPersonDetailsFromSessionId/3.xml deleted file mode 100644 index e81f6bd..0000000 --- a/src/responses/user/getPersonDetailsFromSessionId/3.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingNilsnils@ess.se5NilssonNilsMr Nils NilssonNilsNSTFCMr3 \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/4.json b/src/responses/user/getPersonDetailsFromSessionId/4.json new file mode 100644 index 0000000..a239866 --- /dev/null +++ b/src/responses/user/getPersonDetailsFromSessionId/4.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "7", + "familyName": "Beckley", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr", + "userNumber": "4" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/4.xml b/src/responses/user/getPersonDetailsFromSessionId/4.xml deleted file mode 100644 index eedbde8..0000000 --- a/src/responses/user/getPersonDetailsFromSessionId/4.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingBenjamin Beckleyben@inbox.com5Benjaminpuf57046BenMr Benjamin Bryson BeckleyBenjaminB085793668438None STFCUndergraduate StudentMr4 \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/5.json b/src/responses/user/getPersonDetailsFromSessionId/5.json new file mode 100644 index 0000000..80b6968 --- /dev/null +++ b/src/responses/user/getPersonDetailsFromSessionId/5.json @@ -0,0 +1,21 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "5", + "familyName": "Benjamin", + "fedId": "puf57046", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Bryson Beckley", + "givenName": "Benjamin", + "initials": "B", + "mobilePhone": "085793668438", + "orgName": "None STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "5" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/5.xml b/src/responses/user/getPersonDetailsFromSessionId/5.xml deleted file mode 100644 index 9245c23..0000000 --- a/src/responses/user/getPersonDetailsFromSessionId/5.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingBenjamin Beckleyben@inbox.com5Benjaminpuf57046BenMr Benjamin Bryson BeckleyBenjaminB085793668438None STFCUndergraduate StudentMr5 \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/6.json b/src/responses/user/getPersonDetailsFromSessionId/6.json new file mode 100644 index 0000000..24da78c --- /dev/null +++ b/src/responses/user/getPersonDetailsFromSessionId/6.json @@ -0,0 +1,21 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "David Dawson", + "email": "david@teleworm.us", + "establishmentId": "5", + "familyName": "Dawson", + "fedId": "abc12345", + "firstNameKnownAs": "", + "fullName": "Mr David Dawson", + "givenName": "David", + "initials": "DD", + "mobilePhone": "08579366828", + "orgName": "STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "6" + } +] \ No newline at end of file diff --git a/src/responses/user/getPersonDetailsFromSessionId/6.xml b/src/responses/user/getPersonDetailsFromSessionId/6.xml deleted file mode 100644 index c020883..0000000 --- a/src/responses/user/getPersonDetailsFromSessionId/6.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingDavid Dawsondavid@teleworm.us5Dawsonabc12345Mr David DawsonDavidDD08579366828STFCUndergraduate StudentMr6 \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/1.json b/src/responses/user/getRolesForUser/1.json new file mode 100644 index 0000000..a9a8e2b --- /dev/null +++ b/src/responses/user/getRolesForUser/1.json @@ -0,0 +1,17 @@ +[ + { + "name": "Internal proposal submitter" + }, + { + "name": "FAP Member" + }, + { + "name": "FAP Secretary" + }, + { + "name": "ISIS Instrument Scientist" + }, + { + "name": "Internal Reviewer" + } +] \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/1.xml b/src/responses/user/getRolesForUser/1.xml deleted file mode 100644 index f5c1dc3..0000000 --- a/src/responses/user/getRolesForUser/1.xml +++ /dev/null @@ -1 +0,0 @@ -Internal proposal submitterFAP MemberFAP SecretaryISIS Instrument ScientistInternal Reviewer \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/2.json b/src/responses/user/getRolesForUser/2.json new file mode 100644 index 0000000..7d1448e --- /dev/null +++ b/src/responses/user/getRolesForUser/2.json @@ -0,0 +1,5 @@ +[ + { + "name": "User Officer" + } +] \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/2.xml b/src/responses/user/getRolesForUser/2.xml deleted file mode 100644 index fafb0af..0000000 --- a/src/responses/user/getRolesForUser/2.xml +++ /dev/null @@ -1 +0,0 @@ -User Officer \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/3.json b/src/responses/user/getRolesForUser/3.json new file mode 100644 index 0000000..1876096 --- /dev/null +++ b/src/responses/user/getRolesForUser/3.json @@ -0,0 +1,8 @@ +[ + { + "name": "FAP Secretary" + }, + { + "name": "FAP Member" + } +] \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/3.xml b/src/responses/user/getRolesForUser/3.xml deleted file mode 100644 index 64e40e0..0000000 --- a/src/responses/user/getRolesForUser/3.xml +++ /dev/null @@ -1 +0,0 @@ -FAP SecretaryFAP Member \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/4.json b/src/responses/user/getRolesForUser/4.json new file mode 100644 index 0000000..e189469 --- /dev/null +++ b/src/responses/user/getRolesForUser/4.json @@ -0,0 +1,20 @@ +[ + { + "name": "User" + }, + { + "name": "FAP Secretary" + }, + { + "name": "FAP Member" + }, + { + "name": "FAP Chair" + }, + { + "name": "ISIS Instrument Scientist" + }, + { + "name": "Internal Reviewer" + } +] \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/4.xml b/src/responses/user/getRolesForUser/4.xml deleted file mode 100644 index b57e51e..0000000 --- a/src/responses/user/getRolesForUser/4.xml +++ /dev/null @@ -1 +0,0 @@ -UserFAP SecretaryFAP MemberFAP ChairISIS Instrument ScientistInternal Reviewer \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/5.json b/src/responses/user/getRolesForUser/5.json new file mode 100644 index 0000000..cc47a2a --- /dev/null +++ b/src/responses/user/getRolesForUser/5.json @@ -0,0 +1,5 @@ +[ + { + "name": "User" + } +] \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/5.xml b/src/responses/user/getRolesForUser/5.xml deleted file mode 100644 index 693ee88..0000000 --- a/src/responses/user/getRolesForUser/5.xml +++ /dev/null @@ -1 +0,0 @@ -User \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/6.json b/src/responses/user/getRolesForUser/6.json new file mode 100644 index 0000000..a0d3516 --- /dev/null +++ b/src/responses/user/getRolesForUser/6.json @@ -0,0 +1,8 @@ +[ + { + "name": "FAP Member" + }, + { + "name": "FAP Secretary" + } +] \ No newline at end of file diff --git a/src/responses/user/getRolesForUser/6.xml b/src/responses/user/getRolesForUser/6.xml deleted file mode 100644 index d2485b4..0000000 --- a/src/responses/user/getRolesForUser/6.xml +++ /dev/null @@ -1 +0,0 @@ -FAP MemberFAP Secretary \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/0.json b/src/responses/user/getSearchableBasicPersonDetails/0.json new file mode 100644 index 0000000..3e2c58e --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/0.json @@ -0,0 +1,19 @@ +[ + { + "userNumber": "12345", + "country": "fake", + "deptName": "fake", + "displayName": "fake", + "email": "valid", + "establishmentId": "fake", + "familyName": "fake", + "firstNameKnownAs": "fake", + "fullName": "fake", + "givenName": "fake", + "initials": "fake", + "orgName": "fake", + "orgId": "fake", + "title": "fake", + "workPhone": "fake" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/0.xml b/src/responses/user/getSearchableBasicPersonDetails/0.xml deleted file mode 100644 index 345f4c0..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/0.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingCarl CarlssonJavon4@hotmail.com5CarlssonCarlMr Carl CarlssonCarlCSTFCMr0 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/1.json b/src/responses/user/getSearchableBasicPersonDetails/1.json new file mode 100644 index 0000000..6a618d6 --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/1.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Carl Carlsson", + "email": "Javon4@hotmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "1" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/1.xml b/src/responses/user/getSearchableBasicPersonDetails/1.xml deleted file mode 100644 index f64a552..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/1.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingCarl CarlssonJavon4@hotmail.com5CarlssonCarlMr Carl CarlssonCarlCSTFCMr1 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/2.json b/src/responses/user/getSearchableBasicPersonDetails/2.json new file mode 100644 index 0000000..9b3c7be --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/2.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Anders Andersson", + "email": "Aaron_Harris49@gmail.com", + "establishmentId": "5", + "familyName": "Carlsson", + "firstNameKnownAs": "Carl", + "fullName": "Mr Carl Carlsson", + "givenName": "Carl", + "initials": "C", + "orgName": "STFC", + "title": "Mr", + "userNumber": "2" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/2.xml b/src/responses/user/getSearchableBasicPersonDetails/2.xml deleted file mode 100644 index 3297f5d..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/2.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingAnders AnderssonAaron_Harris49@gmail.com7AnderssonAndersMr Anders AnderssonAndersASTFCMr2 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/3.json b/src/responses/user/getSearchableBasicPersonDetails/3.json new file mode 100644 index 0000000..4805470 --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/3.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Nils", + "email": "nils@ess.se", + "establishmentId": "5", + "familyName": "Nilsson", + "firstNameKnownAs": "Nils", + "fullName": "Mr Nils Nilsson", + "givenName": "Nils", + "initials": "N", + "orgName": "STFC", + "title": "Mr", + "userNumber": "3" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/3.xml b/src/responses/user/getSearchableBasicPersonDetails/3.xml deleted file mode 100644 index 58dd652..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/3.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingNilsnils@ess.se5NilssonNilsMr Nils NilssonNilsNSTFCMr3 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/4.json b/src/responses/user/getSearchableBasicPersonDetails/4.json new file mode 100644 index 0000000..a239866 --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/4.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "7", + "familyName": "Beckley", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr", + "userNumber": "4" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/4.xml b/src/responses/user/getSearchableBasicPersonDetails/4.xml deleted file mode 100644 index 6c30c28..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/4.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingBenjamin Beckleyben@inbox.com7BeckleyBenMr Benjamin BeckleyBenjaminBSTFCMr4 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/5.json b/src/responses/user/getSearchableBasicPersonDetails/5.json new file mode 100644 index 0000000..80b6968 --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/5.json @@ -0,0 +1,21 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "5", + "familyName": "Benjamin", + "fedId": "puf57046", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Bryson Beckley", + "givenName": "Benjamin", + "initials": "B", + "mobilePhone": "085793668438", + "orgName": "None STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "5" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/5.xml b/src/responses/user/getSearchableBasicPersonDetails/5.xml deleted file mode 100644 index 9245c23..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/5.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingBenjamin Beckleyben@inbox.com5Benjaminpuf57046BenMr Benjamin Bryson BeckleyBenjaminB085793668438None STFCUndergraduate StudentMr5 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/6.json b/src/responses/user/getSearchableBasicPersonDetails/6.json new file mode 100644 index 0000000..24da78c --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/6.json @@ -0,0 +1,21 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "David Dawson", + "email": "david@teleworm.us", + "establishmentId": "5", + "familyName": "Dawson", + "fedId": "abc12345", + "firstNameKnownAs": "", + "fullName": "Mr David Dawson", + "givenName": "David", + "initials": "DD", + "mobilePhone": "08579366828", + "orgName": "STFC", + "status": "Undergraduate Student", + "title": "Mr", + "userNumber": "6" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/6.xml b/src/responses/user/getSearchableBasicPersonDetails/6.xml deleted file mode 100644 index 0d07557..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/6.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingDavid Dawsondavid@teleworm.us5Davidpuf57046DaveyyyyMr David DawsonDavidD085793668438STFCUndergraduate StudentMr6 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/7.json b/src/responses/user/getSearchableBasicPersonDetails/7.json new file mode 100644 index 0000000..425307e --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/7.json @@ -0,0 +1,18 @@ +[ + { + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": "7", + "familyName": "Beckley", + "firstNameKnownAs": "Benjamin", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr", + "userNumber": "7" + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/7.xml b/src/responses/user/getSearchableBasicPersonDetails/7.xml deleted file mode 100644 index b0fe1f2..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/7.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMSCDScientific ComputingBenjamin Beckleyben@inbox.com7BeckleyBenjaminMr Benjamin BeckleyBenjaminBSTFCMr7 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.json b/src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.json new file mode 100644 index 0000000..171d15b --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.json @@ -0,0 +1,5 @@ +[ + { + "personDetails": null + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.xml b/src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.xml deleted file mode 100644 index 452f938..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/Aaron_Harris49@gmail.com.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.json b/src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.json new file mode 100644 index 0000000..05533d7 --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.json @@ -0,0 +1,17 @@ +[ + { + "country": "UNITED KINGDOM", + "deptName": "ISIS", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": 7, + "familyName": "Beckley", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr", + "userNumber": 7 + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.xml b/src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.xml deleted file mode 100644 index 2f82f46..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/ben@inbox.com.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMISISBenjamin Beckleyben@inbox.com7BeckleyBenMr Benjamin BeckleyBenjaminBSTFCMr7 \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.json b/src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.json new file mode 100644 index 0000000..ca21b5b --- /dev/null +++ b/src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.json @@ -0,0 +1,17 @@ +[ + { + "country": "UNITED KINGDOM", + "deptName": "ISIS", + "displayName": "Unverified email Placeholder", + "email": "unverified-user@example.com", + "establishmentId": 7, + "familyName": "Placeholder", + "firstNameKnownAs": "Unverified email", + "fullName": "Mr Unverified email Placeholder", + "givenName": "Unverified email", + "initials": "U", + "orgName": "STFC", + "title": "Mr", + "userNumber": 5 + } +] \ No newline at end of file diff --git a/src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.xml b/src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.xml deleted file mode 100644 index 3e6ce77..0000000 --- a/src/responses/user/getSearchableBasicPersonDetails/unverified-user@example.com.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMISISUnverified email Placeholderunverified-user@example.com7PlaceholderUnverified emailMr Unverified email PlaceholderUnverified emailUSTFCMr5 \ No newline at end of file diff --git a/src/responses/user/isTokenValid.json b/src/responses/user/isTokenValid.json new file mode 100644 index 0000000..9d299b5 --- /dev/null +++ b/src/responses/user/isTokenValid.json @@ -0,0 +1,3 @@ +{ + "isTokenValid": true +} \ No newline at end of file diff --git a/src/responses/user/isTokenValid.xml b/src/responses/user/isTokenValid.xml deleted file mode 100644 index 0c0da45..0000000 --- a/src/responses/user/isTokenValid.xml +++ /dev/null @@ -1,7 +0,0 @@ -{ - "isTokenValidResponse": { - "return": "true", - "_xmlns:ns2": "http://webservice.UserOffice.stfc.com/", - "__prefix": "ns2" - }, -} \ No newline at end of file diff --git a/src/responses/user/logout.json b/src/responses/user/logout.json new file mode 100644 index 0000000..ce38988 --- /dev/null +++ b/src/responses/user/logout.json @@ -0,0 +1,3 @@ +{ + "logout": true + } \ No newline at end of file diff --git a/src/responses/user/logout.xml b/src/responses/user/logout.xml deleted file mode 100644 index bf5d569..0000000 --- a/src/responses/user/logout.xml +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/responses/user/notEmptyResponse.json b/src/responses/user/notEmptyResponse.json new file mode 100644 index 0000000..767cb53 --- /dev/null +++ b/src/responses/user/notEmptyResponse.json @@ -0,0 +1,53 @@ +{ + "users": [ + { + "userNumber": 4, + "country": "UNITED KINGDOM", + "deptName": "ISIS", + "displayName": "Benjamin Beckley", + "email": "ben@inbox.com", + "establishmentId": 7, + "familyName": "Beckley", + "firstNameKnownAs": "Ben", + "fullName": "Mr Benjamin Beckley", + "givenName": "Benjamin", + "initials": "B", + "orgName": "STFC", + "title": "Mr" + }, + { + "userNumber": 5, + "country": "UNITED KINGDOM", + "deptName": "ISIS", + "displayName": "Unverified email Placeholder", + "email": "unverified-user@example.com", + "establishmentId": 7, + "familyName": "Placeholder", + "firstNameKnownAs": "Unverified email", + "fullName": "Mr Unverified email Placeholder", + "givenName": "Unverified email", + "initials": "U", + "orgName": "STFC", + "title": "Mr" + }, + { + "userNumber": 6, + "country": "UNITED KINGDOM", + "deptAcronym": "SCD", + "deptName": "Scientific Computing", + "displayName": "David Dawson", + "email": "david@teleworm.us", + "establishmentId": 5, + "familyName": "Dawson", + "fedId": "abc12345", + "firstNameKnownAs": "", + "fullName": "Mr David Dawson", + "givenName": "David", + "initials": "DD", + "mobilePhone": "08579366828", + "orgName": "STFC", + "status": "Undergraduate Student", + "title": "Mr" + } + ] +} \ No newline at end of file diff --git a/src/responses/user/notEmptyResponse.xml b/src/responses/user/notEmptyResponse.xml deleted file mode 100644 index ee404eb..0000000 --- a/src/responses/user/notEmptyResponse.xml +++ /dev/null @@ -1 +0,0 @@ -UNITED KINGDOMISISBenjamin Beckleyben@inbox.com7BeckleyBenMr Benjamin BeckleyBenjaminBSTFCMr4UNITED KINGDOMISISUnverified email Placeholderunverified-user@example.com7PlaceholderUnverified emailMr Unverified email PlaceholderUnverified emailUSTFCMr5UNITED KINGDOMSCDScientific ComputingCarl CarlssonJavon4@hotmail.com5CarlssonCarlMr Carl CarlssonCarlCSTFCMiss0UNITED KINGDOMSCDScientific ComputingCarl CarlssonJavon4@hotmail.com5CarlssonCarlMr Carl CarlssonCarlCSTFCMiss1UNITED KINGDOMISIStest 3unverified-user@example.com7PlaceholderUnverified emailMr Unverified email PlaceholderUnverified emailUSTFCMr2UNITED KINGDOMSCDScientific ComputingNilsnils@ess.se5NilssonNilsMr Nils NilssonNilsNSTFCMr3UNITED KINGDOMSCDScientific ComputingDavid Dawsondavid@teleworm.us5Dawsonabc12345Mr David DawsonDavidDD08579366828STFCUndergraduate StudentMr6