TP-83691 | Redundant files cleanup (#12894)
This commit is contained in:
6
network/BuildConfigDetails.ts
Normal file
6
network/BuildConfigDetails.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
interface BuildConfigDetails {
|
||||
baseUrl?: string;
|
||||
appVersionName?: string;
|
||||
appVersionCode?: string;
|
||||
flavor: string;
|
||||
}
|
||||
@@ -1,6 +1,3 @@
|
||||
export const BASE_URL = "https://sa.navi.com";
|
||||
export const APPLICATION_ID_PATH = "/arc-warden/api/v2/application";
|
||||
export const FILL_APPLICATION_PATH =
|
||||
"/arc-warden/api/v2/application/:applicationId/fill";
|
||||
export const BUNDLE_VERSION = "x-rn-bundle-version";
|
||||
export const GZIP = "gzip";
|
||||
export const GZIP = "gzip";
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
interface Field {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
interface ApplicationFields {
|
||||
fields: Field[];
|
||||
}
|
||||
|
||||
interface FillRequest {
|
||||
applicationFields: ApplicationFields;
|
||||
applicationType: string;
|
||||
}
|
||||
|
||||
interface ScreenRequest {
|
||||
action: string;
|
||||
isScreenDefinitionRequired: boolean;
|
||||
sourceScreen: string;
|
||||
}
|
||||
|
||||
interface AppFormData {
|
||||
fillRequest: FillRequest;
|
||||
screenRequest: ScreenRequest;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
interface FillApplicationResponse {
|
||||
currentScreenCta: CurrentScreenCta;
|
||||
}
|
||||
|
||||
interface CurrentScreenCta {
|
||||
cta: Cta;
|
||||
shouldPoll: boolean;
|
||||
shouldRender: boolean;
|
||||
screenMetaData: ScreenMetaData;
|
||||
screenPollingConfigs: ScreenPollingConfigs;
|
||||
}
|
||||
|
||||
interface ScreenPollingConfigs {
|
||||
initialDelay: number;
|
||||
interval: number;
|
||||
numOfRetries: number;
|
||||
}
|
||||
|
||||
interface ScreenMetaData {
|
||||
screenName: string;
|
||||
screenType: string;
|
||||
screenHash: string;
|
||||
}
|
||||
|
||||
interface Cta {
|
||||
url: string;
|
||||
parameters: Parameter[];
|
||||
}
|
||||
|
||||
interface Parameter {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
interface BuildConfigDetails {
|
||||
baseUrl?: string;
|
||||
appVersionName?: string;
|
||||
appVersionCode?: string;
|
||||
flavor: string
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import { patch, post } from "../NetworkService";
|
||||
import { APPLICATION_ID_PATH, FILL_APPLICATION_PATH } from "../NetworkConstant";
|
||||
import { MemberDetailsRootObject } from "../../App/common/interface/MemberDetailsResponse";
|
||||
|
||||
export const getApplicationId = (
|
||||
applicationType: string = "DEMO_11",
|
||||
applicantType: string = "CUSTOMER"
|
||||
) => {
|
||||
const path = APPLICATION_ID_PATH;
|
||||
const requestBody = JSON.stringify({
|
||||
applicantType: applicantType,
|
||||
applicationType: applicationType,
|
||||
isScreenCtaRequired: true,
|
||||
isScreenDefinitionRequired: true,
|
||||
});
|
||||
return post<ApiResponse<MemberDetailsRootObject>>(path, requestBody);
|
||||
};
|
||||
|
||||
export const fillApplication = (applicationId: string, fields: Field[]) => {
|
||||
const updatedPath = FILL_APPLICATION_PATH.replace(
|
||||
":applicationId",
|
||||
applicationId
|
||||
);
|
||||
|
||||
const requestBody: AppFormData = {
|
||||
fillRequest: {
|
||||
applicationFields: {
|
||||
fields: fields,
|
||||
},
|
||||
applicationType: "DEMO_11",
|
||||
},
|
||||
screenRequest: {
|
||||
action: "NEXT",
|
||||
isScreenDefinitionRequired: true,
|
||||
sourceScreen: "home",
|
||||
},
|
||||
};
|
||||
return patch<ApiResponse<FillApplicationResponse>>(updatedPath, requestBody);
|
||||
};
|
||||
Reference in New Issue
Block a user