diff --git a/frontends/api/src/generated/v1/api.ts b/frontends/api/src/generated/v1/api.ts index 09d442f00e..4ce15dede9 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 * `learning_format` - learning_format * `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 * `learning_format` - learning_format * `delivery` - delivery * `resource_category` - resource_category * @export * @enum {string} */ @@ -58,6 +58,7 @@ export const AggregationsEnumDescriptions = { professional: "professional", free: "free", learning_format: "learning_format", + delivery: "delivery", resource_category: "resource_category", } as const @@ -110,6 +111,10 @@ export const AggregationsEnum = { * learning_format */ LearningFormat: "learning_format", + /** + * delivery + */ + Delivery: "delivery", /** * resource_category */ @@ -674,6 +679,12 @@ export interface CourseResource { * @memberof CourseResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof CourseResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -802,6 +813,36 @@ export const CourseResourceCertificationTypeCodeEnum = { export type CourseResourceCertificationTypeCodeEnum = (typeof CourseResourceCertificationTypeCodeEnum)[keyof typeof CourseResourceCertificationTypeCodeEnum] +/** + * + * @export + * @interface CourseResourceDeliveryInner + */ +export interface CourseResourceDeliveryInner { + /** + * + * @type {string} + * @memberof CourseResourceDeliveryInner + */ + code: CourseResourceDeliveryInnerCodeEnum + /** + * + * @type {string} + * @memberof CourseResourceDeliveryInner + */ + name: string +} + +export const CourseResourceDeliveryInnerCodeEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const + +export type CourseResourceDeliveryInnerCodeEnum = + (typeof CourseResourceDeliveryInnerCodeEnum)[keyof typeof CourseResourceDeliveryInnerCodeEnum] + /** * * @export @@ -928,6 +969,40 @@ export const CourseResourceResourceTypeEnum = { export type CourseResourceResourceTypeEnum = (typeof CourseResourceResourceTypeEnum)[keyof typeof CourseResourceResourceTypeEnum] +/** + * * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @export + * @enum {string} + */ + +export const DeliveryEnumDescriptions = { + online: "Online", + hybrid: "Hybrid", + in_person: "In person", + offline: "Offline", +} as const + +export const DeliveryEnum = { + /** + * Online + */ + Online: "online", + /** + * Hybrid + */ + Hybrid: "hybrid", + /** + * In person + */ + InPerson: "in_person", + /** + * Offline + */ + Offline: "offline", +} as const + +export type DeliveryEnum = (typeof DeliveryEnum)[keyof typeof DeliveryEnum] + /** * * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @export @@ -1335,6 +1410,12 @@ export interface LearningPathResource { * @memberof LearningPathResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -3565,6 +3646,12 @@ export interface PercolateQuerySubscriptionRequestRequest { * @memberof PercolateQuerySubscriptionRequestRequest */ learning_format?: Array + /** + * The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + delivery?: Array /** * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material * @type {Array} @@ -3958,6 +4045,12 @@ export interface PodcastEpisodeResource { * @memberof PodcastEpisodeResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -4280,6 +4373,12 @@ export interface PodcastResource { * @memberof PodcastResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof PodcastResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -4822,6 +4921,12 @@ export interface ProgramResource { * @memberof ProgramResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof ProgramResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -5623,6 +5728,12 @@ export interface VideoPlaylistResource { * @memberof VideoPlaylistResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -5933,6 +6044,12 @@ export interface VideoResource { * @memberof VideoResource */ learning_format: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + delivery: Array /** * Return true if the resource is free/has a free option * @type {boolean} @@ -8269,6 +8386,7 @@ export const CoursesApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -8290,6 +8408,7 @@ export const CoursesApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -8336,6 +8455,10 @@ export const CoursesApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -8556,6 +8679,7 @@ export const CoursesApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -8577,6 +8701,7 @@ export const CoursesApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -8602,6 +8727,7 @@ export const CoursesApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -8731,6 +8857,7 @@ export const CoursesApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -8878,6 +9005,13 @@ export interface CoursesApiCoursesListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof CoursesApiCoursesList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -9063,6 +9197,7 @@ export class CoursesApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -9152,6 +9287,17 @@ export type CoursesListCertificationTypeEnum = /** * @export */ +export const CoursesListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type CoursesListDeliveryEnum = + (typeof CoursesListDeliveryEnum)[keyof typeof CoursesListDeliveryEnum] +/** + * @export + */ export const CoursesListDepartmentEnum = { _1: "1", _10: "10", @@ -9619,6 +9765,7 @@ export const FeaturedApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -9640,6 +9787,7 @@ export const FeaturedApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -9686,6 +9834,10 @@ export const FeaturedApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -9820,6 +9972,7 @@ export const FeaturedApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -9841,6 +9994,7 @@ export const FeaturedApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -9866,6 +10020,7 @@ export const FeaturedApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -9952,6 +10107,7 @@ export const FeaturedApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -10015,6 +10171,13 @@ export interface FeaturedApiFeaturedListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof FeaturedApiFeaturedList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -10152,6 +10315,7 @@ export class FeaturedApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -10203,6 +10367,17 @@ export type FeaturedListCertificationTypeEnum = /** * @export */ +export const FeaturedListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type FeaturedListDeliveryEnum = + (typeof FeaturedListDeliveryEnum)[keyof typeof FeaturedListDeliveryEnum] +/** + * @export + */ export const FeaturedListDepartmentEnum = { _1: "1", _10: "10", @@ -10697,6 +10872,7 @@ export const LearningResourcesApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -10718,6 +10894,7 @@ export const LearningResourcesApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -10764,6 +10941,10 @@ export const LearningResourcesApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -11169,6 +11350,7 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -11190,6 +11372,7 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -11216,6 +11399,7 @@ export const LearningResourcesApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -11450,6 +11634,7 @@ export const LearningResourcesApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -11701,6 +11886,13 @@ export interface LearningResourcesApiLearningResourcesListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -11980,6 +12172,7 @@ export class LearningResourcesApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -12091,6 +12284,17 @@ export type LearningResourcesListCertificationTypeEnum = /** * @export */ +export const LearningResourcesListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type LearningResourcesListDeliveryEnum = + (typeof LearningResourcesListDeliveryEnum)[keyof typeof LearningResourcesListDeliveryEnum] +/** + * @export + */ export const LearningResourcesListDepartmentEnum = { _1: "1", _10: "10", @@ -12245,6 +12449,7 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -12275,6 +12480,7 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -12331,6 +12537,10 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( localVarQueryParameter["course_feature"] = course_feature } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -12455,6 +12665,7 @@ export const LearningResourcesSearchApiFp = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -12485,6 +12696,7 @@ export const LearningResourcesSearchApiFp = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -12520,6 +12732,7 @@ export const LearningResourcesSearchApiFp = function ( certification, certification_type, course_feature, + delivery, department, dev_mode, free, @@ -12588,6 +12801,7 @@ export const LearningResourcesSearchApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -12625,7 +12839,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' | 'learning_format' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'learning_format' | 'delivery' | 'resource_category'>} * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve */ readonly aggregations?: Array @@ -12651,6 +12865,13 @@ export interface LearningResourcesSearchApiLearningResourcesSearchRetrieveReques */ readonly course_feature?: Array + /** + * The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array<'online' | 'hybrid' | 'in_person' | 'offline'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly delivery?: Array + /** * The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -12831,6 +13052,7 @@ export class LearningResourcesSearchApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -12875,6 +13097,7 @@ export const LearningResourcesSearchRetrieveAggregationsEnum = { Professional: "professional", Free: "free", LearningFormat: "learning_format", + Delivery: "delivery", ResourceCategory: "resource_category", } as const export type LearningResourcesSearchRetrieveAggregationsEnum = @@ -12893,6 +13116,17 @@ export type LearningResourcesSearchRetrieveCertificationTypeEnum = /** * @export */ +export const LearningResourcesSearchRetrieveDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type LearningResourcesSearchRetrieveDeliveryEnum = + (typeof LearningResourcesSearchRetrieveDeliveryEnum)[keyof typeof LearningResourcesSearchRetrieveDeliveryEnum] +/** + * @export + */ export const LearningResourcesSearchRetrieveDepartmentEnum = { _1: "1", _2: "2", @@ -13068,6 +13302,7 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -13099,6 +13334,7 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -13156,6 +13392,10 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["course_feature"] = course_feature } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -13271,6 +13511,7 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -13301,6 +13542,7 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -13357,6 +13599,10 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["course_feature"] = course_feature } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -13468,6 +13714,7 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -13500,6 +13747,7 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -13558,6 +13806,10 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["course_feature"] = course_feature } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -13744,6 +13996,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -13775,6 +14028,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -13811,6 +14065,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( certification, certification_type, course_feature, + delivery, department, dev_mode, free, @@ -13856,6 +14111,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -13886,6 +14142,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -13921,6 +14178,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( certification, certification_type, course_feature, + delivery, department, dev_mode, free, @@ -13965,6 +14223,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {boolean | null} [certification] True if the learning resource offers a certificate * @param {Array} [certification_type] The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] The course feature. Possible options are at api/v1/course_features/ + * @param {Array} [delivery] The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations * @param {boolean | null} [free] @@ -13997,6 +14256,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( certification?: boolean | null, certification_type?: Array, course_feature?: Array, + delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, @@ -14031,6 +14291,7 @@ export const LearningResourcesUserSubscriptionApiFp = function ( certification, certification_type, course_feature, + delivery, department, dev_mode, free, @@ -14132,6 +14393,7 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -14176,6 +14438,7 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -14219,6 +14482,7 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -14276,7 +14540,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' | 'learning_format' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'learning_format' | 'delivery' | 'resource_category'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList */ readonly aggregations?: Array @@ -14302,6 +14566,13 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr */ readonly course_feature?: Array + /** + * The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array<'online' | 'hybrid' | 'in_person' | 'offline'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly delivery?: Array + /** * The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -14472,7 +14743,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' | 'learning_format' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'learning_format' | 'delivery' | 'resource_category'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList */ readonly aggregations?: Array @@ -14498,6 +14769,13 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr */ readonly course_feature?: Array + /** + * The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array<'online' | 'hybrid' | 'in_person' | 'offline'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly delivery?: Array + /** * The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -14661,7 +14939,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' | 'learning_format' | 'resource_category'>} + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'learning_format' | 'delivery' | 'resource_category'>} * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate */ readonly aggregations?: Array @@ -14687,6 +14965,13 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr */ readonly course_feature?: Array + /** + * The delivery options in which the learning resource is offered * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array<'online' | 'hybrid' | 'in_person' | 'offline'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly delivery?: Array + /** * The department that offers the learning resource * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -14895,6 +15180,7 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -14941,6 +15227,7 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -14986,6 +15273,7 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, @@ -15052,6 +15340,7 @@ export const LearningResourcesUserSubscriptionCheckListAggregationsEnum = { Professional: "professional", Free: "free", LearningFormat: "learning_format", + Delivery: "delivery", ResourceCategory: "resource_category", } as const export type LearningResourcesUserSubscriptionCheckListAggregationsEnum = @@ -15070,6 +15359,17 @@ export type LearningResourcesUserSubscriptionCheckListCertificationTypeEnum = /** * @export */ +export const LearningResourcesUserSubscriptionCheckListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type LearningResourcesUserSubscriptionCheckListDeliveryEnum = + (typeof LearningResourcesUserSubscriptionCheckListDeliveryEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListDeliveryEnum] +/** + * @export + */ export const LearningResourcesUserSubscriptionCheckListDepartmentEnum = { _1: "1", _2: "2", @@ -15254,6 +15554,7 @@ export const LearningResourcesUserSubscriptionListAggregationsEnum = { Professional: "professional", Free: "free", LearningFormat: "learning_format", + Delivery: "delivery", ResourceCategory: "resource_category", } as const export type LearningResourcesUserSubscriptionListAggregationsEnum = @@ -15272,6 +15573,17 @@ export type LearningResourcesUserSubscriptionListCertificationTypeEnum = /** * @export */ +export const LearningResourcesUserSubscriptionListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type LearningResourcesUserSubscriptionListDeliveryEnum = + (typeof LearningResourcesUserSubscriptionListDeliveryEnum)[keyof typeof LearningResourcesUserSubscriptionListDeliveryEnum] +/** + * @export + */ export const LearningResourcesUserSubscriptionListDepartmentEnum = { _1: "1", _2: "2", @@ -15448,6 +15760,7 @@ export const LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = Professional: "professional", Free: "free", LearningFormat: "learning_format", + Delivery: "delivery", ResourceCategory: "resource_category", } as const export type LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = @@ -15467,6 +15780,17 @@ export type LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnu /** * @export */ +export const LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum] +/** + * @export + */ export const LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum = { _1: "1", _2: "2", @@ -16068,6 +16392,7 @@ export const LearningpathsApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -16089,6 +16414,7 @@ export const LearningpathsApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -16135,6 +16461,10 @@ export const LearningpathsApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -16573,6 +16903,7 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -16594,6 +16925,7 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -16620,6 +16952,7 @@ export const LearningpathsApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -16875,6 +17208,7 @@ export const LearningpathsApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -17111,6 +17445,13 @@ export interface LearningpathsApiLearningpathsListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof LearningpathsApiLearningpathsList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -17414,6 +17755,7 @@ export class LearningpathsApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -17486,6 +17828,17 @@ export type LearningpathsListCertificationTypeEnum = /** * @export */ +export const LearningpathsListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type LearningpathsListDeliveryEnum = + (typeof LearningpathsListDeliveryEnum)[keyof typeof LearningpathsListDeliveryEnum] +/** + * @export + */ export const LearningpathsListDepartmentEnum = { _1: "1", _10: "10", @@ -18251,6 +18604,7 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -18272,6 +18626,7 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -18318,6 +18673,10 @@ export const PodcastEpisodesApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -18453,6 +18812,7 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -18474,6 +18834,7 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -18500,6 +18861,7 @@ export const PodcastEpisodesApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -18589,6 +18951,7 @@ export const PodcastEpisodesApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -18652,6 +19015,13 @@ export interface PodcastEpisodesApiPodcastEpisodesListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -18789,6 +19159,7 @@ export class PodcastEpisodesApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -18840,6 +19211,17 @@ export type PodcastEpisodesListCertificationTypeEnum = /** * @export */ +export const PodcastEpisodesListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type PodcastEpisodesListDeliveryEnum = + (typeof PodcastEpisodesListDeliveryEnum)[keyof typeof PodcastEpisodesListDeliveryEnum] +/** + * @export + */ export const PodcastEpisodesListDepartmentEnum = { _1: "1", _10: "10", @@ -19118,6 +19500,7 @@ export const PodcastsApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -19139,6 +19522,7 @@ export const PodcastsApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -19185,6 +19569,10 @@ export const PodcastsApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -19395,6 +19783,7 @@ export const PodcastsApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -19416,6 +19805,7 @@ export const PodcastsApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -19441,6 +19831,7 @@ export const PodcastsApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -19567,6 +19958,7 @@ export const PodcastsApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -19686,6 +20078,13 @@ export interface PodcastsApiPodcastsListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof PodcastsApiPodcastsList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -19867,6 +20266,7 @@ export class PodcastsApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -19918,6 +20318,17 @@ export type PodcastsListCertificationTypeEnum = /** * @export */ +export const PodcastsListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type PodcastsListDeliveryEnum = + (typeof PodcastsListDeliveryEnum)[keyof typeof PodcastsListDeliveryEnum] +/** + * @export + */ export const PodcastsListDepartmentEnum = { _1: "1", _10: "10", @@ -20230,6 +20641,7 @@ export const ProgramsApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -20251,6 +20663,7 @@ export const ProgramsApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -20297,6 +20710,10 @@ export const ProgramsApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -20431,6 +20848,7 @@ export const ProgramsApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -20452,6 +20870,7 @@ export const ProgramsApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -20477,6 +20896,7 @@ export const ProgramsApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -20563,6 +20983,7 @@ export const ProgramsApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -20626,6 +21047,13 @@ export interface ProgramsApiProgramsListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof ProgramsApiProgramsList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -20763,6 +21191,7 @@ export class ProgramsApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -20814,6 +21243,17 @@ export type ProgramsListCertificationTypeEnum = /** * @export */ +export const ProgramsListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type ProgramsListDeliveryEnum = + (typeof ProgramsListDeliveryEnum)[keyof typeof ProgramsListDeliveryEnum] +/** + * @export + */ export const ProgramsListDepartmentEnum = { _1: "1", _10: "10", @@ -23239,6 +23679,7 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -23260,6 +23701,7 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -23306,6 +23748,10 @@ export const VideoPlaylistsApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -23520,6 +23966,7 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -23541,6 +23988,7 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -23567,6 +24015,7 @@ export const VideoPlaylistsApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -23694,6 +24143,7 @@ export const VideoPlaylistsApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -23813,6 +24263,13 @@ export interface VideoPlaylistsApiVideoPlaylistsListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -23994,6 +24451,7 @@ export class VideoPlaylistsApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -24045,6 +24503,17 @@ export type VideoPlaylistsListCertificationTypeEnum = /** * @export */ +export const VideoPlaylistsListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type VideoPlaylistsListDeliveryEnum = + (typeof VideoPlaylistsListDeliveryEnum)[keyof typeof VideoPlaylistsListDeliveryEnum] +/** + * @export + */ export const VideoPlaylistsListDepartmentEnum = { _1: "1", _10: "10", @@ -24198,6 +24667,7 @@ export const VideosApiAxiosParamCreator = function ( * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -24219,6 +24689,7 @@ export const VideosApiAxiosParamCreator = function ( certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -24265,6 +24736,10 @@ export const VideosApiAxiosParamCreator = function ( ) } + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + if (department) { localVarQueryParameter["department"] = department } @@ -24399,6 +24874,7 @@ export const VideosApiFp = function (configuration?: Configuration) { * @param {boolean} [certification] * @param {Array} [certification_type] The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate * @param {Array} [course_feature] Multiple values may be separated by commas. + * @param {Array>} [delivery] The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline * @param {Array} [department] The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @param {boolean} [free] The course/program is offered for free * @param {Array>} [learning_format] The learning format of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person @@ -24420,6 +24896,7 @@ export const VideosApiFp = function (configuration?: Configuration) { certification?: boolean, certification_type?: Array, course_feature?: Array, + delivery?: Array>, department?: Array, free?: boolean, learning_format?: Array>, @@ -24445,6 +24922,7 @@ export const VideosApiFp = function (configuration?: Configuration) { certification, certification_type, course_feature, + delivery, department, free, learning_format, @@ -24530,6 +25008,7 @@ export const VideosApiFactory = function ( requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -24593,6 +25072,13 @@ export interface VideosApiVideosListRequest { */ readonly course_feature?: Array + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof VideosApiVideosList + */ + readonly delivery?: Array> + /** * The department that offers learning resources * `1` - Civil and Environmental Engineering * `2` - Mechanical Engineering * `3` - Materials Science and Engineering * `4` - Architecture * `5` - Chemistry * `6` - Electrical Engineering and Computer Science * `7` - Biology * `8` - Physics * `9` - Brain and Cognitive Sciences * `10` - Chemical Engineering * `11` - Urban Studies and Planning * `12` - Earth, Atmospheric, and Planetary Sciences * `14` - Economics * `15` - Management * `16` - Aeronautics and Astronautics * `17` - Political Science * `18` - Mathematics * `20` - Biological Engineering * `21A` - Anthropology * `21G` - Global Languages * `21H` - History * `21L` - Literature * `21M` - Music and Theater Arts * `22` - Nuclear Science and Engineering * `24` - Linguistics and Philosophy * `CC` - Concourse * `CMS-W` - Comparative Media Studies/Writing * `EC` - Edgerton Center * `ES` - Experimental Study Group * `ESD` - Engineering Systems Division * `HST` - Medical Engineering and Science * `IDS` - Data, Systems, and Society * `MAS` - Media Arts and Sciences * `PE` - Athletics, Physical Education and Recreation * `SP` - Special Programs * `STS` - Science, Technology, and Society * `WGS` - Women\'s and Gender Studies * @type {Array<'1' | '10' | '11' | '12' | '14' | '15' | '16' | '17' | '18' | '2' | '20' | '21A' | '21G' | '21H' | '21L' | '21M' | '22' | '24' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'CC' | 'CMS-W' | 'EC' | 'ES' | 'ESD' | 'HST' | 'IDS' | 'MAS' | 'PE' | 'SP' | 'STS' | 'WGS'>} @@ -24730,6 +25216,7 @@ export class VideosApi extends BaseAPI { requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, + requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.learning_format, @@ -24781,6 +25268,17 @@ export type VideosListCertificationTypeEnum = /** * @export */ +export const VideosListDeliveryEnum = { + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const +export type VideosListDeliveryEnum = + (typeof VideosListDeliveryEnum)[keyof typeof VideosListDeliveryEnum] +/** + * @export + */ export const VideosListDepartmentEnum = { _1: "1", _10: "10", diff --git a/learning_resources/constants.py b/learning_resources/constants.py index f0bb624de6..71c464c32a 100644 --- a/learning_resources/constants.py +++ b/learning_resources/constants.py @@ -270,13 +270,25 @@ class LevelType(ExtendedEnum): class LearningResourceFormat(ExtendedEnum): - """Enum for resource formats""" + """Enum for resource learning_format""" online = "Online" hybrid = "Hybrid" in_person = "In person" +class LearningResourceDelivery(ExtendedEnum): + """ + Enum for resource delivery methods. This + will eventually replace LearningResourceFormat + """ + + online = "Online" + hybrid = "Hybrid" + in_person = "In person" + offline = "Offline" + + class CertificationType(ExtendedEnum): """Enum for resource certification types""" diff --git a/learning_resources/etl/ocw.py b/learning_resources/etl/ocw.py index e6a25d6350..5e2eb55051 100644 --- a/learning_resources/etl/ocw.py +++ b/learning_resources/etl/ocw.py @@ -20,6 +20,7 @@ CONTENT_TYPE_VIDEO, VALID_TEXT_FILE_TYPES, Availability, + LearningResourceDelivery, LearningResourceType, OfferedBy, PlatformType, @@ -33,7 +34,11 @@ transform_levels, transform_topics, ) -from learning_resources.models import ContentFile, LearningResource +from learning_resources.models import ( + ContentFile, + LearningResource, + default_learning_format, +) from learning_resources.utils import ( get_s3_object_and_read, parse_instructors, @@ -48,6 +53,22 @@ UNIQUE_FIELD = "url" +def parse_delivery(course_data: dict) -> list[str]: + """ + Parse delivery methods + + Args: + url (str): The course url + + Returns: + list[str]: The delivery method(s) + """ + delivery = default_learning_format() + if not course_data.get("hide_download"): + delivery.append(LearningResourceDelivery.offline.name) + return delivery + + def transform_content_files( s3_resource: boto3.resource, course_prefix: str, @@ -343,6 +364,7 @@ def transform_course(course_data: dict) -> dict: "resource_type": LearningResourceType.course.name, "unique_field": UNIQUE_FIELD, "availability": Availability.anytime.name, + "delivery": parse_delivery(course_data), } diff --git a/learning_resources/etl/ocw_test.py b/learning_resources/etl/ocw_test.py index 08896026ee..1b31ba70b3 100644 --- a/learning_resources/etl/ocw_test.py +++ b/learning_resources/etl/ocw_test.py @@ -9,7 +9,7 @@ from moto import mock_s3 from learning_resources.conftest import OCW_TEST_PREFIX, setup_s3_ocw -from learning_resources.constants import DEPARTMENTS +from learning_resources.constants import DEPARTMENTS, LearningResourceDelivery from learning_resources.etl.constants import CourseNumberType, ETLSource from learning_resources.etl.ocw import ( transform_content_files, @@ -174,19 +174,37 @@ def test_transform_content_file_needs_text_update( "term", "year", "expected_id", + "hide_download", ), [ - ("legacy-uid", None, "legacyuid", False, "Spring", "2005", "16.01+spring_2005"), - (None, "site-uid", "siteuid", True, "", 2005, "16.01_2005"), - (None, "site-uid", "siteuid", True, "Fall", 2005, "16.01+fall_2005"), - (None, "site-uid", "siteuid", True, "Fall", None, "16.01+fall"), - (None, "site-uid", "siteuid", True, "", "", "16.01"), - (None, "site-uid", "siteuid", True, None, None, "16.01"), - (None, None, None, True, "Spring", "2005", None), + ( + "legacy-uid", + None, + "legacyuid", + False, + "Spring", + "2005", + "16.01+spring_2005", + False, + ), + (None, "site-uid", "siteuid", True, "", 2005, "16.01_2005", True), + (None, "site-uid", "siteuid", True, "Fall", 2005, "16.01+fall_2005", None), + (None, "site-uid", "siteuid", True, "Fall", None, "16.01+fall", False), + (None, "site-uid", "siteuid", True, "", "", "16.01", True), + (None, "site-uid", "siteuid", True, None, None, "16.01", False), + (None, None, None, True, "Spring", "2005", None, None), ], ) def test_transform_course( # noqa: PLR0913 - settings, legacy_uid, site_uid, expected_uid, has_extra_num, term, year, expected_id + settings, + legacy_uid, + site_uid, + expected_uid, + has_extra_num, + term, + year, + expected_id, + hide_download, ): """transform_course should return expected data""" settings.OCW_BASE_URL = "http://test.edu/" @@ -201,6 +219,7 @@ def test_transform_course( # noqa: PLR0913 course_json["year"] = year course_json["legacy_uid"] = legacy_uid course_json["site_uid"] = site_uid + course_json["hide_download"] = hide_download course_json["extra_course_numbers"] = "1, 2" if has_extra_num else None extracted_json = { **course_json, @@ -208,10 +227,14 @@ def test_transform_course( # noqa: PLR0913 "slug": "slug", "url": "http://test.edu/slug", } + expected_delivery = [LearningResourceDelivery.online.name] + ( + [] if hide_download else [LearningResourceDelivery.offline.name] + ) transformed_json = transform_course(extracted_json) if expected_uid: assert transformed_json["readable_id"] == expected_id assert transformed_json["etl_source"] == ETLSource.ocw.name + assert transformed_json["delivery"] == expected_delivery assert transformed_json["runs"][0]["run_id"] == expected_uid assert transformed_json["runs"][0]["level"] == ["undergraduate", "high_school"] assert transformed_json["runs"][0]["semester"] == (term if term else None) diff --git a/learning_resources/etl/prolearn.py b/learning_resources/etl/prolearn.py index 5dfbe7b9af..87dd0b404f 100644 --- a/learning_resources/etl/prolearn.py +++ b/learning_resources/etl/prolearn.py @@ -11,7 +11,7 @@ from learning_resources.constants import Availability, CertificationType from learning_resources.etl.constants import ETLSource -from learning_resources.etl.utils import transform_format, transform_topics +from learning_resources.etl.utils import transform_delivery, transform_topics from learning_resources.models import LearningResourceOfferor, LearningResourcePlatform from main.utils import clean_data, now_in_utc @@ -189,6 +189,7 @@ def update_format(unique_resource: dict, resource_format: list[str]): unique_resource["learning_format"] = sorted( set(unique_resource["learning_format"] + resource_format) ) + unique_resource["delivery"] = unique_resource["learning_format"] def extract_data(course_or_program: str) -> list[dict]: @@ -265,7 +266,7 @@ def transform_programs(programs: list[dict]) -> list[dict]: "professional": True, "certification": True, "certification_type": CertificationType.professional.name, - "learning_format": transform_format(program["format_name"]), + "learning_format": transform_delivery(program["format_name"]), "runs": runs, "topics": parse_topic(program, offered_by.code) if offered_by else None, "courses": [ @@ -355,7 +356,7 @@ def _transform_course( "course": { "course_numbers": [], }, - "learning_format": transform_format(course["format_name"]), + "learning_format": transform_delivery(course["format_name"]), "published": True, "topics": parse_topic(course, offered_by.code) if offered_by else None, "runs": runs, diff --git a/learning_resources/etl/prolearn_test.py b/learning_resources/etl/prolearn_test.py index d6c98d48fb..b050f17949 100644 --- a/learning_resources/etl/prolearn_test.py +++ b/learning_resources/etl/prolearn_test.py @@ -32,7 +32,7 @@ transform_programs, update_format, ) -from learning_resources.etl.utils import transform_format +from learning_resources.etl.utils import transform_delivery from learning_resources.factories import ( LearningResourceOfferorFactory, LearningResourcePlatformFactory, @@ -157,7 +157,8 @@ def test_prolearn_transform_programs(mock_csail_programs_data): else None, "etl_source": ETLSource.prolearn.name, "professional": True, - "learning_format": transform_format(program["format_name"]), + "learning_format": transform_delivery(program["format_name"]), + "delivery": transform_delivery(program["format_name"]), "certification": True, "certification_type": CertificationType.professional.name, "runs": [ @@ -226,7 +227,8 @@ def test_prolearn_transform_courses(mock_mitpe_courses_data): "professional": True, "certification": True, "certification_type": CertificationType.professional.name, - "learning_format": transform_format(course["format_name"]), + "learning_format": transform_delivery(course["format_name"]), + "delivery": transform_delivery(course["format_name"]), "topics": parse_topic(course, "mitpe"), "url": course["course_link"] if urlparse(course["course_link"]).path @@ -395,6 +397,7 @@ def test_update_format( first_course["learning_format"] = old_format update_format(first_course, new_format) assert first_course["learning_format"] == sorted(expected_format) + assert first_course["delivery"] == sorted(expected_format) @pytest.mark.parametrize("sloan_api_enabled", [True, False]) diff --git a/learning_resources/etl/sloan.py b/learning_resources/etl/sloan.py index b88b2a0229..fcb3fd289a 100644 --- a/learning_resources/etl/sloan.py +++ b/learning_resources/etl/sloan.py @@ -18,7 +18,7 @@ ) from learning_resources.etl.constants import ETLSource from learning_resources.etl.utils import ( - transform_format, + transform_delivery, transform_topics, ) @@ -202,7 +202,9 @@ def transform_course(course_data: dict, runs_data: dict) -> dict: course_runs_data = [ run for run in runs_data if run["Course_Id"] == course_data["Course_Id"] ] - + format_delivery = list( + {transform_delivery(run["Delivery"])[0] for run in course_runs_data} + ) transformed_course = { "readable_id": course_data["Course_Id"], "title": course_data["Title"], @@ -216,9 +218,8 @@ def transform_course(course_data: dict, runs_data: dict) -> dict: "certification_type": CertificationType.professional.name, "professional": True, "published": True, - "learning_format": list( - {transform_format(run["Delivery"])[0] for run in course_runs_data} - ), + "learning_format": format_delivery, + "delivery": format_delivery, "topics": parse_topics(course_data["Topics"]), "course": { "course_numbers": [], diff --git a/learning_resources/etl/sloan_test.py b/learning_resources/etl/sloan_test.py index f0bb3b4b4f..b3ae4effc8 100644 --- a/learning_resources/etl/sloan_test.py +++ b/learning_resources/etl/sloan_test.py @@ -15,7 +15,7 @@ parse_datetime, parse_image, transform_course, - transform_format, + transform_delivery, transform_run, ) from learning_resources.factories import ( @@ -139,8 +139,9 @@ def test_transform_course(mock_sloan_courses_data, mock_sloan_runs_data): transform_run(run, course_data) for run in course_runs_data ] assert transformed["learning_format"] == list( - {transform_format(run["Delivery"])[0] for run in course_runs_data} + {transform_delivery(run["Delivery"])[0] for run in course_runs_data} ) + assert transformed["delivery"] == transformed["learning_format"] assert transformed["image"] == parse_image(course_data) assert transformed["availability"] == parse_availability(course_runs_data) assert sorted(transformed.keys()) == sorted( @@ -158,6 +159,7 @@ def test_transform_course(mock_sloan_courses_data, mock_sloan_runs_data): "professional", "published", "learning_format", + "delivery", "topics", "course", "runs", diff --git a/learning_resources/etl/utils.py b/learning_resources/etl/utils.py index 5fb7217dc7..f0871b243d 100644 --- a/learning_resources/etl/utils.py +++ b/learning_resources/etl/utils.py @@ -687,7 +687,7 @@ def most_common_topics( return [{"name": topic} for topic in common_topics] -def transform_format(resource_format: str) -> list[str]: +def transform_delivery(resource_delivery: str) -> list[str]: """ Return the correct format of the resource @@ -699,9 +699,9 @@ def transform_format(resource_format: str) -> list[str]: """ try: - return [RESOURCE_FORMAT_MAPPING[resource_format]] + return [RESOURCE_FORMAT_MAPPING[resource_delivery]] except KeyError: - log.exception("Invalid format %s", resource_format) + log.exception("Invalid format %s", resource_delivery) return [LearningResourceFormat.online.name] diff --git a/learning_resources/etl/utils_test.py b/learning_resources/etl/utils_test.py index 4ab54b1053..6a3f37a694 100644 --- a/learning_resources/etl/utils_test.py +++ b/learning_resources/etl/utils_test.py @@ -371,13 +371,15 @@ def test_most_common_topics(): ) def test_parse_format(original, expected): """parse_format should return expected format""" - assert utils.transform_format(original) == [expected] + assert utils.transform_delivery(original) == [expected] def test_parse_bad_format(mocker): """An exception log should be called for invalid formats""" mock_log = mocker.patch("learning_resources.etl.utils.log.exception") - assert utils.transform_format("bad_format") == [LearningResourceFormat.online.name] + assert utils.transform_delivery("bad_format") == [ + LearningResourceFormat.online.name + ] mock_log.assert_called_once_with("Invalid format %s", "bad_format") diff --git a/learning_resources/etl/xpro.py b/learning_resources/etl/xpro.py index 7bbb4cbd4f..8090915284 100644 --- a/learning_resources/etl/xpro.py +++ b/learning_resources/etl/xpro.py @@ -17,7 +17,7 @@ from learning_resources.etl.constants import ETLSource from learning_resources.etl.utils import ( generate_course_numbers_json, - transform_format, + transform_delivery, transform_topics, ) from main.utils import clean_data @@ -145,7 +145,8 @@ def _transform_learning_resource_course(course): "topics": parse_topics(course), "runs": [_transform_run(course_run) for course_run in course["courseruns"]], "resource_type": LearningResourceType.course.name, - "learning_format": transform_format(course.get("format")), + "learning_format": transform_delivery(course.get("format")), + "delivery": transform_delivery(course.get("format")), "course": { "course_numbers": generate_course_numbers_json( course["readable_id"], is_ocw=False @@ -190,7 +191,8 @@ def transform_programs(programs): "topics": parse_topics(program), "platform": XPRO_PLATFORM_TRANSFORM.get(program["platform"], None), "resource_type": LearningResourceType.program.name, - "learning_format": transform_format(program.get("format")), + "learning_format": transform_delivery(program.get("format")), + "delivery": transform_delivery(program.get("format")), "runs": [ { "prices": ( diff --git a/learning_resources/etl/xpro_test.py b/learning_resources/etl/xpro_test.py index 352dc4c136..35af294242 100644 --- a/learning_resources/etl/xpro_test.py +++ b/learning_resources/etl/xpro_test.py @@ -16,7 +16,7 @@ from learning_resources.etl import xpro from learning_resources.etl.constants import CourseNumberType, ETLSource from learning_resources.etl.utils import ( - transform_format, + transform_delivery, ) from learning_resources.etl.xpro import _parse_datetime, parse_topics from learning_resources.factories import ( @@ -110,7 +110,8 @@ def test_xpro_transform_programs(mock_xpro_programs_data): "topics": parse_topics(program_data), "platform": PlatformType.xpro.name, "resource_type": LearningResourceType.program.name, - "learning_format": transform_format(program_data.get("format")), + "learning_format": transform_delivery(program_data.get("format")), + "delivery": transform_delivery(program_data.get("format")), "runs": [ { "run_id": program_data["readable_id"], @@ -140,7 +141,8 @@ def test_xpro_transform_programs(mock_xpro_programs_data): "description": course_data["description"], "url": course_data.get("url", None), "offered_by": xpro.OFFERED_BY, - "learning_format": transform_format(course_data.get("format")), + "learning_format": transform_delivery(course_data.get("format")), + "delivery": transform_delivery(course_data.get("format")), "professional": True, "published": any( course_run.get("current_price", None) @@ -211,7 +213,8 @@ def test_xpro_transform_courses(mock_xpro_courses_data): "description": course_data["description"], "url": course_data.get("url"), "offered_by": xpro.OFFERED_BY, - "learning_format": transform_format(course_data.get("format")), + "learning_format": transform_delivery(course_data.get("format")), + "delivery": transform_delivery(course_data.get("format")), "published": any( course_run.get("current_price", None) for course_run in course_data["courseruns"] diff --git a/learning_resources/factories.py b/learning_resources/factories.py index 4c1a279d92..415c853690 100644 --- a/learning_resources/factories.py +++ b/learning_resources/factories.py @@ -14,6 +14,7 @@ from learning_resources.constants import ( DEPARTMENTS, Availability, + LearningResourceDelivery, LearningResourceFormat, LevelType, PlatformType, @@ -215,6 +216,7 @@ class LearningResourceFactory(DjangoModelFactory): content_tags = factory.PostGeneration(_post_gen_tags) published = True learning_format = factory.List(random.choices(LearningResourceFormat.names())) # noqa: S311 + delivery = factory.List(random.choices(LearningResourceDelivery.names())) # noqa: S311 professional = factory.LazyAttribute( lambda o: o.resource_type in ( diff --git a/learning_resources/filters.py b/learning_resources/filters.py index ca5635bb9f..bf876a682a 100644 --- a/learning_resources/filters.py +++ b/learning_resources/filters.py @@ -16,6 +16,7 @@ LEARNING_RESOURCE_SORTBY_OPTIONS, RESOURCE_CATEGORY_VALUES, CertificationType, + LearningResourceDelivery, LearningResourceFormat, LearningResourceType, LevelType, @@ -109,6 +110,12 @@ class LearningResourceFilter(FilterSet): choices=LearningResourceFormat.as_list(), ) + delivery = MultipleChoiceFilter( + label="The delivery of course/program resources", + method="filter_delivery", + choices=LearningResourceDelivery.as_list(), + ) + certification_type = MultipleChoiceFilter( label="The type of certification offered", choices=CertificationType.as_tuple(), @@ -192,6 +199,11 @@ def filter_format(self, queryset, _, value): values = [[LearningResourceFormat[val].name] for val in value] return multi_or_filter(queryset, "learning_format__contains", values) + def filter_delivery(self, queryset, _, value): + """Format Filter for learning resources""" + values = [[LearningResourceDelivery[val].name] for val in value] + return multi_or_filter(queryset, "delivery__contains", values) + class Meta: model = LearningResource fields = ["professional", "certification"] diff --git a/learning_resources/filters_test.py b/learning_resources/filters_test.py index fc1546de89..4fabb6a398 100644 --- a/learning_resources/filters_test.py +++ b/learning_resources/filters_test.py @@ -9,6 +9,7 @@ LEARNING_MATERIAL_RESOURCE_CATEGORY, LEARNING_RESOURCE_SORTBY_OPTIONS, CertificationType, + LearningResourceDelivery, LearningResourceFormat, LearningResourceType, LevelType, @@ -515,6 +516,38 @@ def test_learning_resource_filter_formats(mock_courses, client): ) +def test_learning_resource_filter_delivery(mock_courses, client): + """Test that the delivery filter works""" + LearningResource.objects.filter(id=mock_courses.ocw_course.id).update( + delivery=[LearningResourceDelivery.online.name] + ) + LearningResource.objects.filter(id=mock_courses.mitx_course.id).update( + delivery=[ + LearningResourceDelivery.online.name, + LearningResourceDelivery.hybrid.name, + ] + ) + LearningResource.objects.filter(id=mock_courses.mitpe_course.id).update( + delivery=[ + LearningResourceDelivery.hybrid.name, + LearningResourceDelivery.in_person.name, + ] + ) + + results = client.get( + f"{RESOURCE_API_URL}?delivery={LearningResourceDelivery.in_person.name}" + ).json()["results"] + assert len(results) == 1 + assert results[0]["id"] == mock_courses.mitpe_course.id + + multiformats_filter = f"delivery={LearningResourceDelivery.in_person.name}&delivery={LearningResourceDelivery.hybrid.name}" + results = client.get(f"{RESOURCE_API_URL}?{multiformats_filter}").json()["results"] + assert len(results) == 2 + assert sorted([result["readable_id"] for result in results]) == sorted( + [mock_courses.mitx_course.readable_id, mock_courses.mitpe_course.readable_id] + ) + + def test_content_file_filter_run_id(mock_content_files, client): """Test that the run_id filter works for contentfiles""" diff --git a/learning_resources/migrations/0062_learningresource_delivery_format_pace.py b/learning_resources/migrations/0062_learningresource_delivery_format_pace.py new file mode 100644 index 0000000000..5318553c48 --- /dev/null +++ b/learning_resources/migrations/0062_learningresource_delivery_format_pace.py @@ -0,0 +1,145 @@ +# Generated by Django 4.2.15 on 2024-09-04 15:18 +from urllib.parse import urljoin + +import django.contrib.postgres.fields +from django.conf import settings +from django.db import migrations, models + +import learning_resources.models +from learning_resources.constants import LearningResourceDelivery +from learning_resources.etl.constants import ETLSource + +OCW_HIDDEN_DOWNLOADS = [ + "11-308j-ecological-urbanism-spring-2024", + "11-309j-sensing-place-photography-as-inquiry-spring-2024", + "11-405-just-money-banking-as-if-society-mattered-spring-2021", + "12-340x-global-warming-science-spring-2020", + "15-053x-optimization-methods-in-business-analytics-summer-2021", + "15-480x-the-science-and-business-of-biotechnology-fall-2021", + "15-481x-adaptive-markets-financial-market-dynamics-and-human-behavior-fall-2022", + "18-01-calculus-i-single-variable-calculus-fall-2020", + "2-009-product-engineering-process-fall-2021", + "2-00b-toy-product-design-spring-2021", + "3-012sx-structure-of-materials-spring-2019", + "3-15x-electrical-optical-and-magnetic-materials-and-devices-spring-2020", + "6-00-introduction-to-computer-science-and-programming-fall-2008", + "6-00sc-introduction-to-computer-science-and-programming-spring-2011", + "6-036-introduction-to-machine-learning-fall-2020", + "6-4210-robotic-manipulation-fall-2022", + "6-5060-algorithm-engineering-spring-2023", + "6-5830-database-systems-fall-2023", + "6-832-underactuated-robotics-spring-2022", + "6-s062-generative-artificial-intelligence-in-k12-education-fall-2023", + "6-s191-introduction-to-deep-learning-january-iap-2020", + "6-s980-machine-learning-for-inverse-graphics-fall-2022", + "7-00-covid-19-sars-cov-2-and-the-pandemic-fall-2020", + "7-00-covid-19-sars-cov-2-and-the-pandemic-fall-2021", + "8-02-physics-ii-electricity-and-magnetism-spring-2019", + "8-370x-quantum-information-science-i-spring-2018", + "8-371x-quantum-information-science-ii-spring-2018", + "8-s271-nuclear-weapons-history-and-future-prospects-spring-2022", + "hst-936x-global-health-informatics-to-improve-quality-of-care-spring-2020", + "hst-953-collaborative-data-science-for-healthcare-fall-2020", + "res-11-001-cite-reports-fall-2015", + "res-11-003-climate-justice-instructional-toolkit-fall-2023", + "res-11-550-leveraging-urban-mobility-disruptions-to-create-better-cities-spring-2021", + "res-12-002-terrascope-spring-2023", + "res-14-003-the-roosevelt-project-spring-2023", + "res-15-001-mit-sloan-learningedge-fall-2008", + "res-15-005-healthcare-finance-15-482x-spring-2019", + "res-16-002-how-to-cad-almost-anything-january-iap-2024", + "res-17-001-mit-election-data-science-lab-fall-2020", + "res-17-002-mit-governance-lab-spring-2023", + "res-18-003-calculus-for-beginners-and-artists-spring-2005", + "res-21g-3001-teaching-la-princesse-de-cleves-fall-2023", + "res-21g-3002-teaching-marguerite-de-navarres-heptameron-fall-2023", + "res-21g-3003-marguerite-de-roberval-a-web-based-approach-to-teaching-a-renaissance-heroine-fall-2023", + "res-21g-3004-marguerite-de-navarre-society-website-fall-2023", + "res-21g-601-telebridges-russian-conversation-exchange-site-fall-2021", + "res-21h-001-visualizing-the-birth-of-modern-tokyo-spring-2021", + "res-21m-001-heavy-metal-101-january-iap-2023", + "res-7-001-pre-7-01-getting-up-to-speed-in-biology-summer-2019", + "res-7-003-brave-new-planet-fall-2020", + "res-7-004-bionook-online-biology-resources-spring-2021", + "res-7-006-7-03x-genetics", + "res-7-007-7-06x-cell-biology", + "res-7-008-7-28x-molecular-biology", + "res-8-002-a-wikitextbook-for-introductory-mechanics-fall-2009", + "res-8-003-physics-demonstration-videos-spring-2012", + "res-8-008-nuclear-weapons-education-project-spring-2022", + "res-9-004-nancys-brain-talks-fall-2022", + "res-9-005-fmri-bootcamp-fall-2017", + "res-9-006-afni-training-bootcamp-spring-2018", + "res-9-007-meg-workshop-spring-2019", + "res-9-008-brain-and-cognitive-sciences-computational-tutorials", + "res-bloss-blended-learning-open-source-science-or-math-studies-blossoms-spring-2010", + "res-cms-154-launching-innovation-in-schools-spring-2019", + "res-cms-155-design-thinking-for-leading-and-learning-spring-2019", + "res-cms-501-envisioning-the-graduate-of-the-future-spring-2020", + "res-cms-502-competency-based-education-the-why-what-and-how-spring-2020", + "res-cms-504-sorting-truth-from-fiction-civic-online-reasoning-spring-2021", + "res-ec-002-lean-research-skills-for-conducting-interviews-spring-2021", + "res-ec-003-d-lab-student-showcases-spring-2022", + "res-ec-004-energy-needs-assessment-toolkit", + "res-env-004-mit-climate-portal-fall-2020", + "res-env-005-climate-science-risk-solutions-a-climate-primer", + "res-hso-001-mit-haystack-observatory-k12-stem-lesson-plans", + "res-hst-001-mit-little-devices-lab-fall-2021", + "res-ll-001-introduction-to-radar-systems-spring-2007", + "res-ll-002-adaptive-antennas-and-phased-arrays-spring-2010", + "res-mas-001-raise-responsible-ai-for-social-empowerment-and-education-spring-2022", + "res-solvex-business-and-impact-planning-for-social-enterprises-0-solvex-summer-2021", + "res-tl-002-star-software-tools-for-academics-and-researchers-spring-2012", + "res-tll-007-case-studies-in-social-and-ethical-responsibilities-of-computing-fall-2021", +] + + +def populate_delivery(apps, schema_editor): + """ + Populate delivery field. Initial delivery should be identical to learning_format, + with "offline" added for OCW courses except ones in the list above. + """ + LearningResource = apps.get_model("learning_resources", "LearningResource") + urls = [ + urljoin(settings.OCW_BASE_URL, f"courses/{url}/") + for url in OCW_HIDDEN_DOWNLOADS + ] + LearningResource.objects.all().filter(published=True).update( + delivery=models.F("learning_format") + ) + LearningResource.objects.all().filter( + published=True, etl_source=ETLSource.ocw.name + ).exclude(url__in=urls).update( + delivery=[ + LearningResourceDelivery.online.name, + LearningResourceDelivery.offline.name, + ] + ) + + +class Migration(migrations.Migration): + dependencies = [ + ("learning_resources", "0061_learningresource_completeness"), + ] + + operations = [ + migrations.AddField( + model_name="learningresource", + name="delivery", + field=django.contrib.postgres.fields.ArrayField( + base_field=models.CharField( + choices=[ + ("online", "Online"), + ("hybrid", "Hybrid"), + ("in_person", "In person"), + ("offline", "Offline"), + ], + db_index=True, + max_length=24, + ), + default=learning_resources.models.default_learning_format, + size=None, + ), + ), + migrations.RunPython(populate_delivery, migrations.RunPython.noop), + ] diff --git a/learning_resources/models.py b/learning_resources/models.py index 5b9107c704..c38bf5c71e 100644 --- a/learning_resources/models.py +++ b/learning_resources/models.py @@ -16,6 +16,7 @@ from learning_resources.constants import ( Availability, CertificationType, + LearningResourceDelivery, LearningResourceFormat, LearningResourceRelationTypes, LearningResourceType, @@ -422,6 +423,12 @@ class LearningResource(TimestampedModel): choices=((member.name, member.value) for member in Availability), ) completeness = models.FloatField(default=1.0) + delivery = ArrayField( + models.CharField( + max_length=24, db_index=True, choices=LearningResourceDelivery.as_tuple() + ), + default=default_learning_format, + ) @property def audience(self) -> str | None: diff --git a/learning_resources/serializers.py b/learning_resources/serializers.py index 0e7c2c9875..b2be2cc74b 100644 --- a/learning_resources/serializers.py +++ b/learning_resources/serializers.py @@ -15,6 +15,7 @@ from learning_resources.constants import ( LEARNING_MATERIAL_RESOURCE_CATEGORY, CertificationType, + LearningResourceDelivery, LearningResourceFormat, LearningResourceType, LevelType, @@ -236,6 +237,21 @@ def to_representation(self, value): return {"code": value, "name": LearningResourceFormat[value].value} +@extend_schema_field( + { + "type": "object", + "properties": { + "code": {"enum": LearningResourceDelivery.names()}, + "name": {"type": "string"}, + }, + "required": ["code", "name"], + } +) +class LearningResourceDeliverySerializer(serializers.Field): + def to_representation(self, value): + return {"code": value, "name": LearningResourceDelivery[value].value} + + class LearningResourceRunSerializer(serializers.ModelSerializer): """Serializer for the LearningResourceRun model""" @@ -410,6 +426,9 @@ class LearningResourceBaseSerializer(serializers.ModelSerializer, WriteableTopic learning_format = serializers.ListField( child=LearningResourceFormatSerializer(), read_only=True ) + delivery = serializers.ListField( + child=LearningResourceDeliverySerializer(), read_only=True + ) free = serializers.SerializerMethodField() resource_category = serializers.SerializerMethodField() diff --git a/learning_resources/serializers_test.py b/learning_resources/serializers_test.py index 33febe6187..92969fbd8f 100644 --- a/learning_resources/serializers_test.py +++ b/learning_resources/serializers_test.py @@ -12,6 +12,7 @@ from learning_resources.constants import ( LEARNING_MATERIAL_RESOURCE_CATEGORY, CertificationType, + LearningResourceDelivery, LearningResourceFormat, LearningResourceRelationTypes, LearningResourceType, @@ -262,6 +263,10 @@ def test_learning_resource_serializer( # noqa: PLR0913 {"code": lr_format, "name": LearningResourceFormat[lr_format].value} for lr_format in resource.learning_format ], + "delivery": [ + {"code": lr_delivery, "name": LearningResourceDelivery[lr_delivery].value} + for lr_delivery in resource.delivery + ], "next_start_date": resource.next_start_date, "availability": resource.availability, "completeness": 1.0, diff --git a/learning_resources_search/constants.py b/learning_resources_search/constants.py index c0e25dbbcf..c0e0e33677 100644 --- a/learning_resources_search/constants.py +++ b/learning_resources_search/constants.py @@ -76,6 +76,7 @@ class FilterConfig: "platform": FilterConfig("platform.code"), "offered_by": FilterConfig("offered_by.code"), "learning_format": FilterConfig("learning_format.code"), + "delivery": FilterConfig("delivery.code"), "resource_category": FilterConfig("resource_category"), } @@ -121,6 +122,13 @@ class FilterConfig: "name": {"type": "keyword"}, }, }, + "delivery": { + "type": "nested", + "properties": { + "code": {"type": "keyword"}, + "name": {"type": "keyword"}, + }, + }, "readable_id": {"type": "keyword"}, "title": ENGLISH_TEXT_FIELD_WITH_SUGGEST, "description": ENGLISH_TEXT_FIELD_WITH_SUGGEST, diff --git a/learning_resources_search/serializers.py b/learning_resources_search/serializers.py index bcdc4829a5..a26aa7eb52 100644 --- a/learning_resources_search/serializers.py +++ b/learning_resources_search/serializers.py @@ -20,6 +20,7 @@ LEARNING_MATERIAL_RESOURCE_CATEGORY, RESOURCE_CATEGORY_VALUES, CertificationType, + LearningResourceDelivery, LearningResourceFormat, LearningResourceRelationTypes, LearningResourceType, @@ -239,6 +240,7 @@ def to_representation(self, obj): "professional", "free", "learning_format", + "delivery", "resource_category", ] @@ -398,6 +400,15 @@ class LearningResourcesSearchRequestSerializer(SearchRequestSerializer): \n\n{build_choice_description_list(learning_format_choices)}" ), ) + delivery_choices = LearningResourceDelivery.as_list() + delivery = serializers.ListField( + required=False, + child=serializers.ChoiceField(choices=delivery_choices), + help_text=( + f"The delivery options in which the learning resource is offered \ + \n\n{build_choice_description_list(delivery_choices)}" + ), + ) resource_category_choices = [ (value, value.replace("_", " ").title()) for value in RESOURCE_CATEGORY_VALUES ] diff --git a/learning_resources_search/serializers_test.py b/learning_resources_search/serializers_test.py index 9d09f6c0d3..9b0a66c12d 100644 --- a/learning_resources_search/serializers_test.py +++ b/learning_resources_search/serializers_test.py @@ -80,6 +80,16 @@ "name": "Online", } ], + "delivery": [ + { + "code": "online", + "name": "Online", + }, + { + "code": "offline", + "name": "Offline", + }, + ], "professional": True, "certification": "Certificates", "prices": [2250.0], @@ -222,6 +232,16 @@ "name": "Online", } ], + "delivery": [ + { + "code": "online", + "name": "Online", + }, + { + "code": "offline", + "name": "Offline", + }, + ], "professional": True, "certification": "Certificates", "prices": [2250.0], @@ -348,6 +368,16 @@ "name": "Online", } ], + "delivery": [ + { + "code": "online", + "name": "Online", + }, + { + "code": "offline", + "name": "Offline", + }, + ], "prices": [0.00], "last_modified": None, "runs": [], @@ -446,6 +476,17 @@ "buckets": [{"key": 0, "key_as_string": "online", "doc_count": 1}], }, }, + "delivery": { + "doc_count": 1, + "delivery": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 0, + "buckets": [ + {"key": 0, "key_as_string": "online", "doc_count": 1}, + {"key": 0, "key_as_string": "offline", "doc_count": 1}, + ], + }, + }, }, "suggest": { "description.trigram": [ @@ -512,6 +553,16 @@ "name": "Online", } ], + "delivery": [ + { + "code": "online", + "name": "Online", + }, + { + "code": "offline", + "name": "Offline", + }, + ], "prices": [0.00], "last_modified": None, "runs": [], @@ -534,6 +585,10 @@ "certification": [{"key": "false", "doc_count": 1}], "free": [{"key": "false", "doc_count": 1}], "learning_format": [{"key": "online", "doc_count": 1}], + "delivery": [ + {"key": "online", "doc_count": 1}, + {"key": "offline", "doc_count": 1}, + ], }, "suggest": ["broadignite"], }, diff --git a/openapi/specs/v1.yaml b/openapi/specs/v1.yaml index dbf8de09b2..8e9711f615 100644 --- a/openapi/specs/v1.yaml +++ b/openapi/specs/v1.yaml @@ -567,6 +567,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -1167,6 +1199,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -1560,6 +1624,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -2245,6 +2341,7 @@ paths: - professional - free - learning_format + - delivery - resource_category type: string description: |- @@ -2260,6 +2357,7 @@ paths: * `professional` - professional * `free` - free * `learning_format` - learning_format + * `delivery` - delivery * `resource_category` - resource_category description: Show resource counts by category - in: query @@ -2295,6 +2393,25 @@ paths: type: string minLength: 1 description: The course feature. Possible options are at api/v1/course_features/ + - in: query + name: delivery + schema: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + 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" - in: query name: department schema: @@ -2734,6 +2851,7 @@ paths: - professional - free - learning_format + - delivery - resource_category type: string description: |- @@ -2749,6 +2867,7 @@ paths: * `professional` - professional * `free` - free * `learning_format` - learning_format + * `delivery` - delivery * `resource_category` - resource_category description: Show resource counts by category - in: query @@ -2784,6 +2903,25 @@ paths: type: string minLength: 1 description: The course feature. Possible options are at api/v1/course_features/ + - in: query + name: delivery + schema: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + 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" - in: query name: department schema: @@ -3248,6 +3386,7 @@ paths: - professional - free - learning_format + - delivery - resource_category type: string description: |- @@ -3263,6 +3402,7 @@ paths: * `professional` - professional * `free` - free * `learning_format` - learning_format + * `delivery` - delivery * `resource_category` - resource_category description: Show resource counts by category - in: query @@ -3298,6 +3438,25 @@ paths: type: string minLength: 1 description: The course feature. Possible options are at api/v1/course_features/ + - in: query + name: delivery + schema: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + 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" - in: query name: department schema: @@ -3753,6 +3912,7 @@ paths: - professional - free - learning_format + - delivery - resource_category type: string description: |- @@ -3768,6 +3928,7 @@ paths: * `professional` - professional * `free` - free * `learning_format` - learning_format + * `delivery` - delivery * `resource_category` - resource_category description: Show resource counts by category - in: query @@ -3803,6 +3964,25 @@ paths: type: string minLength: 1 description: The course feature. Possible options are at api/v1/course_features/ + - in: query + name: delivery + schema: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + 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" - in: query name: department schema: @@ -4282,6 +4462,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -5000,6 +5212,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -5393,6 +5637,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -5873,6 +6149,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -6656,6 +6964,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -7115,6 +7455,38 @@ paths: description: Multiple values may be separated by commas. explode: false style: form + - in: query + name: delivery + schema: + type: array + items: + type: array + items: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + enum: + - hybrid + - in_person + - offline + - online + description: |- + The delivery of course/program resources + + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + explode: true + style: form - in: query name: department schema: @@ -7485,6 +7857,7 @@ components: - professional - free - learning_format + - delivery - resource_category type: string description: |- @@ -7500,6 +7873,7 @@ components: * `professional` - professional * `free` - free * `learning_format` - learning_format + * `delivery` - delivery * `resource_category` - resource_category x-enum-descriptions: - resource_type @@ -7514,6 +7888,7 @@ components: - professional - free - learning_format + - delivery - resource_category Article: type: object @@ -7893,6 +8268,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -7959,6 +8351,7 @@ components: - certification_type - course - course_feature + - delivery - departments - free - id @@ -8036,6 +8429,23 @@ components: type: string enum: - course + DeliveryEnum: + enum: + - online + - hybrid + - in_person + - offline + type: string + description: |- + * `online` - Online + * `hybrid` - Hybrid + * `in_person` - In person + * `offline` - Offline + x-enum-descriptions: + - Online + - Hybrid + - In person + - Offline DepartmentEnum: enum: - '1' @@ -8317,6 +8727,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -8381,6 +8808,7 @@ components: - certification - certification_type - course_feature + - delivery - departments - free - id @@ -9985,6 +10413,13 @@ components: description: "The format(s) in which the learning resource is offered \ \ \n\n* `online` - Online\n* `hybrid` - Hybrid\n* `in_person`\ \ - In person" + delivery: + type: array + items: + $ref: '#/components/schemas/DeliveryEnum' + 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: type: array items: @@ -10283,6 +10718,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -10348,6 +10800,7 @@ components: - certification - certification_type - course_feature + - delivery - departments - free - id @@ -10550,6 +11003,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -10615,6 +11085,7 @@ components: - certification - certification_type - course_feature + - delivery - departments - free - id @@ -10947,6 +11418,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -11012,6 +11500,7 @@ components: - certification - certification_type - course_feature + - delivery - departments - free - id @@ -11486,6 +11975,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -11551,6 +12057,7 @@ components: - certification - certification_type - course_feature + - delivery - departments - free - id @@ -11739,6 +12246,23 @@ components: - code - name readOnly: true + delivery: + type: array + items: + type: object + properties: + code: + enum: + - online + - hybrid + - in_person + - offline + name: + type: string + required: + - code + - name + readOnly: true free: type: boolean description: Return true if the resource is free/has a free option @@ -11804,6 +12328,7 @@ components: - certification - certification_type - course_feature + - delivery - departments - free - id diff --git a/test_json/courses/16-01-unified-engineering-i-ii-iii-iv-fall-2005-spring-2006/data.json b/test_json/courses/16-01-unified-engineering-i-ii-iii-iv-fall-2005-spring-2006/data.json index ca230e9bb8..542e96fb1b 100644 --- a/test_json/courses/16-01-unified-engineering-i-ii-iii-iv-fall-2005-spring-2006/data.json +++ b/test_json/courses/16-01-unified-engineering-i-ii-iii-iv-fall-2005-spring-2006/data.json @@ -97,6 +97,7 @@ "term": "Fall", "year": "2005", "level": ["Undergraduate", "High School"], + "hide_download": false, "image_src": "/courses/16-01-unified-engineering-i-ii-iii-iv-fall-2005-spring-2006/8f56bbb35d0e456dc8b70911bec7cd0d_16-01f05.jpg", "course_image_metadata": { "content_type": "resource",