Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new api changes #64

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"homepage": "https://github.com/mitodl/course-search-utils#readme",
"dependencies": {
"bodybuilder": "^2.5.0",
"axios": "^1.6.7",
"query-string": "^6.13.1",
"ramda": "^0.27.1"
},
Expand Down
82 changes: 61 additions & 21 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Facets } from "./url_utils"
import type { Facets } from "./url_utils"

export enum LearningResourceType {
Course = "course",
Expand All @@ -15,28 +15,68 @@ export enum LearningResourceType {
Profile = "profile"
}

export const LR_TYPE_ALL = [
LearningResourceType.Course,
LearningResourceType.Program,
LearningResourceType.Userlist,
LearningResourceType.LearningPath,
LearningResourceType.Video,
LearningResourceType.Podcast,
LearningResourceType.PodcastEpisode
]

export const INITIAL_FACET_STATE: Facets = {
audience: [],
certification: [],
offered_by: [],
topics: [],
type: [],
department_name: [],
level: [],
course_feature_tags: [],
resource_type: []
platform: [],
offered_by: [],
topic: [],
department: [],
level: [],
course_feature: [],
resource_type: [],
content_feature_type: []
}

export const LEARNING_RESOURCE_ENDPOINT = "resource"
export const CONTENT_FILE_ENDPOINT = "content_file"

export const COURSENUM_SORT_FIELD = "department_course_numbers.sort_coursenum"

export type Level = "Graduate" | "Undergraduate" | null
export const DEPARTMENTS = {
1: "Civil and Environmental Engineering",
2: "Mechanical Engineering",
3: "Materials Science and Engineering",
4: "Architecture",
5: "Chemistry",
6: "Electrical Engineering and Computer Science",
7: "Biology",
8: "Physics",
9: "Brain and Cognitive Sciences",
10: "Chemical Engineering",
11: "Urban Studies and Planning",
12: "Earth, Atmospheric, and Planetary Sciences",
14: "Economics",
15: "Sloan School of Management",
16: "Aeronautics and Astronautics",
17: "Political Science",
18: "Mathematics",
20: "Biological Engineering",
"21A": "Anthropology",
"21G": "Global Studies and Languages",
"21H": "History",
"21L": "Literature",
"21M": "Music and Theater Arts",
22: "Nuclear Science and Engineering",
24: "Linguistics and Philosophy",
CC: "Concourse",
"CMS-W": "Comparative Media Studies/Writing",
EC: "Edgerton Center",
ES: "Experimental Study Group",
ESD: "Engineering Systems Division",
HST: "Health Sciences and Technology",
IDS: "Institute for Data, Systems, and Society",
MAS: "Media Arts and Sciences",
PE: "Athletics, Physical Education and Recreation",
RES: "Supplemental Resources",
STS: "Science, Technology, and Society",
WGS: "Women's and Gender Studies"
}

export const LEVELS = {
undergraduate: "Undergraduate",
graduate: "Graduate",
high_school: "High School",
noncredit: "Non-Credit",
advanced: "Advanced",
intermediate: "Intermediate",
introductory: "Introductory"
}
Loading
Loading