2021-04-12 13:32:25 +00:00
|
|
|
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`,
|
2023-02-21 15:31:19 +00:00
|
|
|
CONTROLS_CUSTOM_SETTINGS: `${URL_PREFIX}/controls/mac-settings/custom-settings`,
|
2023-03-14 20:03:02 +00:00
|
|
|
CONTROLS_DISK_ENCRYPTION: `${URL_PREFIX}/controls/mac-settings/disk-encryption`,
|
2023-04-27 15:10:41 +00:00
|
|
|
CONTROLS_MAC_SETUP: `${URL_PREFIX}/controls/mac-setup`,
|
2023-06-02 13:14:39 +00:00
|
|
|
CONTROLS_END_USER_AUTHENTICATION: `${URL_PREFIX}/controls/mac-setup/end-user-auth`,
|
2023-04-27 15:10:41 +00:00
|
|
|
CONTROLS_BOOTSTRAP_PACKAGE: `${URL_PREFIX}/controls/mac-setup/bootstrap-package`,
|
2023-03-06 15:03:48 +00:00
|
|
|
CONTROLS_MAC_SCRIPTS: `${URL_PREFIX}/controls/mac-scripts`,
|
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`,
|
2023-06-06 20:44:21 +00:00
|
|
|
DASHBOARD_CHROME: `${URL_PREFIX}/dashboard/chrome`,
|
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`,
|
2023-06-26 16:54:34 +00:00
|
|
|
ADMIN_INTEGRATIONS_MDM_WINDOWS: `${URL_PREFIX}/settings/integrations/mdm/windows`,
|
2023-05-17 10:18:31 +00:00
|
|
|
ADMIN_INTEGRATIONS_AUTOMATIC_ENROLLMENT: `${URL_PREFIX}/settings/integrations/automatic-enrollment`,
|
2021-04-14 09:20:56 +00:00
|
|
|
ADMIN_TEAMS: `${URL_PREFIX}/settings/teams`,
|
2023-04-27 15:53:30 +00:00
|
|
|
ADMIN_SETTINGS: `${URL_PREFIX}/settings`,
|
2022-04-21 18:12:42 +00:00
|
|
|
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`,
|
2023-03-30 18:22:41 +00:00
|
|
|
MANAGE_HOSTS_ADD_HOSTS: `${URL_PREFIX}/hosts/manage/?add_hosts=true`,
|
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}`;
|
|
|
|
},
|
2023-06-06 10:46:46 +00:00
|
|
|
DEVICE_USER_DETAILS_SOFTWARE: (deviceAuthToken: string): string => {
|
|
|
|
return `${URL_PREFIX}/device/${deviceAuthToken}/software`;
|
|
|
|
},
|
|
|
|
DEVICE_USER_DETAILS_POLICIES: (deviceAuthToken: string): string => {
|
|
|
|
return `${URL_PREFIX}/device/${deviceAuthToken}/policies`;
|
|
|
|
},
|
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}`;
|
|
|
|
},
|
2023-03-31 17:40:14 +00:00
|
|
|
TEAM_DETAILS_MEMBERS: (teamId?: number): string => {
|
|
|
|
if (teamId !== undefined && teamId > 0) {
|
|
|
|
return `${URL_PREFIX}/settings/teams/members?team_id=${teamId}`;
|
|
|
|
}
|
|
|
|
return `${URL_PREFIX}/settings/teams`;
|
2021-04-29 13:47:33 +00:00
|
|
|
},
|
2023-03-31 17:40:14 +00:00
|
|
|
TEAM_DETAILS_OPTIONS: (teamId?: number): string => {
|
|
|
|
if (teamId !== undefined && teamId > 0) {
|
|
|
|
return `${URL_PREFIX}/settings/teams/options?team_id=${teamId}`;
|
|
|
|
}
|
|
|
|
return `${URL_PREFIX}/settings/teams`;
|
2021-04-29 13:47:33 +00:00
|
|
|
},
|
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 => {
|
2023-03-31 17:40:14 +00:00
|
|
|
return `${URL_PREFIX}/schedule/manage?team_id=${teamId}`;
|
2021-08-05 14:48:00 +00:00
|
|
|
},
|
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`,
|
2023-07-17 21:09:59 +00:00
|
|
|
NEW_QUERY: (teamId?: number) =>
|
|
|
|
`${URL_PREFIX}/queries/new${teamId ? `?team_id=${teamId}` : ""}`,
|
2019-10-16 23:40:45 +00:00
|
|
|
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
|
|
|
};
|