forked from openedx/frontend-app-authoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.ts
More file actions
47 lines (44 loc) · 1.18 KB
/
api.ts
File metadata and controls
47 lines (44 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { camelCaseObject, getConfig } from '@edx/frontend-platform';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
export const getHelpUrlsApiUrl = () => `${getConfig().STUDIO_BASE_URL}/api/contentstore/v1/help_urls`;
export interface HelpUrls {
advanced: string;
certificates: string;
checklist: string;
container: string;
contentGroups: string;
contentHighlights: string;
contentLibraries: string;
default: string;
developCourse: string;
enrollmentTracks: string;
exportCourse: string;
exportLibrary: string;
files: string;
grading: string;
groupConfigurations: string;
home: string;
imageAccessibility: string;
importCourse: string;
importLibrary: string;
login: string;
outline: string;
pages: string;
register: string;
schedule: string;
socialSharing: string;
syncLibraryUpdates: string;
teamCourse: string;
teamLibrary: string;
textbooks: string;
unit: string;
updates: string;
video: string;
visibility: string;
welcome: string;
}
export async function getHelpUrls(): Promise<HelpUrls> {
const { data } = await getAuthenticatedHttpClient()
.get(getHelpUrlsApiUrl());
return camelCaseObject(data);
}