From e8f937182326c8b6b7c77372fdc5c5ee74ddd2e2 Mon Sep 17 00:00:00 2001 From: MIT Open Learning Engineering Date: Tue, 29 Oct 2024 19:25:44 +0000 Subject: [PATCH] Generated clients from rev: 1b41ae6cf5d0ecf7a1dfd225bdca195bfd218148 --- VERSION | 2 +- pyproject.toml | 2 +- .../mit-open-api-axios/package.json | 2 +- .../mit-open-api-axios/src/v1/api.ts | 544 ++++++++++++++++++ 4 files changed, 547 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 97e1fa4..bec558e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024.10.15 +2024.10.29 diff --git a/pyproject.toml b/pyproject.toml index 7d62330..02b0e6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "open-api-clients" -version = "2024.10.15" +version = "2024.10.29" description = "" authors = [] readme = "README.md" diff --git a/src/typescript/mit-open-api-axios/package.json b/src/typescript/mit-open-api-axios/package.json index e23f6a7..ff8f15c 100644 --- a/src/typescript/mit-open-api-axios/package.json +++ b/src/typescript/mit-open-api-axios/package.json @@ -1,6 +1,6 @@ { "name": "@mitodl/open-api-axios", - "version": "2024.10.15", + "version": "2024.10.29", "description": "Library for requesting data from mit-open APIs", "main": "dist/cjs/index.js", "scripts": { diff --git a/src/typescript/mit-open-api-axios/src/v1/api.ts b/src/typescript/mit-open-api-axios/src/v1/api.ts index 13eb0d4..0986c59 100644 --- a/src/typescript/mit-open-api-axios/src/v1/api.ts +++ b/src/typescript/mit-open-api-axios/src/v1/api.ts @@ -591,6 +591,12 @@ export interface CourseResource { * @memberof CourseResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof CourseResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -1327,6 +1333,12 @@ export interface LearningPathResource { * @memberof LearningPathResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -2033,6 +2045,44 @@ export interface LearningResourcePlatformRequest { */ 'name'?: string; } +/** + * Serializer for LearningResourcePrice model + * @export + * @interface LearningResourcePrice + */ +export interface LearningResourcePrice { + /** + * + * @type {string} + * @memberof LearningResourcePrice + */ + 'amount': string; + /** + * + * @type {string} + * @memberof LearningResourcePrice + */ + 'currency': string; +} +/** + * Serializer for LearningResourcePrice model + * @export + * @interface LearningResourcePriceRequest + */ +export interface LearningResourcePriceRequest { + /** + * + * @type {string} + * @memberof LearningResourcePriceRequest + */ + 'amount': string; + /** + * + * @type {string} + * @memberof LearningResourcePriceRequest + */ + 'currency': string; +} /** * CRUD serializer for LearningResourceRelationship * @export @@ -2132,6 +2182,12 @@ export interface LearningResourceRun { * @memberof LearningResourceRun */ 'pace': Array; + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + 'resource_prices': Array; /** * * @type {string} @@ -4037,6 +4093,12 @@ export interface PodcastEpisodeResource { * @memberof PodcastEpisodeResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -4423,6 +4485,12 @@ export interface PodcastResource { * @memberof PodcastResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof PodcastResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -5036,6 +5104,12 @@ export interface ProgramResource { * @memberof ProgramResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof ProgramResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -5852,6 +5926,12 @@ export interface VideoPlaylistResource { * @memberof VideoPlaylistResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -6226,6 +6306,12 @@ export interface VideoResource { * @memberof VideoResource */ 'prices': Array; + /** + * + * @type {Array} + * @memberof VideoResource + */ + 'resource_prices': Array; /** * * @type {Array} @@ -9952,6 +10038,125 @@ export const LearningResourcesApiAxiosParamCreator = function (configuration?: C + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Fetch similar learning resources Args: id (integer): The id of the learning resource Returns: QuerySet of similar LearningResource for the resource matching the id parameter + * @summary Get similar resources + * @param {number} id + * @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} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory + * @param {number} [limit] + * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @param {number} [offset] The initial index from which to return the results. + * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean} [professional] + * @param {Array} [readable_id] Multiple values may be separated by commas. + * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist + * @param {LearningResourcesSimilarListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + learningResourcesSimilarList: async (id: number, certification?: boolean, certification_type?: Array, course_feature?: Array, delivery?: Array>, department?: Array, free?: boolean, level?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean, readable_id?: Array, resource_category?: Array, resource_type?: Array, sortby?: LearningResourcesSimilarListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('learningResourcesSimilarList', 'id', id) + const localVarPath = `/api/v1/learning_resources/{id}/similar/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (certification !== undefined) { + localVarQueryParameter['certification'] = certification; + } + + if (certification_type) { + localVarQueryParameter['certification_type'] = certification_type; + } + + if (course_feature) { + localVarQueryParameter['course_feature'] = course_feature.join(COLLECTION_FORMATS.csv); + } + + if (delivery) { + localVarQueryParameter['delivery'] = delivery; + } + + if (department) { + localVarQueryParameter['department'] = department; + } + + if (free !== undefined) { + localVarQueryParameter['free'] = free; + } + + if (level) { + localVarQueryParameter['level'] = level; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offered_by) { + localVarQueryParameter['offered_by'] = offered_by; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (platform) { + localVarQueryParameter['platform'] = platform; + } + + if (professional !== undefined) { + localVarQueryParameter['professional'] = professional; + } + + if (readable_id) { + localVarQueryParameter['readable_id'] = readable_id.join(COLLECTION_FORMATS.csv); + } + + if (resource_category) { + localVarQueryParameter['resource_category'] = resource_category; + } + + if (resource_type) { + localVarQueryParameter['resource_type'] = resource_type; + } + + if (sortby !== undefined) { + localVarQueryParameter['sortby'] = sortby; + } + + if (topic) { + localVarQueryParameter['topic'] = topic.join(COLLECTION_FORMATS.csv); + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -10135,6 +10340,36 @@ export const LearningResourcesApiFp = function(configuration?: Configuration) { const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesRetrieve']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, + /** + * Fetch similar learning resources Args: id (integer): The id of the learning resource Returns: QuerySet of similar LearningResource for the resource matching the id parameter + * @summary Get similar resources + * @param {number} id + * @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} [level] The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory + * @param {number} [limit] + * @param {Array} [offered_by] The organization that offers a learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @param {number} [offset] The initial index from which to return the results. + * @param {Array} [platform] The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean} [professional] + * @param {Array} [readable_id] Multiple values may be separated by commas. + * @param {Array} [resource_category] The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist + * @param {LearningResourcesSimilarListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async learningResourcesSimilarList(id: number, certification?: boolean, certification_type?: Array, course_feature?: Array, delivery?: Array>, department?: Array, free?: boolean, level?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean, readable_id?: Array, resource_category?: Array, resource_type?: Array, sortby?: LearningResourcesSimilarListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesSimilarList(id, certification, certification_type, course_feature, delivery, department, free, level, limit, offered_by, offset, platform, professional, readable_id, resource_category, resource_type, sortby, topic, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesSimilarList']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, /** * Set User List Relationships on a given Learning Resource. * @summary Set User List Relationships @@ -10230,6 +10465,16 @@ export const LearningResourcesApiFactory = function (configuration?: Configurati learningResourcesRetrieve(requestParameters: LearningResourcesApiLearningResourcesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.learningResourcesRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); }, + /** + * Fetch similar learning resources Args: id (integer): The id of the learning resource Returns: QuerySet of similar LearningResource for the resource matching the id parameter + * @summary Get similar resources + * @param {LearningResourcesApiLearningResourcesSimilarListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + learningResourcesSimilarList(requestParameters: LearningResourcesApiLearningResourcesSimilarListRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.learningResourcesSimilarList(requestParameters.id, requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.level, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.readable_id, requestParameters.resource_category, requestParameters.resource_type, requestParameters.sortby, requestParameters.topic, options).then((request) => request(axios, basePath)); + }, /** * Set User List Relationships on a given Learning Resource. * @summary Set User List Relationships @@ -10551,6 +10796,139 @@ export interface LearningResourcesApiLearningResourcesRetrieveRequest { readonly id: number } +/** + * Request parameters for learningResourcesSimilarList operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesSimilarListRequest + */ +export interface LearningResourcesApiLearningResourcesSimilarListRequest { + /** + * + * @type {number} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly id: number + + /** + * + * @type {boolean} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly certification?: boolean + + /** + * The type of certification offered * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate + * @type {Array<'completion' | 'micromasters' | 'none' | 'professional'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly course_feature?: Array + + /** + * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline + * @type {Array>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + 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'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly free?: boolean + + /** + * The academic level of the resources * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory + * @type {Array<'advanced' | 'graduate' | 'high_school' | 'intermediate' | 'introductory' | 'noncredit' | 'undergraduate'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly level?: Array + + /** + * + * @type {number} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly limit?: number + + /** + * The organization that offers a learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array<'bootcamps' | 'mitpe' | 'mitx' | 'ocw' | 'see' | 'xpro'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly offset?: number + + /** + * The platform on which learning resources are offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly resource_category?: Array + + /** + * The type of learning resource * `course` - Course * `program` - Program * `learning_path` - Learning Path * `podcast` - Podcast * `podcast_episode` - Podcast Episode * `video` - Video * `video_playlist` - Video Playlist + * @type {Array<'course' | 'learning_path' | 'podcast' | 'podcast_episode' | 'program' | 'video' | 'video_playlist'>} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly resource_type?: Array + + /** + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'-id' | '-last_modified' | '-mitcoursenumber' | '-readable_id' | '-start_date' | '-views' | 'id' | 'last_modified' | 'mitcoursenumber' | 'new' | 'readable_id' | 'start_date' | 'upcoming' | 'views'} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly sortby?: LearningResourcesSimilarListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesSimilarList + */ + readonly topic?: Array +} + /** * Request parameters for learningResourcesUserlistsPartialUpdate operation in LearningResourcesApi. * @export @@ -10670,6 +11048,18 @@ export class LearningResourcesApi extends BaseAPI { return LearningResourcesApiFp(this.configuration).learningResourcesRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); } + /** + * Fetch similar learning resources Args: id (integer): The id of the learning resource Returns: QuerySet of similar LearningResource for the resource matching the id parameter + * @summary Get similar resources + * @param {LearningResourcesApiLearningResourcesSimilarListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesSimilarList(requestParameters: LearningResourcesApiLearningResourcesSimilarListRequest, options?: RawAxiosRequestConfig) { + return LearningResourcesApiFp(this.configuration).learningResourcesSimilarList(requestParameters.id, requestParameters.certification, requestParameters.certification_type, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.free, requestParameters.level, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.readable_id, requestParameters.resource_category, requestParameters.resource_type, requestParameters.sortby, requestParameters.topic, options).then((request) => request(this.axios, this.basePath)); + } + /** * Set User List Relationships on a given Learning Resource. * @summary Set User List Relationships @@ -10873,6 +11263,160 @@ export const LearningResourcesListSortbyEnum = { Views2: 'views' } as const; export type LearningResourcesListSortbyEnum = typeof LearningResourcesListSortbyEnum[keyof typeof LearningResourcesListSortbyEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListCertificationTypeEnum = { + Completion: 'completion', + Micromasters: 'micromasters', + None: 'none', + Professional: 'professional' +} as const; +export type LearningResourcesSimilarListCertificationTypeEnum = typeof LearningResourcesSimilarListCertificationTypeEnum[keyof typeof LearningResourcesSimilarListCertificationTypeEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListDeliveryEnum = { + Online: 'online', + Hybrid: 'hybrid', + InPerson: 'in_person', + Offline: 'offline' +} as const; +export type LearningResourcesSimilarListDeliveryEnum = typeof LearningResourcesSimilarListDeliveryEnum[keyof typeof LearningResourcesSimilarListDeliveryEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListDepartmentEnum = { + _1: '1', + _10: '10', + _11: '11', + _12: '12', + _14: '14', + _15: '15', + _16: '16', + _17: '17', + _18: '18', + _2: '2', + _20: '20', + _21A: '21A', + _21G: '21G', + _21H: '21H', + _21L: '21L', + _21M: '21M', + _22: '22', + _24: '24', + _3: '3', + _4: '4', + _5: '5', + _6: '6', + _7: '7', + _8: '8', + _9: '9', + Cc: 'CC', + CmsW: 'CMS-W', + Ec: 'EC', + Es: 'ES', + Esd: 'ESD', + Hst: 'HST', + Ids: 'IDS', + Mas: 'MAS', + Pe: 'PE', + Sp: 'SP', + Sts: 'STS', + Wgs: 'WGS' +} as const; +export type LearningResourcesSimilarListDepartmentEnum = typeof LearningResourcesSimilarListDepartmentEnum[keyof typeof LearningResourcesSimilarListDepartmentEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListLevelEnum = { + Advanced: 'advanced', + Graduate: 'graduate', + HighSchool: 'high_school', + Intermediate: 'intermediate', + Introductory: 'introductory', + Noncredit: 'noncredit', + Undergraduate: 'undergraduate' +} as const; +export type LearningResourcesSimilarListLevelEnum = typeof LearningResourcesSimilarListLevelEnum[keyof typeof LearningResourcesSimilarListLevelEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListOfferedByEnum = { + Bootcamps: 'bootcamps', + Mitpe: 'mitpe', + Mitx: 'mitx', + Ocw: 'ocw', + See: 'see', + Xpro: 'xpro' +} as const; +export type LearningResourcesSimilarListOfferedByEnum = typeof LearningResourcesSimilarListOfferedByEnum[keyof typeof LearningResourcesSimilarListOfferedByEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListPlatformEnum = { + Bootcamps: 'bootcamps', + Csail: 'csail', + Ctl: 'ctl', + Edx: 'edx', + Emeritus: 'emeritus', + Globalalumni: 'globalalumni', + Mitpe: 'mitpe', + Mitxonline: 'mitxonline', + Ocw: 'ocw', + Oll: 'oll', + Podcast: 'podcast', + Scc: 'scc', + See: 'see', + Simplilearn: 'simplilearn', + Susskind: 'susskind', + Whu: 'whu', + Xpro: 'xpro', + Youtube: 'youtube' +} as const; +export type LearningResourcesSimilarListPlatformEnum = typeof LearningResourcesSimilarListPlatformEnum[keyof typeof LearningResourcesSimilarListPlatformEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListResourceCategoryEnum = { + Course: 'course', + LearningMaterial: 'learning_material', + Program: 'program' +} as const; +export type LearningResourcesSimilarListResourceCategoryEnum = typeof LearningResourcesSimilarListResourceCategoryEnum[keyof typeof LearningResourcesSimilarListResourceCategoryEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListResourceTypeEnum = { + Course: 'course', + LearningPath: 'learning_path', + Podcast: 'podcast', + PodcastEpisode: 'podcast_episode', + Program: 'program', + Video: 'video', + VideoPlaylist: 'video_playlist' +} as const; +export type LearningResourcesSimilarListResourceTypeEnum = typeof LearningResourcesSimilarListResourceTypeEnum[keyof typeof LearningResourcesSimilarListResourceTypeEnum]; +/** + * @export + */ +export const LearningResourcesSimilarListSortbyEnum = { + Id: '-id', + LastModified: '-last_modified', + Mitcoursenumber: '-mitcoursenumber', + ReadableId: '-readable_id', + StartDate: '-start_date', + Views: '-views', + Id2: 'id', + LastModified2: 'last_modified', + Mitcoursenumber2: 'mitcoursenumber', + New: 'new', + ReadableId2: 'readable_id', + StartDate2: 'start_date', + Upcoming: 'upcoming', + Views2: 'views' +} as const; +export type LearningResourcesSimilarListSortbyEnum = typeof LearningResourcesSimilarListSortbyEnum[keyof typeof LearningResourcesSimilarListSortbyEnum]; /**