diff --git a/RELEASE.rst b/RELEASE.rst index 2f15cf4f9a..113bae2c83 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -1,6 +1,11 @@ Release Notes ============= +Version 0.56.2 +-------------- + +- backend for standardizing learning material resources - articles, videos, documents (#2965) + Version 0.56.1 (Released March 02, 2026) -------------- diff --git a/frontends/api/src/generated/v0/api.ts b/frontends/api/src/generated/v0/api.ts index e2a909ec3e..8c40eb5a45 100644 --- a/frontends/api/src/generated/v0/api.ts +++ b/frontends/api/src/generated/v0/api.ts @@ -146,7 +146,7 @@ export interface ArticleResource { * @type {string} * @memberof ArticleResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -225,6 +225,12 @@ export interface ArticleResource { * @memberof ArticleResource */ url?: string | null + /** + * + * @type {string} + * @memberof ArticleResource + */ + resource_category: string /** * * @type {Array} @@ -817,51 +823,6 @@ export interface ChannelUnitDetail { */ unit: LearningResourceOfferorDetail } -/** - * * `Lecture Notes` - Lecture Notes * `Readings` - Readings * `Practice` - Practice * `Open Textbooks` - Open Textbooks * `Lecture Audio` - Lecture Audio * `Video` - Video - * @export - * @enum {string} - */ - -export const ContentCategoryEnumDescriptions = { - "Lecture Notes": "Lecture Notes", - Readings: "Readings", - Practice: "Practice", - "Open Textbooks": "Open Textbooks", - "Lecture Audio": "Lecture Audio", - Video: "Video", -} as const - -export const ContentCategoryEnum = { - /** - * Lecture Notes - */ - LectureNotes: "Lecture Notes", - /** - * Readings - */ - Readings: "Readings", - /** - * Practice - */ - Practice: "Practice", - /** - * Open Textbooks - */ - OpenTextbooks: "Open Textbooks", - /** - * Lecture Audio - */ - LectureAudio: "Lecture Audio", - /** - * Video - */ - Video: "Video", -} as const - -export type ContentCategoryEnum = - (typeof ContentCategoryEnum)[keyof typeof ContentCategoryEnum] - /** * Serializer class for course run ContentFiles * @export @@ -1352,7 +1313,7 @@ export interface CourseResource { * @type {string} * @memberof CourseResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -1437,6 +1398,12 @@ export interface CourseResource { * @memberof CourseResource */ url?: string | null + /** + * + * @type {string} + * @memberof CourseResource + */ + resource_category: string /** * * @type {Array} @@ -1945,644 +1912,613 @@ export type DepartmentChannelTypeEnum = (typeof DepartmentChannelTypeEnum)[keyof typeof DepartmentChannelTypeEnum] /** - * Serializer for News FeedItem + * Serializer for document resources * @export - * @interface EventFeedItem + * @interface DocumentResource */ -export interface EventFeedItem { +export interface DocumentResource { /** * * @type {number} - * @memberof EventFeedItem + * @memberof DocumentResource */ id: number /** * - * @type {EventFeedItemFeedTypeEnum} - * @memberof EventFeedItem + * @type {Array} + * @memberof DocumentResource */ - feed_type: EventFeedItemFeedTypeEnum + topics?: Array /** * - * @type {FeedImage} - * @memberof EventFeedItem + * @type {number} + * @memberof DocumentResource */ - image: FeedImage + position: number | null /** * - * @type {FeedEventDetail} - * @memberof EventFeedItem + * @type {LearningResourceOfferor} + * @memberof DocumentResource */ - event_details: FeedEventDetail + offered_by: LearningResourceOfferor | null /** * - * @type {string} - * @memberof EventFeedItem + * @type {LearningResourcePlatform} + * @memberof DocumentResource */ - guid: string + platform: LearningResourcePlatform | null /** * - * @type {string} - * @memberof EventFeedItem + * @type {Array} + * @memberof DocumentResource */ - title: string + course_feature: Array | null /** * - * @type {string} - * @memberof EventFeedItem + * @type {Array} + * @memberof DocumentResource */ - url: string + departments: Array | null /** * - * @type {string} - * @memberof EventFeedItem + * @type {boolean} + * @memberof DocumentResource */ - summary?: string + certification: boolean /** * - * @type {string} - * @memberof EventFeedItem + * @type {CourseResourceCertificationType} + * @memberof DocumentResource */ - content?: string + certification_type: CourseResourceCertificationType /** * - * @type {number} - * @memberof EventFeedItem + * @type {Array} + * @memberof DocumentResource */ - source: number -} - -/** - * - * @export - * @enum {string} - */ - -export const EventFeedItemFeedTypeEnumDescriptions = { - events: "", -} as const - -export const EventFeedItemFeedTypeEnum = { - Events: "events", -} as const - -export type EventFeedItemFeedTypeEnum = - (typeof EventFeedItemFeedTypeEnum)[keyof typeof EventFeedItemFeedTypeEnum] - -/** - * FeedEventDetail serializer - * @export - * @interface FeedEventDetail - */ -export interface FeedEventDetail { + prices: Array /** * - * @type {number} - * @memberof FeedEventDetail + * @type {Array} + * @memberof DocumentResource */ - id: number + resource_prices: Array /** * - * @type {Array} - * @memberof FeedEventDetail + * @type {Array} + * @memberof DocumentResource */ - audience: Array + runs: Array | null /** * - * @type {Array} - * @memberof FeedEventDetail + * @type {LearningResourceImage} + * @memberof DocumentResource */ - location: Array + image: LearningResourceImage | null /** * - * @type {Array} - * @memberof FeedEventDetail + * @type {number} + * @memberof DocumentResource */ - event_type: Array + views: number /** * - * @type {string} - * @memberof FeedEventDetail + * @type {Array} + * @memberof DocumentResource */ - event_datetime: string + delivery: Array /** - * - * @type {string} - * @memberof FeedEventDetail + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof DocumentResource */ - event_end_datetime?: string | null -} -/** - * Serializer for FeedImage - * @export - * @interface FeedImage - */ -export interface FeedImage { + free: boolean /** - * - * @type {number} - * @memberof FeedImage + * Return the resource category of the resource + * @type {string} + * @memberof DocumentResource */ - id: number + resource_type_group: string /** * - * @type {string} - * @memberof FeedImage + * @type {Array} + * @memberof DocumentResource */ - url?: string + format: Array /** * - * @type {string} - * @memberof FeedImage + * @type {Array} + * @memberof DocumentResource */ - description?: string + pace: Array /** * - * @type {string} - * @memberof FeedImage + * @type {LearningResourceRelationshipChildField} + * @memberof DocumentResource */ - alt?: string -} -/** - * @type FeedItem - * @export - */ -export type FeedItem = - | ({ resource_type: "events" } & EventFeedItem) - | ({ resource_type: "news" } & NewsFeedItem) - -/** - * FeedNewsDetail serializer - * @export - * @interface FeedNewsDetail - */ -export interface FeedNewsDetail { + children: LearningResourceRelationshipChildField | null /** - * + * Return the best run id for the resource, if it has runs * @type {number} - * @memberof FeedNewsDetail + * @memberof DocumentResource */ - id: number + best_run_id: number | null /** * - * @type {Array} - * @memberof FeedNewsDetail + * @type {DocumentResourceResourceTypeEnum} + * @memberof DocumentResource */ - authors?: Array + resource_type: DocumentResourceResourceTypeEnum /** * - * @type {Array} - * @memberof FeedNewsDetail + * @type {Array} + * @memberof DocumentResource */ - topics?: Array + content_files: Array | null /** * * @type {string} - * @memberof FeedNewsDetail + * @memberof DocumentResource */ - publish_date: string -} -/** - * FeedSource serializer - * @export - * @interface FeedSource - */ -export interface FeedSource { + readable_id: string /** * - * @type {number} - * @memberof FeedSource + * @type {string} + * @memberof DocumentResource */ - id: number + title: string /** * - * @type {FeedImage} - * @memberof FeedSource + * @type {string} + * @memberof DocumentResource */ - image: FeedImage + description?: string | null /** * * @type {string} - * @memberof FeedSource + * @memberof DocumentResource */ - title: string + full_description?: string | null /** * * @type {string} - * @memberof FeedSource + * @memberof DocumentResource */ - url: string + last_modified?: string | null /** * - * @type {string} - * @memberof FeedSource + * @type {boolean} + * @memberof DocumentResource */ - description?: string + published?: boolean /** * - * @type {FeedSourceFeedTypeEnum} - * @memberof FeedSource + * @type {Array} + * @memberof DocumentResource */ - feed_type: FeedSourceFeedTypeEnum -} - -/** - * * `news` - News * `events` - Events - * @export - * @enum {string} - */ - -export const FeedSourceFeedTypeEnumDescriptions = { - news: "News", - events: "Events", -} as const - -export const FeedSourceFeedTypeEnum = { + languages?: Array | null /** - * News + * + * @type {string} + * @memberof DocumentResource */ - News: "news", + url?: string | null /** - * Events + * + * @type {string} + * @memberof DocumentResource */ - Events: "events", -} as const - -export type FeedSourceFeedTypeEnum = - (typeof FeedSourceFeedTypeEnum)[keyof typeof FeedSourceFeedTypeEnum] - -/** - * * `academic-excellence` - Academic Boost * `career-growth` - Career Growth * `lifelong-learning` - Lifelong Learning - * @export - * @enum {string} - */ - -export const GoalsEnumDescriptions = { - "academic-excellence": "Academic Boost", - "career-growth": "Career Growth", - "lifelong-learning": "Lifelong Learning", -} as const - -export const GoalsEnum = { + resource_category: string /** - * Academic Boost + * + * @type {Array} + * @memberof DocumentResource */ - AcademicExcellence: "academic-excellence", + ocw_topics?: Array /** - * Career Growth + * + * @type {boolean} + * @memberof DocumentResource */ - CareerGrowth: "career-growth", + professional: boolean /** - * Lifelong Learning + * + * @type {string} + * @memberof DocumentResource */ - LifelongLearning: "lifelong-learning", -} as const - -export type GoalsEnum = (typeof GoalsEnum)[keyof typeof GoalsEnum] - -/** - * Serializer for the LearningMaterial model - * @export - * @interface LearningMaterial - */ -export interface LearningMaterial { + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof DocumentResource + */ + availability?: AvailabilityEnum | null /** * * @type {number} - * @memberof LearningMaterial + * @memberof DocumentResource */ - id: number + completeness?: number /** * - * @type {ContentFile} - * @memberof LearningMaterial + * @type {boolean} + * @memberof DocumentResource */ - content_file: ContentFile | null + license_cc?: boolean /** * - * @type {Array} - * @memberof LearningMaterial + * @type {boolean} + * @memberof DocumentResource */ - content_tags?: Array | null + test_mode?: boolean /** * - * @type {LearningMaterialContentCategory} - * @memberof LearningMaterial + * @type {string} + * @memberof DocumentResource */ - content_category?: LearningMaterialContentCategory | null -} -/** - * @type LearningMaterialContentCategory - * @export - */ -export type LearningMaterialContentCategory = BlankEnum | ContentCategoryEnum - -/** - * Serializer for LearningMaterial resources with resource_type=Lecture Notes - * @export - * @interface LearningMaterialResource - */ -export interface LearningMaterialResource { + continuing_ed_credits?: string | null /** * - * @type {number} - * @memberof LearningMaterialResource + * @type {string} + * @memberof DocumentResource */ - id: number + location?: string /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {string} + * @memberof DocumentResource */ - topics?: Array + duration?: string /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ - position: number | null + min_weeks?: number | null /** * - * @type {LearningResourceOfferor} - * @memberof LearningMaterialResource + * @type {number} + * @memberof DocumentResource */ - offered_by: LearningResourceOfferor | null + max_weeks?: number | null /** * - * @type {LearningResourcePlatform} - * @memberof LearningMaterialResource + * @type {string} + * @memberof DocumentResource */ - platform: LearningResourcePlatform | null + time_commitment?: string /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {number} + * @memberof DocumentResource */ - course_feature: Array | null + min_weekly_hours?: number | null /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {number} + * @memberof DocumentResource */ - departments: Array | null + max_weekly_hours?: number | null /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ - certification: boolean + require_summaries: boolean +} + +/** + * + * @export + * @enum {string} + */ + +export const DocumentResourceResourceTypeEnumDescriptions = { + document: "", +} as const + +export const DocumentResourceResourceTypeEnum = { + Document: "document", +} as const + +export type DocumentResourceResourceTypeEnum = + (typeof DocumentResourceResourceTypeEnum)[keyof typeof DocumentResourceResourceTypeEnum] + +/** + * Serializer for News FeedItem + * @export + * @interface EventFeedItem + */ +export interface EventFeedItem { /** * - * @type {CourseResourceCertificationType} - * @memberof LearningMaterialResource + * @type {number} + * @memberof EventFeedItem */ - certification_type: CourseResourceCertificationType + id: number /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {EventFeedItemFeedTypeEnum} + * @memberof EventFeedItem */ - prices: Array + feed_type: EventFeedItemFeedTypeEnum /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {FeedImage} + * @memberof EventFeedItem */ - resource_prices: Array + image: FeedImage /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {FeedEventDetail} + * @memberof EventFeedItem */ - runs: Array | null + event_details: FeedEventDetail /** * - * @type {LearningResourceImage} - * @memberof LearningMaterialResource + * @type {string} + * @memberof EventFeedItem */ - image: LearningResourceImage | null + guid: string /** * - * @type {number} - * @memberof LearningMaterialResource + * @type {string} + * @memberof EventFeedItem */ - views: number + title: string /** * - * @type {Array} - * @memberof LearningMaterialResource - */ - delivery: Array - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof LearningMaterialResource - */ - free: boolean - /** - * Return the resource category of the resource * @type {string} - * @memberof LearningMaterialResource + * @memberof EventFeedItem */ - resource_category: string + url: string /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {string} + * @memberof EventFeedItem */ - format: Array + summary?: string /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {string} + * @memberof EventFeedItem */ - pace: Array + content?: string /** * - * @type {LearningResourceRelationshipChildField} - * @memberof LearningMaterialResource + * @type {number} + * @memberof EventFeedItem */ - children: LearningResourceRelationshipChildField | null + source: number +} + +/** + * + * @export + * @enum {string} + */ + +export const EventFeedItemFeedTypeEnumDescriptions = { + events: "", +} as const + +export const EventFeedItemFeedTypeEnum = { + Events: "events", +} as const + +export type EventFeedItemFeedTypeEnum = + (typeof EventFeedItemFeedTypeEnum)[keyof typeof EventFeedItemFeedTypeEnum] + +/** + * FeedEventDetail serializer + * @export + * @interface FeedEventDetail + */ +export interface FeedEventDetail { /** - * Return the best run id for the resource, if it has runs + * * @type {number} - * @memberof LearningMaterialResource + * @memberof FeedEventDetail */ - best_run_id: number | null + id: number /** * - * @type {LearningMaterialResourceResourceTypeEnum} - * @memberof LearningMaterialResource + * @type {Array} + * @memberof FeedEventDetail */ - resource_type: LearningMaterialResourceResourceTypeEnum + audience: Array /** * - * @type {LearningMaterial} - * @memberof LearningMaterialResource + * @type {Array} + * @memberof FeedEventDetail */ - learning_material: LearningMaterial + location: Array /** * - * @type {string} - * @memberof LearningMaterialResource + * @type {Array} + * @memberof FeedEventDetail */ - readable_id: string + event_type: Array /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof FeedEventDetail */ - title: string + event_datetime: string /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof FeedEventDetail */ - description?: string | null + event_end_datetime?: string | null +} +/** + * Serializer for FeedImage + * @export + * @interface FeedImage + */ +export interface FeedImage { /** * - * @type {string} - * @memberof LearningMaterialResource + * @type {number} + * @memberof FeedImage */ - full_description?: string | null + id: number /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof FeedImage */ - last_modified?: string | null + url?: string /** * - * @type {boolean} - * @memberof LearningMaterialResource + * @type {string} + * @memberof FeedImage */ - published?: boolean + description?: string /** * - * @type {Array} - * @memberof LearningMaterialResource + * @type {string} + * @memberof FeedImage */ - languages?: Array | null + alt?: string +} +/** + * @type FeedItem + * @export + */ +export type FeedItem = + | ({ resource_type: "events" } & EventFeedItem) + | ({ resource_type: "news" } & NewsFeedItem) + +/** + * FeedNewsDetail serializer + * @export + * @interface FeedNewsDetail + */ +export interface FeedNewsDetail { /** * - * @type {string} - * @memberof LearningMaterialResource + * @type {number} + * @memberof FeedNewsDetail */ - url?: string | null + id: number /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof FeedNewsDetail */ - ocw_topics?: Array + authors?: Array /** * - * @type {boolean} - * @memberof LearningMaterialResource + * @type {Array} + * @memberof FeedNewsDetail */ - professional: boolean + topics?: Array /** * * @type {string} - * @memberof LearningMaterialResource - */ - next_start_date?: string | null - /** - * - * @type {AvailabilityEnum} - * @memberof LearningMaterialResource + * @memberof FeedNewsDetail */ - availability?: AvailabilityEnum | null + publish_date: string +} +/** + * FeedSource serializer + * @export + * @interface FeedSource + */ +export interface FeedSource { /** * * @type {number} - * @memberof LearningMaterialResource - */ - completeness?: number - /** - * - * @type {boolean} - * @memberof LearningMaterialResource - */ - license_cc?: boolean - /** - * - * @type {boolean} - * @memberof LearningMaterialResource + * @memberof FeedSource */ - test_mode?: boolean + id: number /** * - * @type {string} - * @memberof LearningMaterialResource + * @type {FeedImage} + * @memberof FeedSource */ - continuing_ed_credits?: string | null + image: FeedImage /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof FeedSource */ - location?: string + title: string /** * * @type {string} - * @memberof LearningMaterialResource - */ - duration?: string - /** - * - * @type {number} - * @memberof LearningMaterialResource - */ - min_weeks?: number | null - /** - * - * @type {number} - * @memberof LearningMaterialResource + * @memberof FeedSource */ - max_weeks?: number | null + url: string /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof FeedSource */ - time_commitment?: string + description?: string /** * - * @type {number} - * @memberof LearningMaterialResource + * @type {FeedSourceFeedTypeEnum} + * @memberof FeedSource */ - min_weekly_hours?: number | null + feed_type: FeedSourceFeedTypeEnum +} + +/** + * * `news` - News * `events` - Events + * @export + * @enum {string} + */ + +export const FeedSourceFeedTypeEnumDescriptions = { + news: "News", + events: "Events", +} as const + +export const FeedSourceFeedTypeEnum = { /** - * - * @type {number} - * @memberof LearningMaterialResource + * News */ - max_weekly_hours?: number | null + News: "news", /** - * - * @type {boolean} - * @memberof LearningMaterialResource + * Events */ - require_summaries: boolean -} + Events: "events", +} as const + +export type FeedSourceFeedTypeEnum = + (typeof FeedSourceFeedTypeEnum)[keyof typeof FeedSourceFeedTypeEnum] /** - * + * * `academic-excellence` - Academic Boost * `career-growth` - Career Growth * `lifelong-learning` - Lifelong Learning * @export * @enum {string} */ -export const LearningMaterialResourceResourceTypeEnumDescriptions = { - learning_material: "", +export const GoalsEnumDescriptions = { + "academic-excellence": "Academic Boost", + "career-growth": "Career Growth", + "lifelong-learning": "Lifelong Learning", } as const -export const LearningMaterialResourceResourceTypeEnum = { - LearningMaterial: "learning_material", +export const GoalsEnum = { + /** + * Academic Boost + */ + AcademicExcellence: "academic-excellence", + /** + * Career Growth + */ + CareerGrowth: "career-growth", + /** + * Lifelong Learning + */ + LifelongLearning: "lifelong-learning", } as const -export type LearningMaterialResourceResourceTypeEnum = - (typeof LearningMaterialResourceResourceTypeEnum)[keyof typeof LearningMaterialResourceResourceTypeEnum] +export type GoalsEnum = (typeof GoalsEnum)[keyof typeof GoalsEnum] /** * Serializer for the LearningPath model @@ -2735,7 +2671,7 @@ export interface LearningPathResource { * @type {string} * @memberof LearningPathResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -2766,6 +2702,12 @@ export interface LearningPathResource { * @memberof LearningPathResource */ resource_type: LearningPathResourceResourceTypeEnum + /** + * + * @type {string} + * @memberof LearningPathResource + */ + resource_category: string /** * * @type {LearningPath} @@ -2942,7 +2884,7 @@ export type LearningPathResourceResourceTypeEnum = export type LearningResource = | ({ resource_type: "article" } & ArticleResource) | ({ resource_type: "course" } & CourseResource) - | ({ resource_type: "learning_material" } & LearningMaterialResource) + | ({ resource_type: "document" } & DocumentResource) | ({ resource_type: "learning_path" } & LearningPathResource) | ({ resource_type: "podcast" } & PodcastResource) | ({ resource_type: "podcast_episode" } & PodcastEpisodeResource) @@ -4486,7 +4428,7 @@ export interface PodcastEpisodeResource { * @type {string} * @memberof PodcastEpisodeResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -4571,6 +4513,12 @@ export interface PodcastEpisodeResource { * @memberof PodcastEpisodeResource */ url?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + resource_category: string /** * * @type {Array} @@ -4793,7 +4741,7 @@ export interface PodcastResource { * @type {string} * @memberof PodcastResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -4878,6 +4826,12 @@ export interface PodcastResource { * @memberof PodcastResource */ url?: string | null + /** + * + * @type {string} + * @memberof PodcastResource + */ + resource_category: string /** * * @type {Array} @@ -5502,7 +5456,7 @@ export interface ProgramResource { * @type {string} * @memberof ProgramResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -5587,6 +5541,12 @@ export interface ProgramResource { * @memberof ProgramResource */ url?: string | null + /** + * + * @type {string} + * @memberof ProgramResource + */ + resource_category: string /** * * @type {Array} @@ -6506,7 +6466,7 @@ export interface VideoPlaylistResource { * @type {string} * @memberof VideoPlaylistResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -6591,6 +6551,12 @@ export interface VideoPlaylistResource { * @memberof VideoPlaylistResource */ url?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + resource_category: string /** * * @type {Array} @@ -6813,7 +6779,7 @@ export interface VideoResource { * @type {string} * @memberof VideoResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -6856,6 +6822,12 @@ export interface VideoResource { * @memberof VideoResource */ playlists: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + content_files: Array | null /** * * @type {string} @@ -6904,6 +6876,12 @@ export interface VideoResource { * @memberof VideoResource */ url?: string | null + /** + * + * @type {string} + * @memberof VideoResource + */ + resource_category: string /** * * @type {Array} @@ -12252,8 +12230,8 @@ export const VectorLearningResourcesSearchApiAxiosParamCreator = function ( * @param {boolean | null} [professional] * @param {string} [q] The search text * @param {string} [readable_id] The readable id of the resource - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -12274,8 +12252,8 @@ export const VectorLearningResourcesSearchApiAxiosParamCreator = function ( professional?: boolean | null, q?: string, readable_id?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, topic?: Array, options: RawAxiosRequestConfig = {}, ): Promise => { @@ -12355,14 +12333,14 @@ export const VectorLearningResourcesSearchApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_type) { localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (topic) { localVarQueryParameter["topic"] = topic } @@ -12412,8 +12390,8 @@ export const VectorLearningResourcesSearchApiFp = function ( * @param {boolean | null} [professional] * @param {string} [q] The search text * @param {string} [readable_id] The readable id of the resource - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -12434,8 +12412,8 @@ export const VectorLearningResourcesSearchApiFp = function ( professional?: boolean | null, q?: string, readable_id?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, topic?: Array, options?: RawAxiosRequestConfig, ): Promise< @@ -12461,8 +12439,8 @@ export const VectorLearningResourcesSearchApiFp = function ( professional, q, readable_id, - resource_category, resource_type, + resource_type_group, topic, options, ) @@ -12521,8 +12499,8 @@ export const VectorLearningResourcesSearchApiFactory = function ( requestParameters.professional, requestParameters.q, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.topic, options, ) @@ -12643,18 +12621,18 @@ export interface VectorLearningResourcesSearchApiVectorLearningResourcesSearchRe readonly readable_id?: string /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'document'>} * @memberof VectorLearningResourcesSearchApiVectorLearningResourcesSearchRetrieve */ - readonly resource_category?: Array + readonly resource_type?: Array /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material - * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'learning_material'>} + * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} * @memberof VectorLearningResourcesSearchApiVectorLearningResourcesSearchRetrieve */ - readonly resource_type?: Array + readonly resource_type_group?: Array /** * The topic name. To see a list of options go to api/v1/topics/ @@ -12700,8 +12678,8 @@ export class VectorLearningResourcesSearchApi extends BaseAPI { requestParameters.professional, requestParameters.q, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.topic, options, ) @@ -12833,16 +12811,6 @@ export type VectorLearningResourcesSearchRetrievePlatformEnum = /** * @export */ -export const VectorLearningResourcesSearchRetrieveResourceCategoryEnum = { - Course: "course", - Program: "program", - LearningMaterial: "learning_material", -} as const -export type VectorLearningResourcesSearchRetrieveResourceCategoryEnum = - (typeof VectorLearningResourcesSearchRetrieveResourceCategoryEnum)[keyof typeof VectorLearningResourcesSearchRetrieveResourceCategoryEnum] -/** - * @export - */ export const VectorLearningResourcesSearchRetrieveResourceTypeEnum = { Course: "course", Program: "program", @@ -12852,10 +12820,20 @@ export const VectorLearningResourcesSearchRetrieveResourceTypeEnum = { Video: "video", VideoPlaylist: "video_playlist", Article: "article", - LearningMaterial: "learning_material", + Document: "document", } as const export type VectorLearningResourcesSearchRetrieveResourceTypeEnum = (typeof VectorLearningResourcesSearchRetrieveResourceTypeEnum)[keyof typeof VectorLearningResourcesSearchRetrieveResourceTypeEnum] +/** + * @export + */ +export const VectorLearningResourcesSearchRetrieveResourceTypeGroupEnum = { + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type VectorLearningResourcesSearchRetrieveResourceTypeGroupEnum = + (typeof VectorLearningResourcesSearchRetrieveResourceTypeGroupEnum)[keyof typeof VectorLearningResourcesSearchRetrieveResourceTypeGroupEnum] /** * VideoShortsApi - axios parameter creator diff --git a/frontends/api/src/generated/v1/api.ts b/frontends/api/src/generated/v1/api.ts index 12b99147d6..ee0f9788b8 100644 --- a/frontends/api/src/generated/v1/api.ts +++ b/frontends/api/src/generated/v1/api.ts @@ -40,7 +40,7 @@ import { } from "./base" /** - * * `resource_type` - resource_type * `certification` - certification * `certification_type` - certification_type * `offered_by` - offered_by * `platform` - platform * `topic` - topic * `department` - department * `level` - level * `course_feature` - course_feature * `professional` - professional * `free` - free * `delivery` - delivery * `resource_category` - resource_category + * * `resource_type` - resource_type * `certification` - certification * `certification_type` - certification_type * `offered_by` - offered_by * `platform` - platform * `topic` - topic * `department` - department * `level` - level * `course_feature` - course_feature * `professional` - professional * `free` - free * `delivery` - delivery * `resource_type_group` - resource_type_group * @export * @enum {string} */ @@ -58,7 +58,7 @@ export const AggregationsEnumDescriptions = { professional: "professional", free: "free", delivery: "delivery", - resource_category: "resource_category", + resource_type_group: "resource_type_group", } as const export const AggregationsEnum = { @@ -111,9 +111,9 @@ export const AggregationsEnum = { */ Delivery: "delivery", /** - * resource_category + * resource_type_group */ - ResourceCategory: "resource_category", + ResourceTypeGroup: "resource_type_group", } as const export type AggregationsEnum = @@ -226,7 +226,7 @@ export interface ArticleResource { * @type {string} * @memberof ArticleResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -305,6 +305,12 @@ export interface ArticleResource { * @memberof ArticleResource */ url?: string | null + /** + * + * @type {string} + * @memberof ArticleResource + */ + resource_category: string /** * * @type {Array} @@ -591,22 +597,6 @@ export const AvailabilityEnum = { export type AvailabilityEnum = (typeof AvailabilityEnum)[keyof typeof AvailabilityEnum] -/** - * - * @export - * @enum {string} - */ - -export const BlankEnumDescriptions = { - "": "", -} as const - -export const BlankEnum = { - Empty: "", -} as const - -export type BlankEnum = (typeof BlankEnum)[keyof typeof BlankEnum] - /** * * `micromasters` - MicroMasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @export @@ -642,51 +632,6 @@ export const CertificationTypeEnum = { export type CertificationTypeEnum = (typeof CertificationTypeEnum)[keyof typeof CertificationTypeEnum] -/** - * * `Lecture Notes` - Lecture Notes * `Readings` - Readings * `Practice` - Practice * `Open Textbooks` - Open Textbooks * `Lecture Audio` - Lecture Audio * `Video` - Video - * @export - * @enum {string} - */ - -export const ContentCategoryEnumDescriptions = { - "Lecture Notes": "Lecture Notes", - Readings: "Readings", - Practice: "Practice", - "Open Textbooks": "Open Textbooks", - "Lecture Audio": "Lecture Audio", - Video: "Video", -} as const - -export const ContentCategoryEnum = { - /** - * Lecture Notes - */ - LectureNotes: "Lecture Notes", - /** - * Readings - */ - Readings: "Readings", - /** - * Practice - */ - Practice: "Practice", - /** - * Open Textbooks - */ - OpenTextbooks: "Open Textbooks", - /** - * Lecture Audio - */ - LectureAudio: "Lecture Audio", - /** - * Video - */ - Video: "Video", -} as const - -export type ContentCategoryEnum = - (typeof ContentCategoryEnum)[keyof typeof ContentCategoryEnum] - /** * Serializer class for course run ContentFiles * @export @@ -899,164 +844,6 @@ export interface ContentFile { flashcards?: any } -/** - * Serializer class for course run ContentFiles - * @export - * @interface ContentFileRequest - */ -export interface ContentFileRequest { - /** - * - * @type {number} - * @memberof ContentFileRequest - */ - run_id?: number - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - run_title?: string - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - run_slug?: string - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - semester?: string - /** - * - * @type {number} - * @memberof ContentFileRequest - */ - year?: number - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - key?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - uid?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - title?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - description?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - url?: string | null - /** - * - * @type {Array} - * @memberof ContentFileRequest - */ - content_feature_type: Array - /** - * - * @type {ContentTypeEnum} - * @memberof ContentFileRequest - */ - content_type?: ContentTypeEnum - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - content?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - content_title?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - content_author?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - content_language?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - checksum?: string - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - image_src?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - source_path?: string - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - file_type?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - file_extension?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - run_readable_id?: string - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - edx_module_id?: string | null - /** - * - * @type {string} - * @memberof ContentFileRequest - */ - summary?: string - /** - * - * @type {any} - * @memberof ContentFileRequest - */ - flashcards?: any -} - /** * SearchResponseSerializer with OpenAPI annotations for Content Files search * @export @@ -1418,7 +1205,7 @@ export interface CourseResource { * @type {string} * @memberof CourseResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -1503,6 +1290,12 @@ export interface CourseResource { * @memberof CourseResource */ url?: string | null + /** + * + * @type {string} + * @memberof CourseResource + */ + resource_category: string /** * * @type {Array} @@ -2115,493 +1908,443 @@ export type DepartmentEnum = (typeof DepartmentEnum)[keyof typeof DepartmentEnum] /** - * Serializer for the LearningMaterial model - * @export - * @interface LearningMaterial - */ -export interface LearningMaterial { - /** - * - * @type {number} - * @memberof LearningMaterial - */ - id: number - /** - * - * @type {ContentFile} - * @memberof LearningMaterial - */ - content_file: ContentFile | null - /** - * - * @type {Array} - * @memberof LearningMaterial - */ - content_tags?: Array | null - /** - * - * @type {LearningMaterialContentCategory} - * @memberof LearningMaterial - */ - content_category?: LearningMaterialContentCategory | null -} -/** - * @type LearningMaterialContentCategory - * @export - */ -export type LearningMaterialContentCategory = BlankEnum | ContentCategoryEnum - -/** - * Serializer for the LearningMaterial model + * Serializer for document resources * @export - * @interface LearningMaterialRequest + * @interface DocumentResource */ -export interface LearningMaterialRequest { - /** - * - * @type {Array} - * @memberof LearningMaterialRequest - */ - content_tags?: Array | null - /** - * - * @type {LearningMaterialContentCategory} - * @memberof LearningMaterialRequest - */ - content_category?: LearningMaterialContentCategory | null -} -/** - * Serializer for LearningMaterial resources with resource_type=Lecture Notes - * @export - * @interface LearningMaterialResource - */ -export interface LearningMaterialResource { +export interface DocumentResource { /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ id: number /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ topics?: Array /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ position: number | null /** * * @type {LearningResourceOfferor} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ offered_by: LearningResourceOfferor | null /** * * @type {LearningResourcePlatform} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ platform: LearningResourcePlatform | null /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ course_feature: Array | null /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ departments: Array | null /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ certification: boolean /** * * @type {CourseResourceCertificationType} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ certification_type: CourseResourceCertificationType /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ prices: Array /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ resource_prices: Array /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ runs: Array | null /** * * @type {LearningResourceImage} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ image: LearningResourceImage | null /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ views: number /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ free: boolean /** * Return the resource category of the resource * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ format: Array /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ pace: Array /** * * @type {LearningResourceRelationshipChildField} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ children: LearningResourceRelationshipChildField | null /** * Return the best run id for the resource, if it has runs * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ best_run_id: number | null /** * - * @type {LearningMaterialResourceResourceTypeEnum} - * @memberof LearningMaterialResource + * @type {DocumentResourceResourceTypeEnum} + * @memberof DocumentResource */ - resource_type: LearningMaterialResourceResourceTypeEnum + resource_type: DocumentResourceResourceTypeEnum /** * - * @type {LearningMaterial} - * @memberof LearningMaterialResource + * @type {Array} + * @memberof DocumentResource */ - learning_material: LearningMaterial + content_files: Array | null /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ readable_id: string /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ title: string /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ description?: string | null /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ full_description?: string | null /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ last_modified?: string | null /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ published?: boolean /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ languages?: Array | null /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ url?: string | null + /** + * + * @type {string} + * @memberof DocumentResource + */ + resource_category: string /** * * @type {Array} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ ocw_topics?: Array /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ professional: boolean /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ next_start_date?: string | null /** * * @type {AvailabilityEnum} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ availability?: AvailabilityEnum | null /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ completeness?: number /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ license_cc?: boolean /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ test_mode?: boolean /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ continuing_ed_credits?: string | null /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ location?: string /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ duration?: string /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ min_weeks?: number | null /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ max_weeks?: number | null /** * * @type {string} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ time_commitment?: string /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ min_weekly_hours?: number | null /** * * @type {number} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ max_weekly_hours?: number | null /** * * @type {boolean} - * @memberof LearningMaterialResource + * @memberof DocumentResource */ require_summaries: boolean } /** - * Serializer for LearningMaterial resources with resource_type=Lecture Notes + * Serializer for document resources * @export - * @interface LearningMaterialResourceRequest + * @interface DocumentResourceRequest */ -export interface LearningMaterialResourceRequest { +export interface DocumentResourceRequest { /** * * @type {Array} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ topics?: Array /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ readable_id: string /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ title: string /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ description?: string | null /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ full_description?: string | null /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ last_modified?: string | null /** * * @type {boolean} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ published?: boolean /** * * @type {Array} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ languages?: Array | null /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ url?: string | null /** * * @type {Array} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ ocw_topics?: Array /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ next_start_date?: string | null /** * * @type {AvailabilityEnum} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ availability?: AvailabilityEnum | null /** * * @type {number} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ completeness?: number /** * * @type {boolean} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ license_cc?: boolean /** * * @type {boolean} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ test_mode?: boolean /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ continuing_ed_credits?: string | null /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ location?: string /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ duration?: string /** * * @type {number} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ min_weeks?: number | null /** * * @type {number} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ max_weeks?: number | null /** * * @type {string} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ time_commitment?: string /** * * @type {number} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ min_weekly_hours?: number | null /** * * @type {number} - * @memberof LearningMaterialResourceRequest + * @memberof DocumentResourceRequest */ max_weekly_hours?: number | null } @@ -2612,16 +2355,16 @@ export interface LearningMaterialResourceRequest { * @enum {string} */ -export const LearningMaterialResourceResourceTypeEnumDescriptions = { - learning_material: "", +export const DocumentResourceResourceTypeEnumDescriptions = { + document: "", } as const -export const LearningMaterialResourceResourceTypeEnum = { - LearningMaterial: "learning_material", +export const DocumentResourceResourceTypeEnum = { + Document: "document", } as const -export type LearningMaterialResourceResourceTypeEnum = - (typeof LearningMaterialResourceResourceTypeEnum)[keyof typeof LearningMaterialResourceResourceTypeEnum] +export type DocumentResourceResourceTypeEnum = + (typeof DocumentResourceResourceTypeEnum)[keyof typeof DocumentResourceResourceTypeEnum] /** * Serializer for the LearningPath model @@ -2811,7 +2554,7 @@ export interface LearningPathResource { * @type {string} * @memberof LearningPathResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -2842,6 +2585,12 @@ export interface LearningPathResource { * @memberof LearningPathResource */ resource_type: LearningPathResourceResourceTypeEnum + /** + * + * @type {string} + * @memberof LearningPathResource + */ + resource_category: string /** * * @type {LearningPath} @@ -3170,7 +2919,7 @@ export type LearningPathResourceResourceTypeEnum = export type LearningResource = | ({ resource_type: "article" } & ArticleResource) | ({ resource_type: "course" } & CourseResource) - | ({ resource_type: "learning_material" } & LearningMaterialResource) + | ({ resource_type: "document" } & DocumentResource) | ({ resource_type: "learning_path" } & LearningPathResource) | ({ resource_type: "podcast" } & PodcastResource) | ({ resource_type: "podcast_episode" } & PodcastEpisodeResource) @@ -3922,7 +3671,7 @@ export interface LearningResourceRelationshipChildField { export type LearningResourceRequest = | ({ resource_type: "article" } & ArticleResourceRequest) | ({ resource_type: "course" } & CourseResourceRequest) - | ({ resource_type: "learning_material" } & LearningMaterialResourceRequest) + | ({ resource_type: "document" } & DocumentResourceRequest) | ({ resource_type: "learning_path" } & LearningPathResourceRequest) | ({ resource_type: "podcast" } & PodcastResourceRequest) | ({ resource_type: "podcast_episode" } & PodcastEpisodeResourceRequest) @@ -5736,7 +5485,7 @@ export interface PercolateQuerySubscriptionRequestRequest { */ sortby?: SortbyEnum /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document * @type {Array} * @memberof PercolateQuerySubscriptionRequestRequest */ @@ -5802,11 +5551,11 @@ export interface PercolateQuerySubscriptionRequestRequest { */ delivery?: Array /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array} + * The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array} * @memberof PercolateQuerySubscriptionRequestRequest */ - resource_category?: Array + resource_type_group?: Array /** * * @type {SearchModeEnum} @@ -5846,7 +5595,7 @@ export interface PercolateQuerySubscriptionRequestRequest { } /** - * * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document * @export * @enum {string} */ @@ -5860,7 +5609,7 @@ export const PercolateQuerySubscriptionRequestResourceTypeEnumDescriptions = { video: "video", video_playlist: "video playlist", article: "article", - learning_material: "learning material", + document: "document", } as const export const PercolateQuerySubscriptionRequestResourceTypeEnum = { @@ -5897,9 +5646,9 @@ export const PercolateQuerySubscriptionRequestResourceTypeEnum = { */ Article: "article", /** - * learning material + * document */ - LearningMaterial: "learning_material", + Document: "document", } as const export type PercolateQuerySubscriptionRequestResourceTypeEnum = @@ -6249,7 +5998,7 @@ export interface PodcastEpisodeResource { * @type {string} * @memberof PodcastEpisodeResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -6334,6 +6083,12 @@ export interface PodcastEpisodeResource { * @memberof PodcastEpisodeResource */ url?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + resource_category: string /** * * @type {Array} @@ -6733,7 +6488,7 @@ export interface PodcastResource { * @type {string} * @memberof PodcastResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -6818,6 +6573,12 @@ export interface PodcastResource { * @memberof PodcastResource */ url?: string | null + /** + * + * @type {string} + * @memberof PodcastResource + */ + resource_category: string /** * * @type {Array} @@ -7449,7 +7210,7 @@ export interface ProgramResource { * @type {string} * @memberof ProgramResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -7534,6 +7295,12 @@ export interface ProgramResource { * @memberof ProgramResource */ url?: string | null + /** + * + * @type {string} + * @memberof ProgramResource + */ + resource_category: string /** * * @type {Array} @@ -7836,37 +7603,7 @@ export type RelationTypeEnum = (typeof RelationTypeEnum)[keyof typeof RelationTypeEnum] /** - * * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @export - * @enum {string} - */ - -export const ResourceCategoryEnumDescriptions = { - course: "Course", - program: "Program", - learning_material: "Learning Material", -} as const - -export const ResourceCategoryEnum = { - /** - * Course - */ - Course: "course", - /** - * Program - */ - Program: "program", - /** - * Learning Material - */ - LearningMaterial: "learning_material", -} as const - -export type ResourceCategoryEnum = - (typeof ResourceCategoryEnum)[keyof typeof ResourceCategoryEnum] - -/** - * * `course` - course * `program` - program * `learning_path` - learning_path * `podcast` - podcast * `podcast_episode` - podcast_episode * `video` - video * `video_playlist` - video_playlist * `article` - article * `learning_material` - learning_material + * * `course` - course * `program` - program * `learning_path` - learning_path * `podcast` - podcast * `podcast_episode` - podcast_episode * `video` - video * `video_playlist` - video_playlist * `article` - article * `document` - document * @export * @enum {string} */ @@ -7880,7 +7617,7 @@ export const ResourceTypeEnumDescriptions = { video: "video", video_playlist: "video_playlist", article: "article", - learning_material: "learning_material", + document: "document", } as const export const ResourceTypeEnum = { @@ -7909,21 +7646,51 @@ export const ResourceTypeEnum = { */ Video: "video", /** - * video_playlist + * video_playlist + */ + VideoPlaylist: "video_playlist", + /** + * article + */ + Article: "article", + /** + * document + */ + Document: "document", +} as const + +export type ResourceTypeEnum = + (typeof ResourceTypeEnum)[keyof typeof ResourceTypeEnum] + +/** + * * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @export + * @enum {string} + */ + +export const ResourceTypeGroupEnumDescriptions = { + course: "Course", + program: "Program", + learning_material: "Learning Material", +} as const + +export const ResourceTypeGroupEnum = { + /** + * Course */ - VideoPlaylist: "video_playlist", + Course: "course", /** - * article + * Program */ - Article: "article", + Program: "program", /** - * learning_material + * Learning Material */ LearningMaterial: "learning_material", } as const -export type ResourceTypeEnum = - (typeof ResourceTypeEnum)[keyof typeof ResourceTypeEnum] +export type ResourceTypeGroupEnum = + (typeof ResourceTypeGroupEnum)[keyof typeof ResourceTypeGroupEnum] /** * Serializer for LearningResourceInstructor model @@ -8648,7 +8415,7 @@ export interface VideoPlaylistResource { * @type {string} * @memberof VideoPlaylistResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -8733,6 +8500,12 @@ export interface VideoPlaylistResource { * @memberof VideoPlaylistResource */ url?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + resource_category: string /** * * @type {Array} @@ -9120,7 +8893,7 @@ export interface VideoResource { * @type {string} * @memberof VideoResource */ - resource_category: string + resource_type_group: string /** * * @type {Array} @@ -9163,6 +8936,12 @@ export interface VideoResource { * @memberof VideoResource */ playlists: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + content_files: Array | null /** * * @type {string} @@ -9211,6 +8990,12 @@ export interface VideoResource { * @memberof VideoResource */ url?: string | null + /** + * + * @type {string} + * @memberof VideoResource + */ + resource_category: string /** * * @type {Array} @@ -11856,9 +11641,9 @@ export const CoursesApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -11878,9 +11663,9 @@ export const CoursesApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: CoursesListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -11953,10 +11738,6 @@ export const CoursesApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -11965,6 +11746,10 @@ export const CoursesApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -12148,9 +11933,9 @@ export const CoursesApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -12170,9 +11955,9 @@ export const CoursesApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: CoursesListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -12196,9 +11981,9 @@ export const CoursesApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -12327,9 +12112,9 @@ export const CoursesApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -12542,13 +12327,6 @@ export interface CoursesApiCoursesListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof CoursesApiCoursesList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -12557,12 +12335,19 @@ export interface CoursesApiCoursesListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof CoursesApiCoursesList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof CoursesApiCoursesList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -12675,9 +12460,9 @@ export class CoursesApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -12868,20 +12653,10 @@ export type CoursesListPlatformEnum = /** * @export */ -export const CoursesListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type CoursesListResourceCategoryEnum = - (typeof CoursesListResourceCategoryEnum)[keyof typeof CoursesListResourceCategoryEnum] -/** - * @export - */ export const CoursesListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -12894,6 +12669,16 @@ export type CoursesListResourceTypeEnum = /** * @export */ +export const CoursesListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type CoursesListResourceTypeGroupEnum = + (typeof CoursesListResourceTypeGroupEnum)[keyof typeof CoursesListResourceTypeGroupEnum] +/** + * @export + */ export const CoursesListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -13251,9 +13036,9 @@ export const FeaturedApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {FeaturedListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -13273,9 +13058,9 @@ export const FeaturedApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: FeaturedListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -13348,10 +13133,6 @@ export const FeaturedApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -13360,6 +13141,10 @@ export const FeaturedApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -13454,9 +13239,9 @@ export const FeaturedApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {FeaturedListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -13476,9 +13261,9 @@ export const FeaturedApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: FeaturedListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -13502,9 +13287,9 @@ export const FeaturedApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -13589,9 +13374,9 @@ export const FeaturedApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -13713,13 +13498,6 @@ export interface FeaturedApiFeaturedListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof FeaturedApiFeaturedList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -13728,12 +13506,19 @@ export interface FeaturedApiFeaturedListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof FeaturedApiFeaturedList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof FeaturedApiFeaturedList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -13797,9 +13582,9 @@ export class FeaturedApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -13949,20 +13734,10 @@ export type FeaturedListPlatformEnum = /** * @export */ -export const FeaturedListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type FeaturedListResourceCategoryEnum = - (typeof FeaturedListResourceCategoryEnum)[keyof typeof FeaturedListResourceCategoryEnum] -/** - * @export - */ export const FeaturedListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -13975,6 +13750,16 @@ export type FeaturedListResourceTypeEnum = /** * @export */ +export const FeaturedListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type FeaturedListResourceTypeGroupEnum = + (typeof FeaturedListResourceTypeGroupEnum)[keyof typeof FeaturedListResourceTypeGroupEnum] +/** + * @export + */ export const FeaturedListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -14018,9 +13803,9 @@ export const LearningResourceDisplayInfoApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourceDisplayInfoListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -14040,9 +13825,9 @@ export const LearningResourceDisplayInfoApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourceDisplayInfoListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -14115,10 +13900,6 @@ export const LearningResourceDisplayInfoApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -14127,6 +13908,10 @@ export const LearningResourceDisplayInfoApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -14225,9 +14010,9 @@ export const LearningResourceDisplayInfoApiFp = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourceDisplayInfoListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -14247,9 +14032,9 @@ export const LearningResourceDisplayInfoApiFp = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourceDisplayInfoListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -14274,9 +14059,9 @@ export const LearningResourceDisplayInfoApiFp = function ( platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -14368,9 +14153,9 @@ export const LearningResourceDisplayInfoApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -14492,13 +14277,6 @@ export interface LearningResourceDisplayInfoApiLearningResourceDisplayInfoListRe */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningResourceDisplayInfoApiLearningResourceDisplayInfoList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -14507,12 +14285,19 @@ export interface LearningResourceDisplayInfoApiLearningResourceDisplayInfoListRe readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof LearningResourceDisplayInfoApiLearningResourceDisplayInfoList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourceDisplayInfoApiLearningResourceDisplayInfoList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -14576,9 +14361,9 @@ export class LearningResourceDisplayInfoApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -14728,20 +14513,10 @@ export type LearningResourceDisplayInfoListPlatformEnum = /** * @export */ -export const LearningResourceDisplayInfoListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type LearningResourceDisplayInfoListResourceCategoryEnum = - (typeof LearningResourceDisplayInfoListResourceCategoryEnum)[keyof typeof LearningResourceDisplayInfoListResourceCategoryEnum] -/** - * @export - */ export const LearningResourceDisplayInfoListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -14754,6 +14529,16 @@ export type LearningResourceDisplayInfoListResourceTypeEnum = /** * @export */ +export const LearningResourceDisplayInfoListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningResourceDisplayInfoListResourceTypeGroupEnum = + (typeof LearningResourceDisplayInfoListResourceTypeGroupEnum)[keyof typeof LearningResourceDisplayInfoListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourceDisplayInfoListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -15141,9 +14926,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -15163,9 +14948,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -15238,10 +15023,6 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -15250,6 +15031,10 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -15334,9 +15119,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesSimilarListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -15356,9 +15141,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesSimilarListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -15432,10 +15217,6 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -15444,6 +15225,10 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -15482,9 +15267,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesSummaryListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -15504,9 +15289,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesSummaryListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -15579,10 +15364,6 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -15591,6 +15372,10 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -15690,9 +15475,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesVectorSimilarListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -15712,9 +15497,9 @@ export const LearningResourcesApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesVectorSimilarListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -15789,10 +15574,6 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -15801,6 +15582,10 @@ export const LearningResourcesApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -16062,9 +15847,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -16084,9 +15869,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -16111,9 +15896,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -16178,9 +15963,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesSimilarListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -16200,9 +15985,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesSimilarListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -16227,9 +16012,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -16263,9 +16048,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesSummaryListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -16285,9 +16070,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesSummaryListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -16312,9 +16097,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -16388,9 +16173,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesVectorSimilarListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -16410,9 +16195,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningResourcesVectorSimilarListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -16437,9 +16222,9 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -16602,9 +16387,9 @@ export const LearningResourcesApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -16652,9 +16437,9 @@ export const LearningResourcesApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -16687,9 +16472,9 @@ export const LearningResourcesApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -16742,9 +16527,9 @@ export const LearningResourcesApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -17026,13 +16811,6 @@ export interface LearningResourcesApiLearningResourcesListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningResourcesApiLearningResourcesList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -17041,12 +16819,19 @@ export interface LearningResourcesApiLearningResourcesListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof LearningResourcesApiLearningResourcesList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -17173,13 +16958,6 @@ export interface LearningResourcesApiLearningResourcesSimilarListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningResourcesApiLearningResourcesSimilarList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -17188,12 +16966,19 @@ export interface LearningResourcesApiLearningResourcesSimilarListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof LearningResourcesApiLearningResourcesSimilarList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -17306,13 +17091,6 @@ export interface LearningResourcesApiLearningResourcesSummaryListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningResourcesApiLearningResourcesSummaryList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -17321,12 +17099,19 @@ export interface LearningResourcesApiLearningResourcesSummaryListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof LearningResourcesApiLearningResourcesSummaryList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourcesApiLearningResourcesSummaryList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -17469,13 +17254,6 @@ export interface LearningResourcesApiLearningResourcesVectorSimilarListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningResourcesApiLearningResourcesVectorSimilarList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -17484,12 +17262,19 @@ export interface LearningResourcesApiLearningResourcesVectorSimilarListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof LearningResourcesApiLearningResourcesVectorSimilarList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourcesApiLearningResourcesVectorSimilarList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -17654,9 +17439,9 @@ export class LearningResourcesApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -17708,9 +17493,9 @@ export class LearningResourcesApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -17745,9 +17530,9 @@ export class LearningResourcesApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -17804,9 +17589,9 @@ export class LearningResourcesApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -17980,20 +17765,10 @@ export type LearningResourcesListPlatformEnum = /** * @export */ -export const LearningResourcesListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type LearningResourcesListResourceCategoryEnum = - (typeof LearningResourcesListResourceCategoryEnum)[keyof typeof LearningResourcesListResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -18006,6 +17781,16 @@ export type LearningResourcesListResourceTypeEnum = /** * @export */ +export const LearningResourcesListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningResourcesListResourceTypeGroupEnum = + (typeof LearningResourcesListResourceTypeGroupEnum)[keyof typeof LearningResourcesListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -18148,20 +17933,10 @@ export type LearningResourcesSimilarListPlatformEnum = /** * @export */ -export const LearningResourcesSimilarListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type LearningResourcesSimilarListResourceCategoryEnum = - (typeof LearningResourcesSimilarListResourceCategoryEnum)[keyof typeof LearningResourcesSimilarListResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesSimilarListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -18174,6 +17949,16 @@ export type LearningResourcesSimilarListResourceTypeEnum = /** * @export */ +export const LearningResourcesSimilarListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningResourcesSimilarListResourceTypeGroupEnum = + (typeof LearningResourcesSimilarListResourceTypeGroupEnum)[keyof typeof LearningResourcesSimilarListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesSimilarListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -18316,20 +18101,10 @@ export type LearningResourcesSummaryListPlatformEnum = /** * @export */ -export const LearningResourcesSummaryListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type LearningResourcesSummaryListResourceCategoryEnum = - (typeof LearningResourcesSummaryListResourceCategoryEnum)[keyof typeof LearningResourcesSummaryListResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesSummaryListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -18342,6 +18117,16 @@ export type LearningResourcesSummaryListResourceTypeEnum = /** * @export */ +export const LearningResourcesSummaryListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningResourcesSummaryListResourceTypeGroupEnum = + (typeof LearningResourcesSummaryListResourceTypeGroupEnum)[keyof typeof LearningResourcesSummaryListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesSummaryListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -18484,20 +18269,10 @@ export type LearningResourcesVectorSimilarListPlatformEnum = /** * @export */ -export const LearningResourcesVectorSimilarListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type LearningResourcesVectorSimilarListResourceCategoryEnum = - (typeof LearningResourcesVectorSimilarListResourceCategoryEnum)[keyof typeof LearningResourcesVectorSimilarListResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesVectorSimilarListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -18510,6 +18285,16 @@ export type LearningResourcesVectorSimilarListResourceTypeEnum = /** * @export */ +export const LearningResourcesVectorSimilarListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningResourcesVectorSimilarListResourceTypeGroupEnum = + (typeof LearningResourcesVectorSimilarListResourceTypeGroupEnum)[keyof typeof LearningResourcesVectorSimilarListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesVectorSimilarListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -18560,8 +18345,8 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesSearchRetrieveSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -18591,8 +18376,8 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesSearchRetrieveSearchModeEnum, slop?: number | null, sortby?: LearningResourcesSearchRetrieveSortbyEnum, @@ -18698,14 +18483,14 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( localVarQueryParameter["q"] = q } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_type) { localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (search_mode !== undefined) { localVarQueryParameter["search_mode"] = search_mode } @@ -18776,8 +18561,8 @@ export const LearningResourcesSearchApiFp = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesSearchRetrieveSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -18807,8 +18592,8 @@ export const LearningResourcesSearchApiFp = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesSearchRetrieveSearchModeEnum, slop?: number | null, sortby?: LearningResourcesSearchRetrieveSortbyEnum, @@ -18843,8 +18628,8 @@ export const LearningResourcesSearchApiFp = function ( platform, professional, q, - resource_category, resource_type, + resource_type_group, search_mode, slop, sortby, @@ -18912,8 +18697,8 @@ export const LearningResourcesSearchApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -18934,7 +18719,7 @@ export const LearningResourcesSearchApiFactory = function ( export interface LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest { /** * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_type_group'>} * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve */ readonly aggregations?: Array @@ -19073,18 +18858,18 @@ export interface LearningResourcesSearchApiLearningResourcesSearchRetrieveReques readonly q?: string /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'document'>} * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve */ - readonly resource_category?: Array + readonly resource_type?: Array /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material - * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'learning_material'>} + * The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve */ - readonly resource_type?: Array + readonly resource_type_group?: Array /** * The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid @@ -19163,8 +18948,8 @@ export class LearningResourcesSearchApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -19192,7 +18977,7 @@ export const LearningResourcesSearchRetrieveAggregationsEnum = { Professional: "professional", Free: "free", Delivery: "delivery", - ResourceCategory: "resource_category", + ResourceTypeGroup: "resource_type_group", } as const export type LearningResourcesSearchRetrieveAggregationsEnum = (typeof LearningResourcesSearchRetrieveAggregationsEnum)[keyof typeof LearningResourcesSearchRetrieveAggregationsEnum] @@ -19313,20 +19098,10 @@ export const LearningResourcesSearchRetrievePlatformEnum = { Podcast: "podcast", Youtube: "youtube", Canvas: "canvas", - Climate: "climate", -} as const -export type LearningResourcesSearchRetrievePlatformEnum = - (typeof LearningResourcesSearchRetrievePlatformEnum)[keyof typeof LearningResourcesSearchRetrievePlatformEnum] -/** - * @export - */ -export const LearningResourcesSearchRetrieveResourceCategoryEnum = { - Course: "course", - Program: "program", - LearningMaterial: "learning_material", + Climate: "climate", } as const -export type LearningResourcesSearchRetrieveResourceCategoryEnum = - (typeof LearningResourcesSearchRetrieveResourceCategoryEnum)[keyof typeof LearningResourcesSearchRetrieveResourceCategoryEnum] +export type LearningResourcesSearchRetrievePlatformEnum = + (typeof LearningResourcesSearchRetrievePlatformEnum)[keyof typeof LearningResourcesSearchRetrievePlatformEnum] /** * @export */ @@ -19339,13 +19114,23 @@ export const LearningResourcesSearchRetrieveResourceTypeEnum = { Video: "video", VideoPlaylist: "video_playlist", Article: "article", - LearningMaterial: "learning_material", + Document: "document", } as const export type LearningResourcesSearchRetrieveResourceTypeEnum = (typeof LearningResourcesSearchRetrieveResourceTypeEnum)[keyof typeof LearningResourcesSearchRetrieveResourceTypeEnum] /** * @export */ +export const LearningResourcesSearchRetrieveResourceTypeGroupEnum = { + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type LearningResourcesSearchRetrieveResourceTypeGroupEnum = + (typeof LearningResourcesSearchRetrieveResourceTypeGroupEnum)[keyof typeof LearningResourcesSearchRetrieveResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesSearchRetrieveSearchModeEnum = { Phrase: "phrase", BestFields: "best_fields", @@ -19408,8 +19193,8 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesUserSubscriptionCheckListSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -19440,8 +19225,8 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, @@ -19548,14 +19333,14 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["q"] = q } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_type) { localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (search_mode !== undefined) { localVarQueryParameter["search_mode"] = search_mode } @@ -19617,8 +19402,8 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesUserSubscriptionListSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -19648,8 +19433,8 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionListSortbyEnum, @@ -19755,14 +19540,14 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["q"] = q } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_type) { localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (search_mode !== undefined) { localVarQueryParameter["search_mode"] = search_mode } @@ -19820,8 +19605,8 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -19853,8 +19638,8 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, @@ -19962,14 +19747,14 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["q"] = q } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_type) { localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (search_mode !== undefined) { localVarQueryParameter["search_mode"] = search_mode } @@ -20102,8 +19887,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesUserSubscriptionCheckListSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -20134,8 +19919,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, @@ -20171,8 +19956,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( platform, professional, q, - resource_category, resource_type, + resource_type_group, search_mode, slop, sortby, @@ -20217,8 +20002,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesUserSubscriptionListSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -20248,8 +20033,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionListSortbyEnum, @@ -20284,8 +20069,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( platform, professional, q, - resource_category, resource_type, + resource_type_group, search_mode, slop, sortby, @@ -20329,8 +20114,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {Array} [platform] The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean | null} [professional] * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @param {Array} [resource_type_group] The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum} [search_mode] The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -20362,8 +20147,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( platform?: Array, professional?: boolean | null, q?: string, - resource_category?: Array, resource_type?: Array, + resource_type_group?: Array, search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, @@ -20397,8 +20182,8 @@ export const LearningResourcesUserSubscriptionApiFp = function ( platform, professional, q, - resource_category, resource_type, + resource_type_group, search_mode, slop, sortby, @@ -20499,8 +20284,8 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -20544,8 +20329,8 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -20588,8 +20373,8 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -20630,7 +20415,7 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest { /** * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_type_group'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList */ readonly aggregations?: Array @@ -20769,18 +20554,18 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr readonly q?: string /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'document'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList */ - readonly resource_category?: Array + readonly resource_type?: Array /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material - * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'learning_material'>} + * The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList */ - readonly resource_type?: Array + readonly resource_type_group?: Array /** * The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid @@ -20833,7 +20618,7 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest { /** * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_type_group'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList */ readonly aggregations?: Array @@ -20972,18 +20757,18 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr readonly q?: string /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'document'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList */ - readonly resource_category?: Array + readonly resource_type?: Array /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material - * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'learning_material'>} + * The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList */ - readonly resource_type?: Array + readonly resource_type_group?: Array /** * The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid @@ -21029,7 +20814,7 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest { /** * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_type_group'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate */ readonly aggregations?: Array @@ -21168,18 +20953,18 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr readonly q?: string /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `document` - document + * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'document'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate */ - readonly resource_category?: Array + readonly resource_type?: Array /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * `article` - article * `learning_material` - learning material - * @type {Array<'course' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist' | 'article' | 'learning_material'>} + * The resource type grouping of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate */ - readonly resource_type?: Array + readonly resource_type_group?: Array /** * The open search search type for text queries * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `hybrid` - hybrid @@ -21286,8 +21071,8 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -21333,8 +21118,8 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -21379,8 +21164,8 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.q, - requestParameters.resource_category, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, @@ -21430,7 +21215,7 @@ export const LearningResourcesUserSubscriptionCheckListAggregationsEnum = { Professional: "professional", Free: "free", Delivery: "delivery", - ResourceCategory: "resource_category", + ResourceTypeGroup: "resource_type_group", } as const export type LearningResourcesUserSubscriptionCheckListAggregationsEnum = (typeof LearningResourcesUserSubscriptionCheckListAggregationsEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListAggregationsEnum] @@ -21558,16 +21343,6 @@ export type LearningResourcesUserSubscriptionCheckListPlatformEnum = /** * @export */ -export const LearningResourcesUserSubscriptionCheckListResourceCategoryEnum = { - Course: "course", - Program: "program", - LearningMaterial: "learning_material", -} as const -export type LearningResourcesUserSubscriptionCheckListResourceCategoryEnum = - (typeof LearningResourcesUserSubscriptionCheckListResourceCategoryEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesUserSubscriptionCheckListResourceTypeEnum = { Course: "course", Program: "program", @@ -21577,13 +21352,23 @@ export const LearningResourcesUserSubscriptionCheckListResourceTypeEnum = { Video: "video", VideoPlaylist: "video_playlist", Article: "article", - LearningMaterial: "learning_material", + Document: "document", } as const export type LearningResourcesUserSubscriptionCheckListResourceTypeEnum = (typeof LearningResourcesUserSubscriptionCheckListResourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListResourceTypeEnum] /** * @export */ +export const LearningResourcesUserSubscriptionCheckListResourceTypeGroupEnum = { + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type LearningResourcesUserSubscriptionCheckListResourceTypeGroupEnum = + (typeof LearningResourcesUserSubscriptionCheckListResourceTypeGroupEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesUserSubscriptionCheckListSearchModeEnum = { Phrase: "phrase", BestFields: "best_fields", @@ -21639,7 +21424,7 @@ export const LearningResourcesUserSubscriptionListAggregationsEnum = { Professional: "professional", Free: "free", Delivery: "delivery", - ResourceCategory: "resource_category", + ResourceTypeGroup: "resource_type_group", } as const export type LearningResourcesUserSubscriptionListAggregationsEnum = (typeof LearningResourcesUserSubscriptionListAggregationsEnum)[keyof typeof LearningResourcesUserSubscriptionListAggregationsEnum] @@ -21767,16 +21552,6 @@ export type LearningResourcesUserSubscriptionListPlatformEnum = /** * @export */ -export const LearningResourcesUserSubscriptionListResourceCategoryEnum = { - Course: "course", - Program: "program", - LearningMaterial: "learning_material", -} as const -export type LearningResourcesUserSubscriptionListResourceCategoryEnum = - (typeof LearningResourcesUserSubscriptionListResourceCategoryEnum)[keyof typeof LearningResourcesUserSubscriptionListResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesUserSubscriptionListResourceTypeEnum = { Course: "course", Program: "program", @@ -21786,13 +21561,23 @@ export const LearningResourcesUserSubscriptionListResourceTypeEnum = { Video: "video", VideoPlaylist: "video_playlist", Article: "article", - LearningMaterial: "learning_material", + Document: "document", } as const export type LearningResourcesUserSubscriptionListResourceTypeEnum = (typeof LearningResourcesUserSubscriptionListResourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionListResourceTypeEnum] /** * @export */ +export const LearningResourcesUserSubscriptionListResourceTypeGroupEnum = { + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type LearningResourcesUserSubscriptionListResourceTypeGroupEnum = + (typeof LearningResourcesUserSubscriptionListResourceTypeGroupEnum)[keyof typeof LearningResourcesUserSubscriptionListResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesUserSubscriptionListSearchModeEnum = { Phrase: "phrase", BestFields: "best_fields", @@ -21840,7 +21625,7 @@ export const LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = Professional: "professional", Free: "free", Delivery: "delivery", - ResourceCategory: "resource_category", + ResourceTypeGroup: "resource_type_group", } as const export type LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = (typeof LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum] @@ -21969,17 +21754,6 @@ export type LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum = /** * @export */ -export const LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum = - { - Course: "course", - Program: "program", - LearningMaterial: "learning_material", - } as const -export type LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum = - (typeof LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum] -/** - * @export - */ export const LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = { Course: "course", @@ -21990,13 +21764,24 @@ export const LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = Video: "video", VideoPlaylist: "video_playlist", Article: "article", - LearningMaterial: "learning_material", + Document: "document", } as const export type LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = (typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum] /** * @export */ +export const LearningResourcesUserSubscriptionSubscribeCreateResourceTypeGroupEnum = + { + Course: "course", + Program: "program", + LearningMaterial: "learning_material", + } as const +export type LearningResourcesUserSubscriptionSubscribeCreateResourceTypeGroupEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeGroupEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeGroupEnum] +/** + * @export + */ export const LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum = { Phrase: "phrase", BestFields: "best_fields", @@ -22475,9 +22260,9 @@ export const LearningpathsApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -22497,9 +22282,9 @@ export const LearningpathsApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningpathsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -22572,10 +22357,6 @@ export const LearningpathsApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -22584,6 +22365,10 @@ export const LearningpathsApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -23020,9 +22805,9 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -23042,9 +22827,9 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: LearningpathsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -23069,9 +22854,9 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -23353,9 +23138,9 @@ export const LearningpathsApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -23663,13 +23448,6 @@ export interface LearningpathsApiLearningpathsListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningpathsApiLearningpathsList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -23678,12 +23456,19 @@ export interface LearningpathsApiLearningpathsListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof LearningpathsApiLearningpathsList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningpathsApiLearningpathsList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -23912,9 +23697,9 @@ export class LearningpathsApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -24098,20 +23883,10 @@ export type LearningpathsListPlatformEnum = /** * @export */ -export const LearningpathsListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type LearningpathsListResourceCategoryEnum = - (typeof LearningpathsListResourceCategoryEnum)[keyof typeof LearningpathsListResourceCategoryEnum] -/** - * @export - */ export const LearningpathsListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -24124,6 +23899,16 @@ export type LearningpathsListResourceTypeEnum = /** * @export */ +export const LearningpathsListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningpathsListResourceTypeGroupEnum = + (typeof LearningpathsListResourceTypeGroupEnum)[keyof typeof LearningpathsListResourceTypeGroupEnum] +/** + * @export + */ export const LearningpathsListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -24948,9 +24733,9 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -24970,9 +24755,9 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: PodcastEpisodesListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -25045,10 +24830,6 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -25057,6 +24838,10 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -25152,9 +24937,9 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -25174,9 +24959,9 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: PodcastEpisodesListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -25201,9 +24986,9 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -25291,9 +25076,9 @@ export const PodcastEpisodesApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -25415,13 +25200,6 @@ export interface PodcastEpisodesApiPodcastEpisodesListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -25430,12 +25208,19 @@ export interface PodcastEpisodesApiPodcastEpisodesListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof PodcastEpisodesApiPodcastEpisodesList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -25499,9 +25284,9 @@ export class PodcastEpisodesApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -25651,20 +25436,10 @@ export type PodcastEpisodesListPlatformEnum = /** * @export */ -export const PodcastEpisodesListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type PodcastEpisodesListResourceCategoryEnum = - (typeof PodcastEpisodesListResourceCategoryEnum)[keyof typeof PodcastEpisodesListResourceCategoryEnum] -/** - * @export - */ export const PodcastEpisodesListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -25677,6 +25452,16 @@ export type PodcastEpisodesListResourceTypeEnum = /** * @export */ +export const PodcastEpisodesListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type PodcastEpisodesListResourceTypeGroupEnum = + (typeof PodcastEpisodesListResourceTypeGroupEnum)[keyof typeof PodcastEpisodesListResourceTypeGroupEnum] +/** + * @export + */ export const PodcastEpisodesListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -25845,9 +25630,9 @@ export const PodcastsApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -25867,9 +25652,9 @@ export const PodcastsApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: PodcastsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -25942,10 +25727,6 @@ export const PodcastsApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -25954,6 +25735,10 @@ export const PodcastsApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -26124,9 +25909,9 @@ export const PodcastsApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -26146,9 +25931,9 @@ export const PodcastsApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: PodcastsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -26172,9 +25957,9 @@ export const PodcastsApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -26299,9 +26084,9 @@ export const PodcastsApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -26479,13 +26264,6 @@ export interface PodcastsApiPodcastsListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof PodcastsApiPodcastsList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -26494,12 +26272,19 @@ export interface PodcastsApiPodcastsListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof PodcastsApiPodcastsList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof PodcastsApiPodcastsList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -26607,9 +26392,9 @@ export class PodcastsApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -26759,20 +26544,10 @@ export type PodcastsListPlatformEnum = /** * @export */ -export const PodcastsListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type PodcastsListResourceCategoryEnum = - (typeof PodcastsListResourceCategoryEnum)[keyof typeof PodcastsListResourceCategoryEnum] -/** - * @export - */ export const PodcastsListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -26785,6 +26560,16 @@ export type PodcastsListResourceTypeEnum = /** * @export */ +export const PodcastsListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type PodcastsListResourceTypeGroupEnum = + (typeof PodcastsListResourceTypeGroupEnum)[keyof typeof PodcastsListResourceTypeGroupEnum] +/** + * @export + */ export const PodcastsListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -26987,9 +26772,9 @@ export const ProgramsApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -27009,9 +26794,9 @@ export const ProgramsApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: ProgramsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -27084,10 +26869,6 @@ export const ProgramsApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -27096,6 +26877,10 @@ export const ProgramsApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -27190,9 +26975,9 @@ export const ProgramsApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -27212,9 +26997,9 @@ export const ProgramsApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: ProgramsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -27238,9 +27023,9 @@ export const ProgramsApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -27325,9 +27110,9 @@ export const ProgramsApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -27449,13 +27234,6 @@ export interface ProgramsApiProgramsListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof ProgramsApiProgramsList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -27464,12 +27242,19 @@ export interface ProgramsApiProgramsListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof ProgramsApiProgramsList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof ProgramsApiProgramsList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -27533,9 +27318,9 @@ export class ProgramsApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -27685,20 +27470,10 @@ export type ProgramsListPlatformEnum = /** * @export */ -export const ProgramsListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type ProgramsListResourceCategoryEnum = - (typeof ProgramsListResourceCategoryEnum)[keyof typeof ProgramsListResourceCategoryEnum] -/** - * @export - */ export const ProgramsListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -27711,6 +27486,16 @@ export type ProgramsListResourceTypeEnum = /** * @export */ +export const ProgramsListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type ProgramsListResourceTypeGroupEnum = + (typeof ProgramsListResourceTypeGroupEnum)[keyof typeof ProgramsListResourceTypeGroupEnum] +/** + * @export + */ export const ProgramsListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -30116,9 +29901,9 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -30138,9 +29923,9 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: VideoPlaylistsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -30213,10 +29998,6 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -30225,6 +30006,10 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -30399,9 +30184,9 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -30421,9 +30206,9 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: VideoPlaylistsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -30448,9 +30233,9 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -30576,9 +30361,9 @@ export const VideoPlaylistsApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -30756,13 +30541,6 @@ export interface VideoPlaylistsApiVideoPlaylistsListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -30771,12 +30549,19 @@ export interface VideoPlaylistsApiVideoPlaylistsListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof VideoPlaylistsApiVideoPlaylistsList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -30884,9 +30669,9 @@ export class VideoPlaylistsApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -31036,20 +30821,10 @@ export type VideoPlaylistsListPlatformEnum = /** * @export */ -export const VideoPlaylistsListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type VideoPlaylistsListResourceCategoryEnum = - (typeof VideoPlaylistsListResourceCategoryEnum)[keyof typeof VideoPlaylistsListResourceCategoryEnum] -/** - * @export - */ export const VideoPlaylistsListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -31062,6 +30837,16 @@ export type VideoPlaylistsListResourceTypeEnum = /** * @export */ +export const VideoPlaylistsListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type VideoPlaylistsListResourceTypeGroupEnum = + (typeof VideoPlaylistsListResourceTypeGroupEnum)[keyof typeof VideoPlaylistsListResourceTypeGroupEnum] +/** + * @export + */ export const VideoPlaylistsListSortbyEnum = { Id: "-id", LastModified: "-last_modified", @@ -31105,9 +30890,9 @@ export const VideosApiAxiosParamCreator = function ( * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -31127,9 +30912,9 @@ export const VideosApiAxiosParamCreator = function ( platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: VideosListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}, @@ -31202,10 +30987,6 @@ export const VideosApiAxiosParamCreator = function ( localVarQueryParameter["readable_id"] = readable_id } - if (resource_category) { - localVarQueryParameter["resource_category"] = resource_category - } - if (resource_id) { localVarQueryParameter["resource_id"] = resource_id } @@ -31214,6 +30995,10 @@ export const VideosApiAxiosParamCreator = function ( localVarQueryParameter["resource_type"] = resource_type } + if (resource_type_group) { + localVarQueryParameter["resource_type_group"] = resource_type_group + } + if (sortby !== undefined) { localVarQueryParameter["sortby"] = sortby } @@ -31308,9 +31093,9 @@ export const VideosApiFp = function (configuration?: Configuration) { * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube * `canvas` - Canvas * `climate` - MIT Climate * @param {boolean} [professional] * @param {Array} [readable_id] A unique text identifier for the resources - * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {Array} [resource_id] Comma-separated list of learning resource IDs - * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @param {Array} [resource_type_group] The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material * @param {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] Topics covered by the resources. Load the \'/api/v1/topics\' endpoint for a list of topics * @param {*} [options] Override http request option. @@ -31330,9 +31115,9 @@ export const VideosApiFp = function (configuration?: Configuration) { platform?: Array, professional?: boolean, readable_id?: Array, - resource_category?: Array, resource_id?: Array, resource_type?: Array, + resource_type_group?: Array, sortby?: VideosListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig, @@ -31356,9 +31141,9 @@ export const VideosApiFp = function (configuration?: Configuration) { platform, professional, readable_id, - resource_category, resource_id, resource_type, + resource_type_group, sortby, topic, options, @@ -31442,9 +31227,9 @@ export const VideosApiFactory = function ( requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -31566,13 +31351,6 @@ export interface VideosApiVideosListRequest { */ readonly readable_id?: Array - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof VideosApiVideosList - */ - readonly resource_category?: Array - /** * Comma-separated list of learning resource IDs * @type {Array} @@ -31581,12 +31359,19 @@ export interface VideosApiVideosListRequest { readonly resource_id?: Array /** - * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `learning_material` - Learning Material - * @type {Array<'article' | 'course' | 'learning_material' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist * `article` - Article * `document` - Document + * @type {Array<'article' | 'course' | 'document' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} * @memberof VideosApiVideosList */ readonly resource_type?: Array + /** + * The resource type group of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof VideosApiVideosList + */ + readonly resource_type_group?: Array + /** * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} @@ -31650,9 +31435,9 @@ export class VideosApi extends BaseAPI { requestParameters.platform, requestParameters.professional, requestParameters.readable_id, - requestParameters.resource_category, requestParameters.resource_id, requestParameters.resource_type, + requestParameters.resource_type_group, requestParameters.sortby, requestParameters.topic, options, @@ -31802,20 +31587,10 @@ export type VideosListPlatformEnum = /** * @export */ -export const VideosListResourceCategoryEnum = { - Course: "course", - LearningMaterial: "learning_material", - Program: "program", -} as const -export type VideosListResourceCategoryEnum = - (typeof VideosListResourceCategoryEnum)[keyof typeof VideosListResourceCategoryEnum] -/** - * @export - */ export const VideosListResourceTypeEnum = { Article: "article", Course: "course", - LearningMaterial: "learning_material", + Document: "document", LearningPath: "learning_path", Podcast: "podcast", PodcastEpisode: "podcast_episode", @@ -31828,6 +31603,16 @@ export type VideosListResourceTypeEnum = /** * @export */ +export const VideosListResourceTypeGroupEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type VideosListResourceTypeGroupEnum = + (typeof VideosListResourceTypeGroupEnum)[keyof typeof VideosListResourceTypeGroupEnum] +/** + * @export + */ export const VideosListSortbyEnum = { Id: "-id", LastModified: "-last_modified", diff --git a/frontends/api/src/test-utils/factories/learningResources.ts b/frontends/api/src/test-utils/factories/learningResources.ts index 6d2aa5b5d0..2e66d7fb6b 100644 --- a/frontends/api/src/test-utils/factories/learningResources.ts +++ b/frontends/api/src/test-utils/factories/learningResources.ts @@ -30,7 +30,7 @@ import type { VideoResource, LearningResourceRelationship, LearningResourceSummary, - LearningMaterialResource, + DocumentResource, } from "api" import { AvailabilityEnum, @@ -323,8 +323,8 @@ const learningResource: PartialFactory = (overrides = {}) => { return video(overrides) case ResourceTypeEnum.Article: return article(overrides) - case ResourceTypeEnum.LearningMaterial: - return learningMaterial(overrides) + case ResourceTypeEnum.Document: + return document(overrides) default: throw Error(`Invalid resource type: ${overrides.resource_type}`) @@ -551,12 +551,12 @@ const article: LearningResourceFactory = (overrides = {}) => { const articles = makePaginatedFactory(article) -const learningMaterial: LearningResourceFactory = ( +const document: LearningResourceFactory = ( overrides = {}, ) => { - return mergeOverrides( + return mergeOverrides( _learningResourceShared(), - { resource_type: ResourceTypeEnum.LearningMaterial }, + { resource_type: ResourceTypeEnum.Document }, {}, overrides, ) diff --git a/frontends/main/package.json b/frontends/main/package.json index 7a4aa92817..096ef64599 100644 --- a/frontends/main/package.json +++ b/frontends/main/package.json @@ -13,7 +13,7 @@ "@emotion/cache": "^11.13.1", "@emotion/styled": "^11.11.0", "@floating-ui/react": "^0.27.16", - "@mitodl/course-search-utils": "^3.5.0", + "@mitodl/course-search-utils": "^3.5.1", "@mitodl/mitxonline-api-axios": "^2026.2.19", "@mitodl/smoot-design": "^6.24.0", "@mui/material": "^6.4.5", diff --git a/frontends/main/src/app-pages/ChannelPage/ChannelSearch.tsx b/frontends/main/src/app-pages/ChannelPage/ChannelSearch.tsx index 04a3929932..191cf89310 100644 --- a/frontends/main/src/app-pages/ChannelPage/ChannelSearch.tsx +++ b/frontends/main/src/app-pages/ChannelPage/ChannelSearch.tsx @@ -52,12 +52,12 @@ const ChannelSearch: React.FC = ({ }, [offerorsQuery.data?.results]) const [searchParams, setSearchParams] = useSearchParams() - const resourceCategory = searchParams.get("resource_category") + const resourceTypeGroup = searchParams.get("resource_type_group") const { facetNames, facetManifest } = useMemo( () => - getFacets(channelType, offerors, constantSearchParams, resourceCategory), - [offerors, channelType, constantSearchParams, resourceCategory], + getFacets(channelType, offerors, constantSearchParams, resourceTypeGroup), + [offerors, channelType, constantSearchParams, resourceTypeGroup], ) const setPage = useCallback( diff --git a/frontends/main/src/app-pages/ChannelPage/searchRequests.ts b/frontends/main/src/app-pages/ChannelPage/searchRequests.ts index 7c934234c4..7deb66d0d4 100644 --- a/frontends/main/src/app-pages/ChannelPage/searchRequests.ts +++ b/frontends/main/src/app-pages/ChannelPage/searchRequests.ts @@ -59,10 +59,10 @@ const getFacetManifestForChannelType = ( channelType: ChannelTypeEnum, offerors: Record, constantSearchParams: Facets, - resourceCategory: string | null, + resourceTypeGroup: string | null, ): FacetManifest => { const facets = FACETS_BY_CHANNEL_TYPE[channelType] || [] - return getFacetManifest(offerors, resourceCategory) + return getFacetManifest(offerors, resourceTypeGroup) .filter( (facetSetting) => !Object.keys(constantSearchParams).includes(facetSetting.name) && @@ -77,13 +77,13 @@ export const getFacets = ( channelType: ChannelTypeEnum, offerors: Record, constantSearchParams: Facets, - resourceCategory: string | null, + resourceTypeGroup: string | null, ) => { const facetManifest = getFacetManifestForChannelType( channelType, offerors, constantSearchParams, - resourceCategory, + resourceTypeGroup, ) const facetNames = Array.from( diff --git a/frontends/main/src/app-pages/SearchPage/SearchPage.test.tsx b/frontends/main/src/app-pages/SearchPage/SearchPage.test.tsx index 16099f0853..649d27c97c 100644 --- a/frontends/main/src/app-pages/SearchPage/SearchPage.test.tsx +++ b/frontends/main/src/app-pages/SearchPage/SearchPage.test.tsx @@ -128,8 +128,8 @@ describe("SearchPage", () => { "free", "offered_by", "professional", - "resource_category", "resource_type", + "resource_type_group", "topic", ]) expect(Object.fromEntries(apiSearchParams.entries())).toEqual( @@ -186,7 +186,7 @@ describe("SearchPage", () => { count: 700, metadata: { aggregations: { - resource_category: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "learning_material", doc_count: 200 }, ], @@ -237,7 +237,7 @@ describe("SearchPage", () => { count: 700, metadata: { aggregations: { - resource_category: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "learning_material", doc_count: 200 }, ], @@ -273,7 +273,7 @@ describe("SearchPage", () => { count: 700, metadata: { aggregations: { - resource_category: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "learning_material", doc_count: 200 }, ], @@ -312,7 +312,7 @@ describe("SearchPage", () => { count: 700, metadata: { aggregations: { - resource_category: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "learning_material", doc_count: 200 }, ], @@ -360,7 +360,7 @@ test("admin users can set the search mode and slop", async () => { count: 700, metadata: { aggregations: { - resource_category: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "learning_material", doc_count: 200 }, ], @@ -430,10 +430,10 @@ describe("Search Page Tabs", () => { test.each([ { url: "", expectedActive: /All/ }, { url: "?all", expectedActive: /All/ }, - { url: "?resource_category=course", expectedActive: /Courses/ }, - { url: "?resource_category=program", expectedActive: /Programs/ }, + { url: "?resource_type_group=course", expectedActive: /Courses/ }, + { url: "?resource_type_group=program", expectedActive: /Programs/ }, { - url: "?resource_category=learning_material", + url: "?resource_type_group=learning_material", expectedActive: /Learning Materials/, }, ])("Active tab determined by URL $url", async ({ url, expectedActive }) => { @@ -442,7 +442,7 @@ describe("Search Page Tabs", () => { count: 1000, metadata: { aggregations: { - resource_type: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "podcast", doc_count: 200 }, { key: "program", doc_count: 300 }, @@ -486,14 +486,14 @@ describe("Search Page Tabs", () => { await user.click(tabCourses) expect(tabCourses).toHaveAttribute("aria-selected") const params1 = new URLSearchParams(location.current.search) - expect(params1.get("resource_category")).toBe("course") + expect(params1.get("resource_type_group")).toBe("course") expect(params1.get("department")).toBe("8") // should preserve other params // Click "All" await user.click(tabAll) expect(tabAll).toHaveAttribute("aria-selected") const params2 = new URLSearchParams(location.current.search) - expect(params2.get("resource_category")).toBe(null) + expect(params2.get("resource_type_group")).toBe(null) expect(params2.get("department")).toBe("8") // should preserve other params }) @@ -503,14 +503,14 @@ describe("Search Page Tabs", () => { count: 1000, metadata: { aggregations: { - resource_type: [{ key: "video", doc_count: 100 }], + resource_type_group: [{ key: "video", doc_count: 100 }], }, suggestions: [], }, }, }) const { location } = renderWithProviders(, { - url: "?resource_category=learning_material&resource_type=video&topic=Biology", + url: "?resource_type_group=learning_material&resource_type=video&topic=Biology", }) const tabLM = screen.getByRole("tab", { name: /Learning Materials/ }) const tabCourses = screen.getByRole("tab", { name: /Courses/ }) @@ -519,7 +519,7 @@ describe("Search Page Tabs", () => { // Click "Courses" await user.click(tabCourses) expect(location.current.search).toBe( - "?resource_category=course&topic=Biology", + "?resource_type_group=course&topic=Biology", ) }) @@ -529,7 +529,7 @@ describe("Search Page Tabs", () => { count: 700, metadata: { aggregations: { - resource_category: [ + resource_type_group: [ { key: "course", doc_count: 100 }, { key: "program", doc_count: 200 }, { key: "learning_material", doc_count: 300 }, @@ -573,11 +573,11 @@ describe("Search Page Tabs", () => { }) const { location } = renderWithProviders(, { - url: "?page=3&resource_category=course", + url: "?page=3&resource_type_group=course", }) const tabPrograms = screen.getByRole("tab", { name: /Programs/ }) await user.click(tabPrograms) - expect(location.current.search).toBe("?resource_category=program") + expect(location.current.search).toBe("?resource_type_group=program") }) }) diff --git a/frontends/main/src/app-pages/SearchPage/SearchPage.tsx b/frontends/main/src/app-pages/SearchPage/SearchPage.tsx index f61391d86a..962fec4817 100644 --- a/frontends/main/src/app-pages/SearchPage/SearchPage.tsx +++ b/frontends/main/src/app-pages/SearchPage/SearchPage.tsx @@ -64,21 +64,23 @@ const StyledSearchField = styled(SearchField)(({ theme }) => ({ const constantSearchParams = {} -const useFacetManifest = (resourceCategory: string | null) => { +const useFacetManifest = (resourceTypeGroup: string | null) => { const offerorsQuery = useOfferorsList() const offerors = useMemo(() => { return keyBy(offerorsQuery.data?.results ?? [], (o) => o.code) }, [offerorsQuery.data?.results]) const facetManifest = useMemo( - () => getFacetManifest(offerors, resourceCategory), - [offerors, resourceCategory], + () => getFacetManifest(offerors, resourceTypeGroup), + [offerors, resourceTypeGroup], ) return facetManifest } const SearchPage: React.FC = () => { const [searchParams, setSearchParams] = useSearchParams() - const facetManifest = useFacetManifest(searchParams.get("resource_category")) + const facetManifest = useFacetManifest( + searchParams.get("resource_type_group"), + ) const setPage = useCallback( (newPage: number) => { diff --git a/frontends/main/src/common/urls.ts b/frontends/main/src/common/urls.ts index f157fdb2eb..d55eaa2664 100644 --- a/frontends/main/src/common/urls.ts +++ b/frontends/main/src/common/urls.ts @@ -143,14 +143,16 @@ export const SEARCH_CERTIFICATE = querifiedSearchUrl( CERTIFICATION_SEARCH_PARAMS, ) -export const SEARCH_COURSE = querifiedSearchUrl({ resource_category: "course" }) +export const SEARCH_COURSE = querifiedSearchUrl({ + resource_type_group: "course", +}) export const SEARCH_PROGRAM = querifiedSearchUrl({ - resource_category: "program", + resource_type_group: "program", }) export const SEARCH_LEARNING_MATERIAL = querifiedSearchUrl({ - resource_category: "learning_material", + resource_type_group: "learning_material", }) export const LOGIN = `${MITOL_API_BASE_URL}/login` diff --git a/frontends/main/src/page-components/LearningResourceExpanded/CallToActionSection.tsx b/frontends/main/src/page-components/LearningResourceExpanded/CallToActionSection.tsx index dffcf4b9ce..8436d94025 100644 --- a/frontends/main/src/page-components/LearningResourceExpanded/CallToActionSection.tsx +++ b/frontends/main/src/page-components/LearningResourceExpanded/CallToActionSection.tsx @@ -259,7 +259,7 @@ const getCallToActionText = (resource: LearningResource): string => { [ResourceTypeEnum.VideoPlaylist]: watchOnYouTube, [ResourceTypeEnum.Podcast]: listenToPodcast, [ResourceTypeEnum.PodcastEpisode]: listenToPodcast, - [ResourceTypeEnum.LearningMaterial]: learnMore, + [ResourceTypeEnum.Document]: learnMore, } if ( resource?.resource_type === ResourceTypeEnum.Video || diff --git a/frontends/main/src/page-components/SearchDisplay/ResourceCategoryTabs.tsx b/frontends/main/src/page-components/SearchDisplay/ResourceTypeGroupTabs.tsx similarity index 66% rename from frontends/main/src/page-components/SearchDisplay/ResourceCategoryTabs.tsx rename to frontends/main/src/page-components/SearchDisplay/ResourceTypeGroupTabs.tsx index 6626c1d7cc..ecb19c1555 100644 --- a/frontends/main/src/page-components/SearchDisplay/ResourceCategoryTabs.tsx +++ b/frontends/main/src/page-components/SearchDisplay/ResourceTypeGroupTabs.tsx @@ -1,7 +1,7 @@ import React from "react" import { TabContext, TabPanel, styled } from "ol-components" import { TabButton, TabButtonList } from "@mitodl/smoot-design" -import { ResourceCategoryEnum, LearningResourcesSearchResponse } from "api" +import { ResourceTypeGroupEnum, LearningResourcesSearchResponse } from "api" const TabsList = styled(TabButtonList)(({ theme }) => ({ ".MuiTabScrollButton-root.Mui-disabled": { @@ -22,20 +22,20 @@ type TabConfig = { label: string name: string defaultTab?: boolean - resource_category: ResourceCategoryEnum | null + resource_type_group: ResourceTypeGroupEnum | null minWidth: number } type Aggregations = LearningResourcesSearchResponse["metadata"]["aggregations"] -const resourceCategoryCounts = (aggregations?: Aggregations) => { +const resourceTypeGroupCounts = (aggregations?: Aggregations) => { if (!aggregations) return null - const buckets = aggregations?.resource_category ?? [] + const buckets = aggregations?.resource_type_group ?? [] const counts = buckets.reduce( (acc, bucket) => { - acc[bucket.key as ResourceCategoryEnum] = bucket.doc_count + acc[bucket.key as ResourceTypeGroupEnum] = bucket.doc_count return acc }, - {} as Record, + {} as Record, ) return counts } @@ -53,30 +53,30 @@ const appendCount = (label: string, count?: number | null) => { /** * */ -const ResourceCategoryTabContext: React.FC<{ +const ResourceTypeGroupTabContext: React.FC<{ activeTabName: string children: React.ReactNode }> = ({ activeTabName, children }) => { return {children} } -type ResourceCategoryTabsProps = { +type ResourceTypeGroupTabsProps = { aggregations?: Aggregations tabs: TabConfig[] setSearchParams: (fn: (prev: URLSearchParams) => URLSearchParams) => void onTabChange?: () => void className?: string } -const ResourceCategoryTabList: React.FC = ({ +const ResourceTypeGroupTabList: React.FC = ({ tabs, aggregations, setSearchParams, onTabChange, className, }) => { - const counts = resourceCategoryCounts(aggregations) - const allCount = aggregations?.resource_category - ? (aggregations.resource_category || []).reduce((count, bucket) => { + const counts = resourceTypeGroupCounts(aggregations) + const allCount = aggregations?.resource_type_group + ? (aggregations.resource_type_group || []).reduce((count, bucket) => { count = count + bucket.doc_count return count }, 0) @@ -89,13 +89,13 @@ const ResourceCategoryTabList: React.FC = ({ const tab = tabs.find((t) => t.name === value) setSearchParams((prev) => { const next = new URLSearchParams(prev) - if (prev.get("resource_category") === "learning_material") { + if (prev.get("resource_type_group") === "learning_material") { next.delete("resource_type") } - if (tab?.resource_category) { - next.set("resource_category", tab.resource_category) + if (tab?.resource_type_group) { + next.set("resource_type_group", tab.resource_type_group) } else { - next.delete("resource_category") + next.delete("resource_type_group") } return next }) @@ -108,8 +108,8 @@ const ResourceCategoryTabList: React.FC = ({ count = allCount } else { count = - counts && t.resource_category - ? (counts[t.resource_category] ?? 0) + counts && t.resource_type_group + ? (counts[t.resource_type_group] ?? 0) : undefined } return ( @@ -125,7 +125,7 @@ const ResourceCategoryTabList: React.FC = ({ ) } -const ResourceCategoryTabPanels: React.FC<{ +const ResourceTypeGroupTabPanels: React.FC<{ tabs: TabConfig[] children?: React.ReactNode }> = ({ tabs, children }) => { @@ -141,26 +141,26 @@ const ResourceCategoryTabPanels: React.FC<{ } /** - * Components for a tabbed search UI with tabs controlling resource_category facet. + * Components for a tabbed search UI with tabs controlling resource_type_group facet. * * Intended usage is: * ```jsx - * - * - * + * + * + * * Panel Content - * - * + * + * * ``` * * These are exported as three separate components (Context, TabList, TabPanels) * to facilitate placement within a grid layout. */ -const ResourceCategoryTabs = { - Context: ResourceCategoryTabContext, - TabList: ResourceCategoryTabList, - TabPanels: ResourceCategoryTabPanels, +const ResourceTypeGroupTabs = { + Context: ResourceTypeGroupTabContext, + TabList: ResourceTypeGroupTabList, + TabPanels: ResourceTypeGroupTabPanels, } -export { ResourceCategoryTabs } +export { ResourceTypeGroupTabs } export type { TabConfig } diff --git a/frontends/main/src/page-components/SearchDisplay/SearchDisplay.tsx b/frontends/main/src/page-components/SearchDisplay/SearchDisplay.tsx index e8c6927dab..3e1d21d7b7 100644 --- a/frontends/main/src/page-components/SearchDisplay/SearchDisplay.tsx +++ b/frontends/main/src/page-components/SearchDisplay/SearchDisplay.tsx @@ -34,7 +34,7 @@ import { } from "api/hooks/learningResources" import { LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest as LRSearchRequest, - ResourceCategoryEnum, + ResourceTypeGroupEnum, SearchModeEnumDescriptions, } from "api" import { keepPreviousData, useQuery } from "@tanstack/react-query" @@ -50,18 +50,18 @@ import type { FacetManifest, } from "@mitodl/course-search-utils" import { useSearchParams } from "@mitodl/course-search-utils/next" -import { ResourceCategoryTabs } from "./ResourceCategoryTabs" +import { ResourceTypeGroupTabs } from "./ResourceTypeGroupTabs" import ProfessionalToggle from "./ProfessionalToggle" import SliderInput from "./SliderInput" -import type { TabConfig } from "./ResourceCategoryTabs" +import type { TabConfig } from "./ResourceTypeGroupTabs" import { ResourceCard } from "../ResourceCard/ResourceCard" import { useUserMe } from "api/hooks/user" import { usePostHog } from "posthog-js/react" import getSearchParams from "./getSearchParams" -const StyledResourceTabs = styled(ResourceCategoryTabs.TabList)` +const StyledResourceTabs = styled(ResourceTypeGroupTabs.TabList)` margin-top: 0; ` @@ -460,25 +460,25 @@ const TABS: TabConfig[] = [ name: "all", label: "All", defaultTab: true, - resource_category: null, + resource_type_group: null, minWidth: 85, }, { name: "courses", label: "Courses", - resource_category: ResourceCategoryEnum.Course, + resource_type_group: ResourceTypeGroupEnum.Course, minWidth: 112, }, { name: "programs", label: "Programs", - resource_category: ResourceCategoryEnum.Program, + resource_type_group: ResourceTypeGroupEnum.Program, minWidth: 118, }, { name: "learning-materials", label: "Learning Materials", - resource_category: ResourceCategoryEnum.LearningMaterial, + resource_type_group: ResourceTypeGroupEnum.LearningMaterial, minWidth: 172, }, ] @@ -548,7 +548,7 @@ const SearchDisplay: React.FC = ({ const scrollHook = useRef(null) const activeTab = TABS.find( - (t) => t.resource_category === searchParams.get("resource_category"), + (t) => t.resource_type_group === searchParams.get("resource_type_group"), ) ?? TABS.find((t) => t.defaultTab) ?? TABS[0] @@ -558,7 +558,7 @@ const SearchDisplay: React.FC = ({ searchParams, requestParams, constantSearchParams, - resourceCategory: activeTab?.resource_category || undefined, + resourceTypeGroup: activeTab?.resource_type_group || undefined, facetNames, page, pageSize: PAGE_SIZE, @@ -567,7 +567,7 @@ const SearchDisplay: React.FC = ({ searchParams, requestParams, constantSearchParams, - activeTab?.resource_category, + activeTab?.resource_type_group, facetNames, page, ]) @@ -853,7 +853,7 @@ const SearchDisplay: React.FC = ({ return ( - + = ({ /> {sortDropdown} - + = ({ )} /> - + = ({ {filterContents} - + ) diff --git a/frontends/main/src/page-components/SearchDisplay/getFacetManifest.ts b/frontends/main/src/page-components/SearchDisplay/getFacetManifest.ts index 9da93ffda8..7275b7e8bc 100644 --- a/frontends/main/src/page-components/SearchDisplay/getFacetManifest.ts +++ b/frontends/main/src/page-components/SearchDisplay/getFacetManifest.ts @@ -9,7 +9,7 @@ const LEARNING_MATERIAL = "learning_material" export const getFacetManifest = ( offerors: Record, - resourceCategory: string | null, + resourceTypeGroup: string | null, ) => { const manifest = [ { @@ -80,8 +80,8 @@ export const getFacetManifest = ( }, ] - //Only display the resource_type facet if the resource_category is learning_material - if (resourceCategory !== LEARNING_MATERIAL) { + //Only display the resource_type facet if the resource_type_group is learning_material + if (resourceTypeGroup !== LEARNING_MATERIAL) { manifest.splice(1, 1) } diff --git a/frontends/main/src/page-components/SearchDisplay/getSearchParams.ts b/frontends/main/src/page-components/SearchDisplay/getSearchParams.ts index b3ab1ce758..5fb40bb951 100644 --- a/frontends/main/src/page-components/SearchDisplay/getSearchParams.ts +++ b/frontends/main/src/page-components/SearchDisplay/getSearchParams.ts @@ -1,6 +1,6 @@ import { LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest as ResourceSearchRequest, - ResourceCategoryEnum, + ResourceTypeGroupEnum, } from "api" import { UseResourceSearchParamsProps } from "@mitodl/course-search-utils" import type { @@ -15,7 +15,7 @@ type SearchParams = { searchParams?: URLSearchParams requestParams: UseResourceSearchParamsResult["params"] constantSearchParams?: Facets & BooleanFacets - resourceCategory?: ResourceCategoryEnum + resourceTypeGroup?: ResourceTypeGroupEnum facetNames: UseResourceSearchParamsProps["facets"] page: number pageSize?: number @@ -25,7 +25,7 @@ const getSearchParams = ({ searchParams = new URLSearchParams({}), requestParams, constantSearchParams = {}, - resourceCategory, + resourceTypeGroup, facetNames, page, pageSize = PAGE_SIZE, @@ -38,8 +38,8 @@ const getSearchParams = ({ min_score: searchParams.get("min_score"), max_incompleteness_penalty: searchParams.get("max_incompleteness_penalty"), content_file_score_weight: searchParams.get("content_file_score_weight"), - resource_category: resourceCategory ? [resourceCategory] : null, - aggregations: [...(facetNames || []), "resource_category"], + resource_type_group: resourceTypeGroup ? [resourceTypeGroup] : null, + aggregations: [...(facetNames || []), "resource_type_group"], ...requestParams, offset: (Number(page) - 1) * pageSize, limit: pageSize, diff --git a/frontends/ol-utilities/src/learning-resources/learning-resources.ts b/frontends/ol-utilities/src/learning-resources/learning-resources.ts index 246f34b7bd..cf5c001ca1 100644 --- a/frontends/ol-utilities/src/learning-resources/learning-resources.ts +++ b/frontends/ol-utilities/src/learning-resources/learning-resources.ts @@ -12,7 +12,7 @@ const readableResourceTypes: Record = { [ResourceTypeEnum.PodcastEpisode]: "Podcast Episode", [ResourceTypeEnum.Video]: "Video", [ResourceTypeEnum.VideoPlaylist]: "Video Playlist", - [ResourceTypeEnum.LearningMaterial]: "Learning Material", + [ResourceTypeEnum.Document]: "Document", } const getReadableResourceType = (resourceType: ResourceTypeEnum): string => readableResourceTypes[resourceType] diff --git a/learning_resources/constants.py b/learning_resources/constants.py index 25d62b01c7..8689fe422b 100644 --- a/learning_resources/constants.py +++ b/learning_resources/constants.py @@ -37,14 +37,14 @@ class LearningResourceType(ExtendedEnum): video = "Video" video_playlist = "Video Playlist" article = "Article" - learning_material = "Learning Material" + document = "Document" -LEARNING_MATERIAL_RESOURCE_CATEGORY = "learning_material" -RESOURCE_CATEGORY_VALUES = [ +LEARNING_MATERIAL_RESOURCE_TYPE_GROUP = "learning_material" +RESOURCE_TYPE_GROUP_VALUES = [ LearningResourceType.course.name, LearningResourceType.program.name, - LEARNING_MATERIAL_RESOURCE_CATEGORY, + LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, ] @@ -119,49 +119,44 @@ class LearningResourceRelationTypes(TextChoices): GROUP_STAFF_LISTS_EDITORS = "learning_path_editors" -OCW_CONTENT_CATEGORY_LECTURE_NOTES = "Lecture Notes" -OCW_CONTENT_CATEGORY_READINGS = "Readings" -OCW_CONTENT_CATEGORY_PRACTICE = "Practice" +OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT = "Practice & Assignment" OCW_CONTENT_CATEGORY_OPEN_TEXTBOOKS = "Open Textbooks" -OCW_CONTENT_CATEGORY_LECTURE_AUDIO = "Lecture Audio" -OCW_CONTENT_CATEGORY_VIDEOS = "Video" +OCW_CONTENT_CATEGORY_LECTURE_VIDEOS = "Lecture Videos" +OCW_CONTENT_CATEGORY_TEACHING_RESOURCES = "Teaching Resources" VALID_COURSE_CONTENT_CATEGORY_CHOICES = ( - (OCW_CONTENT_CATEGORY_LECTURE_NOTES, OCW_CONTENT_CATEGORY_LECTURE_NOTES), - (OCW_CONTENT_CATEGORY_READINGS, OCW_CONTENT_CATEGORY_READINGS), - (OCW_CONTENT_CATEGORY_PRACTICE, OCW_CONTENT_CATEGORY_PRACTICE), + ( + OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + ), (OCW_CONTENT_CATEGORY_OPEN_TEXTBOOKS, OCW_CONTENT_CATEGORY_OPEN_TEXTBOOKS), - (OCW_CONTENT_CATEGORY_LECTURE_AUDIO, OCW_CONTENT_CATEGORY_LECTURE_AUDIO), - (OCW_CONTENT_CATEGORY_VIDEOS, OCW_CONTENT_CATEGORY_VIDEOS), + (OCW_CONTENT_CATEGORY_LECTURE_VIDEOS, OCW_CONTENT_CATEGORY_LECTURE_VIDEOS), + (OCW_CONTENT_CATEGORY_TEACHING_RESOURCES, OCW_CONTENT_CATEGORY_TEACHING_RESOURCES), ) +VIDEO_CONTENT_CATEGORIES = [ + OCW_CONTENT_CATEGORY_LECTURE_VIDEOS, + OCW_CONTENT_CATEGORY_TEACHING_RESOURCES, +] + OCW_COURSE_CONTENT_CATEGORY_MAPPING = { - OCW_CONTENT_CATEGORY_LECTURE_NOTES: OCW_CONTENT_CATEGORY_LECTURE_NOTES, - OCW_CONTENT_CATEGORY_READINGS: OCW_CONTENT_CATEGORY_READINGS, - OCW_CONTENT_CATEGORY_PRACTICE: OCW_CONTENT_CATEGORY_PRACTICE, - "Exams": OCW_CONTENT_CATEGORY_PRACTICE, - "Exams Solutions": OCW_CONTENT_CATEGORY_PRACTICE, - "Supplemental Exam Materials": OCW_CONTENT_CATEGORY_PRACTICE, - "Problem Sets": OCW_CONTENT_CATEGORY_PRACTICE, - "Problem Set Solutions": OCW_CONTENT_CATEGORY_PRACTICE, - "Recitations": OCW_CONTENT_CATEGORY_PRACTICE, - "Tutorials": OCW_CONTENT_CATEGORY_PRACTICE, - "Projects": OCW_CONTENT_CATEGORY_PRACTICE, - "Assignments": OCW_CONTENT_CATEGORY_PRACTICE, - "Laboratory Assignments": OCW_CONTENT_CATEGORY_PRACTICE, - "Programming Assignments": OCW_CONTENT_CATEGORY_PRACTICE, - "Activity Assignments": OCW_CONTENT_CATEGORY_PRACTICE, - "Written Assignments": OCW_CONTENT_CATEGORY_PRACTICE, + "Exams": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Exams Solutions": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Supplemental Exam Materials": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Problem Sets": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Problem Set Solutions": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Recitations": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Tutorials": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Projects": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Assignments": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Laboratory Assignments": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Programming Assignments": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Activity Assignments": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, + "Written Assignments": OCW_CONTENT_CATEGORY_PRACTICE_AND_ASSIGNMENT, OCW_CONTENT_CATEGORY_OPEN_TEXTBOOKS: OCW_CONTENT_CATEGORY_OPEN_TEXTBOOKS, - OCW_CONTENT_CATEGORY_LECTURE_AUDIO: OCW_CONTENT_CATEGORY_LECTURE_AUDIO, - OCW_CONTENT_CATEGORY_VIDEOS: OCW_CONTENT_CATEGORY_VIDEOS, - "Lecture Videos": OCW_CONTENT_CATEGORY_VIDEOS, - "Problem-solving Videos": OCW_CONTENT_CATEGORY_VIDEOS, - "Other Video": OCW_CONTENT_CATEGORY_VIDEOS, - "Tutorial Videos": OCW_CONTENT_CATEGORY_VIDEOS, - "Instructor Insights": OCW_CONTENT_CATEGORY_VIDEOS, - "Demonstration Videos": OCW_CONTENT_CATEGORY_VIDEOS, - "Recitation Videos": OCW_CONTENT_CATEGORY_VIDEOS, + "Lecture Videos": OCW_CONTENT_CATEGORY_LECTURE_VIDEOS, + "Problem-solving Videos": OCW_CONTENT_CATEGORY_LECTURE_VIDEOS, + "Instructor Insights": OCW_CONTENT_CATEGORY_TEACHING_RESOURCES, } diff --git a/learning_resources/etl/canvas.py b/learning_resources/etl/canvas.py index 6b603f23dc..24337d749c 100644 --- a/learning_resources/etl/canvas.py +++ b/learning_resources/etl/canvas.py @@ -114,6 +114,7 @@ def run_for_canvas_archive(course_archive_path, course_folder, overwrite): code=PlatformType.canvas.name ), "resource_type": LearningResourceType.course.name, + "resource_category": LearningResourceType.course.value, }, ) if resource.runs.count() == 0: diff --git a/learning_resources/etl/loaders.py b/learning_resources/etl/loaders.py index 27bd3d1343..97cd532018 100644 --- a/learning_resources/etl/loaders.py +++ b/learning_resources/etl/loaders.py @@ -9,6 +9,7 @@ from learning_resources.constants import ( OCW_COURSE_CONTENT_CATEGORY_MAPPING, + VIDEO_CONTENT_CATEGORIES, LearningResourceDelivery, LearningResourceRelationTypes, LearningResourceType, @@ -30,7 +31,6 @@ Article, ContentFile, Course, - LearningMaterial, LearningResource, LearningResourceContentTag, LearningResourceDepartment, @@ -283,6 +283,8 @@ def load_offered_by( def load_content_tags( learning_resources_obj: LearningResource or ContentFile, content_tags_data: list[str], + *, + is_content_file: bool, ) -> list[LearningResourceContentTag]: """Load the content tags for a resource into the database""" if content_tags_data is not None: @@ -290,9 +292,16 @@ def load_content_tags( for content_tag in content_tags_data: tag, _ = LearningResourceContentTag.objects.get_or_create(name=content_tag) tags.append(tag) - learning_resources_obj.content_tags.set(tags) + if is_content_file: + learning_resources_obj.content_tags.set(tags) + else: + learning_resources_obj.resource_tags.set(tags) learning_resources_obj.save() - return learning_resources_obj.content_tags.all() + return ( + learning_resources_obj.content_tags.all() + if is_content_file + else learning_resources_obj.resource_tags.all() + ) def load_run( @@ -381,7 +390,7 @@ def enqueue_content_tasks(): return learning_resource_run -def upsert_course_or_program( # noqa: C901 +def upsert_course_or_program( # noqa: C901, PLR0912 resource_data: dict, blocklist: list[str], duplicates: list[dict], @@ -418,6 +427,11 @@ def upsert_course_or_program( # noqa: C901 if readable_id in blocklist or not runs: resource_data["published"] = False + if resource_type == LearningResourceType.course.name: + resource_category = LearningResourceType.course.value + else: + resource_category = LearningResourceType.program.value + resource_data["resource_category"] = resource_category deduplicated_course_id = next( ( record["course_id"] @@ -579,7 +593,7 @@ def load_course( load_offered_by(learning_resource, offered_bys_data) load_image(learning_resource, image_data) load_departments(learning_resource, department_data) - load_content_tags(learning_resource, content_tags_data) + load_content_tags(learning_resource, content_tags_data, is_content_file=False) update_index(learning_resource, created) return learning_resource @@ -761,7 +775,7 @@ def load_content_file( content_file, _ = ContentFile.objects.update_or_create( run=course_run, key=content_file_data.get("key"), defaults=content_file_data ) - load_content_tags(content_file, content_file_tags) + load_content_tags(content_file, content_file_tags, is_content_file=True) return content_file.id # noqa: TRY300 except: # noqa: E722 log.exception( @@ -862,12 +876,8 @@ def load_content_files( file.published = False file.save() - learning_material = LearningMaterial.objects.filter( - content_file=file - ).last() - - if learning_material: - resource = learning_material.learning_resource + if file.direct_learning_resource: + resource = file.direct_learning_resource resource.published = False resource.save() @@ -915,34 +925,36 @@ def load_learning_material( Create learning material object from ocw content file """ - content_categories = { + resource_categories = { OCW_COURSE_CONTENT_CATEGORY_MAPPING[tag] for tag in learning_material_tags } - content_categories = sorted(content_categories) - content_category = content_categories[0] + resource_categories = sorted(resource_categories) + resource_category = resource_categories[0] with transaction.atomic(): + if resource_category in VIDEO_CONTENT_CATEGORIES: + resource_type = LearningResourceType.video.name + else: + resource_type = LearningResourceType.document.name learning_resource, _ = LearningResource.objects.update_or_create( readable_id=f"{course_run.run_id}-{content_file.key}", platform=course_run.learning_resource.platform, defaults={ - "resource_type": LearningResourceType.learning_material.name, + "resource_type": resource_type, "title": content_file.title, "url": content_file.url, "etl_source": course_run.learning_resource.etl_source, "offered_by": course_run.learning_resource.offered_by, "published": True, + "resource_category": resource_category, }, ) - - LearningMaterial.objects.update_or_create( - learning_resource=learning_resource, - content_file=content_file, - defaults={ - "content_tags": list(learning_material_tags), - "content_category": content_category, - }, + load_content_tags( + learning_resource, learning_material_tags, is_content_file=False ) + + content_file.direct_learning_resource = learning_resource + content_file.save() return learning_resource.id @@ -1019,8 +1031,10 @@ def load_podcast_episode(episode_data: dict) -> LearningResource: offered_bys_data = episode_data.pop("offered_by", {}) image_data = episode_data.pop("image", {}) departments_data = episode_data.pop("departments", []) + episode_data["resource_category"] = LearningResourceType.podcast_episode.value episode_model_data = episode_data.pop("podcast_episode", {}) + with transaction.atomic(): learning_resource, created = LearningResource.objects.update_or_create( readable_id=readable_id, @@ -1063,7 +1077,7 @@ def load_podcast(podcast_data: dict) -> LearningResource: image_data = podcast_data.pop("image", {}) podcast_model_data = podcast_data.pop("podcast", {}) departments_data = podcast_data.pop("departments", []) - + podcast_data["resource_category"] = LearningResourceType.podcast.value with transaction.atomic(): learning_resource, created = LearningResource.objects.update_or_create( readable_id=readable_id, @@ -1173,6 +1187,8 @@ def load_video(video_data: dict) -> LearningResource: offered_by_data = video_data.pop("offered_by", None) video_fields = video_data.pop("video", {}) image_data = video_data.pop("image", None) + video_data["resource_category"] = LearningResourceType.video.value + with transaction.atomic(): ( learning_resource, @@ -1226,7 +1242,7 @@ def load_article(article_data: dict) -> LearningResource: topics_data = article_data.pop("topics") offered_by_data = article_data.pop("offered_by", None) image_url = article_data.pop("image") - + article_data["resource_category"] = LearningResourceType.article.value with transaction.atomic(): ( learning_resource, @@ -1301,7 +1317,7 @@ def load_playlist(video_channel: VideoChannel, playlist_data: dict) -> LearningR thumbnail_data = playlist_data.pop("image", None) videos_data = playlist_data.pop("videos", []) offered_bys_data = playlist_data.pop("offered_by", None) - + playlist_data["resource_category"] = LearningResourceType.video_playlist.value with transaction.atomic(): image, _ = LearningResourceImage.objects.update_or_create( url=thumbnail_data.get("url"), diff --git a/learning_resources/etl/loaders_test.py b/learning_resources/etl/loaders_test.py index 0d0121b10e..4aa53480f1 100644 --- a/learning_resources/etl/loaders_test.py +++ b/learning_resources/etl/loaders_test.py @@ -59,7 +59,6 @@ ArticleFactory, ContentFileFactory, CourseFactory, - LearningMaterialFactory, LearningResourceContentTagFactory, LearningResourceDepartmentFactory, LearningResourceFactory, @@ -79,7 +78,6 @@ from learning_resources.models import ( ContentFile, Course, - LearningMaterial, LearningResource, LearningResourceImage, LearningResourceOfferor, @@ -100,6 +98,7 @@ "platform", "departments", "content_tags", + "resource_tags", "resources", "delivery", "resource_prices", @@ -1280,9 +1279,14 @@ def test_load_content_files(mocker, is_published, calc_score): assert course.runs.count() == 2 deleted_content_file = ContentFileFactory.create(run=course_run) - deleted_content_file_learning_material = LearningMaterialFactory.create( - content_file=deleted_content_file + deleted_content_file_learning_resource = LearningResourceFactory.create( + resource_type=LearningResourceType.document.value, ) + deleted_content_file.direct_learning_resource = ( + deleted_content_file_learning_resource + ) + deleted_content_file.save() + returned_content_file_id = deleted_content_file.id + 1 content_data = [{"a": "b"}, {"a": "c"}] @@ -1312,10 +1316,10 @@ def test_load_content_files(mocker, is_published, calc_score): assert mock_bulk_delete.call_count == 0 if is_published else 1 assert mock_calc_score.call_count == (1 if calc_score else 0) deleted_content_file.refresh_from_db() - deleted_content_file_learning_material.refresh_from_db() + deleted_content_file_learning_resource.refresh_from_db() assert not deleted_content_file.published - assert not deleted_content_file_learning_material.learning_resource.published + assert not deleted_content_file_learning_resource.published @pytest.mark.parametrize("test_mode", [True, False]) @@ -2395,15 +2399,15 @@ def test_load_learning_materials(mocker): {"Programming Assignments"}, ) - learning_material = LearningMaterial.objects.last() + learning_material_content_file.refresh_from_db() + + learning_material = learning_material_content_file.direct_learning_resource resource_relationships = ocw_course.learning_resource.children.all() + assert resource_relationships.count() == 1 - assert ( - resource_relationships.first().child.id - == learning_material.learning_resource.id - ) + assert resource_relationships.first().child.id == learning_material.id assert ( resource_relationships.first().relation_type == LearningResourceRelationTypes.COURSE_LEARNING_MATERIALS.value @@ -2434,17 +2438,16 @@ def test_load_learning_material(mocker, learning_material_exists): ) if learning_material_exists: - existing_learning_material = LearningMaterialFactory.create( - content_file=content_file, - ) + existing_learning_material = LearningResourceFactory.create() - existing_learning_material.learning_resource.readable_id = ( + existing_learning_material.readable_id = ( f"{ocw_course.learning_resource.runs.first().run_id}-{content_file.key}" ) - existing_learning_material.learning_resource.platform = ( - ocw_course.learning_resource.platform - ) - existing_learning_material.learning_resource.save() + existing_learning_material.platform = ocw_course.learning_resource.platform + existing_learning_material.save() + + content_file.direct_learning_resource = existing_learning_material + content_file.save() loaders.load_learning_material( ocw_course.learning_resource.runs.first(), @@ -2452,10 +2455,18 @@ def test_load_learning_material(mocker, learning_material_exists): {"Programming Assignments"}, ) - assert LearningMaterial.objects.count() == 1 + assert ( + LearningResource.objects.filter( + resource_type=LearningResourceType.document.name + ).count() + == 1 + ) + + learning_material = LearningResource.objects.filter( + resource_type=LearningResourceType.document.name + ).last() - learning_material = LearningMaterial.objects.last() + assert learning_material.title == content_file.title + assert learning_material.url == content_file.url - assert learning_material.learning_resource.title == content_file.title - assert learning_material.learning_resource.url == content_file.url - assert learning_material.content_file.id == content_file.id + assert content_file.direct_learning_resource_id == learning_material.id diff --git a/learning_resources/etl/pipelines_test.py b/learning_resources/etl/pipelines_test.py index 784f8d3427..7c7dc708d6 100644 --- a/learning_resources/etl/pipelines_test.py +++ b/learning_resources/etl/pipelines_test.py @@ -261,7 +261,7 @@ def test_ocw_courses_etl(settings, mocker, skip_content_files): assert resource.platform.code == PlatformType.ocw.name assert resource.offered_by.code == OfferedBy.ocw.name assert resource.departments.first().department_id == "16" - assert resource.content_tags.count() == 5 + assert resource.resource_tags.count() == 5 run = resource.runs.first() assert run.instructors.count() == 10 assert run.run_id == "97db384ef34009a64df7cb86cf701979" @@ -270,7 +270,10 @@ def test_ocw_courses_etl(settings, mocker, skip_content_files): assert mock_calc_score.call_count == (0 if skip_content_files else 1) learning_materials = LearningResource.objects.filter( - resource_type=LearningResourceType.learning_material.name + resource_type__in=[ + LearningResourceType.video.name, + LearningResourceType.document.name, + ] ) assert learning_materials.count() == (0 if skip_content_files else 1) @@ -285,10 +288,10 @@ def test_ocw_courses_etl(settings, mocker, skip_content_files): assert learning_material.offered_by.code == OfferedBy.ocw.name assert learning_material.title == "Resource Title" - assert learning_material.learning_material.content_tags == [ + assert list(learning_material.resource_tags.values_list("name", flat=True)) == [ "Activity Assignments" ] - assert learning_material.learning_material.content_category == "Practice" + assert learning_material.resource_category == "Practice & Assignment" @mock_aws diff --git a/learning_resources/factories.py b/learning_resources/factories.py index c5684c17de..714ac70915 100644 --- a/learning_resources/factories.py +++ b/learning_resources/factories.py @@ -58,7 +58,10 @@ def _post_gen_tags(obj, create, extracted, **kwargs): # noqa: ARG001 random.randint(1, 5) # noqa: S311 ) - obj.content_tags.set(extracted) + if isinstance(obj, models.LearningResource): + obj.resource_tags.set(extracted) + else: + obj.content_tags.set(extracted) class LearningResourceContentTagFactory(DjangoModelFactory): @@ -198,6 +201,9 @@ class LearningResourceFactory(DjangoModelFactory): resource_type = factory.fuzzy.FuzzyChoice( choices=constants.LearningResourceType.names() ) + resource_category = factory.LazyAttribute( + lambda o: o.resource_type.replace("_", " ").title() + ) readable_id = factory.Sequence( lambda n: f"RESOURCEN{n:03d}_{random.randint(1, 1000)}.MIT" # noqa: S311 ) @@ -214,7 +220,7 @@ class LearningResourceFactory(DjangoModelFactory): offered_by = factory.SubFactory(LearningResourceOfferorFactory) departments = factory.PostGeneration(_post_gen_departments) topics = factory.PostGeneration(_post_gen_topics) - content_tags = factory.PostGeneration(_post_gen_tags) + resource_tags = factory.PostGeneration(_post_gen_tags) completeness = 1 published = True delivery = factory.List(random.choices(LearningResourceDelivery.names())) # noqa: S311 @@ -313,7 +319,7 @@ class Meta: class Params: no_topics = factory.Trait(topics=[]) - no_content_tags = factory.Trait(content_tags=[]) + no_resource_tags = factory.Trait(content_tags=[]) no_image = factory.Trait(image=None) is_course = factory.Trait( @@ -877,23 +883,6 @@ class Params: is_unpublished = factory.Trait(learning_resource__published=False) -class LearningMaterialFactory(DjangoModelFactory): - """Factory for Learning Material Resources""" - - learning_resource = factory.SubFactory( - LearningResourceFactory, - platform=factory.SubFactory( - LearningResourcePlatformFactory, code=PlatformType.ocw.name - ), - ) - - content_file = factory.SubFactory(ContentFileFactory) - - class Meta: - model = models.LearningMaterial - skip_postgeneration_save = True - - class VideoFactory(DjangoModelFactory): """Factory for Videos""" diff --git a/learning_resources/filters.py b/learning_resources/filters.py index 4ed025140c..e1991a99b7 100644 --- a/learning_resources/filters.py +++ b/learning_resources/filters.py @@ -14,7 +14,7 @@ from learning_resources.constants import ( DEPARTMENTS, LEARNING_RESOURCE_SORTBY_OPTIONS, - RESOURCE_CATEGORY_VALUES, + RESOURCE_TYPE_GROUP_VALUES, CertificationType, LearningResourceDelivery, LearningResourceType, @@ -84,7 +84,7 @@ class LearningResourceFilter(FilterSet): course_feature = CharInFilter( label="Content feature for the resources. Load the 'api/v1/course_features' " "endpoint for a list of course features", - field_name="content_tags__name__iexact", + field_name="resource_tags__name__iexact", ) readable_id = CharInFilter( @@ -121,13 +121,13 @@ class LearningResourceFilter(FilterSet): lookup_expr="iexact", ) - resource_category = MultipleChoiceFilter( - label="The resource category of the learning resources", - method="filter_resource_category", + resource_type_group = MultipleChoiceFilter( + label="The resource type group of the learning resources", + method="filter_resource_type_group", choices=( [ (value, value.replace("_", " ").title()) - for value in RESOURCE_CATEGORY_VALUES + for value in RESOURCE_TYPE_GROUP_VALUES ] ), ) @@ -146,8 +146,8 @@ def filter_free(self, queryset, _, value): # Resources that are not offered for free return queryset.exclude(free_filter) - def filter_resource_category(self, queryset, _, value): - """Filter by resource category""" + def filter_resource_type_group(self, queryset, _, value): + """Filter by resource type group""" query_or_filters = Q() for val in value: if val in [ diff --git a/learning_resources/filters_test.py b/learning_resources/filters_test.py index 6021ea6ac1..109d026efd 100644 --- a/learning_resources/filters_test.py +++ b/learning_resources/filters_test.py @@ -7,7 +7,7 @@ from django.utils.http import urlencode from learning_resources.constants import ( - LEARNING_MATERIAL_RESOURCE_CATEGORY, + LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, LEARNING_RESOURCE_SORTBY_OPTIONS, CertificationType, LearningResourceDelivery, @@ -294,14 +294,14 @@ def test_learning_resource_filter_resource_category(client): video = VideoFactory.create().learning_resource results = client.get( - f"{RESOURCE_API_URL}?resource_category={LEARNING_MATERIAL_RESOURCE_CATEGORY}" + f"{RESOURCE_API_URL}?resource_type_group={LEARNING_MATERIAL_RESOURCE_TYPE_GROUP}" ).json()["results"] assert len(results) == 2 ids = (res["id"] for res in results) assert podcast.id in ids assert video.id in ids - resource_filter = f"resource_category={LearningResourceType.program.name}&resource_category={LEARNING_MATERIAL_RESOURCE_CATEGORY}" + resource_filter = f"resource_type_group={LearningResourceType.program.name}&resource_type_group={LEARNING_MATERIAL_RESOURCE_TYPE_GROUP}" results = client.get(f"{RESOURCE_API_URL}?{resource_filter}").json()["results"] assert len(results) == 3 ids = (res["id"] for res in results) @@ -446,17 +446,17 @@ def test_learning_resource_filter_course_features(client): """Test that the resource_content_tag filter works""" resource_with_exams = LearningResourceFactory.create( - content_tags=LearningResourceContentTagFactory.create_batch(1, name="Exams"), + resource_tags=LearningResourceContentTagFactory.create_batch(1, name="Exams"), resource_type=LearningResourceType.video.name, ) resource_with_notes = LearningResourceFactory.create( - content_tags=LearningResourceContentTagFactory.create_batch( + resource_tags=LearningResourceContentTagFactory.create_batch( 1, name="Lecture Notes" ), resource_type=LearningResourceType.video.name, ) LearningResourceFactory.create( - content_tags=LearningResourceContentTagFactory.create_batch(1, name="Other"), + resource_tags=LearningResourceContentTagFactory.create_batch(1, name="Other"), resource_type=LearningResourceType.video.name, ) diff --git a/learning_resources/migrations/0102_learning_resources_resource_category.py b/learning_resources/migrations/0102_learning_resources_resource_category.py new file mode 100644 index 0000000000..ce8e13b4fd --- /dev/null +++ b/learning_resources/migrations/0102_learning_resources_resource_category.py @@ -0,0 +1,54 @@ +# Generated by Django 4.2.27 on 2026-02-12 22:11 + +from django.db import migrations, models + + +def populate_resource_category(apps, schema_editor): + for resource in apps.get_model( + "learning_resources", "LearningResource" + ).objects.all(): + resource_type = resource.resource_type + resource_category = resource_type.replace("_", " ") + resource_category = resource_category.title() + resource.resource_category = resource_category + resource.save() + + +class Migration(migrations.Migration): + dependencies = [ + ("learning_resources", "0101_add_learning_material"), + ] + + operations = [ + migrations.RenameField( + model_name="learningresource", + old_name="content_tags", + new_name="resource_tags", + ), + migrations.AddField( + model_name="learningresource", + name="resource_category", + field=models.CharField(default="", max_length=256), + preserve_default=False, + ), + migrations.RunPython(populate_resource_category, migrations.RunPython.noop), + migrations.AlterField( + model_name="learningresource", + name="resource_type", + field=models.CharField( + choices=[ + ("course", "Course"), + ("program", "Program"), + ("learning_path", "Learning Path"), + ("podcast", "Podcast"), + ("podcast_episode", "Podcast Episode"), + ("video", "Video"), + ("video_playlist", "Video Playlist"), + ("article", "Article"), + ("document", "Document"), + ], + db_index=True, + max_length=24, + ), + ), + ] diff --git a/learning_resources/migrations/0103_contentfilechanges.py b/learning_resources/migrations/0103_contentfilechanges.py new file mode 100644 index 0000000000..a1c642221d --- /dev/null +++ b/learning_resources/migrations/0103_contentfilechanges.py @@ -0,0 +1,68 @@ +# Generated by Django 4.2.28 on 2026-02-13 20:11 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("learning_resources", "0102_learning_resources_resource_category"), + ] + + operations = [ + migrations.RemoveConstraint( + model_name="contentfile", + name="run_or_resource_defined", + ), + migrations.AlterUniqueTogether( + name="contentfile", + unique_together=set(), + ), + migrations.AddField( + model_name="contentfile", + name="duration", + field=models.CharField(blank=True, max_length=11, null=True), + ), + migrations.AddField( + model_name="contentfile", + name="direct_learning_resource", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="direct_content_files", + to="learning_resources.learningresource", + ), + ), + migrations.AlterUniqueTogether( + name="contentfile", + unique_together={ + ("key", "run", "learning_resource", "direct_learning_resource") + }, + ), + migrations.AddConstraint( + model_name="contentfile", + constraint=models.CheckConstraint( + check=models.Q( + models.Q( + ("learning_resource__isnull", False), ("run__isnull", True) + ), + models.Q( + ("learning_resource__isnull", True), ("run__isnull", False) + ), + models.Q( + ("direct_learning_resource__isnull", False), + ("learning_resource__isnull", True), + ("run__isnull", True), + ), + _connector="OR", + ), + name="direct_learning_resource_run_or_resource_defined", + violation_error_message=( + "One of learning_resource, direct_learning_resource, " + "or run must be defined. " + "Both learning_resource and run cannot be defined at the same time." + ), + ), + ), + ] diff --git a/learning_resources/migrations/0104_delete_learningmaterial.py b/learning_resources/migrations/0104_delete_learningmaterial.py new file mode 100644 index 0000000000..9c98dd8ba7 --- /dev/null +++ b/learning_resources/migrations/0104_delete_learningmaterial.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.28 on 2026-02-17 17:04 + +from django.db import migrations + + +def delete_learning_material_resouces(apps, schema_editor): + LearningResource = apps.get_model("learning_resources", "LearningResource") + LearningResource.objects.filter(resource_type="learning_material").delete() + + +class Migration(migrations.Migration): + dependencies = [ + ("learning_resources", "0103_contentfilechanges"), + ] + + operations = [ + migrations.RunPython( + delete_learning_material_resouces, migrations.RunPython.noop + ), + migrations.DeleteModel( + name="LearningMaterial", + ), + ] diff --git a/learning_resources/models.py b/learning_resources/models.py index ddf08fced9..782c5c45c0 100644 --- a/learning_resources/models.py +++ b/learning_resources/models.py @@ -361,7 +361,7 @@ def for_serialization(self): "school" ), ), - "content_tags", + "resource_tags", Prefetch( "runs", queryset=LearningResourceRun.objects.filter(published=True) @@ -394,6 +394,44 @@ def for_serialization(self): queryset=LearningResourceViewEvent.objects.all(), to_attr="_views", ), + Prefetch( + "direct_content_files", + queryset=ContentFile.objects.prefetch_related( + "learning_resource__course", + "learning_resource__platform", + "run__learning_resource__course", + "run__learning_resource__platform", + "content_tags", + Prefetch( + "learning_resource__topics", + queryset=LearningResourceTopic.objects.for_serialization(), + ), + Prefetch( + "learning_resource__offered_by", + queryset=LearningResourceOfferor.objects.for_serialization(), + ), + Prefetch( + "learning_resource__departments", + queryset=LearningResourceDepartment.objects.for_serialization().select_related( + "school" + ), + ), + Prefetch( + "run__learning_resource__topics", + queryset=LearningResourceTopic.objects.for_serialization(), + ), + Prefetch( + "run__learning_resource__offered_by", + queryset=LearningResourceOfferor.objects.for_serialization(), + ), + Prefetch( + "run__learning_resource__departments", + queryset=LearningResourceDepartment.objects.for_serialization().select_related( + "school" + ), + ), + ), + ), *LearningResourceDetailModel.get_subclass_prefetches(), ).select_related("image", "platform") @@ -446,12 +484,13 @@ class LearningResource(TimestampedModel): db_index=True, choices=((member.name, member.value) for member in LearningResourceType), ) + resource_category = models.CharField(max_length=256) topics = models.ManyToManyField(LearningResourceTopic) ocw_topics = ArrayField(models.CharField(max_length=128), default=list, blank=True) offered_by = models.ForeignKey( LearningResourceOfferor, null=True, on_delete=models.SET_NULL ) - content_tags = models.ManyToManyField(LearningResourceContentTag) + resource_tags = models.ManyToManyField(LearningResourceContentTag) resources = models.ManyToManyField( "self", through="LearningResourceRelationship", symmetrical=False, blank=True ) @@ -1005,6 +1044,13 @@ class ContentFile(TimestampedModel): blank=True, null=True, ) + direct_learning_resource = models.ForeignKey( + LearningResource, + related_name="direct_content_files", + on_delete=models.SET_NULL, + blank=True, + null=True, + ) learning_resource = models.ForeignKey( LearningResource, related_name="resource_content_files", @@ -1043,13 +1089,16 @@ class ContentFile(TimestampedModel): edx_module_id = models.CharField(max_length=1024, null=True, blank=True) # noqa: DJ001 summary = models.TextField(blank=True, default="") flashcards = models.JSONField(blank=True, default=list) + duration = models.CharField(max_length=11, null=True, blank=True) # noqa: DJ001 def save(self, **kwargs): self.checksum = checksum_for_content(self.content) super().save(**kwargs) class Meta: - unique_together = (("key", "run"),) + unique_together = ( + ("key", "run", "learning_resource", "direct_learning_resource"), + ) verbose_name = "contentfile" # add constraint so that atleast run or learning_resource is defined (not both) constraints = [ @@ -1057,10 +1106,18 @@ class Meta: check=( models.Q(learning_resource__isnull=False, run__isnull=True) | models.Q(run__isnull=False, learning_resource__isnull=True) + | models.Q( + direct_learning_resource__isnull=False, + learning_resource__isnull=True, + run__isnull=True, + ) ), - name="run_or_resource_defined", + name="direct_learning_resource_run_or_resource_defined", violation_error_message=( - "Either run or learning_resource should be defined (but not both)" + "One of learning_resource, direct_learning_resource," + " or run must be defined. " + "Both learning_resource and run cannot be defined at the" + " same time." ), ), ] @@ -1185,46 +1242,6 @@ class Meta: ordering = ("id",) -class LearningMaterialQuerySet(LearningResourceDetailQuerySet): - """QuerySet for LearningMaterial""" - - def for_serialization(self): - """Return queryset for serialization""" - return self - - -class LearningMaterial(LearningResourceDetailModel): - """Data model for course learning materials""" - - objects = LearningMaterialQuerySet.as_manager() - - learning_resource = models.OneToOneField( - LearningResource, - related_name="learning_material", - on_delete=models.CASCADE, - ) - - content_file = models.OneToOneField( - ContentFile, - related_name="learning_material", - on_delete=models.CASCADE, - ) - - content_tags = ArrayField( - models.CharField(max_length=256, null=False, blank=False), null=True, blank=True - ) - - content_category = models.CharField( # noqa: DJ001 - max_length=128, - choices=constants.VALID_COURSE_CONTENT_CATEGORY_CHOICES, - null=True, - blank=True, - ) - - def __str__(self): - return f"LearningMaterial: {self.learning_resource.readable_id}" - - class VideoChannel(TimestampedModel): """Data model for video channels""" diff --git a/learning_resources/serializers.py b/learning_resources/serializers.py index 4cc00552e3..5b274a5dc7 100644 --- a/learning_resources/serializers.py +++ b/learning_resources/serializers.py @@ -19,7 +19,7 @@ from learning_resources import constants, models from learning_resources.constants import ( - LEARNING_MATERIAL_RESOURCE_CATEGORY, + LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, Availability, CertificationType, Format, @@ -626,7 +626,7 @@ def get_duration(self, serialized_resource): LearningResourceType.video.name, LearningResourceType.podcast_episode.name, ]: - duration = serialized_resource[resource_type].get("duration") + duration = (serialized_resource[resource_type] or {}).get("duration") if duration: return str(parse_duration(duration)) return None @@ -888,7 +888,7 @@ class LearningResourceBaseSerializer(serializers.ModelSerializer, WriteableTopic offered_by = LearningResourceOfferorSerializer(read_only=True, allow_null=True) platform = LearningResourcePlatformSerializer(read_only=True, allow_null=True) course_feature = LearningResourceContentTagField( - source="content_tags", read_only=True, allow_null=True + source="resource_tags", read_only=True, allow_null=True ) departments = LearningResourceDepartmentSerializer( read_only=True, allow_null=True, many=True @@ -910,7 +910,7 @@ class LearningResourceBaseSerializer(serializers.ModelSerializer, WriteableTopic child=LearningResourceDeliverySerializer(), read_only=True ) free = serializers.SerializerMethodField() - resource_category = serializers.SerializerMethodField() + resource_type_group = serializers.SerializerMethodField() format = serializers.ListField(child=FormatSerializer(), read_only=True) pace = serializers.ListField(child=PaceSerializer(), read_only=True) children = serializers.SerializerMethodField(allow_null=True) @@ -929,7 +929,7 @@ def get_best_run_id(self, instance) -> int | None: return best_run.id return None - def get_resource_category(self, instance) -> str: + def get_resource_type_group(self, instance) -> str: """Return the resource category of the resource""" if instance.resource_type in [ LearningResourceType.course.name, @@ -937,7 +937,7 @@ def get_resource_category(self, instance) -> str: ]: return instance.resource_type else: - return LEARNING_MATERIAL_RESOURCE_CATEGORY + return LEARNING_MATERIAL_RESOURCE_TYPE_GROUP def get_free(self, instance) -> bool: """Return true if the resource is free/has a free option""" @@ -985,7 +985,7 @@ class Meta: "views", "require_summaries", ] - exclude = ["content_tags", "resources", "etl_source", *COMMON_IGNORED_FIELDS] + exclude = ["resource_tags", "resources", "etl_source", *COMMON_IGNORED_FIELDS] class ProgramResourceSerializer(LearningResourceBaseSerializer): @@ -1024,6 +1024,10 @@ class LearningPathResourceSerializer(LearningResourceBaseSerializer): default=constants.LearningResourceType.learning_path.name ) + resource_category = serializers.ReadOnlyField( + default=constants.LearningResourceType.learning_path.value + ) + learning_path = LearningPathSerializer(read_only=True) def validate_resource_type(self, value): @@ -1065,7 +1069,7 @@ def update(self, instance, validated_data): class Meta: model = models.LearningResource - exclude = ["content_tags", "resources", "etl_source", *COMMON_IGNORED_FIELDS] + exclude = ["resource_tags", "resources", "etl_source", *COMMON_IGNORED_FIELDS] read_only_fields = ["platform", "offered_by", "readable_id"] @@ -1089,22 +1093,6 @@ class PodcastEpisodeResourceSerializer(LearningResourceBaseSerializer): podcast_episode = PodcastEpisodeSerializer(read_only=True) -class VideoResourceSerializer(LearningResourceBaseSerializer): - """Serializer for video resources""" - - resource_type = LearningResourceTypeField( - default=constants.LearningResourceType.video.name - ) - - video = VideoSerializer(read_only=True) - - playlists = serializers.SerializerMethodField() - - def get_playlists(self, instance) -> list[str]: - """Get the playlist id(s) the video belongs to""" - return [playlist.parent_id for playlist in instance.playlists] - - class VideoPlaylistResourceSerializer(LearningResourceBaseSerializer): """Serializer for video playlist resources""" @@ -1139,43 +1127,60 @@ class ContentFileSerializer(serializers.ModelSerializer): platform = serializers.SerializerMethodField() def to_representation(self, instance): - # prefetch related run and learning resource - queryset = models.ContentFile.objects.prefetch_related( - "learning_resource__course", - "learning_resource__platform", - "run__learning_resource__course", - "run__learning_resource__platform", - "content_tags", - Prefetch( - "learning_resource__topics", - queryset=models.LearningResourceTopic.objects.for_serialization(), - ), - Prefetch( - "learning_resource__offered_by", - queryset=models.LearningResourceOfferor.objects.for_serialization(), - ), - Prefetch( - "learning_resource__departments", - queryset=models.LearningResourceDepartment.objects.for_serialization().select_related( - "school" + if not self.context.get("skip_content_file_refetch", False): + # prefetch related run and learning resource + queryset = models.ContentFile.objects.prefetch_related( + "learning_resource__course", + "learning_resource__platform", + "run__learning_resource__course", + "run__learning_resource__platform", + "content_tags", + Prefetch( + "learning_resource__topics", + queryset=models.LearningResourceTopic.objects.for_serialization(), ), - ), - Prefetch( - "run__learning_resource__topics", - queryset=models.LearningResourceTopic.objects.for_serialization(), - ), - Prefetch( - "run__learning_resource__offered_by", - queryset=models.LearningResourceOfferor.objects.for_serialization(), - ), - Prefetch( - "run__learning_resource__departments", - queryset=models.LearningResourceDepartment.objects.for_serialization().select_related( - "school" + Prefetch( + "learning_resource__offered_by", + queryset=models.LearningResourceOfferor.objects.for_serialization(), ), - ), - ) - instance = queryset.get(pk=instance.pk) + Prefetch( + "learning_resource__departments", + queryset=models.LearningResourceDepartment.objects.for_serialization().select_related( + "school" + ), + ), + Prefetch( + "run__learning_resource__topics", + queryset=models.LearningResourceTopic.objects.for_serialization(), + ), + Prefetch( + "run__learning_resource__offered_by", + queryset=models.LearningResourceOfferor.objects.for_serialization(), + ), + Prefetch( + "run__learning_resource__departments", + queryset=models.LearningResourceDepartment.objects.for_serialization().select_related( + "school" + ), + ), + "direct_learning_resource__course", + "direct_learning_resource__platform", + Prefetch( + "direct_learning_resource__topics", + queryset=models.LearningResourceTopic.objects.for_serialization(), + ), + Prefetch( + "direct_learning_resource__offered_by", + queryset=models.LearningResourceOfferor.objects.for_serialization(), + ), + Prefetch( + "direct_learning_resource__departments", + queryset=models.LearningResourceDepartment.objects.for_serialization( + prefetch_school=True + ).select_related("school"), + ), + ) + instance = queryset.get(pk=instance.pk) return super().to_representation(instance) def get_learning_resource(self, instance): @@ -1266,26 +1271,54 @@ class Meta: ] -class LearningMaterialSerializer(serializers.ModelSerializer): - """Serializer for the LearningMaterial model""" +class VideoResourceSerializer(LearningResourceBaseSerializer): + """Serializer for video resources""" - content_file = ContentFileSerializer(read_only=True, allow_null=True) + resource_type = LearningResourceTypeField( + default=constants.LearningResourceType.video.name + ) - class Meta: - model = models.LearningMaterial - exclude = ("learning_resource", *COMMON_IGNORED_FIELDS) + video = VideoSerializer(read_only=True) + playlists = serializers.SerializerMethodField() -class LearningMaterialResourceSerializer(LearningResourceBaseSerializer): - """ - Serializer for LearningMaterial resources with resource_type=Lecture Notes - """ + content_files = serializers.SerializerMethodField() + + @extend_schema_field(ContentFileSerializer(many=True, allow_null=True)) + def get_content_files(self, instance): + """Serialize content files with prefetch.""" + content_files = instance.direct_content_files.all() + return ContentFileSerializer( + content_files, + many=True, + read_only=True, + context={**self.context, "skip_content_file_refetch": True}, + ).data + + def get_playlists(self, instance) -> list[str]: + """Get the playlist id(s) the video belongs to""" + return [playlist.parent_id for playlist in instance.playlists] + + +class DocumentResourceSerializer(LearningResourceBaseSerializer): + """Serializer for document resources""" resource_type = LearningResourceTypeField( - default=constants.LearningResourceType.learning_material.name + default=constants.LearningResourceType.document.name ) - learning_material = LearningMaterialSerializer(read_only=True) + content_files = serializers.SerializerMethodField() + + @extend_schema_field(ContentFileSerializer(many=True, allow_null=True)) + def get_content_files(self, instance): + """Serialize content files with prefetch.""" + content_files = instance.direct_content_files.all() + return ContentFileSerializer( + content_files, + many=True, + read_only=True, + context={**self.context, "skip_content_file_refetch": True}, + ).data class LearningResourceSerializer(serializers.Serializer): @@ -1302,7 +1335,7 @@ class LearningResourceSerializer(serializers.Serializer): VideoResourceSerializer, VideoPlaylistResourceSerializer, ArticleResourceSerializer, - LearningMaterialResourceSerializer, + DocumentResourceSerializer, ) } diff --git a/learning_resources/serializers_test.py b/learning_resources/serializers_test.py index c00bdfb505..a0c74f0886 100644 --- a/learning_resources/serializers_test.py +++ b/learning_resources/serializers_test.py @@ -15,7 +15,7 @@ from learning_resources import factories, serializers from learning_resources.constants import ( CURRENCY_USD, - LEARNING_MATERIAL_RESOURCE_CATEGORY, + LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, Availability, CertificationType, Format, @@ -240,9 +240,9 @@ def test_learning_resource_serializer( # noqa: PLR0913 LearningResourceType.course.name, LearningResourceType.program.name, ]: - resource_category = resource.resource_type + resource_type_group = resource.resource_type else: - resource_category = LEARNING_MATERIAL_RESOURCE_CATEGORY + resource_type_group = LEARNING_MATERIAL_RESOURCE_TYPE_GROUP assert result == expected assert result == { "id": resource.id, @@ -291,10 +291,11 @@ def test_learning_resource_serializer( # noqa: PLR0913 ) ) ), - "resource_category": resource_category, + "resource_category": resource.resource_category, + "resource_type_group": resource_type_group, "published": resource.published, "readable_id": resource.readable_id, - "course_feature": sorted([tag.name for tag in resource.content_tags.all()]), + "course_feature": sorted([tag.name for tag in resource.resource_tags.all()]), "resource_type": resource.resource_type, "url": resource.url, "image": serializers.LearningResourceImageSerializer( diff --git a/learning_resources_search/constants.py b/learning_resources_search/constants.py index d3093cd727..aeb92a5824 100644 --- a/learning_resources_search/constants.py +++ b/learning_resources_search/constants.py @@ -96,7 +96,12 @@ class FilterConfig: "platform": FilterConfig("platform.code"), "offered_by": FilterConfig("offered_by.code"), "delivery": FilterConfig("delivery.code"), - "resource_category": FilterConfig("resource_category"), + # NOTE resource_category was renamed to resource_type_group + # Both fields contain the resource tab data for now so that + # we don't break search until a reindex finishes. + # A follow up pr will update the next line and populate + # the new resource_category field. + "resource_type_group": FilterConfig("resource_category"), } SEARCH_NESTED_FILTERS = { @@ -198,6 +203,7 @@ class FilterConfig: "professional": {"type": "boolean"}, "resource_type": {"type": "keyword"}, "resource_category": {"type": "keyword"}, + "resource_type_group": {"type": "keyword"}, "topics": { "type": "nested", "properties": { diff --git a/learning_resources_search/serializers.py b/learning_resources_search/serializers.py index 417116bfe8..4cecdb93ca 100644 --- a/learning_resources_search/serializers.py +++ b/learning_resources_search/serializers.py @@ -16,8 +16,8 @@ from learning_resources.constants import ( DEPARTMENTS, - LEARNING_MATERIAL_RESOURCE_CATEGORY, - RESOURCE_CATEGORY_VALUES, + LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, + RESOURCE_TYPE_GROUP_VALUES, CertificationType, LearningResourceDelivery, LearningResourceType, @@ -66,7 +66,7 @@ class SearchCourseNumberSerializer(CourseNumberSerializer): sort_coursenum = serializers.CharField() -def get_resource_age_date(learning_resource_obj, resource_category): +def get_resource_age_date(learning_resource_obj, resource_type_group): """ Get the internal resource_age_date which measures how stale a resource is. Resources with upcoming runs have a resource_age_date of null. Otherwise the @@ -76,7 +76,7 @@ def get_resource_age_date(learning_resource_obj, resource_category): resource_age_date = None - if resource_category == LEARNING_MATERIAL_RESOURCE_CATEGORY: + if resource_type_group == LEARNING_MATERIAL_RESOURCE_TYPE_GROUP: resource_age_date = learning_resource_obj.last_modified elif ( learning_resource_obj.resource_type == LearningResourceType.course.name @@ -153,18 +153,22 @@ def serialize_learning_resource_for_update( featured_rank = None resource_age_date = get_resource_age_date( - learning_resource_obj, serialized_data["resource_category"] + learning_resource_obj, serialized_data["resource_type_group"] ) is_incomplete_or_stale = ( resource_age_date and resource_age_date.year <= STALENESS_CUTOFF ) or (learning_resource_obj.completeness < COMPLETENESS_CUTOFF) + # NOTE - resource_category was renamed to resource_type_group + # The next line should be removed in a follow-up PR + serialized_data["resource_category"] = serialized_data["resource_type_group"] + return { "resource_relations": {"name": "resource"}, "created_on": learning_resource_obj.created_on, - "is_learning_material": serialized_data["resource_category"] - == LEARNING_MATERIAL_RESOURCE_CATEGORY, + "is_learning_material": serialized_data["resource_type_group"] + == LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, "resource_age_date": resource_age_date, "featured_rank": featured_rank, "is_incomplete_or_stale": is_incomplete_or_stale, @@ -252,7 +256,7 @@ def to_representation(self, obj): "professional", "free", "delivery", - "resource_category", + "resource_type_group", ] CONTENT_FILE_AGGREGATIONS = ["topic", "content_feature_type", "platform", "offered_by"] @@ -405,17 +409,17 @@ class LearningResourcesSearchRequestSerializer(SearchRequestSerializer): \n\n{build_choice_description_list(delivery_choices)}" ), ) - resource_category_choices = [ - (value, value.replace("_", " ").title()) for value in RESOURCE_CATEGORY_VALUES + resource_type_group_choices = [ + (value, value.replace("_", " ").title()) for value in RESOURCE_TYPE_GROUP_VALUES ] - resource_category = serializers.ListField( + resource_type_group = serializers.ListField( required=False, child=serializers.ChoiceField( - choices=resource_category_choices, + choices=resource_type_group_choices, ), help_text=( - f"The category of learning resource \ - \n\n{build_choice_description_list(resource_category_choices)}" + f"The resource type grouping of learning resource \ + \n\n{build_choice_description_list(resource_type_group_choices)}" ), ) search_mode_choices = [ diff --git a/learning_resources_search/serializers_test.py b/learning_resources_search/serializers_test.py index 6b699c0444..84514c0ea0 100644 --- a/learning_resources_search/serializers_test.py +++ b/learning_resources_search/serializers_test.py @@ -16,7 +16,7 @@ from learning_resources import factories from learning_resources.constants import ( DEPARTMENTS, - LEARNING_MATERIAL_RESOURCE_CATEGORY, + LEARNING_MATERIAL_RESOURCE_TYPE_GROUP, CertificationType, LearningResourceRelationTypes, LearningResourceType, @@ -608,6 +608,8 @@ def test_serialize_bulk_learning_resources(mocker): expected = [] for resource in resources: + resource_data = LearningResourceSerializer(instance=resource).data + resource_data["resource_category"] = resource_data["resource_type_group"] data = { "_id": mocker.ANY, "resource_relations": mocker.ANY, @@ -616,7 +618,7 @@ def test_serialize_bulk_learning_resources(mocker): "is_learning_material": mocker.ANY, "featured_rank": None, "is_incomplete_or_stale": mocker.ANY, - **LearningResourceSerializer(instance=resource).data, + **resource_data, } if resource.resource_type == LearningResourceType.course.name: @@ -707,7 +709,8 @@ def test_serialize_learning_resource_for_bulk( # noqa: PLR0913 channel.save() resource = LearningResource.objects.for_search_serialization().get(pk=resource.pk) - + resource_data = LearningResourceSerializer(resource).data + resource_data["resource_category"] = resource_data["resource_type_group"] assert serializers.serialize_learning_resource_for_bulk(resource) == { "_id": resource.id, "resource_relations": {"name": "resource"}, @@ -717,7 +720,7 @@ def test_serialize_learning_resource_for_bulk( # noqa: PLR0913 "featured_rank": 3.4 if has_featured_rank else None, "is_incomplete_or_stale": is_incomplete or is_stale, **free_dict, - **LearningResourceSerializer(resource).data, + **resource_data, } @@ -731,7 +734,7 @@ def test_get_resource_age_date(): resource_type=LearningResourceType.podcast_episode.name ) assert ( - get_resource_age_date(podcast, LEARNING_MATERIAL_RESOURCE_CATEGORY) + get_resource_age_date(podcast, LEARNING_MATERIAL_RESOURCE_TYPE_GROUP) == podcast.last_modified ) @@ -828,6 +831,8 @@ def test_serialize_course_numbers_for_bulk( "learning_resources_search.serializers.get_resource_age_date", return_value=datetime(2024, 1, 1, 1, 1, 1, 0, tzinfo=UTC), ) + resource_data = LearningResourceSerializer(resource).data + resource_data["resource_category"] = resource_data["resource_type_group"] expected_data = { "_id": resource.id, "resource_relations": {"name": "resource"}, @@ -837,7 +842,7 @@ def test_serialize_course_numbers_for_bulk( "resource_age_date": datetime(2024, 1, 1, 1, 1, 1, 0, tzinfo=UTC), "featured_rank": None, "is_incomplete_or_stale": False, - **LearningResourceSerializer(resource).data, + **resource_data, } expected_data["course"]["course_numbers"][0] = { **expected_data["course"]["course_numbers"][0], @@ -915,14 +920,14 @@ def test_learning_resources_search_request_serializer(): "certification": "false", "certification_type": [CertificationType.none.name], "free": True, - "resource_category": ["course", "program"], + "resource_type_group": ["course", "program"], "topic": ["Math", "Atoms,Molecules,and Ions"], "offered_by": ["xpro", "ocw"], "platform": ["xpro", "edx", "ocw"], "department": ["18", "5"], "level": ["high_school", "undergraduate"], "course_feature": ["Lecture Videos"], - "aggregations": ["resource_type", "platform", "level", "resource_category"], + "aggregations": ["resource_type", "platform", "level", "resource_type_group"], "yearly_decay_percent": "0.25", "search_mode": "phrase", "slop": 2, @@ -939,7 +944,7 @@ def test_learning_resources_search_request_serializer(): "sortby": "-start_date", "professional": [True], "certification": [False], - "resource_category": ["course", "program"], + "resource_type_group": ["course", "program"], "certification_type": [CertificationType.none.name], "free": [True], "offered_by": ["xpro", "ocw"], @@ -948,7 +953,7 @@ def test_learning_resources_search_request_serializer(): "department": ["18", "5"], "level": ["high_school", "undergraduate"], "course_feature": ["Lecture Videos"], - "aggregations": ["resource_type", "platform", "level", "resource_category"], + "aggregations": ["resource_type", "platform", "level", "resource_type_group"], "yearly_decay_percent": 0.25, "dev_mode": False, "search_mode": "phrase", diff --git a/learning_resources_search/tasks.py b/learning_resources_search/tasks.py index 1eaba0154b..16481b48ae 100644 --- a/learning_resources_search/tasks.py +++ b/learning_resources_search/tasks.py @@ -264,7 +264,9 @@ def send_subscription_emails(self, subscription_type, period="daily"): delta = datetime.timedelta(days=7) since = now_in_utc() - delta new_learning_resources = LearningResource.objects.filter( - published=True, created_on__gt=since, learning_material__isnull=True + published=True, + created_on__gt=since, + direct_content_files__isnull=True, ) rows = _get_percolated_rows(new_learning_resources, subscription_type) template_data = _group_percolated_rows(rows) @@ -660,7 +662,8 @@ def start_recreate_index(self, indexes, remove_existing_reindexing_tags): ) for ids in chunks( LearningResource.objects.filter( - published=True, learning_material__isnull=True + published=True, + direct_content_files__isnull=True, ) .exclude(readable_id=blocklisted_ids) .order_by("id") @@ -681,6 +684,7 @@ def start_recreate_index(self, indexes, remove_existing_reindexing_tags): LearningResource.objects.filter( published=True, resource_type=resource_type, + direct_content_files__isnull=True, ) .order_by("id") .values_list("id", flat=True), @@ -891,6 +895,7 @@ def get_update_learning_resource_tasks(resource_type): LearningResource.objects.filter( published=True, resource_type=resource_type, + direct_content_files__isnull=True, ) .order_by("id") .values_list("id", flat=True), @@ -904,6 +909,7 @@ def get_update_learning_resource_tasks(resource_type): LearningResource.objects.filter( published=False, resource_type=resource_type, + direct_content_files__isnull=True, ) .order_by("id") .values_list("id", flat=True), diff --git a/learning_resources_search/views.py b/learning_resources_search/views.py index fdf3b3c803..50a83fbdd6 100644 --- a/learning_resources_search/views.py +++ b/learning_resources_search/views.py @@ -74,7 +74,6 @@ class LearningResourcesSearchView(ESView): @extend_schema(summary="Search") def get(self, request): request_data = LearningResourcesSearchRequestSerializer(data=request.GET) - if request_data.is_valid(): response = execute_learn_search( request_data.data | {"endpoint": LEARNING_RESOURCE} diff --git a/main/settings.py b/main/settings.py index b4600439a9..6c759e141d 100644 --- a/main/settings.py +++ b/main/settings.py @@ -34,7 +34,7 @@ from main.settings_pluggy import * # noqa: F403 from openapi.settings_spectacular import open_spectacular_settings -VERSION = "0.56.1" +VERSION = "0.56.2" log = logging.getLogger() diff --git a/openapi/specs/v0.yaml b/openapi/specs/v0.yaml index aa8cab2bb9..127b899101 100644 --- a/openapi/specs/v0.yaml +++ b/openapi/specs/v0.yaml @@ -1265,22 +1265,6 @@ paths: type: string minLength: 1 description: The readable id of the resource - - in: query - name: resource_category - schema: - type: array - items: - enum: - - course - - program - - learning_material - type: string - description: |- - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - description: "The category of learning resource \n\n* `course`\ - \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" - in: query name: resource_type schema: @@ -1295,7 +1279,7 @@ paths: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -1306,12 +1290,27 @@ paths: * `video` - video * `video_playlist` - video playlist * `article` - article - * `learning_material` - learning material + * `document` - document description: "The type of learning resource \n\n* `course` - course\n\ * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ - \ - video playlist\n* `article` - article\n* `learning_material` - learning\ - \ material" + \ - video playlist\n* `article` - article\n* `document` - document" + - in: query + name: resource_type_group + schema: + type: array + items: + enum: + - course + - program + - learning_material + type: string + description: |- + * `course` - Course + * `program` - Program + * `learning_material` - Learning Material + description: "The category of learning resource \n\n* `course`\ + \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" - in: query name: topic schema: @@ -1602,7 +1601,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -1682,6 +1681,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -1766,6 +1768,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -2089,29 +2092,6 @@ components: readOnly: true required: - unit - ContentCategoryEnum: - enum: - - Lecture Notes - - Readings - - Practice - - Open Textbooks - - Lecture Audio - - Video - type: string - description: |- - * `Lecture Notes` - Lecture Notes - * `Readings` - Readings - * `Practice` - Practice - * `Open Textbooks` - Open Textbooks - * `Lecture Audio` - Lecture Audio - * `Video` - Video - x-enum-descriptions: - - Lecture Notes - - Readings - - Practice - - Open Textbooks - - Lecture Audio - - Video ContentFile: type: object description: Serializer class for course run ContentFiles @@ -2446,7 +2426,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -2530,6 +2510,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -2615,6 +2598,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -2778,218 +2762,9 @@ components: description: '* `department` - Department' x-enum-descriptions: - Department - EventFeedItem: + DocumentResource: type: object - description: Serializer for News FeedItem - properties: - id: - type: integer - readOnly: true - feed_type: - allOf: - - $ref: '#/components/schemas/EventFeedItemFeedTypeEnum' - default: events - readOnly: true - image: - $ref: '#/components/schemas/FeedImage' - event_details: - $ref: '#/components/schemas/FeedEventDetail' - guid: - type: string - maxLength: 2048 - title: - type: string - maxLength: 255 - url: - type: string - format: uri - maxLength: 200 - summary: - type: string - content: - type: string - source: - type: integer - required: - - event_details - - feed_type - - guid - - id - - image - - source - - title - - url - EventFeedItemFeedTypeEnum: - type: string - enum: - - events - FeedEventDetail: - type: object - description: FeedEventDetail serializer - properties: - id: - type: integer - readOnly: true - audience: - type: array - items: - type: string - maxLength: 255 - location: - type: array - items: - type: string - maxLength: 255 - event_type: - type: array - items: - type: string - maxLength: 255 - event_datetime: - type: string - format: date-time - event_end_datetime: - type: string - format: date-time - nullable: true - required: - - audience - - event_datetime - - event_type - - id - - location - FeedImage: - type: object - description: Serializer for FeedImage - properties: - id: - type: integer - readOnly: true - url: - type: string - maxLength: 2048 - description: - type: string - maxLength: 1024 - alt: - type: string - maxLength: 1024 - required: - - id - FeedItem: - oneOf: - - $ref: '#/components/schemas/NewsFeedItem' - - $ref: '#/components/schemas/EventFeedItem' - discriminator: - propertyName: resource_type - mapping: - news: '#/components/schemas/NewsFeedItem' - events: '#/components/schemas/EventFeedItem' - FeedNewsDetail: - type: object - description: FeedNewsDetail serializer - properties: - id: - type: integer - readOnly: true - authors: - type: array - items: - type: string - maxLength: 255 - topics: - type: array - items: - type: string - maxLength: 255 - publish_date: - type: string - format: date-time - required: - - id - - publish_date - FeedSource: - type: object - description: FeedSource serializer - properties: - id: - type: integer - readOnly: true - image: - $ref: '#/components/schemas/FeedImage' - title: - type: string - maxLength: 255 - url: - type: string - format: uri - maxLength: 200 - description: - type: string - feed_type: - $ref: '#/components/schemas/FeedSourceFeedTypeEnum' - required: - - feed_type - - id - - image - - title - - url - FeedSourceFeedTypeEnum: - enum: - - news - - events - type: string - description: |- - * `news` - News - * `events` - Events - x-enum-descriptions: - - News - - Events - GoalsEnum: - enum: - - academic-excellence - - career-growth - - lifelong-learning - type: string - description: |- - * `academic-excellence` - Academic Boost - * `career-growth` - Career Growth - * `lifelong-learning` - Lifelong Learning - x-enum-descriptions: - - Academic Boost - - Career Growth - - Lifelong Learning - LearningMaterial: - type: object - description: Serializer for the LearningMaterial model - properties: - id: - type: integer - readOnly: true - content_file: - allOf: - - $ref: '#/components/schemas/ContentFile' - readOnly: true - nullable: true - content_tags: - type: array - items: - type: string - maxLength: 256 - nullable: true - content_category: - nullable: true - oneOf: - - $ref: '#/components/schemas/ContentCategoryEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - required: - - content_file - - id - LearningMaterialResource: - type: object - description: Serializer for LearningMaterial resources with resource_type=Lecture - Notes + description: Serializer for document resources properties: id: type: integer @@ -3091,7 +2866,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -3139,12 +2914,14 @@ components: readOnly: true resource_type: allOf: - - $ref: '#/components/schemas/LearningMaterialResourceResourceTypeEnum' - default: learning_material + - $ref: '#/components/schemas/DocumentResourceResourceTypeEnum' + default: document readOnly: true - learning_material: - allOf: - - $ref: '#/components/schemas/LearningMaterial' + content_files: + type: array + items: + $ref: '#/components/schemas/ContentFile' + nullable: true readOnly: true readable_id: type: string @@ -3175,6 +2952,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -3241,6 +3021,7 @@ components: - certification - certification_type - children + - content_files - course_feature - delivery - departments @@ -3248,7 +3029,6 @@ components: - free - id - image - - learning_material - offered_by - pace - platform @@ -3260,13 +3040,195 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views - LearningMaterialResourceResourceTypeEnum: + DocumentResourceResourceTypeEnum: + type: string + enum: + - document + EventFeedItem: + type: object + description: Serializer for News FeedItem + properties: + id: + type: integer + readOnly: true + feed_type: + allOf: + - $ref: '#/components/schemas/EventFeedItemFeedTypeEnum' + default: events + readOnly: true + image: + $ref: '#/components/schemas/FeedImage' + event_details: + $ref: '#/components/schemas/FeedEventDetail' + guid: + type: string + maxLength: 2048 + title: + type: string + maxLength: 255 + url: + type: string + format: uri + maxLength: 200 + summary: + type: string + content: + type: string + source: + type: integer + required: + - event_details + - feed_type + - guid + - id + - image + - source + - title + - url + EventFeedItemFeedTypeEnum: + type: string + enum: + - events + FeedEventDetail: + type: object + description: FeedEventDetail serializer + properties: + id: + type: integer + readOnly: true + audience: + type: array + items: + type: string + maxLength: 255 + location: + type: array + items: + type: string + maxLength: 255 + event_type: + type: array + items: + type: string + maxLength: 255 + event_datetime: + type: string + format: date-time + event_end_datetime: + type: string + format: date-time + nullable: true + required: + - audience + - event_datetime + - event_type + - id + - location + FeedImage: + type: object + description: Serializer for FeedImage + properties: + id: + type: integer + readOnly: true + url: + type: string + maxLength: 2048 + description: + type: string + maxLength: 1024 + alt: + type: string + maxLength: 1024 + required: + - id + FeedItem: + oneOf: + - $ref: '#/components/schemas/NewsFeedItem' + - $ref: '#/components/schemas/EventFeedItem' + discriminator: + propertyName: resource_type + mapping: + news: '#/components/schemas/NewsFeedItem' + events: '#/components/schemas/EventFeedItem' + FeedNewsDetail: + type: object + description: FeedNewsDetail serializer + properties: + id: + type: integer + readOnly: true + authors: + type: array + items: + type: string + maxLength: 255 + topics: + type: array + items: + type: string + maxLength: 255 + publish_date: + type: string + format: date-time + required: + - id + - publish_date + FeedSource: + type: object + description: FeedSource serializer + properties: + id: + type: integer + readOnly: true + image: + $ref: '#/components/schemas/FeedImage' + title: + type: string + maxLength: 255 + url: + type: string + format: uri + maxLength: 200 + description: + type: string + feed_type: + $ref: '#/components/schemas/FeedSourceFeedTypeEnum' + required: + - feed_type + - id + - image + - title + - url + FeedSourceFeedTypeEnum: + enum: + - news + - events type: string + description: |- + * `news` - News + * `events` - Events + x-enum-descriptions: + - News + - Events + GoalsEnum: enum: - - learning_material + - academic-excellence + - career-growth + - lifelong-learning + type: string + description: |- + * `academic-excellence` - Academic Boost + * `career-growth` - Career Growth + * `lifelong-learning` - Lifelong Learning + x-enum-descriptions: + - Academic Boost + - Career Growth + - Lifelong Learning LearningPath: type: object description: Serializer for the LearningPath model @@ -3403,7 +3365,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -3454,6 +3416,10 @@ components: - $ref: '#/components/schemas/LearningPathResourceResourceTypeEnum' default: learning_path readOnly: true + resource_category: + type: string + readOnly: true + default: Learning Path learning_path: allOf: - $ref: '#/components/schemas/LearningPath' @@ -3568,6 +3534,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -3583,9 +3550,9 @@ components: - $ref: '#/components/schemas/LearningPathResource' - $ref: '#/components/schemas/PodcastResource' - $ref: '#/components/schemas/PodcastEpisodeResource' - - $ref: '#/components/schemas/VideoResource' - $ref: '#/components/schemas/VideoPlaylistResource' - - $ref: '#/components/schemas/LearningMaterialResource' + - $ref: '#/components/schemas/VideoResource' + - $ref: '#/components/schemas/DocumentResource' discriminator: propertyName: resource_type mapping: @@ -3595,9 +3562,9 @@ components: learning_path: '#/components/schemas/LearningPathResource' podcast: '#/components/schemas/PodcastResource' podcast_episode: '#/components/schemas/PodcastEpisodeResource' - video: '#/components/schemas/VideoResource' video_playlist: '#/components/schemas/VideoPlaylistResource' - learning_material: '#/components/schemas/LearningMaterialResource' + video: '#/components/schemas/VideoResource' + document: '#/components/schemas/DocumentResource' LearningResourceBaseSchool: type: object description: |- @@ -4724,7 +4691,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -4808,6 +4775,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -4893,6 +4863,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -5004,7 +4975,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -5088,6 +5059,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -5173,6 +5147,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -5562,7 +5537,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -5646,6 +5621,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -5731,6 +5709,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -6283,7 +6262,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -6367,6 +6346,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -6451,6 +6433,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - video_playlist @@ -6563,7 +6546,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -6624,6 +6607,12 @@ components: type: string description: Get the playlist id(s) the video belongs to readOnly: true + content_files: + type: array + items: + $ref: '#/components/schemas/ContentFile' + nullable: true + readOnly: true readable_id: type: string maxLength: 512 @@ -6653,6 +6642,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -6719,6 +6711,7 @@ components: - certification - certification_type - children + - content_files - course_feature - delivery - departments @@ -6738,6 +6731,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - video diff --git a/openapi/specs/v1.yaml b/openapi/specs/v1.yaml index 54fb9e44eb..4d1d47e7df 100644 --- a/openapi/specs/v1.yaml +++ b/openapi/specs/v1.yaml @@ -873,24 +873,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -909,7 +891,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -927,6 +909,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -1522,24 +1522,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -1558,7 +1540,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -1576,6 +1558,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -1947,24 +1947,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -1983,7 +1965,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -2001,6 +1983,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -2372,24 +2372,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -2408,7 +2390,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -2426,6 +2408,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -2801,24 +2801,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -2837,7 +2819,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -2855,6 +2837,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -3211,24 +3211,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -3247,7 +3229,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -3265,6 +3247,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -3941,24 +3941,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -3977,7 +3959,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -3995,6 +3977,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -4077,7 +4077,7 @@ paths: - professional - free - delivery - - resource_category + - resource_type_group type: string description: |- * `resource_type` - resource_type @@ -4092,7 +4092,7 @@ paths: * `professional` - professional * `free` - free * `delivery` - delivery - * `resource_category` - resource_category + * `resource_type_group` - resource_type_group description: Show resource counts by category - in: query name: certification @@ -4430,22 +4430,6 @@ paths: type: string minLength: 1 description: The search text - - in: query - name: resource_category - schema: - type: array - items: - enum: - - course - - program - - learning_material - type: string - description: |- - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - description: "The category of learning resource \n\n* `course`\ - \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" - in: query name: resource_type schema: @@ -4460,7 +4444,7 @@ paths: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -4471,12 +4455,28 @@ paths: * `video` - video * `video_playlist` - video playlist * `article` - article - * `learning_material` - learning material + * `document` - document description: "The type of learning resource \n\n* `course` - course\n\ * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ - \ - video playlist\n* `article` - article\n* `learning_material` - learning\ - \ material" + \ - video playlist\n* `article` - article\n* `document` - document" + - in: query + name: resource_type_group + schema: + type: array + items: + enum: + - course + - program + - learning_material + type: string + description: |- + * `course` - Course + * `program` - Program + * `learning_material` - Learning Material + description: "The resource type grouping of learning resource \ + \ \n\n* `course` - Course\n* `program` - Program\n* `learning_material`\ + \ - Learning Material" - in: query name: search_mode schema: @@ -4587,7 +4587,7 @@ paths: - professional - free - delivery - - resource_category + - resource_type_group type: string description: |- * `resource_type` - resource_type @@ -4602,7 +4602,7 @@ paths: * `professional` - professional * `free` - free * `delivery` - delivery - * `resource_category` - resource_category + * `resource_type_group` - resource_type_group description: Show resource counts by category - in: query name: certification @@ -4940,22 +4940,6 @@ paths: type: string minLength: 1 description: The search text - - in: query - name: resource_category - schema: - type: array - items: - enum: - - course - - program - - learning_material - type: string - description: |- - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - description: "The category of learning resource \n\n* `course`\ - \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" - in: query name: resource_type schema: @@ -4970,7 +4954,7 @@ paths: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -4981,12 +4965,28 @@ paths: * `video` - video * `video_playlist` - video playlist * `article` - article - * `learning_material` - learning material + * `document` - document description: "The type of learning resource \n\n* `course` - course\n\ * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ - \ - video playlist\n* `article` - article\n* `learning_material` - learning\ - \ material" + \ - video playlist\n* `article` - article\n* `document` - document" + - in: query + name: resource_type_group + schema: + type: array + items: + enum: + - course + - program + - learning_material + type: string + description: |- + * `course` - Course + * `program` - Program + * `learning_material` - Learning Material + description: "The resource type grouping of learning resource \ + \ \n\n* `course` - Course\n* `program` - Program\n* `learning_material`\ + \ - Learning Material" - in: query name: search_mode schema: @@ -5122,7 +5122,7 @@ paths: - professional - free - delivery - - resource_category + - resource_type_group type: string description: |- * `resource_type` - resource_type @@ -5137,7 +5137,7 @@ paths: * `professional` - professional * `free` - free * `delivery` - delivery - * `resource_category` - resource_category + * `resource_type_group` - resource_type_group description: Show resource counts by category - in: query name: certification @@ -5475,22 +5475,6 @@ paths: type: string minLength: 1 description: The search text - - in: query - name: resource_category - schema: - type: array - items: - enum: - - course - - program - - learning_material - type: string - description: |- - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - description: "The category of learning resource \n\n* `course`\ - \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" - in: query name: resource_type schema: @@ -5505,7 +5489,7 @@ paths: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -5516,12 +5500,28 @@ paths: * `video` - video * `video_playlist` - video playlist * `article` - article - * `learning_material` - learning material + * `document` - document description: "The type of learning resource \n\n* `course` - course\n\ * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ - \ - video playlist\n* `article` - article\n* `learning_material` - learning\ - \ material" + \ - video playlist\n* `article` - article\n* `document` - document" + - in: query + name: resource_type_group + schema: + type: array + items: + enum: + - course + - program + - learning_material + type: string + description: |- + * `course` - Course + * `program` - Program + * `learning_material` - Learning Material + description: "The resource type grouping of learning resource \ + \ \n\n* `course` - Course\n* `program` - Program\n* `learning_material`\ + \ - Learning Material" - in: query name: search_mode schema: @@ -5648,7 +5648,7 @@ paths: - professional - free - delivery - - resource_category + - resource_type_group type: string description: |- * `resource_type` - resource_type @@ -5663,7 +5663,7 @@ paths: * `professional` - professional * `free` - free * `delivery` - delivery - * `resource_category` - resource_category + * `resource_type_group` - resource_type_group description: Show resource counts by category - in: query name: certification @@ -6001,22 +6001,6 @@ paths: type: string minLength: 1 description: The search text - - in: query - name: resource_category - schema: - type: array - items: - enum: - - course - - program - - learning_material - type: string - description: |- - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - description: "The category of learning resource \n\n* `course`\ - \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" - in: query name: resource_type schema: @@ -6031,7 +6015,7 @@ paths: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -6042,12 +6026,28 @@ paths: * `video` - video * `video_playlist` - video playlist * `article` - article - * `learning_material` - learning material + * `document` - document description: "The type of learning resource \n\n* `course` - course\n\ * `program` - program\n* `learning_path` - learning path\n* `podcast` -\ \ podcast\n* `podcast_episode` - podcast episode\n* `video` - video\n* `video_playlist`\ - \ - video playlist\n* `article` - article\n* `learning_material` - learning\ - \ material" + \ - video playlist\n* `article` - article\n* `document` - document" + - in: query + name: resource_type_group + schema: + type: array + items: + enum: + - course + - program + - learning_material + type: string + description: |- + * `course` - Course + * `program` - Program + * `learning_material` - Learning Material + description: "The resource type grouping of learning resource \ + \ \n\n* `course` - Course\n* `program` - Program\n* `learning_material`\ + \ - Learning Material" - in: query name: search_mode schema: @@ -6451,24 +6451,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -6487,7 +6469,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -6505,6 +6487,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -7216,24 +7216,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -7252,7 +7234,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -7270,6 +7252,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -7641,24 +7641,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -7677,7 +7659,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -7695,6 +7677,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -8153,24 +8153,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -8189,7 +8171,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -8207,6 +8189,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -9004,28 +9004,10 @@ paths: - in: query name: readable_id schema: - type: array - items: - type: string - description: A unique text identifier for the resources - explode: true - style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material + type: array + items: + type: string + description: A unique text identifier for the resources explode: true style: form - in: query @@ -9046,7 +9028,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -9064,6 +9046,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -9501,24 +9501,6 @@ paths: description: A unique text identifier for the resources explode: true style: form - - in: query - name: resource_category - schema: - type: array - items: - type: string - enum: - - course - - learning_material - - program - description: |- - The resource category of the learning resources - - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - explode: true - style: form - in: query name: resource_id schema: @@ -9537,7 +9519,7 @@ paths: enum: - article - course - - learning_material + - document - learning_path - podcast - podcast_episode @@ -9555,6 +9537,24 @@ paths: * `video` - Video * `video_playlist` - Video Playlist * `article` - Article + * `document` - Document + explode: true + style: form + - in: query + name: resource_type_group + schema: + type: array + items: + type: string + enum: + - course + - learning_material + - program + description: |- + The resource type group of the learning resources + + * `course` - Course + * `program` - Program * `learning_material` - Learning Material explode: true style: form @@ -9787,7 +9787,7 @@ components: - professional - free - delivery - - resource_category + - resource_type_group type: string description: |- * `resource_type` - resource_type @@ -9802,7 +9802,7 @@ components: * `professional` - professional * `free` - free * `delivery` - delivery - * `resource_category` - resource_category + * `resource_type_group` - resource_type_group x-enum-descriptions: - resource_type - certification @@ -9816,7 +9816,7 @@ components: - professional - free - delivery - - resource_category + - resource_type_group ArticleImageUploadRequest: type: object properties: @@ -9929,7 +9929,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -10009,6 +10009,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -10093,6 +10096,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -10211,9 +10215,6 @@ components: x-enum-descriptions: - Dated - Anytime - BlankEnum: - enum: - - '' CertificationTypeEnum: enum: - micromasters @@ -10231,29 +10232,6 @@ components: - Professional Certificate - Certificate of Completion - No Certificate - ContentCategoryEnum: - enum: - - Lecture Notes - - Readings - - Practice - - Open Textbooks - - Lecture Audio - - Video - type: string - description: |- - * `Lecture Notes` - Lecture Notes - * `Readings` - Readings - * `Practice` - Practice - * `Open Textbooks` - Open Textbooks - * `Lecture Audio` - Lecture Audio - * `Video` - Video - x-enum-descriptions: - - Lecture Notes - - Readings - - Practice - - Open Textbooks - - Lecture Audio - - Video ContentFile: type: object description: Serializer class for course run ContentFiles @@ -10380,93 +10358,6 @@ components: - resource_id - resource_readable_id - topics - ContentFileRequest: - type: object - description: Serializer class for course run ContentFiles - properties: - run_id: - type: integer - run_title: - type: string - minLength: 1 - run_slug: - type: string - minLength: 1 - semester: - type: string - minLength: 1 - year: - type: integer - key: - type: string - nullable: true - maxLength: 1024 - uid: - type: string - nullable: true - maxLength: 36 - title: - type: string - nullable: true - maxLength: 1024 - description: - type: string - nullable: true - url: - type: string - nullable: true - content_feature_type: - type: array - items: - type: string - content_type: - $ref: '#/components/schemas/ContentTypeEnum' - content: - type: string - nullable: true - content_title: - type: string - nullable: true - maxLength: 1024 - content_author: - type: string - nullable: true - maxLength: 1024 - content_language: - type: string - nullable: true - maxLength: 24 - checksum: - type: string - minLength: 1 - image_src: - type: string - format: uri - nullable: true - maxLength: 200 - source_path: - type: string - minLength: 1 - file_type: - type: string - nullable: true - maxLength: 128 - file_extension: - type: string - nullable: true - maxLength: 32 - run_readable_id: - type: string - minLength: 1 - edx_module_id: - type: string - nullable: true - maxLength: 1024 - summary: - type: string - flashcards: {} - required: - - content_feature_type ContentFileSearchResponse: type: object description: SearchResponseSerializer with OpenAPI annotations for Content Files @@ -10720,7 +10611,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -10804,6 +10695,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -10889,6 +10783,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -11129,54 +11024,9 @@ components: - Special Programs - Science, Technology, and Society - Women's and Gender Studies - LearningMaterial: - type: object - description: Serializer for the LearningMaterial model - properties: - id: - type: integer - readOnly: true - content_file: - allOf: - - $ref: '#/components/schemas/ContentFile' - readOnly: true - nullable: true - content_tags: - type: array - items: - type: string - maxLength: 256 - nullable: true - content_category: - nullable: true - oneOf: - - $ref: '#/components/schemas/ContentCategoryEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - required: - - content_file - - id - LearningMaterialRequest: - type: object - description: Serializer for the LearningMaterial model - properties: - content_tags: - type: array - items: - type: string - minLength: 1 - maxLength: 256 - nullable: true - content_category: - nullable: true - oneOf: - - $ref: '#/components/schemas/ContentCategoryEnum' - - $ref: '#/components/schemas/BlankEnum' - - $ref: '#/components/schemas/NullEnum' - LearningMaterialResource: + DocumentResource: type: object - description: Serializer for LearningMaterial resources with resource_type=Lecture - Notes + description: Serializer for document resources properties: id: type: integer @@ -11278,7 +11128,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -11326,12 +11176,14 @@ components: readOnly: true resource_type: allOf: - - $ref: '#/components/schemas/LearningMaterialResourceResourceTypeEnum' - default: learning_material + - $ref: '#/components/schemas/DocumentResourceResourceTypeEnum' + default: document readOnly: true - learning_material: - allOf: - - $ref: '#/components/schemas/LearningMaterial' + content_files: + type: array + items: + $ref: '#/components/schemas/ContentFile' + nullable: true readOnly: true readable_id: type: string @@ -11362,6 +11214,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -11428,6 +11283,7 @@ components: - certification - certification_type - children + - content_files - course_feature - delivery - departments @@ -11435,7 +11291,6 @@ components: - free - id - image - - learning_material - offered_by - pace - platform @@ -11447,13 +11302,13 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views - LearningMaterialResourceRequest: + DocumentResourceRequest: type: object - description: Serializer for LearningMaterial resources with resource_type=Lecture - Notes + description: Serializer for document resources properties: topics: type: array @@ -11551,10 +11406,10 @@ components: required: - readable_id - title - LearningMaterialResourceResourceTypeEnum: + DocumentResourceResourceTypeEnum: type: string enum: - - learning_material + - document LearningPath: type: object description: Serializer for the LearningPath model @@ -11712,7 +11567,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -11763,6 +11618,10 @@ components: - $ref: '#/components/schemas/LearningPathResourceResourceTypeEnum' default: learning_path readOnly: true + resource_category: + type: string + readOnly: true + default: Learning Path learning_path: allOf: - $ref: '#/components/schemas/LearningPath' @@ -11877,6 +11736,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -11991,9 +11851,9 @@ components: - $ref: '#/components/schemas/LearningPathResource' - $ref: '#/components/schemas/PodcastResource' - $ref: '#/components/schemas/PodcastEpisodeResource' - - $ref: '#/components/schemas/VideoResource' - $ref: '#/components/schemas/VideoPlaylistResource' - - $ref: '#/components/schemas/LearningMaterialResource' + - $ref: '#/components/schemas/VideoResource' + - $ref: '#/components/schemas/DocumentResource' discriminator: propertyName: resource_type mapping: @@ -12003,9 +11863,9 @@ components: learning_path: '#/components/schemas/LearningPathResource' podcast: '#/components/schemas/PodcastResource' podcast_episode: '#/components/schemas/PodcastEpisodeResource' - video: '#/components/schemas/VideoResource' video_playlist: '#/components/schemas/VideoPlaylistResource' - learning_material: '#/components/schemas/LearningMaterialResource' + video: '#/components/schemas/VideoResource' + document: '#/components/schemas/DocumentResource' LearningResourceBaseDepartment: type: object description: |- @@ -12576,9 +12436,9 @@ components: - $ref: '#/components/schemas/LearningPathResourceRequest' - $ref: '#/components/schemas/PodcastResourceRequest' - $ref: '#/components/schemas/PodcastEpisodeResourceRequest' - - $ref: '#/components/schemas/VideoResourceRequest' - $ref: '#/components/schemas/VideoPlaylistResourceRequest' - - $ref: '#/components/schemas/LearningMaterialResourceRequest' + - $ref: '#/components/schemas/VideoResourceRequest' + - $ref: '#/components/schemas/DocumentResourceRequest' discriminator: propertyName: resource_type mapping: @@ -12588,9 +12448,9 @@ components: learning_path: '#/components/schemas/LearningPathResourceRequest' podcast: '#/components/schemas/PodcastResourceRequest' podcast_episode: '#/components/schemas/PodcastEpisodeResourceRequest' - video: '#/components/schemas/VideoResourceRequest' video_playlist: '#/components/schemas/VideoPlaylistResourceRequest' - learning_material: '#/components/schemas/LearningMaterialResourceRequest' + video: '#/components/schemas/VideoResourceRequest' + document: '#/components/schemas/DocumentResourceRequest' LearningResourceRun: type: object description: Serializer for the LearningResourceRun model @@ -13934,7 +13794,7 @@ components: \ course\n* `program` - program\n* `learning_path` - learning path\n*\ \ `podcast` - podcast\n* `podcast_episode` - podcast episode\n* `video`\ \ - video\n* `video_playlist` - video playlist\n* `article` - article\n\ - * `learning_material` - learning material" + * `document` - document" free: type: boolean nullable: true @@ -14004,12 +13864,13 @@ components: description: "The delivery options in which the learning resource is offered\ \ \n\n* `online` - Online\n* `hybrid` - Hybrid\n* `in_person`\ \ - In person\n* `offline` - Offline" - resource_category: + resource_type_group: type: array items: - $ref: '#/components/schemas/ResourceCategoryEnum' - description: "The category of learning resource \n\n* `course`\ - \ - Course\n* `program` - Program\n* `learning_material` - Learning Material" + $ref: '#/components/schemas/ResourceTypeGroupEnum' + description: "The resource type grouping of learning resource \ + \ \n\n* `course` - Course\n* `program` - Program\n* `learning_material`\ + \ - Learning Material" search_mode: allOf: - $ref: '#/components/schemas/SearchModeEnum' @@ -14066,7 +13927,7 @@ components: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -14077,7 +13938,7 @@ components: * `video` - video * `video_playlist` - video playlist * `article` - article - * `learning_material` - learning material + * `document` - document x-enum-descriptions: - course - program @@ -14087,7 +13948,7 @@ components: - video - video playlist - article - - learning material + - document PlatformEnum: enum: - edx @@ -14345,7 +14206,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -14429,6 +14290,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -14514,6 +14378,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -14751,7 +14616,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -14835,6 +14700,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -14920,6 +14788,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -15295,7 +15164,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -15379,6 +15248,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -15464,6 +15336,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - views @@ -15591,20 +15464,6 @@ components: - Podcast Episodes - Playlist Videos - Course Learning Materials - ResourceCategoryEnum: - enum: - - course - - program - - learning_material - type: string - description: |- - * `course` - Course - * `program` - Program - * `learning_material` - Learning Material - x-enum-descriptions: - - Course - - Program - - Learning Material ResourceTypeEnum: enum: - course @@ -15615,7 +15474,7 @@ components: - video - video_playlist - article - - learning_material + - document type: string description: |- * `course` - course @@ -15626,7 +15485,7 @@ components: * `video` - video * `video_playlist` - video_playlist * `article` - article - * `learning_material` - learning_material + * `document` - document x-enum-descriptions: - course - program @@ -15636,7 +15495,21 @@ components: - video - video_playlist - article + - document + ResourceTypeGroupEnum: + enum: + - course + - program - learning_material + type: string + description: |- + * `course` - Course + * `program` - Program + * `learning_material` - Learning Material + x-enum-descriptions: + - Course + - Program + - Learning Material RichTextArticle: type: object description: Serializer for LearningResourceInstructor model @@ -16110,7 +15983,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -16194,6 +16067,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -16278,6 +16154,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - video_playlist @@ -16502,7 +16379,7 @@ components: type: boolean description: Return true if the resource is free/has a free option readOnly: true - resource_category: + resource_type_group: type: string description: Return the resource category of the resource readOnly: true @@ -16563,6 +16440,12 @@ components: type: string description: Get the playlist id(s) the video belongs to readOnly: true + content_files: + type: array + items: + $ref: '#/components/schemas/ContentFile' + nullable: true + readOnly: true readable_id: type: string maxLength: 512 @@ -16592,6 +16475,9 @@ components: format: uri nullable: true maxLength: 2048 + resource_category: + type: string + readOnly: true ocw_topics: type: array items: @@ -16658,6 +16544,7 @@ components: - certification - certification_type - children + - content_files - course_feature - delivery - departments @@ -16677,6 +16564,7 @@ components: - resource_category - resource_prices - resource_type + - resource_type_group - runs - title - video diff --git a/vector_search/constants.py b/vector_search/constants.py index ac061d34de..fb0db3536d 100644 --- a/vector_search/constants.py +++ b/vector_search/constants.py @@ -41,7 +41,7 @@ "platform": "platform.code", "offered_by": "offered_by.code", "delivery": "delivery[].code", - "resource_category": "resource_category", + "resource_type_group": "resource_type_group", } @@ -65,7 +65,7 @@ "platform.code": models.PayloadSchemaType.KEYWORD, "offered_by.code": models.PayloadSchemaType.KEYWORD, "delivery[].code": models.PayloadSchemaType.KEYWORD, - "resource_category": models.PayloadSchemaType.KEYWORD, + "resource_type_group": models.PayloadSchemaType.KEYWORD, } diff --git a/vector_search/serializers.py b/vector_search/serializers.py index a50f7a0de5..d9401d831f 100644 --- a/vector_search/serializers.py +++ b/vector_search/serializers.py @@ -4,7 +4,7 @@ from learning_resources.constants import ( DEPARTMENTS, - RESOURCE_CATEGORY_VALUES, + RESOURCE_TYPE_GROUP_VALUES, CertificationType, LearningResourceDelivery, LearningResourceType, @@ -135,17 +135,17 @@ class LearningResourcesVectorSearchRequestSerializer(serializers.Serializer): \n\n{build_choice_description_list(delivery_choices)}" ), ) - resource_category_choices = [ - (value, value.replace("_", " ").title()) for value in RESOURCE_CATEGORY_VALUES + resource_type_group_choices = [ + (value, value.replace("_", " ").title()) for value in RESOURCE_TYPE_GROUP_VALUES ] - resource_category = serializers.ListField( + resource_type_group = serializers.ListField( required=False, child=serializers.ChoiceField( - choices=resource_category_choices, + choices=resource_type_group_choices, ), help_text=( f"The category of learning resource \ - \n\n{build_choice_description_list(resource_category_choices)}" + \n\n{build_choice_description_list(resource_type_group_choices)}" ), ) diff --git a/yarn.lock b/yarn.lock index b98444a3b2..77457ab525 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3478,9 +3478,9 @@ __metadata: languageName: node linkType: hard -"@mitodl/course-search-utils@npm:^3.5.0": - version: 3.5.0 - resolution: "@mitodl/course-search-utils@npm:3.5.0" +"@mitodl/course-search-utils@npm:^3.5.1": + version: 3.5.1 + resolution: "@mitodl/course-search-utils@npm:3.5.1" dependencies: "@mitodl/mit-learn-api-axios": "npm:2025.10.28" "@remixicon/react": "npm:^4.2.0" @@ -3500,7 +3500,7 @@ __metadata: optional: true react-router: optional: true - checksum: 10/f7b31dc385bc9220b54ec580f21c9a7c90c5a4e69ee86617642f8934bdd79bfd1f2bac4dfdbeadd7edf71c768e67fd5b3af0cd526fdaaacbcfb13eec9a4f7afb + checksum: 10/577f144b454562e8bc2d4cb42638f1932511056dfa6e99847714059319840a1fd32f916dfdc9295f1e8344675d0e2b6999c0bee99e6551ed3fb993f2d38fc5cc languageName: node linkType: hard @@ -7413,7 +7413,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^22.0.0": +"@types/node@npm:*": version: 22.7.5 resolution: "@types/node@npm:22.7.5" dependencies: @@ -7440,6 +7440,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^22.0.0": + version: 22.19.13 + resolution: "@types/node@npm:22.19.13" + dependencies: + undici-types: "npm:~6.21.0" + checksum: 10/b2d1d0cff2f0e283cbd5a3b60226b8a938c59d868c5c4715d52be619b1e57386c3ce043abc28a833e21c86fa33aaa2d00181e76d23600953f18c9aa69e3d654b + languageName: node + linkType: hard + "@types/node@npm:^24.0.0": version: 24.10.11 resolution: "@types/node@npm:24.10.11" @@ -9223,7 +9232,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.12.2, axios@npm:^1.6.5, axios@npm:^1.6.7": +"axios@npm:^1.12.2, axios@npm:^1.6.5": version: 1.12.2 resolution: "axios@npm:1.12.2" dependencies: @@ -9234,6 +9243,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:^1.6.7": + version: 1.13.6 + resolution: "axios@npm:1.13.6" + dependencies: + follow-redirects: "npm:^1.15.11" + form-data: "npm:^4.0.5" + proxy-from-env: "npm:^1.1.0" + checksum: 10/a7ed83c2af3ef21d64609df0f85e76893a915a864c5934df69241001d0578082d6521a0c730bf37518ee458821b5695957cb10db9fc705f2a8996c8686ea7a89 + languageName: node + linkType: hard + "axobject-query@npm:^4.1.0": version: 4.1.0 resolution: "axobject-query@npm:4.1.0" @@ -12748,6 +12768,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.11": + version: 1.15.11 + resolution: "follow-redirects@npm:1.15.11" + peerDependenciesMeta: + debug: + optional: true + checksum: 10/07372fd74b98c78cf4d417d68d41fdaa0be4dcacafffb9e67b1e3cf090bc4771515e65020651528faab238f10f9b9c0d9707d6c1574a6c0387c5de1042cde9ba + languageName: node + linkType: hard + "fontkit@npm:^2.0.2": version: 2.0.4 resolution: "fontkit@npm:2.0.4" @@ -12820,6 +12850,19 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.5": + version: 4.0.5 + resolution: "form-data@npm:4.0.5" + dependencies: + asynckit: "npm:^0.4.0" + combined-stream: "npm:^1.0.8" + es-set-tostringtag: "npm:^2.1.0" + hasown: "npm:^2.0.2" + mime-types: "npm:^2.1.12" + checksum: 10/52ecd6e927c8c4e215e68a7ad5e0f7c1031397439672fd9741654b4a94722c4182e74cc815b225dcb5be3f4180f36428f67c6dd39eaa98af0dcfdd26c00c19cd + languageName: node + linkType: hard + "formik@npm:^2.4.6": version: 2.4.6 resolution: "formik@npm:2.4.6" @@ -13011,9 +13054,9 @@ __metadata: linkType: hard "fuse.js@npm:^7.0.0": - version: 7.0.0 - resolution: "fuse.js@npm:7.0.0" - checksum: 10/d75d35f2d61afa85b8248f9cbfc7d4df29ae47ea574a15ad5c3c2a41930c5ed78668346295508b59ec4929fcb1a5cd6d9a8c649b5a3bc8b18e515f4e4cb9809d + version: 7.1.0 + resolution: "fuse.js@npm:7.1.0" + checksum: 10/9f9105e54372897a46cb3e04074f0db5bd0a428320d4618276a57e6142d7502235a556f05cf87aa3c5d6d9c6fdfa06b901b78379c48aa0951672ccbc4a1bfe70 languageName: node linkType: hard @@ -16013,7 +16056,7 @@ __metadata: "@faker-js/faker": "npm:^10.0.0" "@floating-ui/react": "npm:^0.27.16" "@happy-dom/jest-environment": "npm:^20.1.0" - "@mitodl/course-search-utils": "npm:^3.5.0" + "@mitodl/course-search-utils": "npm:^3.5.1" "@mitodl/mitxonline-api-axios": "npm:^2026.2.19" "@mitodl/smoot-design": "npm:^6.24.0" "@mui/material": "npm:^6.4.5" @@ -22191,6 +22234,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.21.0": + version: 6.21.0 + resolution: "undici-types@npm:6.21.0" + checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14 + languageName: node + linkType: hard + "undici-types@npm:~7.16.0": version: 7.16.0 resolution: "undici-types@npm:7.16.0"