added jsdoc definitions to apis
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/createaccount_api:
|
||||
* post:
|
||||
* tags: [Account]
|
||||
* description: Create password
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/createcase_api:
|
||||
* post:
|
||||
* tags: [Case]
|
||||
* description: Create case
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/createmywatchedcases_api:
|
||||
* post:
|
||||
* tags: [Portal,Case]
|
||||
* description: Create my watched cases
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/deleteawaitingsubmissions_api:
|
||||
* delete:
|
||||
* tags: [Case]
|
||||
* description: Delete awaiting case submission
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/deleteamyrepresentations_api:
|
||||
* delete:
|
||||
* tags: [Portal,Representations]
|
||||
* description: Delete my representations
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/deleteamywatchedcases_api:
|
||||
* delete:
|
||||
* tags: [Portal,Case]
|
||||
* description: Delete my watched cases
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getToken:
|
||||
* post:
|
||||
* tags: [Login]
|
||||
* summary: Not used
|
||||
* description: Get case
|
||||
* parameters:
|
||||
* - name: client_id
|
||||
* in: requestbody
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
import axios from "axios";
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
const accessTokenEndpoint = process.env.ACCESS_TOKEN_ENDPOINT;
|
||||
const tenantId = process.env.TENANT;
|
||||
const tokenBody =
|
||||
"grant_type=" +
|
||||
process.env.GRANT_TYPE +
|
||||
"&client_id=" +
|
||||
process.env.CLIENT_ID +
|
||||
"&client_secret=" +
|
||||
process.env.CLIENT_SECRET +
|
||||
"&scope=" +
|
||||
"https://" +
|
||||
process.env.RELAYURI +
|
||||
"/.default";
|
||||
|
||||
var config = {
|
||||
method: "post",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"Cache-Control": "no-cache",
|
||||
},
|
||||
url: `${accessTokenEndpoint}${tenantId}/oauth2/v2.0/token`,
|
||||
body: tokenBody,
|
||||
};
|
||||
|
||||
console.log("get token case:", config);
|
||||
|
||||
return axios
|
||||
.post(`${accessTokenEndpoint}${tenantId}/oauth2/v2.0/token`, tokenBody)
|
||||
.then(({ data }) => {
|
||||
console.log;
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(400);
|
||||
});
|
||||
}
|
||||
@@ -1,3 +1,26 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getadvancedsearch_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Advanced search
|
||||
* parameters:
|
||||
* - name: searchstring
|
||||
* description: search string
|
||||
* in: query
|
||||
* required: false
|
||||
* example: {
|
||||
* "q":"cas-",
|
||||
* "lpa":"744c69f4-48da-eb11-aac5-00224800be9c",
|
||||
* "apt":"846040000",
|
||||
* "statuscode":"1"}
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
@@ -55,14 +78,14 @@ export default async function ApiProxy(req, res) {
|
||||
? " statuscode eq " + searchString.statuscode + " and"
|
||||
: "";
|
||||
|
||||
console.log(queryString);
|
||||
//console.log(queryString);
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=" +
|
||||
queryString +
|
||||
" pinswg_appealcasetype ne null and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
console.log(queryUrl);
|
||||
//console.log(queryString, "\n", queryUrl);
|
||||
|
||||
var apiResponse = _.isEmpty(searchString)
|
||||
? res.status(400).json()
|
||||
|
||||
@@ -1,3 +1,52 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getadvancedsearchpaged_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Advanced search paged
|
||||
* parameters:
|
||||
* - name: searchstring
|
||||
* description: search string
|
||||
* in: query
|
||||
* required: false
|
||||
* example: {
|
||||
* "q":"cas-",
|
||||
* "lpa":"744c69f4-48da-eb11-aac5-00224800be9c",
|
||||
* "apt":"846040000",
|
||||
* "statuscode":"1"}
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: pageNumber
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 1
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: orderby
|
||||
* in: query
|
||||
* required: true
|
||||
* example: createdon
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: fieldSort
|
||||
* in: query
|
||||
* required: true
|
||||
* description: asc or desc
|
||||
* example: asc
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: showNumberOfRecords
|
||||
* in: query
|
||||
* required: true
|
||||
* description: number of records to return per page
|
||||
* example: 10
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { query } from "jsonpath";
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getappealid_api:
|
||||
* get:
|
||||
* tags: [Misc]
|
||||
* description: Get Appeal ID from
|
||||
* parameters:
|
||||
* - name: caseReference
|
||||
* in: query
|
||||
* required: true
|
||||
* example: CAS-00764-L0Q9W2
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: updateFormCollection
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78s
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: primaryAttribute
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78id
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getappealtypes_api:
|
||||
* get:
|
||||
* tags: [Misc]
|
||||
* description: Get Appeal Types
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getappealtypesfornewappeal_api:
|
||||
* get:
|
||||
* tags: [Misc]
|
||||
* description: Get Appeal Types for appeal
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
const ApiResponse = (req, res) => {
|
||||
res.statusCode = 200;
|
||||
res.json({
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getawaitingsubmission_api:
|
||||
* get:
|
||||
* tags: [Case]
|
||||
* description: get awaiting case submission
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getawaitingsubmissionproxy_api:
|
||||
* get:
|
||||
* tags: [Case]
|
||||
* description: get awaiting case submission proxy
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicdnssearch_api:
|
||||
* get:
|
||||
* tags: [Search,]
|
||||
* description: Basic DNS search
|
||||
* parameters:
|
||||
* - name: searchString
|
||||
* in: query
|
||||
* required: true
|
||||
* example: farm
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicdnssearchdetails_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* summary: Not used
|
||||
* description: Basic DNS search details
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicdnssearchdetailspaged_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic DNS search details paged
|
||||
* summary: Not used
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,47 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicdnssearchpaged_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic DNS search paged
|
||||
* parameters:
|
||||
* - name: searchString
|
||||
* in: query
|
||||
* required: true
|
||||
* example: farm
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: pageNumber
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 1
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: orderby
|
||||
* in: query
|
||||
* required: true
|
||||
* example: createdon
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: fieldSort
|
||||
* in: query
|
||||
* required: true
|
||||
* description: asc or desc
|
||||
* example: asc
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: showNumberOfRecords
|
||||
* in: query
|
||||
* required: true
|
||||
* description: number of records to return per page
|
||||
* example: 10
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicdnsurlsearch_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic DNS search URL
|
||||
* parameters:
|
||||
* - name: searchString
|
||||
* in: query
|
||||
* required: true
|
||||
* example: farm
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicsearch_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic search
|
||||
* parameters:
|
||||
* - name: searchString
|
||||
* in: query
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicsearchdetails_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic search details
|
||||
* parameters:
|
||||
* - name: appealTypeName
|
||||
* description:
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78s
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: primaryIdAttribute
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78id
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: incidentID
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 1f129091-cb0f-ec11-aac8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicsearchdetailspaged_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic search details
|
||||
* parameters:
|
||||
* - name: appealTypeName
|
||||
* description:
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78s
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: primaryIdAttribute
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78id
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: incidentID
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 1f129091-cb0f-ec11-aac8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,7 +1,55 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getbasicsearchpaged_api:
|
||||
* get:
|
||||
* tags: [Search]
|
||||
* description: Basic search paged
|
||||
* parameters:
|
||||
* - name: searchString
|
||||
* in: query
|
||||
* required: true
|
||||
* example: cas-
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: pageNumber
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 2
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: orderby
|
||||
* in: query
|
||||
* required: true
|
||||
* example: createdon
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: fieldSort
|
||||
* in: query
|
||||
* required: true
|
||||
* description: asc or desc
|
||||
* example: asc
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: showNumberOfRecords
|
||||
* in: query
|
||||
* required: true
|
||||
* description: number of records to return per page
|
||||
* example: 10
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeadersPagedCustom } from "../../../actions";
|
||||
import {
|
||||
getToken,
|
||||
azureHeadersPagedCustom,
|
||||
consoleLogger,
|
||||
} from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -42,7 +90,7 @@ export default async function ApiProxy(req, res) {
|
||||
? "&$skiptoken=" + '<cookie pagenumber="' + pageNumber + '" />'
|
||||
: "");
|
||||
|
||||
//console.log("basic search paged:", queryUrl);
|
||||
console.log("basic search paged:", queryUrl);
|
||||
|
||||
var apiResponse =
|
||||
searchString.length > 0
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getcase_api:
|
||||
* get:
|
||||
* tags: [Case]
|
||||
* summary: Not used
|
||||
* description: Get case
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getlinkedcases_api:
|
||||
* get:
|
||||
* tags: [Case]
|
||||
* description: Get linked cases
|
||||
* parameters:
|
||||
* - name: parentincidentid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 53a37b9e-1dfc-eb11-aac7-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
* get:
|
||||
* tags: [Login]
|
||||
* description: Returns the hello world
|
||||
* parameters:
|
||||
* - name: emailaddress
|
||||
* in: query
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: pwd
|
||||
* in: query
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: hello world
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
* security:
|
||||
* - relay_auth: []
|
||||
*
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getmycases_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get My Cases
|
||||
* parameters:
|
||||
* - name: loggedInUserId
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 726158c6-708d-ec11-aad8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getmyrepresentations_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get My representations
|
||||
* parameters:
|
||||
* - name: loggedInUserId
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 726158c6-708d-ec11-aad8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getmyrepresentationsproxy_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get My representations
|
||||
* parameters:
|
||||
* - name: loggedInUserId
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 726158c6-708d-ec11-aad8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getpersonalaccount_api:
|
||||
* get:
|
||||
* tags: [Account]
|
||||
* description: Get personal account
|
||||
* parameters:
|
||||
* - name: contactid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 726158c6-708d-ec11-aad8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: hello world
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getportallogin_api:
|
||||
* get:
|
||||
* tags: [Login]
|
||||
* description: Returns portal login
|
||||
* parameters:
|
||||
* - name: emailaddress
|
||||
* in: query
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: hello world
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getportalmoduledetails_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get portal module details
|
||||
* parameters:
|
||||
* - name: appealType
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78s
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: caseReference
|
||||
* in: query
|
||||
* required: true
|
||||
* example: CAS-00764-L0Q9W2
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: hello world
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
@@ -23,7 +47,7 @@ export default async function ApiProxy(req, res) {
|
||||
var caseReference = req.query.caseReference.split("'").join("''");
|
||||
var token = await getToken();
|
||||
|
||||
//console.log("the case:", req.query, caseReference);
|
||||
console.log("the case:", req.query, caseReference);
|
||||
|
||||
var queryUrl =
|
||||
appealType +
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getportalmoduledetailsproxy_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get portal module details proxy
|
||||
* parameters:
|
||||
* - name: appealType
|
||||
* in: query
|
||||
* required: true
|
||||
* example: pinswg_planningappeals78s
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: caseReference
|
||||
* in: query
|
||||
* required: true
|
||||
* example: CAS-00764-L0Q9W2
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: hello world
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getrepresentations_api:
|
||||
* get:
|
||||
* tags: [Case]
|
||||
* description: Get Representations for a Case
|
||||
* parameters:
|
||||
* - name: incidentID
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 50b533aa-43f1-ec11-aade-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
@@ -19,6 +37,7 @@ const hashAPIPath = (queryPath) => {
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var loggedInUserId = req.query.loggedInUserId;
|
||||
var incidentID = req.query.incidentID;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getrepresentationsproxy_api:
|
||||
* get:
|
||||
* tags: [Case]
|
||||
* description: Get Representations for a Case
|
||||
* parameters:
|
||||
* - name: incidentID
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 50b533aa-43f1-ec11-aade-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getsearchdocumentTypes_api:
|
||||
* get:
|
||||
* tags: [Search,]
|
||||
* description: Returns types of documents for a case
|
||||
* parameters:
|
||||
* - name: incidentid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 50b533aa-43f1-ec11-aade-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getsearchdocumentdetails_api:
|
||||
* get:
|
||||
* tags: [Search,Documents]
|
||||
* description: Basic search documents details
|
||||
* parameters:
|
||||
* - name: incidentid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 50b533aa-43f1-ec11-aade-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,47 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getsearchdocumentdetailspaged_api:
|
||||
* get:
|
||||
* tags: [Search,]
|
||||
* description: Basic search documents details paged
|
||||
* parameters:
|
||||
* - name: incidentid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 50b533aa-43f1-ec11-aade-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: pageNumber
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 1
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: orderby
|
||||
* in: query
|
||||
* required: true
|
||||
* example: createdon
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: fieldSort
|
||||
* in: query
|
||||
* required: true
|
||||
* description: asc or desc
|
||||
* example: asc
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: showNumberOfRecords
|
||||
* in: query
|
||||
* required: true
|
||||
* description: number of records to return per page
|
||||
* example: 10
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getsearchdocumenthistory_api:
|
||||
* get:
|
||||
* tags: [Search,]
|
||||
* description: Basic search documents history
|
||||
* parameters:
|
||||
* - name: documentid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: e09d7297-2a13-ed11-aadf-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,47 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getsearchdocumenthistorypaged_api:
|
||||
* get:
|
||||
* tags: [Search,]
|
||||
* description: Basic search documents history paged
|
||||
* parameters:
|
||||
* - name: documentid
|
||||
* in: query
|
||||
* required: true
|
||||
* example: e09d7297-2a13-ed11-aadf-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: pageNumber
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 1
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: orderby
|
||||
* in: query
|
||||
* required: true
|
||||
* example: createdon
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: fieldSort
|
||||
* in: query
|
||||
* required: true
|
||||
* description: asc or desc
|
||||
* example: asc
|
||||
* schema:
|
||||
* type: string
|
||||
* - name: showNumberOfRecords
|
||||
* in: query
|
||||
* required: true
|
||||
* description: number of records to return per page
|
||||
* example: 10
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersPaged, consoleLogger } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getwatchedcases_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get my watched cases s
|
||||
* parameters:
|
||||
* - name: loggedInUserId
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 726158c6-708d-ec11-aad8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import {
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getwatchedcasesproxy_api:
|
||||
* get:
|
||||
* tags: [Portal]
|
||||
* description: Get my watched cases s
|
||||
* parameters:
|
||||
* - name: loggedInUserId
|
||||
* in: query
|
||||
* required: true
|
||||
* example: 726158c6-708d-ec11-aad8-00224800be9c
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, getToken } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/patchcase_api:
|
||||
* patch:
|
||||
* tags: [Case]
|
||||
* description: Patch case
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/updateaccount_api:
|
||||
* patch:
|
||||
* tags: [Account]
|
||||
* description: Update account
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/updatecase_api:
|
||||
* patch:
|
||||
* tags: [Case]
|
||||
* description: Update case
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, patchCase } from "../../../actions";
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/updatepassword_api:
|
||||
* patch:
|
||||
* tags: [Account]
|
||||
* description: Update password
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Success
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken } from "../../../actions";
|
||||
|
||||
Reference in New Issue
Block a user