Route view-service calls through /app/{appId}/view/ prefix
This commit is contained in:
parent
7ff3638afb
commit
9e8b41a202
@ -57,7 +57,7 @@ export interface NavItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getHeaderConfig(deviceType = "desktop"): Promise<HeaderConfig> {
|
export async function getHeaderConfig(deviceType = "desktop"): Promise<HeaderConfig> {
|
||||||
const raw = await request<any>("GET", `/app/${APP_ID}/header/${deviceType}`);
|
const raw = await request<any>("GET", `/app/${APP_ID}/view/header/${deviceType}`);
|
||||||
return raw.config ?? raw;
|
return raw.config ?? raw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,11 +88,11 @@ export interface LayoutElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getScreens(deviceType = "desktop"): Promise<ScreenListItem[]> {
|
export function getScreens(deviceType = "desktop"): Promise<ScreenListItem[]> {
|
||||||
return request("GET", `/app/${APP_ID}/screens?device_type=${deviceType}`);
|
return request("GET", `/app/${APP_ID}/view/screens?device_type=${deviceType}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getScreen(sourceScreenId: number): Promise<ScreenLayout> {
|
export function getScreen(sourceScreenId: number): Promise<ScreenLayout> {
|
||||||
return request("GET", `/app/${APP_ID}/screens/${sourceScreenId}`);
|
return request("GET", `/app/${APP_ID}/view/screens/${sourceScreenId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@ -110,7 +110,7 @@ export interface RVScreen {
|
|||||||
// Accepts either the numeric source_screen_id OR the source_uuid — both
|
// Accepts either the numeric source_screen_id OR the source_uuid — both
|
||||||
// are accepted by the view-service's rv-screens endpoint.
|
// are accepted by the view-service's rv-screens endpoint.
|
||||||
export function getRVScreen(idOrUuid: number | string): Promise<RVScreen> {
|
export function getRVScreen(idOrUuid: number | string): Promise<RVScreen> {
|
||||||
return request("GET", `/app/${APP_ID}/rv-screens/${idOrUuid}`);
|
return request("GET", `/app/${APP_ID}/view/rv-screens/${idOrUuid}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@ -152,7 +152,7 @@ export function getRecordView(
|
|||||||
rvScreenId: string | number,
|
rvScreenId: string | number,
|
||||||
query: SearchQuery = {},
|
query: SearchQuery = {},
|
||||||
): Promise<RecordViewResponse> {
|
): Promise<RecordViewResponse> {
|
||||||
return request("POST", `/app/${APP_ID}/recordview`, {
|
return request("POST", `/app/${APP_ID}/view/recordview`, {
|
||||||
rv_template_id: rvTemplateId,
|
rv_template_id: rvTemplateId,
|
||||||
rv_screen_id: String(rvScreenId),
|
rv_screen_id: String(rvScreenId),
|
||||||
search_query: {
|
search_query: {
|
||||||
@ -198,7 +198,7 @@ export interface DVScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getDVScreen(idOrUuid: number | string): Promise<DVScreen> {
|
export function getDVScreen(idOrUuid: number | string): Promise<DVScreen> {
|
||||||
return request("GET", `/app/${APP_ID}/dv-screens/${idOrUuid}`);
|
return request("GET", `/app/${APP_ID}/view/dv-screens/${idOrUuid}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@ -213,7 +213,7 @@ export interface DetailViewResponse {
|
|||||||
export function getDetailView(dvSourceId: number, instanceId: string): Promise<DetailViewResponse> {
|
export function getDetailView(dvSourceId: number, instanceId: string): Promise<DetailViewResponse> {
|
||||||
return request(
|
return request(
|
||||||
"GET",
|
"GET",
|
||||||
`/app/${APP_ID}/detailview/${dvSourceId}?instance_id=${encodeURIComponent(instanceId)}`,
|
`/app/${APP_ID}/view/detailview/${dvSourceId}?instance_id=${encodeURIComponent(instanceId)}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ export function getFormScreen(
|
|||||||
instanceId?: string,
|
instanceId?: string,
|
||||||
deviceType = "desktop",
|
deviceType = "desktop",
|
||||||
): Promise<FormScreenResponse> {
|
): Promise<FormScreenResponse> {
|
||||||
return request("POST", `/app/${APP_ID}/form-screens`, {
|
return request("POST", `/app/${APP_ID}/view/form-screens`, {
|
||||||
activity_id: activityId,
|
activity_id: activityId,
|
||||||
instance_id: instanceId || "",
|
instance_id: instanceId || "",
|
||||||
device_type: deviceType,
|
device_type: deviceType,
|
||||||
@ -353,5 +353,5 @@ export interface AuditEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getAuditLog(instanceId: string): Promise<AuditEntry[]> {
|
export function getAuditLog(instanceId: string): Promise<AuditEntry[]> {
|
||||||
return request("GET", `/app/${APP_ID}/audit?instance_id=${encodeURIComponent(instanceId)}`);
|
return request("GET", `/app/${APP_ID}/view/audit?instance_id=${encodeURIComponent(instanceId)}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user