|
9 | 9 | LearningResourcesSearchRetrieveSortbyEnum: SortByEnum,
|
10 | 10 | LearningResourcesSearchRetrieveAggregationsEnum: AggregationsEnum,
|
11 | 11 | LearningResourcesSearchRetrieveLearningFormatEnum: LearningFormatEnum,
|
| 12 | + CertificationTypeEnum, |
12 | 13 | ContentFileSearchRetrieveSortbyEnum,
|
13 | 14 | ContentFileSearchRetrieveAggregationsEnum
|
14 | 15 | } = v1
|
@@ -39,23 +40,24 @@ type QueryParamValidators<ReqParams> = {
|
39 | 40 | }
|
40 | 41 |
|
41 | 42 | const resourceSearchValidators: QueryParamValidators<ResourceSearchRequest> = {
|
42 |
| - resource_type: withinEnum(Object.values(ResourceTypeEnum)), |
43 |
| - department: withinEnum(Object.values(DepartmentEnum)), |
44 |
| - level: withinEnum(Object.values(LevelEnum)), |
45 |
| - platform: withinEnum(Object.values(PlatformEnum)), |
46 |
| - offered_by: withinEnum(Object.values(OfferedByEnum)), |
47 |
| - sortby: values => withinEnum(Object.values(SortByEnum))(values)[0], |
48 |
| - q: first, |
49 |
| - topic: identity, |
50 |
| - certification: firstBoolean, |
51 |
| - professional: firstBoolean, |
52 |
| - aggregations: withinEnum(Object.values(AggregationsEnum)), |
53 |
| - course_feature: identity, |
54 |
| - limit: firstNumber, |
55 |
| - offset: firstNumber, |
56 |
| - id: numbers, |
57 |
| - free: firstBoolean, |
58 |
| - learning_format: withinEnum(Object.values(LearningFormatEnum)) |
| 43 | + resource_type: withinEnum(Object.values(ResourceTypeEnum)), |
| 44 | + department: withinEnum(Object.values(DepartmentEnum)), |
| 45 | + level: withinEnum(Object.values(LevelEnum)), |
| 46 | + platform: withinEnum(Object.values(PlatformEnum)), |
| 47 | + offered_by: withinEnum(Object.values(OfferedByEnum)), |
| 48 | + sortby: values => withinEnum(Object.values(SortByEnum))(values)[0], |
| 49 | + q: first, |
| 50 | + topic: identity, |
| 51 | + certification: firstBoolean, |
| 52 | + professional: firstBoolean, |
| 53 | + aggregations: withinEnum(Object.values(AggregationsEnum)), |
| 54 | + course_feature: identity, |
| 55 | + limit: firstNumber, |
| 56 | + offset: firstNumber, |
| 57 | + id: numbers, |
| 58 | + free: firstBoolean, |
| 59 | + learning_format: withinEnum(Object.values(LearningFormatEnum)), |
| 60 | + certification_type: withinEnum(Object.values(CertificationTypeEnum)) |
59 | 61 | }
|
60 | 62 |
|
61 | 63 | const contentSearchValidators: QueryParamValidators<ContentFileSearchRequest> =
|
|
0 commit comments