2021-04-12 13:32:25 +00:00
|
|
|
import { IHost } from "../interfaces/host";
|
|
|
|
import { IQuery } from "../interfaces/query";
|
2021-11-24 17:16:42 +00:00
|
|
|
import { IPolicy } from "../interfaces/policy";
|
2021-04-12 13:32:25 +00:00
|
|
|
import URL_PREFIX from "./url_prefix";
|
2019-10-16 23:40:45 +00:00
|
|
|
|
2016-09-14 20:31:54 +00:00
|
|
|
export default {
|
2021-10-03 18:15:58 +00:00
|
|
|
ROOT: `${URL_PREFIX}/`,
|
2023-01-26 19:33:54 +00:00
|
|
|
CONTROLS: `${URL_PREFIX}/controls`,
|
2023-01-27 22:25:53 +00:00
|
|
|
CONTROLS_MAC_OS_UPDATES: `${URL_PREFIX}/controls/mac-os-updates`,
|
2023-01-26 19:33:54 +00:00
|
|
|
CONTROLS_MAC_SETTINGS: `${URL_PREFIX}/controls/mac-settings`,
|
2022-11-17 15:45:35 +00:00
|
|
|
DASHBOARD: `${URL_PREFIX}/dashboard`,
|
|
|
|
DASHBOARD_LINUX: `${URL_PREFIX}/dashboard/linux`,
|
|
|
|
DASHBOARD_MAC: `${URL_PREFIX}/dashboard/mac`,
|
|
|
|
DASHBOARD_WINDOWS: `${URL_PREFIX}/dashboard/windows`,
|
2021-03-08 16:48:29 +00:00
|
|
|
ADMIN_USERS: `${URL_PREFIX}/settings/users`,
|
2022-04-11 19:04:41 +00:00
|
|
|
ADMIN_INTEGRATIONS: `${URL_PREFIX}/settings/integrations`,
|
2023-01-04 18:39:39 +00:00
|
|
|
ADMIN_INTEGRATIONS_TICKET_DESTINATIONS: `${URL_PREFIX}/settings/integrations/ticket-destinations`,
|
|
|
|
ADMIN_INTEGRATIONS_MDM: `${URL_PREFIX}/settings/integrations/mdm`,
|
2021-04-14 09:20:56 +00:00
|
|
|
ADMIN_TEAMS: `${URL_PREFIX}/settings/teams`,
|
2022-04-21 18:12:42 +00:00
|
|
|
ADMIN_SETTINGS: `${URL_PREFIX}/settings/organization`,
|
|
|
|
ADMIN_SETTINGS_INFO: `${URL_PREFIX}/settings/organization/info`,
|
|
|
|
ADMIN_SETTINGS_WEBADDRESS: `${URL_PREFIX}/settings/organization/webaddress`,
|
|
|
|
ADMIN_SETTINGS_SSO: `${URL_PREFIX}/settings/organization/sso`,
|
|
|
|
ADMIN_SETTINGS_SMTP: `${URL_PREFIX}/settings/organization/smtp`,
|
|
|
|
ADMIN_SETTINGS_AGENTS: `${URL_PREFIX}/settings/organization/agents`,
|
|
|
|
ADMIN_SETTINGS_HOST_STATUS_WEBHOOK: `${URL_PREFIX}/settings/organization/host-status-webhook`,
|
|
|
|
ADMIN_SETTINGS_STATISTICS: `${URL_PREFIX}/settings/organization/statistics`,
|
|
|
|
ADMIN_SETTINGS_ADVANCED: `${URL_PREFIX}/settings/organization/advanced`,
|
2022-06-11 17:23:02 +00:00
|
|
|
ADMIN_SETTINGS_FLEET_DESKTOP: `${URL_PREFIX}/settings/organization/fleet-desktop`,
|
2021-10-04 20:26:10 +00:00
|
|
|
EDIT_PACK: (packId: number): string => {
|
|
|
|
return `${URL_PREFIX}/packs/${packId}/edit`;
|
2019-10-16 23:40:45 +00:00
|
|
|
},
|
2021-10-04 20:26:10 +00:00
|
|
|
PACK: (packId: number): string => {
|
|
|
|
return `${URL_PREFIX}/packs/${packId}`;
|
2019-10-16 23:40:45 +00:00
|
|
|
},
|
2022-09-01 21:42:25 +00:00
|
|
|
EDIT_LABEL: (labelId: number): string => {
|
|
|
|
return `${URL_PREFIX}/labels/${labelId}`;
|
|
|
|
},
|
2021-03-03 16:51:39 +00:00
|
|
|
EDIT_QUERY: (query: IQuery): string => {
|
2019-10-16 23:40:45 +00:00
|
|
|
return `${URL_PREFIX}/queries/${query.id}`;
|
2017-01-06 20:57:44 +00:00
|
|
|
},
|
2021-11-24 17:16:42 +00:00
|
|
|
EDIT_POLICY: (policy: IPolicy): string => {
|
2021-12-10 19:17:36 +00:00
|
|
|
return `${URL_PREFIX}/policies/${policy.id}${
|
|
|
|
policy.team_id ? `?team_id=${policy.team_id}` : ""
|
|
|
|
}`;
|
2021-11-24 17:16:42 +00:00
|
|
|
},
|
2019-10-16 23:40:45 +00:00
|
|
|
FORGOT_PASSWORD: `${URL_PREFIX}/login/forgot`,
|
2021-06-17 15:11:28 +00:00
|
|
|
API_ONLY_USER: `${URL_PREFIX}/apionlyuser`,
|
2021-06-04 16:34:27 +00:00
|
|
|
FLEET_403: `${URL_PREFIX}/403`,
|
2019-10-16 23:40:45 +00:00
|
|
|
LOGIN: `${URL_PREFIX}/login`,
|
|
|
|
LOGOUT: `${URL_PREFIX}/logout`,
|
|
|
|
MANAGE_HOSTS: `${URL_PREFIX}/hosts/manage`,
|
2022-09-01 21:42:25 +00:00
|
|
|
MANAGE_HOSTS_LABEL: (labelId: number | string): string => {
|
|
|
|
return `${URL_PREFIX}/hosts/manage/labels/${labelId}`;
|
|
|
|
},
|
2022-11-18 17:21:53 +00:00
|
|
|
HOST_DETAILS: (id: number): string => {
|
|
|
|
return `${URL_PREFIX}/hosts/${id}`;
|
|
|
|
},
|
|
|
|
HOST_SOFTWARE: (id: number): string => {
|
|
|
|
return `${URL_PREFIX}/hosts/${id}/software`;
|
|
|
|
},
|
|
|
|
HOST_SCHEDULE: (id: number): string => {
|
|
|
|
return `${URL_PREFIX}/hosts/${id}/schedule`;
|
|
|
|
},
|
|
|
|
HOST_POLICIES: (id: number): string => {
|
|
|
|
return `${URL_PREFIX}/hosts/${id}/policies`;
|
2021-01-28 20:44:48 +00:00
|
|
|
},
|
2022-03-21 13:38:59 +00:00
|
|
|
DEVICE_USER_DETAILS: (deviceAuthToken: any): string => {
|
|
|
|
return `${URL_PREFIX}/device/${deviceAuthToken}`;
|
|
|
|
},
|
2022-01-31 22:24:20 +00:00
|
|
|
MANAGE_SOFTWARE: `${URL_PREFIX}/software/manage`,
|
2022-06-08 19:01:38 +00:00
|
|
|
SOFTWARE_DETAILS: (id: string): string => {
|
|
|
|
return `${URL_PREFIX}/software/${id}`;
|
|
|
|
},
|
2021-04-29 13:47:33 +00:00
|
|
|
TEAM_DETAILS_MEMBERS: (teamId: number): string => {
|
|
|
|
return `${URL_PREFIX}/settings/teams/${teamId}/members`;
|
|
|
|
},
|
|
|
|
TEAM_DETAILS_OPTIONS: (teamId: number): string => {
|
|
|
|
return `${URL_PREFIX}/settings/teams/${teamId}/options`;
|
|
|
|
},
|
2019-10-16 23:40:45 +00:00
|
|
|
MANAGE_PACKS: `${URL_PREFIX}/packs/manage`,
|
|
|
|
NEW_PACK: `${URL_PREFIX}/packs/new`,
|
|
|
|
MANAGE_QUERIES: `${URL_PREFIX}/queries/manage`,
|
2021-07-26 18:41:36 +00:00
|
|
|
MANAGE_SCHEDULE: `${URL_PREFIX}/schedule/manage`,
|
2021-08-05 14:48:00 +00:00
|
|
|
MANAGE_TEAM_SCHEDULE: (teamId: number): string => {
|
|
|
|
return `${URL_PREFIX}/schedule/manage/teams/${teamId}`;
|
|
|
|
},
|
2021-08-30 23:02:53 +00:00
|
|
|
MANAGE_POLICIES: `${URL_PREFIX}/policies/manage`,
|
2022-09-01 21:42:25 +00:00
|
|
|
NEW_LABEL: `${URL_PREFIX}/labels/new`,
|
2021-11-24 17:16:42 +00:00
|
|
|
NEW_POLICY: `${URL_PREFIX}/policies/new`,
|
2019-10-16 23:40:45 +00:00
|
|
|
NEW_QUERY: `${URL_PREFIX}/queries/new`,
|
|
|
|
RESET_PASSWORD: `${URL_PREFIX}/login/reset`,
|
|
|
|
SETUP: `${URL_PREFIX}/setup`,
|
2021-03-08 16:48:29 +00:00
|
|
|
USER_SETTINGS: `${URL_PREFIX}/profile`,
|
2021-09-30 19:32:06 +00:00
|
|
|
URL_PREFIX,
|
2016-09-14 20:31:54 +00:00
|
|
|
};
|