* Initial import of playwright tests * Pipeline changes for automated tests * Modified pipeline for testing * Attempt #2 * Attempt #3 * Added missing paren * Removed debug stuff from pipeline * Changes from playwright repo * Changed pipeline for debugging * Fix for ServiceLocationPage playwright locators * Change pipeline to run with TEST APIs * Moved more of Siraj's changes to this repo * Changed where updating env occurs * Changed location of env update again * Escaped double quotes * Added visible report in Azure * Moved changes into main pipeline * Made it so dotenv only runs config in local
21 lines
No EOL
1,016 B
TypeScript
21 lines
No EOL
1,016 B
TypeScript
import axios, { type AxiosInstance } from 'axios';
|
|
import { buildQueryString, httpGet } from '@utils/HttpUtils'
|
|
import { IClientAuthentication, IClientSignatureRequest, IClientSignatureResponse } from '@business-logic/types/Authentication';
|
|
|
|
|
|
const adminServiceUrl = process.env.ADMIN_SERVICE_API_URL || '';
|
|
|
|
const axiosInstance: AxiosInstance = axios.create({
|
|
baseURL: adminServiceUrl,
|
|
headers: {'Content-Type': 'application/json'}
|
|
});
|
|
|
|
const INSURANCE_SERVICE_ROUTE = 'insurance';
|
|
|
|
export const getClientAuthByClientTag = async (clientTag: string): Promise<IClientAuthentication> => {
|
|
return await httpGet<IClientAuthentication>(axiosInstance, `${INSURANCE_SERVICE_ROUTE}/client-info?clientTag=${clientTag}`);
|
|
}
|
|
export const getClientSignature = async (request: IClientSignatureRequest): Promise<IClientSignatureResponse> => {
|
|
const params = buildQueryString(request);
|
|
return await httpGet<IClientSignatureResponse>(axiosInstance, `${INSURANCE_SERVICE_ROUTE}/signature?${params.toString()}`);
|
|
} |