Skip to content

Commit 17e06e4

Browse files
authored
resource category (#117)
1 parent e9068e1 commit 17e06e4

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"homepage": "https://github.com/mitodl/course-search-utils#readme",
3939
"dependencies": {
40-
"@mitodl/open-api-axios": "^2024.6.4",
40+
"@mitodl/open-api-axios": "^2024.7.2",
4141
"axios": "^1.6.7",
4242
"fuse.js": "^7.0.0",
4343
"query-string": "^6.13.1",

src/facet_display/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface Facets {
5555
content_feature_type?: string[]
5656
learning_format?: string[]
5757
certification_type?: string[]
58+
resource_category?: string[]
5859
}
5960

6061
export interface BooleanFacets {

src/hooks/useInfiniteSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type ResourceSearchRequest =
77
v1.LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest
88
type ContentFileSearchRequest =
99
v1.ContentFileSearchApiContentFileSearchRetrieveRequest
10-
type SearchResponse = v1.LearningResourceSearchResponse
10+
type SearchResponse = v1.LearningResourcesSearchResponse
1111

1212
type Status = "pending" | "error" | "success"
1313

src/hooks/validation.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const {
99
LearningResourcesSearchRetrieveSortbyEnum: SortByEnum,
1010
LearningResourcesSearchRetrieveAggregationsEnum: AggregationsEnum,
1111
LearningResourcesSearchRetrieveLearningFormatEnum: LearningFormatEnum,
12+
LearningResourcesSearchRetrieveResourceCategoryEnum: ResourceCategoryEnum,
1213
CertificationTypeEnum,
1314
ContentFileSearchRetrieveSortbyEnum,
1415
ContentFileSearchRetrieveAggregationsEnum
@@ -57,7 +58,8 @@ const resourceSearchValidators: QueryParamValidators<ResourceSearchRequest> = {
5758
id: numbers,
5859
free: firstBoolean,
5960
learning_format: withinEnum(Object.values(LearningFormatEnum)),
60-
certification_type: withinEnum(Object.values(CertificationTypeEnum))
61+
certification_type: withinEnum(Object.values(CertificationTypeEnum)),
62+
resource_category: withinEnum(Object.values(ResourceCategoryEnum))
6163
}
6264

6365
const contentSearchValidators: QueryParamValidators<ContentFileSearchRequest> =

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,10 @@
762762
dependencies:
763763
make-plural "^7.0.0"
764764

765-
"@mitodl/open-api-axios@^2024.6.4":
766-
version "2024.6.4"
767-
resolved "https://registry.yarnpkg.com/@mitodl/open-api-axios/-/open-api-axios-2024.6.4.tgz#e906b764b115665858570f4bbf04bc065a2eeb4f"
768-
integrity sha512-oJ3AwyDTrHOQXairhtqHyBHb9CzIf7En2gV7y6BANDKXhYGXKOVvxqWtvV+1jsCzgGWT6A2nBXYsKuVIGoAP6w==
765+
"@mitodl/open-api-axios@^2024.7.2":
766+
version "2024.7.2"
767+
resolved "https://registry.yarnpkg.com/@mitodl/open-api-axios/-/open-api-axios-2024.7.2.tgz#7d33927e55b0ac8be7971e9f96455329e2778b20"
768+
integrity sha512-x4NyMEjxjNZ3ppqq9gNO4oI83ZuoAJaCdwVQw2kBWC6RZgV7vcPdqlXIkKg1JtaY9ubqQxlQ82BtmlrFhTuIyQ==
769769
dependencies:
770770
"@types/node" "^20.11.19"
771771
axios "^1.6.5"

0 commit comments

Comments
 (0)