diff --git a/src/typescript/mit-open-api-axios/package.json b/src/typescript/mit-open-api-axios/package.json index ff8f15c..62555fa 100644 --- a/src/typescript/mit-open-api-axios/package.json +++ b/src/typescript/mit-open-api-axios/package.json @@ -37,7 +37,7 @@ "typescript": "5.4.5" }, "dependencies": { - "@types/node": "^20.11.19", + "@types/node": "^22.0.0", "axios": "^1.6.5" }, "packageManager": "yarn@4.4.1" diff --git a/src/typescript/mit-open-api-axios/src/v0/.openapi-generator/VERSION b/src/typescript/mit-open-api-axios/src/v0/.openapi-generator/VERSION index 4b49d9b..0ee843c 100644 --- a/src/typescript/mit-open-api-axios/src/v0/.openapi-generator/VERSION +++ b/src/typescript/mit-open-api-axios/src/v0/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.2.0 diff --git a/src/typescript/mit-open-api-axios/src/v0/api.ts b/src/typescript/mit-open-api-axios/src/v0/api.ts index e9c03eb..4bf4e65 100644 --- a/src/typescript/mit-open-api-axios/src/v0/api.ts +++ b/src/typescript/mit-open-api-axios/src/v0/api.ts @@ -5,23 +5,39 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v0) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; +import type { Configuration } from "./configuration" +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios" +import globalAxios from "axios" // Some imports not used depending on template conditions // @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from "./common" +import type { RequestArgs } from "./base" // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; +import { + BASE_PATH, + COLLECTION_FORMATS, + BaseAPI, + RequiredError, + operationServerMap, +} from "./base" /** * Serializer for attestations. @@ -29,103 +45,102 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerM * @interface Attestation */ export interface Attestation { - /** - * - * @type {number} - * @memberof Attestation - */ - 'id': number; - /** - * Get the avatar image URL - * @type {string} - * @memberof Attestation - */ - 'avatar': string | null; - /** - * Get the avatar_small image URL - * @type {string} - * @memberof Attestation - */ - 'avatar_small': string | null; - /** - * Get the avatar_medium image URL - * @type {string} - * @memberof Attestation - */ - 'avatar_medium': string | null; - /** - * Get the cover image URL - * @type {string} - * @memberof Attestation - */ - 'cover': string | null; - /** - * - * @type {string} - * @memberof Attestation - */ - 'created_on': string; - /** - * - * @type {string} - * @memberof Attestation - */ - 'updated_on': string; - /** - * The name of the attestant - * @type {string} - * @memberof Attestation - */ - 'attestant_name': string; - /** - * The attestant\'s title - * @type {string} - * @memberof Attestation - */ - 'title': string; - /** - * The testimonial attestation - * @type {string} - * @memberof Attestation - */ - 'quote': string; - /** - * The position the attestation should occupy - * @type {number} - * @memberof Attestation - */ - 'position'?: number; - /** - * The datetime to show the testimonial - * @type {string} - * @memberof Attestation - */ - 'publish_date'?: string | null; - /** - * Channels that the testimonial belongs to - * @type {Array} - * @memberof Attestation - */ - 'channels'?: Array; - /** - * The offerors that this attestation can appear on - * @type {Array} - * @memberof Attestation - */ - 'offerors'?: Array; + /** + * + * @type {number} + * @memberof Attestation + */ + id: number + /** + * Get the avatar image URL + * @type {string} + * @memberof Attestation + */ + avatar: string | null + /** + * Get the avatar_small image URL + * @type {string} + * @memberof Attestation + */ + avatar_small: string | null + /** + * Get the avatar_medium image URL + * @type {string} + * @memberof Attestation + */ + avatar_medium: string | null + /** + * Get the cover image URL + * @type {string} + * @memberof Attestation + */ + cover: string | null + /** + * + * @type {string} + * @memberof Attestation + */ + created_on: string + /** + * + * @type {string} + * @memberof Attestation + */ + updated_on: string + /** + * The name of the attestant + * @type {string} + * @memberof Attestation + */ + attestant_name: string + /** + * The attestant\'s title + * @type {string} + * @memberof Attestation + */ + title: string + /** + * The testimonial attestation + * @type {string} + * @memberof Attestation + */ + quote: string + /** + * The position the attestation should occupy + * @type {number} + * @memberof Attestation + */ + position?: number + /** + * The datetime to show the testimonial + * @type {string} + * @memberof Attestation + */ + publish_date?: string | null + /** + * Channels that the testimonial belongs to + * @type {Array} + * @memberof Attestation + */ + channels?: Array + /** + * The offerors that this attestation can appear on + * @type {Array} + * @memberof Attestation + */ + offerors?: Array } /** - * + * * @export * @enum {string} */ export const BlankEnum = { - Empty: '' -} as const; - -export type BlankEnum = typeof BlankEnum[keyof typeof BlankEnum]; + Empty: "", +} as const +export type BlankEnum = (typeof BlankEnum)[keyof typeof BlankEnum] /** * Serializer for CKEditor settings @@ -133,12 +148,12 @@ export type BlankEnum = typeof BlankEnum[keyof typeof BlankEnum]; * @interface CKEditorSettings */ export interface CKEditorSettings { - /** - * Get the JWT token - * @type {string} - * @memberof CKEditorSettings - */ - 'token': string | null; + /** + * Get the JWT token + * @type {string} + * @memberof CKEditorSettings + */ + token: string | null } /** * * `yes` - Yes, I am looking for a certificate * `no` - No, I am not looking for a certificate * `not-sure-yet` - Not Sure @@ -147,28 +162,32 @@ export interface CKEditorSettings { */ export const CertificateDesiredEnum = { - /** - * Yes, I am looking for a certificate - */ - Yes: 'yes', - /** - * No, I am not looking for a certificate - */ - No: 'no', - /** - * Not Sure - */ - NotSureYet: 'not-sure-yet' -} as const; - -export type CertificateDesiredEnum = typeof CertificateDesiredEnum[keyof typeof CertificateDesiredEnum]; - + /** + * Yes, I am looking for a certificate + */ + Yes: "yes", + /** + * No, I am not looking for a certificate + */ + No: "no", + /** + * Not Sure + */ + NotSureYet: "not-sure-yet", +} as const + +export type CertificateDesiredEnum = + (typeof CertificateDesiredEnum)[keyof typeof CertificateDesiredEnum] /** * @type Channel * @export */ -export type Channel = { channel_type: 'department' } & DepartmentChannel | { channel_type: 'pathway' } & PathwayChannel | { channel_type: 'topic' } & TopicChannel | { channel_type: 'unit' } & UnitChannel; +export type Channel = + | ({ channel_type: "department" } & DepartmentChannel) + | ({ channel_type: "pathway" } & PathwayChannel) + | ({ channel_type: "topic" } & TopicChannel) + | ({ channel_type: "unit" } & UnitChannel) /** * Serializer for resource counts associated with Channel @@ -176,162 +195,160 @@ export type Channel = { channel_type: 'department' } & DepartmentChannel | { cha * @interface ChannelCounts */ export interface ChannelCounts { - /** - * - * @type {number} - * @memberof ChannelCounts - */ - 'id': number; - /** - * - * @type {Counts} - * @memberof ChannelCounts - */ - 'counts': Counts; - /** - * Get the URL for the channel - * @type {string} - * @memberof ChannelCounts - */ - 'channel_url': string; - /** - * - * @type {string} - * @memberof ChannelCounts - */ - 'created_on': string; - /** - * - * @type {string} - * @memberof ChannelCounts - */ - 'updated_on': string; - /** - * - * @type {string} - * @memberof ChannelCounts - */ - 'name': string; - /** - * - * @type {string} - * @memberof ChannelCounts - */ - 'title': string; - /** - * - * @type {ChannelTypeEnum} - * @memberof ChannelCounts - */ - 'channel_type': ChannelTypeEnum; - /** - * - * @type {string} - * @memberof ChannelCounts - */ - 'search_filter'?: string; + /** + * + * @type {number} + * @memberof ChannelCounts + */ + id: number + /** + * + * @type {Counts} + * @memberof ChannelCounts + */ + counts: Counts + /** + * Get the URL for the channel + * @type {string} + * @memberof ChannelCounts + */ + channel_url: string + /** + * + * @type {string} + * @memberof ChannelCounts + */ + created_on: string + /** + * + * @type {string} + * @memberof ChannelCounts + */ + updated_on: string + /** + * + * @type {string} + * @memberof ChannelCounts + */ + name: string + /** + * + * @type {string} + * @memberof ChannelCounts + */ + title: string + /** + * + * @type {ChannelTypeEnum} + * @memberof ChannelCounts + */ + channel_type: ChannelTypeEnum + /** + * + * @type {string} + * @memberof ChannelCounts + */ + search_filter?: string } - /** * Write serializer for Channel. Uses primary keys for referenced objects during requests, and delegates to ChannelSerializer for responses. * @export * @interface ChannelCreateRequest */ export interface ChannelCreateRequest { - /** - * - * @type {string} - * @memberof ChannelCreateRequest - */ - 'name': string; - /** - * - * @type {string} - * @memberof ChannelCreateRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof ChannelCreateRequest - */ - 'public_description'?: string; - /** - * - * @type {Array} - * @memberof ChannelCreateRequest - */ - 'sub_channels'?: Array; - /** - * Learning path featured in this channel. - * @type {number} - * @memberof ChannelCreateRequest - */ - 'featured_list'?: number | null; - /** - * Learning paths in this channel. - * @type {Array} - * @memberof ChannelCreateRequest - */ - 'lists'?: Array; - /** - * - * @type {File} - * @memberof ChannelCreateRequest - */ - 'avatar'?: File | null; - /** - * - * @type {File} - * @memberof ChannelCreateRequest - */ - 'banner'?: File | null; - /** - * - * @type {any} - * @memberof ChannelCreateRequest - */ - 'about'?: any | null; - /** - * - * @type {ChannelTypeEnum} - * @memberof ChannelCreateRequest - */ - 'channel_type': ChannelTypeEnum; - /** - * - * @type {string} - * @memberof ChannelCreateRequest - */ - 'search_filter'?: string; - /** - * - * @type {ChannelTopicDetailRequest} - * @memberof ChannelCreateRequest - */ - 'topic_detail'?: ChannelTopicDetailRequest | null; - /** - * - * @type {ChannelDepartmentDetailRequest} - * @memberof ChannelCreateRequest - */ - 'department_detail'?: ChannelDepartmentDetailRequest | null; + /** + * + * @type {string} + * @memberof ChannelCreateRequest + */ + name: string + /** + * + * @type {string} + * @memberof ChannelCreateRequest + */ + title: string + /** + * + * @type {string} + * @memberof ChannelCreateRequest + */ + public_description?: string + /** + * + * @type {Array} + * @memberof ChannelCreateRequest + */ + sub_channels?: Array + /** + * Learning path featured in this channel. + * @type {number} + * @memberof ChannelCreateRequest + */ + featured_list?: number | null + /** + * Learning paths in this channel. + * @type {Array} + * @memberof ChannelCreateRequest + */ + lists?: Array + /** + * + * @type {File} + * @memberof ChannelCreateRequest + */ + avatar?: File | null + /** + * + * @type {File} + * @memberof ChannelCreateRequest + */ + banner?: File | null + /** + * + * @type {any} + * @memberof ChannelCreateRequest + */ + about?: any | null + /** + * + * @type {ChannelTypeEnum} + * @memberof ChannelCreateRequest + */ + channel_type: ChannelTypeEnum + /** + * + * @type {string} + * @memberof ChannelCreateRequest + */ + search_filter?: string + /** + * + * @type {ChannelTopicDetailRequest} + * @memberof ChannelCreateRequest + */ + topic_detail?: ChannelTopicDetailRequest | null + /** + * + * @type {ChannelDepartmentDetailRequest} + * @memberof ChannelCreateRequest + */ + department_detail?: ChannelDepartmentDetailRequest | null } - /** * Serializer for the ChannelDepartmentDetail model * @export * @interface ChannelDepartmentDetail */ export interface ChannelDepartmentDetail { - /** - * - * @type {string} - * @memberof ChannelDepartmentDetail - */ - 'department'?: string | null; + /** + * + * @type {string} + * @memberof ChannelDepartmentDetail + */ + department?: string | null } /** * Serializer for the ChannelDepartmentDetail model @@ -339,12 +356,12 @@ export interface ChannelDepartmentDetail { * @interface ChannelDepartmentDetailRequest */ export interface ChannelDepartmentDetailRequest { - /** - * - * @type {string} - * @memberof ChannelDepartmentDetailRequest - */ - 'department'?: string | null; + /** + * + * @type {string} + * @memberof ChannelDepartmentDetailRequest + */ + department?: string | null } /** * Serializer for moderators @@ -352,24 +369,24 @@ export interface ChannelDepartmentDetailRequest { * @interface ChannelModerator */ export interface ChannelModerator { - /** - * Returns the name for the moderator - * @type {string} - * @memberof ChannelModerator - */ - 'moderator_name'?: string; - /** - * Get the email from the associated user - * @type {string} - * @memberof ChannelModerator - */ - 'email'?: string; - /** - * Get the full name of the associated user - * @type {string} - * @memberof ChannelModerator - */ - 'full_name': string; + /** + * Returns the name for the moderator + * @type {string} + * @memberof ChannelModerator + */ + moderator_name?: string + /** + * Get the email from the associated user + * @type {string} + * @memberof ChannelModerator + */ + email?: string + /** + * Get the full name of the associated user + * @type {string} + * @memberof ChannelModerator + */ + full_name: string } /** * Serializer for moderators @@ -377,18 +394,18 @@ export interface ChannelModerator { * @interface ChannelModeratorRequest */ export interface ChannelModeratorRequest { - /** - * Returns the name for the moderator - * @type {string} - * @memberof ChannelModeratorRequest - */ - 'moderator_name'?: string; - /** - * Get the email from the associated user - * @type {string} - * @memberof ChannelModeratorRequest - */ - 'email'?: string; + /** + * Returns the name for the moderator + * @type {string} + * @memberof ChannelModeratorRequest + */ + moderator_name?: string + /** + * Get the email from the associated user + * @type {string} + * @memberof ChannelModeratorRequest + */ + email?: string } /** * Serializer for the ChannelTopicDetail model @@ -396,12 +413,12 @@ export interface ChannelModeratorRequest { * @interface ChannelTopicDetail */ export interface ChannelTopicDetail { - /** - * - * @type {number} - * @memberof ChannelTopicDetail - */ - 'topic'?: number | null; + /** + * + * @type {number} + * @memberof ChannelTopicDetail + */ + topic?: number | null } /** * Serializer for the ChannelTopicDetail model @@ -409,12 +426,12 @@ export interface ChannelTopicDetail { * @interface ChannelTopicDetailRequest */ export interface ChannelTopicDetailRequest { - /** - * - * @type {number} - * @memberof ChannelTopicDetailRequest - */ - 'topic'?: number | null; + /** + * + * @type {number} + * @memberof ChannelTopicDetailRequest + */ + topic?: number | null } /** * * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway @@ -423,26 +440,26 @@ export interface ChannelTopicDetailRequest { */ export const ChannelTypeEnum = { - /** - * Topic - */ - Topic: 'topic', - /** - * Department - */ - Department: 'department', - /** - * Unit - */ - Unit: 'unit', - /** - * Pathway - */ - Pathway: 'pathway' -} as const; - -export type ChannelTypeEnum = typeof ChannelTypeEnum[keyof typeof ChannelTypeEnum]; - + /** + * Topic + */ + Topic: "topic", + /** + * Department + */ + Department: "department", + /** + * Unit + */ + Unit: "unit", + /** + * Pathway + */ + Pathway: "pathway", +} as const + +export type ChannelTypeEnum = + (typeof ChannelTypeEnum)[keyof typeof ChannelTypeEnum] /** * Serializer for the ChannelOfferorDetail model @@ -450,31 +467,31 @@ export type ChannelTypeEnum = typeof ChannelTypeEnum[keyof typeof ChannelTypeEnu * @interface ChannelUnitDetail */ export interface ChannelUnitDetail { - /** - * - * @type {LearningResourceOfferorDetail} - * @memberof ChannelUnitDetail - */ - 'unit': LearningResourceOfferorDetail; + /** + * + * @type {LearningResourceOfferorDetail} + * @memberof ChannelUnitDetail + */ + unit: LearningResourceOfferorDetail } /** - * + * * @export * @interface Counts */ export interface Counts { - /** - * - * @type {number} - * @memberof Counts - */ - 'courses': number; - /** - * - * @type {number} - * @memberof Counts - */ - 'programs': number; + /** + * + * @type {number} + * @memberof Counts + */ + courses: number + /** + * + * @type {number} + * @memberof Counts + */ + programs: number } /** * * `` - ---- * `Doctorate` - Doctorate * `Master\'s or professional degree` - Master\'s or professional degree * `Bachelor\'s degree` - Bachelor\'s degree * `Associate degree` - Associate degree * `Secondary/high school` - Secondary/high school * `Junior secondary/junior high/middle school` - Junior secondary/junior high/middle school * `No formal education` - No formal education * `Other education` - Other education @@ -483,42 +500,43 @@ export interface Counts { */ export const CurrentEducationEnum = { - /** - * Doctorate - */ - Doctorate: 'Doctorate', - /** - * Master's or professional degree - */ - MastersOrProfessionalDegree: 'Master\'s or professional degree', - /** - * Bachelor's degree - */ - BachelorsDegree: 'Bachelor\'s degree', - /** - * Associate degree - */ - AssociateDegree: 'Associate degree', - /** - * Secondary/high school - */ - SecondaryHighSchool: 'Secondary/high school', - /** - * Junior secondary/junior high/middle school - */ - JuniorSecondaryJuniorHighMiddleSchool: 'Junior secondary/junior high/middle school', - /** - * No formal education - */ - NoFormalEducation: 'No formal education', - /** - * Other education - */ - OtherEducation: 'Other education' -} as const; - -export type CurrentEducationEnum = typeof CurrentEducationEnum[keyof typeof CurrentEducationEnum]; - + /** + * Doctorate + */ + Doctorate: "Doctorate", + /** + * Master's or professional degree + */ + MastersOrProfessionalDegree: "Master's or professional degree", + /** + * Bachelor's degree + */ + BachelorsDegree: "Bachelor's degree", + /** + * Associate degree + */ + AssociateDegree: "Associate degree", + /** + * Secondary/high school + */ + SecondaryHighSchool: "Secondary/high school", + /** + * Junior secondary/junior high/middle school + */ + JuniorSecondaryJuniorHighMiddleSchool: + "Junior secondary/junior high/middle school", + /** + * No formal education + */ + NoFormalEducation: "No formal education", + /** + * Other education + */ + OtherEducation: "Other education", +} as const + +export type CurrentEducationEnum = + (typeof CurrentEducationEnum)[keyof typeof CurrentEducationEnum] /** * * `online` - Online * `hybrid` - Hybrid * `in_person` - In-Person * `offline` - Offline @@ -527,26 +545,25 @@ export type CurrentEducationEnum = typeof CurrentEducationEnum[keyof typeof Curr */ 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]; - + /** + * Online + */ + Online: "online", + /** + * Hybrid + */ + Hybrid: "hybrid", + /** + * In-Person + */ + InPerson: "in_person", + /** + * Offline + */ + Offline: "offline", +} as const + +export type DeliveryEnum = (typeof DeliveryEnum)[keyof typeof DeliveryEnum] /** * Serializer for Channel model of type department @@ -554,165 +571,164 @@ export type DeliveryEnum = typeof DeliveryEnum[keyof typeof DeliveryEnum]; * @interface DepartmentChannel */ export interface DepartmentChannel { - /** - * - * @type {number} - * @memberof DepartmentChannel - */ - 'id': number; - /** - * Get the avatar image URL - * @type {string} - * @memberof DepartmentChannel - */ - 'avatar'?: string | null; - /** - * Get the avatar image small URL - * @type {string} - * @memberof DepartmentChannel - */ - 'avatar_small': string | null; - /** - * Get the avatar image medium URL - * @type {string} - * @memberof DepartmentChannel - */ - 'avatar_medium': string | null; - /** - * Get the banner image URL - * @type {string} - * @memberof DepartmentChannel - */ - 'banner'?: string | null; - /** - * Return true if user is a moderator for the channel - * @type {boolean} - * @memberof DepartmentChannel - */ - 'is_moderator': boolean; - /** - * - * @type {Array} - * @memberof DepartmentChannel - */ - 'lists': Array; - /** - * Get the URL for the channel - * @type {string} - * @memberof DepartmentChannel - */ - 'channel_url': string; - /** - * - * @type {DepartmentChannelFeaturedList} - * @memberof DepartmentChannel - */ - 'featured_list': DepartmentChannelFeaturedList | null; - /** - * - * @type {Array} - * @memberof DepartmentChannel - */ - 'sub_channels': Array; - /** - * - * @type {DepartmentChannelTypeEnum} - * @memberof DepartmentChannel - */ - 'channel_type': DepartmentChannelTypeEnum; - /** - * - * @type {ChannelDepartmentDetail} - * @memberof DepartmentChannel - */ - 'department_detail': ChannelDepartmentDetail; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'created_on': string; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'updated_on': string; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'name': string; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'title': string; - /** - * - * @type {any} - * @memberof DepartmentChannel - */ - 'about'?: any | null; - /** - * - * @type {any} - * @memberof DepartmentChannel - */ - 'configuration'?: any | null; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'search_filter'?: string; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'public_description'?: string; - /** - * - * @type {string} - * @memberof DepartmentChannel - */ - 'ga_tracking_id'?: string; - /** - * - * @type {number} - * @memberof DepartmentChannel - */ - 'widget_list'?: number | null; + /** + * + * @type {number} + * @memberof DepartmentChannel + */ + id: number + /** + * Get the avatar image URL + * @type {string} + * @memberof DepartmentChannel + */ + avatar?: string | null + /** + * Get the avatar image small URL + * @type {string} + * @memberof DepartmentChannel + */ + avatar_small: string | null + /** + * Get the avatar image medium URL + * @type {string} + * @memberof DepartmentChannel + */ + avatar_medium: string | null + /** + * Get the banner image URL + * @type {string} + * @memberof DepartmentChannel + */ + banner?: string | null + /** + * Return true if user is a moderator for the channel + * @type {boolean} + * @memberof DepartmentChannel + */ + is_moderator: boolean + /** + * + * @type {Array} + * @memberof DepartmentChannel + */ + lists: Array + /** + * Get the URL for the channel + * @type {string} + * @memberof DepartmentChannel + */ + channel_url: string + /** + * + * @type {DepartmentChannelFeaturedList} + * @memberof DepartmentChannel + */ + featured_list: DepartmentChannelFeaturedList | null + /** + * + * @type {Array} + * @memberof DepartmentChannel + */ + sub_channels: Array + /** + * + * @type {DepartmentChannelTypeEnum} + * @memberof DepartmentChannel + */ + channel_type: DepartmentChannelTypeEnum + /** + * + * @type {ChannelDepartmentDetail} + * @memberof DepartmentChannel + */ + department_detail: ChannelDepartmentDetail + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + created_on: string + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + updated_on: string + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + name: string + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + title: string + /** + * + * @type {any} + * @memberof DepartmentChannel + */ + about?: any | null + /** + * + * @type {any} + * @memberof DepartmentChannel + */ + configuration?: any | null + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + search_filter?: string + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + public_description?: string + /** + * + * @type {string} + * @memberof DepartmentChannel + */ + ga_tracking_id?: string + /** + * + * @type {number} + * @memberof DepartmentChannel + */ + widget_list?: number | null } - /** * Learning path featured in this channel. * @export * @interface DepartmentChannelFeaturedList */ export interface DepartmentChannelFeaturedList { - /** - * - * @type {string} - * @memberof DepartmentChannelFeaturedList - */ - 'title': string; - /** - * - * @type {string} - * @memberof DepartmentChannelFeaturedList - */ - 'url'?: string | null; - /** - * - * @type {number} - * @memberof DepartmentChannelFeaturedList - */ - 'id': number; + /** + * + * @type {string} + * @memberof DepartmentChannelFeaturedList + */ + title: string + /** + * + * @type {string} + * @memberof DepartmentChannelFeaturedList + */ + url?: string | null + /** + * + * @type {number} + * @memberof DepartmentChannelFeaturedList + */ + id: number } /** * * `department` - Department @@ -721,14 +737,14 @@ export interface DepartmentChannelFeaturedList { */ export const DepartmentChannelTypeEnum = { - /** - * Department - */ - Department: 'department' -} as const; - -export type DepartmentChannelTypeEnum = typeof DepartmentChannelTypeEnum[keyof typeof DepartmentChannelTypeEnum]; + /** + * Department + */ + Department: "department", +} as const +export type DepartmentChannelTypeEnum = + (typeof DepartmentChannelTypeEnum)[keyof typeof DepartmentChannelTypeEnum] /** * Serializer for News FeedItem @@ -736,81 +752,80 @@ export type DepartmentChannelTypeEnum = typeof DepartmentChannelTypeEnum[keyof t * @interface EventFeedItem */ export interface EventFeedItem { - /** - * - * @type {number} - * @memberof EventFeedItem - */ - 'id': number; - /** - * - * @type {EventFeedItemFeedTypeEnum} - * @memberof EventFeedItem - */ - 'feed_type': EventFeedItemFeedTypeEnum; - /** - * - * @type {FeedImage} - * @memberof EventFeedItem - */ - 'image': FeedImage; - /** - * - * @type {FeedEventDetail} - * @memberof EventFeedItem - */ - 'event_details': FeedEventDetail; - /** - * - * @type {string} - * @memberof EventFeedItem - */ - 'guid': string; - /** - * - * @type {string} - * @memberof EventFeedItem - */ - 'title': string; - /** - * - * @type {string} - * @memberof EventFeedItem - */ - 'url': string; - /** - * - * @type {string} - * @memberof EventFeedItem - */ - 'summary'?: string; - /** - * - * @type {string} - * @memberof EventFeedItem - */ - 'content'?: string; - /** - * - * @type {number} - * @memberof EventFeedItem - */ - 'source': number; + /** + * + * @type {number} + * @memberof EventFeedItem + */ + id: number + /** + * + * @type {EventFeedItemFeedTypeEnum} + * @memberof EventFeedItem + */ + feed_type: EventFeedItemFeedTypeEnum + /** + * + * @type {FeedImage} + * @memberof EventFeedItem + */ + image: FeedImage + /** + * + * @type {FeedEventDetail} + * @memberof EventFeedItem + */ + event_details: FeedEventDetail + /** + * + * @type {string} + * @memberof EventFeedItem + */ + guid: string + /** + * + * @type {string} + * @memberof EventFeedItem + */ + title: string + /** + * + * @type {string} + * @memberof EventFeedItem + */ + url: string + /** + * + * @type {string} + * @memberof EventFeedItem + */ + summary?: string + /** + * + * @type {string} + * @memberof EventFeedItem + */ + content?: string + /** + * + * @type {number} + * @memberof EventFeedItem + */ + source: number } - /** - * + * * @export * @enum {string} */ export const EventFeedItemFeedTypeEnum = { - Events: 'events' -} as const; - -export type EventFeedItemFeedTypeEnum = typeof EventFeedItemFeedTypeEnum[keyof typeof EventFeedItemFeedTypeEnum]; + Events: "events", +} as const +export type EventFeedItemFeedTypeEnum = + (typeof EventFeedItemFeedTypeEnum)[keyof typeof EventFeedItemFeedTypeEnum] /** * FeedEventDetail serializer @@ -818,42 +833,42 @@ export type EventFeedItemFeedTypeEnum = typeof EventFeedItemFeedTypeEnum[keyof t * @interface FeedEventDetail */ export interface FeedEventDetail { - /** - * - * @type {number} - * @memberof FeedEventDetail - */ - 'id': number; - /** - * - * @type {Array} - * @memberof FeedEventDetail - */ - 'audience': Array; - /** - * - * @type {Array} - * @memberof FeedEventDetail - */ - 'location': Array; - /** - * - * @type {Array} - * @memberof FeedEventDetail - */ - 'event_type': Array; - /** - * - * @type {string} - * @memberof FeedEventDetail - */ - 'event_datetime': string; - /** - * - * @type {string} - * @memberof FeedEventDetail - */ - 'event_end_datetime'?: string | null; + /** + * + * @type {number} + * @memberof FeedEventDetail + */ + id: number + /** + * + * @type {Array} + * @memberof FeedEventDetail + */ + audience: Array + /** + * + * @type {Array} + * @memberof FeedEventDetail + */ + location: Array + /** + * + * @type {Array} + * @memberof FeedEventDetail + */ + event_type: Array + /** + * + * @type {string} + * @memberof FeedEventDetail + */ + event_datetime: string + /** + * + * @type {string} + * @memberof FeedEventDetail + */ + event_end_datetime?: string | null } /** * Serializer for FeedImage @@ -861,36 +876,38 @@ export interface FeedEventDetail { * @interface FeedImage */ export interface FeedImage { - /** - * - * @type {number} - * @memberof FeedImage - */ - 'id': number; - /** - * - * @type {string} - * @memberof FeedImage - */ - 'url'?: string; - /** - * - * @type {string} - * @memberof FeedImage - */ - 'description'?: string; - /** - * - * @type {string} - * @memberof FeedImage - */ - 'alt'?: string; + /** + * + * @type {number} + * @memberof FeedImage + */ + id: number + /** + * + * @type {string} + * @memberof FeedImage + */ + url?: string + /** + * + * @type {string} + * @memberof FeedImage + */ + description?: string + /** + * + * @type {string} + * @memberof FeedImage + */ + alt?: string } /** * @type FeedItem * @export */ -export type FeedItem = { resource_type: 'events' } & EventFeedItem | { resource_type: 'news' } & NewsFeedItem; +export type FeedItem = + | ({ resource_type: "events" } & EventFeedItem) + | ({ resource_type: "news" } & NewsFeedItem) /** * FeedNewsDetail serializer @@ -898,30 +915,30 @@ export type FeedItem = { resource_type: 'events' } & EventFeedItem | { resource_ * @interface FeedNewsDetail */ export interface FeedNewsDetail { - /** - * - * @type {number} - * @memberof FeedNewsDetail - */ - 'id': number; - /** - * - * @type {Array} - * @memberof FeedNewsDetail - */ - 'authors'?: Array; - /** - * - * @type {Array} - * @memberof FeedNewsDetail - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof FeedNewsDetail - */ - 'publish_date': string; + /** + * + * @type {number} + * @memberof FeedNewsDetail + */ + id: number + /** + * + * @type {Array} + * @memberof FeedNewsDetail + */ + authors?: Array + /** + * + * @type {Array} + * @memberof FeedNewsDetail + */ + topics?: Array + /** + * + * @type {string} + * @memberof FeedNewsDetail + */ + publish_date: string } /** * FeedSource serializer @@ -929,45 +946,44 @@ export interface FeedNewsDetail { * @interface FeedSource */ export interface FeedSource { - /** - * - * @type {number} - * @memberof FeedSource - */ - 'id': number; - /** - * - * @type {FeedImage} - * @memberof FeedSource - */ - 'image': FeedImage; - /** - * - * @type {string} - * @memberof FeedSource - */ - 'title': string; - /** - * - * @type {string} - * @memberof FeedSource - */ - 'url': string; - /** - * - * @type {string} - * @memberof FeedSource - */ - 'description'?: string; - /** - * - * @type {FeedSourceFeedTypeEnum} - * @memberof FeedSource - */ - 'feed_type': FeedSourceFeedTypeEnum; + /** + * + * @type {number} + * @memberof FeedSource + */ + id: number + /** + * + * @type {FeedImage} + * @memberof FeedSource + */ + image: FeedImage + /** + * + * @type {string} + * @memberof FeedSource + */ + title: string + /** + * + * @type {string} + * @memberof FeedSource + */ + url: string + /** + * + * @type {string} + * @memberof FeedSource + */ + description?: string + /** + * + * @type {FeedSourceFeedTypeEnum} + * @memberof FeedSource + */ + feed_type: FeedSourceFeedTypeEnum } - /** * * `news` - News * `events` - Events * @export @@ -975,18 +991,18 @@ export interface FeedSource { */ export const FeedSourceFeedTypeEnum = { - /** - * News - */ - News: 'news', - /** - * Events - */ - Events: 'events' -} as const; - -export type FeedSourceFeedTypeEnum = typeof FeedSourceFeedTypeEnum[keyof typeof FeedSourceFeedTypeEnum]; + /** + * News + */ + News: "news", + /** + * Events + */ + Events: "events", +} as const +export type FeedSourceFeedTypeEnum = + (typeof FeedSourceFeedTypeEnum)[keyof typeof FeedSourceFeedTypeEnum] /** * * `academic-excellence` - Academic Boost * `career-growth` - Career Growth * `lifelong-learning` - Lifelong Learning @@ -995,22 +1011,21 @@ export type FeedSourceFeedTypeEnum = typeof FeedSourceFeedTypeEnum[keyof typeof */ export const GoalsEnum = { - /** - * Academic Boost - */ - AcademicExcellence: 'academic-excellence', - /** - * Career Growth - */ - CareerGrowth: 'career-growth', - /** - * Lifelong Learning - */ - LifelongLearning: 'lifelong-learning' -} as const; - -export type GoalsEnum = typeof GoalsEnum[keyof typeof GoalsEnum]; - + /** + * Academic Boost + */ + AcademicExcellence: "academic-excellence", + /** + * Career Growth + */ + CareerGrowth: "career-growth", + /** + * Lifelong Learning + */ + LifelongLearning: "lifelong-learning", +} as const + +export type GoalsEnum = (typeof GoalsEnum)[keyof typeof GoalsEnum] /** * Serializer for a minimal preview of Learning Paths @@ -1018,24 +1033,24 @@ export type GoalsEnum = typeof GoalsEnum[keyof typeof GoalsEnum]; * @interface LearningPathPreview */ export interface LearningPathPreview { - /** - * - * @type {string} - * @memberof LearningPathPreview - */ - 'title': string; - /** - * - * @type {string} - * @memberof LearningPathPreview - */ - 'url'?: string | null; - /** - * - * @type {number} - * @memberof LearningPathPreview - */ - 'id': number; + /** + * + * @type {string} + * @memberof LearningPathPreview + */ + title: string + /** + * + * @type {string} + * @memberof LearningPathPreview + */ + url?: string | null + /** + * + * @type {number} + * @memberof LearningPathPreview + */ + id: number } /** * Serializer for LearningResourceOfferor with all details @@ -1043,78 +1058,78 @@ export interface LearningPathPreview { * @interface LearningResourceOfferorDetail */ export interface LearningResourceOfferorDetail { - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'channel_url': string | null; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'name': string; - /** - * - * @type {boolean} - * @memberof LearningResourceOfferorDetail - */ - 'professional'?: boolean; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'offerings'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'audience'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'formats'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'fee'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'certifications'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'content_types'?: Array; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'more_information'?: string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'value_prop'?: string; + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + channel_url: string | null + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + name: string + /** + * + * @type {boolean} + * @memberof LearningResourceOfferorDetail + */ + professional?: boolean + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + offerings?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + audience?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + formats?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + fee?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + certifications?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + content_types?: Array + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + more_information?: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + value_prop?: string } /** * Serializer for LearningResourceOfferor with all details @@ -1122,72 +1137,72 @@ export interface LearningResourceOfferorDetail { * @interface LearningResourceOfferorDetailRequest */ export interface LearningResourceOfferorDetailRequest { - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetailRequest - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetailRequest - */ - 'name': string; - /** - * - * @type {boolean} - * @memberof LearningResourceOfferorDetailRequest - */ - 'professional'?: boolean; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetailRequest - */ - 'offerings'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetailRequest - */ - 'audience'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetailRequest - */ - 'formats'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetailRequest - */ - 'fee'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetailRequest - */ - 'certifications'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetailRequest - */ - 'content_types'?: Array; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetailRequest - */ - 'more_information'?: string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetailRequest - */ - 'value_prop'?: string; + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetailRequest + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetailRequest + */ + name: string + /** + * + * @type {boolean} + * @memberof LearningResourceOfferorDetailRequest + */ + professional?: boolean + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetailRequest + */ + offerings?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetailRequest + */ + audience?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetailRequest + */ + formats?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetailRequest + */ + fee?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetailRequest + */ + certifications?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetailRequest + */ + content_types?: Array + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetailRequest + */ + more_information?: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetailRequest + */ + value_prop?: string } /** * Serializer for LearningResourceTopic model @@ -1195,36 +1210,36 @@ export interface LearningResourceOfferorDetailRequest { * @interface LearningResourceTopic */ export interface LearningResourceTopic { - /** - * - * @type {number} - * @memberof LearningResourceTopic - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceTopic - */ - 'name': string; - /** - * The icon to display for the topic. - * @type {string} - * @memberof LearningResourceTopic - */ - 'icon'?: string; - /** - * - * @type {number} - * @memberof LearningResourceTopic - */ - 'parent'?: number | null; - /** - * - * @type {string} - * @memberof LearningResourceTopic - */ - 'channel_url': string | null; + /** + * + * @type {number} + * @memberof LearningResourceTopic + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceTopic + */ + name: string + /** + * The icon to display for the topic. + * @type {string} + * @memberof LearningResourceTopic + */ + icon?: string + /** + * + * @type {number} + * @memberof LearningResourceTopic + */ + parent?: number | null + /** + * + * @type {string} + * @memberof LearningResourceTopic + */ + channel_url: string | null } /** * Serializer for News FeedItem @@ -1232,205 +1247,204 @@ export interface LearningResourceTopic { * @interface NewsFeedItem */ export interface NewsFeedItem { - /** - * - * @type {number} - * @memberof NewsFeedItem - */ - 'id': number; - /** - * - * @type {NewsFeedItemFeedTypeEnum} - * @memberof NewsFeedItem - */ - 'feed_type': NewsFeedItemFeedTypeEnum; - /** - * - * @type {FeedImage} - * @memberof NewsFeedItem - */ - 'image': FeedImage; - /** - * - * @type {FeedNewsDetail} - * @memberof NewsFeedItem - */ - 'news_details': FeedNewsDetail; - /** - * - * @type {string} - * @memberof NewsFeedItem - */ - 'guid': string; - /** - * - * @type {string} - * @memberof NewsFeedItem - */ - 'title': string; - /** - * - * @type {string} - * @memberof NewsFeedItem - */ - 'url': string; - /** - * - * @type {string} - * @memberof NewsFeedItem - */ - 'summary'?: string; - /** - * - * @type {string} - * @memberof NewsFeedItem - */ - 'content'?: string; - /** - * - * @type {number} - * @memberof NewsFeedItem - */ - 'source': number; + /** + * + * @type {number} + * @memberof NewsFeedItem + */ + id: number + /** + * + * @type {NewsFeedItemFeedTypeEnum} + * @memberof NewsFeedItem + */ + feed_type: NewsFeedItemFeedTypeEnum + /** + * + * @type {FeedImage} + * @memberof NewsFeedItem + */ + image: FeedImage + /** + * + * @type {FeedNewsDetail} + * @memberof NewsFeedItem + */ + news_details: FeedNewsDetail + /** + * + * @type {string} + * @memberof NewsFeedItem + */ + guid: string + /** + * + * @type {string} + * @memberof NewsFeedItem + */ + title: string + /** + * + * @type {string} + * @memberof NewsFeedItem + */ + url: string + /** + * + * @type {string} + * @memberof NewsFeedItem + */ + summary?: string + /** + * + * @type {string} + * @memberof NewsFeedItem + */ + content?: string + /** + * + * @type {number} + * @memberof NewsFeedItem + */ + source: number } - /** - * + * * @export * @enum {string} */ export const NewsFeedItemFeedTypeEnum = { - News: 'news' -} as const; - -export type NewsFeedItemFeedTypeEnum = typeof NewsFeedItemFeedTypeEnum[keyof typeof NewsFeedItemFeedTypeEnum]; + News: "news", +} as const +export type NewsFeedItemFeedTypeEnum = + (typeof NewsFeedItemFeedTypeEnum)[keyof typeof NewsFeedItemFeedTypeEnum] /** - * + * * @export * @interface PaginatedAttestationList */ export interface PaginatedAttestationList { - /** - * - * @type {number} - * @memberof PaginatedAttestationList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedAttestationList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedAttestationList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedAttestationList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedAttestationList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedAttestationList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedAttestationList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedAttestationList + */ + results: Array } /** - * + * * @export * @interface PaginatedChannelList */ export interface PaginatedChannelList { - /** - * - * @type {number} - * @memberof PaginatedChannelList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedChannelList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedChannelList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedChannelList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedChannelList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedChannelList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedChannelList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedChannelList + */ + results: Array } /** - * + * * @export * @interface PaginatedFeedItemList */ export interface PaginatedFeedItemList { - /** - * - * @type {number} - * @memberof PaginatedFeedItemList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedFeedItemList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedFeedItemList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedFeedItemList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedFeedItemList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedFeedItemList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedFeedItemList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedFeedItemList + */ + results: Array } /** - * + * * @export * @interface PaginatedFeedSourceList */ export interface PaginatedFeedSourceList { - /** - * - * @type {number} - * @memberof PaginatedFeedSourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedFeedSourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedFeedSourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedFeedSourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedFeedSourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedFeedSourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedFeedSourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedFeedSourceList + */ + results: Array } /** * Similar to ChannelCreateSerializer, with read-only name @@ -1438,195 +1452,198 @@ export interface PaginatedFeedSourceList { * @interface PatchedChannelWriteRequest */ export interface PatchedChannelWriteRequest { - /** - * - * @type {string} - * @memberof PatchedChannelWriteRequest - */ - 'name'?: string; - /** - * - * @type {string} - * @memberof PatchedChannelWriteRequest - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof PatchedChannelWriteRequest - */ - 'public_description'?: string; - /** - * - * @type {Array} - * @memberof PatchedChannelWriteRequest - */ - 'sub_channels'?: Array; - /** - * Learning path featured in this channel. - * @type {number} - * @memberof PatchedChannelWriteRequest - */ - 'featured_list'?: number | null; - /** - * Learning paths in this channel. - * @type {Array} - * @memberof PatchedChannelWriteRequest - */ - 'lists'?: Array; - /** - * Get the avatar image URL - * @type {string} - * @memberof PatchedChannelWriteRequest - */ - 'avatar'?: string | null; - /** - * Get the banner image URL - * @type {string} - * @memberof PatchedChannelWriteRequest - */ - 'banner'?: string | null; - /** - * - * @type {any} - * @memberof PatchedChannelWriteRequest - */ - 'about'?: any | null; - /** - * - * @type {ChannelTypeEnum} - * @memberof PatchedChannelWriteRequest - */ - 'channel_type'?: ChannelTypeEnum; - /** - * - * @type {string} - * @memberof PatchedChannelWriteRequest - */ - 'search_filter'?: string; - /** - * - * @type {ChannelTopicDetailRequest} - * @memberof PatchedChannelWriteRequest - */ - 'topic_detail'?: ChannelTopicDetailRequest | null; - /** - * - * @type {ChannelDepartmentDetailRequest} - * @memberof PatchedChannelWriteRequest - */ - 'department_detail'?: ChannelDepartmentDetailRequest | null; + /** + * + * @type {string} + * @memberof PatchedChannelWriteRequest + */ + name?: string + /** + * + * @type {string} + * @memberof PatchedChannelWriteRequest + */ + title?: string + /** + * + * @type {string} + * @memberof PatchedChannelWriteRequest + */ + public_description?: string + /** + * + * @type {Array} + * @memberof PatchedChannelWriteRequest + */ + sub_channels?: Array + /** + * Learning path featured in this channel. + * @type {number} + * @memberof PatchedChannelWriteRequest + */ + featured_list?: number | null + /** + * Learning paths in this channel. + * @type {Array} + * @memberof PatchedChannelWriteRequest + */ + lists?: Array + /** + * Get the avatar image URL + * @type {string} + * @memberof PatchedChannelWriteRequest + */ + avatar?: string | null + /** + * Get the banner image URL + * @type {string} + * @memberof PatchedChannelWriteRequest + */ + banner?: string | null + /** + * + * @type {any} + * @memberof PatchedChannelWriteRequest + */ + about?: any | null + /** + * + * @type {ChannelTypeEnum} + * @memberof PatchedChannelWriteRequest + */ + channel_type?: ChannelTypeEnum + /** + * + * @type {string} + * @memberof PatchedChannelWriteRequest + */ + search_filter?: string + /** + * + * @type {ChannelTopicDetailRequest} + * @memberof PatchedChannelWriteRequest + */ + topic_detail?: ChannelTopicDetailRequest | null + /** + * + * @type {ChannelDepartmentDetailRequest} + * @memberof PatchedChannelWriteRequest + */ + department_detail?: ChannelDepartmentDetailRequest | null } - /** * Serializer for Profile * @export * @interface PatchedProfileRequest */ export interface PatchedProfileRequest { - /** - * - * @type {string} - * @memberof PatchedProfileRequest - */ - 'image'?: string | null; - /** - * - * @type {string} - * @memberof PatchedProfileRequest - */ - 'image_small'?: string | null; - /** - * - * @type {string} - * @memberof PatchedProfileRequest - */ - 'image_medium'?: string | null; - /** - * - * @type {boolean} - * @memberof PatchedProfileRequest - */ - 'email_optin'?: boolean; - /** - * - * @type {boolean} - * @memberof PatchedProfileRequest - */ - 'toc_optin'?: boolean; - /** - * - * @type {string} - * @memberof PatchedProfileRequest - */ - 'bio'?: string | null; - /** - * - * @type {string} - * @memberof PatchedProfileRequest - */ - 'headline'?: string | null; - /** - * - * @type {any} - * @memberof PatchedProfileRequest - */ - 'location'?: any | null; - /** - * - * @type {Array} - * @memberof PatchedProfileRequest - */ - 'topic_interests'?: Array; - /** - * - * @type {Array} - * @memberof PatchedProfileRequest - */ - 'goals'?: Array; - /** - * - * @type {PatchedProfileRequestCurrentEducation} - * @memberof PatchedProfileRequest - */ - 'current_education'?: PatchedProfileRequestCurrentEducation; - /** - * - * @type {PatchedProfileRequestCertificateDesired} - * @memberof PatchedProfileRequest - */ - 'certificate_desired'?: PatchedProfileRequestCertificateDesired; - /** - * - * @type {PatchedProfileRequestTimeCommitment} - * @memberof PatchedProfileRequest - */ - 'time_commitment'?: PatchedProfileRequestTimeCommitment; - /** - * - * @type {Array} - * @memberof PatchedProfileRequest - */ - 'delivery'?: Array; + /** + * + * @type {string} + * @memberof PatchedProfileRequest + */ + image?: string | null + /** + * + * @type {string} + * @memberof PatchedProfileRequest + */ + image_small?: string | null + /** + * + * @type {string} + * @memberof PatchedProfileRequest + */ + image_medium?: string | null + /** + * + * @type {boolean} + * @memberof PatchedProfileRequest + */ + email_optin?: boolean + /** + * + * @type {boolean} + * @memberof PatchedProfileRequest + */ + toc_optin?: boolean + /** + * + * @type {string} + * @memberof PatchedProfileRequest + */ + bio?: string | null + /** + * + * @type {string} + * @memberof PatchedProfileRequest + */ + headline?: string | null + /** + * + * @type {any} + * @memberof PatchedProfileRequest + */ + location?: any | null + /** + * + * @type {Array} + * @memberof PatchedProfileRequest + */ + topic_interests?: Array + /** + * + * @type {Array} + * @memberof PatchedProfileRequest + */ + goals?: Array + /** + * + * @type {PatchedProfileRequestCurrentEducation} + * @memberof PatchedProfileRequest + */ + current_education?: PatchedProfileRequestCurrentEducation + /** + * + * @type {PatchedProfileRequestCertificateDesired} + * @memberof PatchedProfileRequest + */ + certificate_desired?: PatchedProfileRequestCertificateDesired + /** + * + * @type {PatchedProfileRequestTimeCommitment} + * @memberof PatchedProfileRequest + */ + time_commitment?: PatchedProfileRequestTimeCommitment + /** + * + * @type {Array} + * @memberof PatchedProfileRequest + */ + delivery?: Array } /** * @type PatchedProfileRequestCertificateDesired * @export */ -export type PatchedProfileRequestCertificateDesired = BlankEnum | CertificateDesiredEnum; +export type PatchedProfileRequestCertificateDesired = + | BlankEnum + | CertificateDesiredEnum /** * @type PatchedProfileRequestCurrentEducation * @export */ -export type PatchedProfileRequestCurrentEducation = BlankEnum | CurrentEducationEnum; +export type PatchedProfileRequestCurrentEducation = + | BlankEnum + | CurrentEducationEnum /** * @type PatchedProfileRequestTimeCommitment * @export */ -export type PatchedProfileRequestTimeCommitment = BlankEnum | TimeCommitmentEnum; +export type PatchedProfileRequestTimeCommitment = BlankEnum | TimeCommitmentEnum /** * Serializer for User @@ -1634,18 +1651,18 @@ export type PatchedProfileRequestTimeCommitment = BlankEnum | TimeCommitmentEnum * @interface PatchedUserRequest */ export interface PatchedUserRequest { - /** - * - * @type {ProfileRequest} - * @memberof PatchedUserRequest - */ - 'profile'?: ProfileRequest; - /** - * - * @type {string} - * @memberof PatchedUserRequest - */ - 'email'?: string; + /** + * + * @type {ProfileRequest} + * @memberof PatchedUserRequest + */ + profile?: ProfileRequest + /** + * + * @type {string} + * @memberof PatchedUserRequest + */ + email?: string } /** * Serializer for WidgetLists @@ -1653,12 +1670,12 @@ export interface PatchedUserRequest { * @interface PatchedWidgetListRequest */ export interface PatchedWidgetListRequest { - /** - * - * @type {Array} - * @memberof PatchedWidgetListRequest - */ - 'widgets'?: Array | null; + /** + * + * @type {Array} + * @memberof PatchedWidgetListRequest + */ + widgets?: Array | null } /** * Serializer for Channel model of type pathway @@ -1666,135 +1683,134 @@ export interface PatchedWidgetListRequest { * @interface PathwayChannel */ export interface PathwayChannel { - /** - * - * @type {number} - * @memberof PathwayChannel - */ - 'id': number; - /** - * Get the avatar image URL - * @type {string} - * @memberof PathwayChannel - */ - 'avatar'?: string | null; - /** - * Get the avatar image small URL - * @type {string} - * @memberof PathwayChannel - */ - 'avatar_small': string | null; - /** - * Get the avatar image medium URL - * @type {string} - * @memberof PathwayChannel - */ - 'avatar_medium': string | null; - /** - * Get the banner image URL - * @type {string} - * @memberof PathwayChannel - */ - 'banner'?: string | null; - /** - * Return true if user is a moderator for the channel - * @type {boolean} - * @memberof PathwayChannel - */ - 'is_moderator': boolean; - /** - * - * @type {Array} - * @memberof PathwayChannel - */ - 'lists': Array; - /** - * Get the URL for the channel - * @type {string} - * @memberof PathwayChannel - */ - 'channel_url': string; - /** - * - * @type {DepartmentChannelFeaturedList} - * @memberof PathwayChannel - */ - 'featured_list': DepartmentChannelFeaturedList | null; - /** - * - * @type {Array} - * @memberof PathwayChannel - */ - 'sub_channels': Array; - /** - * - * @type {PathwayChannelTypeEnum} - * @memberof PathwayChannel - */ - 'channel_type': PathwayChannelTypeEnum; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'created_on': string; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'updated_on': string; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'name': string; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'title': string; - /** - * - * @type {any} - * @memberof PathwayChannel - */ - 'about'?: any | null; - /** - * - * @type {any} - * @memberof PathwayChannel - */ - 'configuration'?: any | null; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'search_filter'?: string; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'public_description'?: string; - /** - * - * @type {string} - * @memberof PathwayChannel - */ - 'ga_tracking_id'?: string; - /** - * - * @type {number} - * @memberof PathwayChannel - */ - 'widget_list'?: number | null; + /** + * + * @type {number} + * @memberof PathwayChannel + */ + id: number + /** + * Get the avatar image URL + * @type {string} + * @memberof PathwayChannel + */ + avatar?: string | null + /** + * Get the avatar image small URL + * @type {string} + * @memberof PathwayChannel + */ + avatar_small: string | null + /** + * Get the avatar image medium URL + * @type {string} + * @memberof PathwayChannel + */ + avatar_medium: string | null + /** + * Get the banner image URL + * @type {string} + * @memberof PathwayChannel + */ + banner?: string | null + /** + * Return true if user is a moderator for the channel + * @type {boolean} + * @memberof PathwayChannel + */ + is_moderator: boolean + /** + * + * @type {Array} + * @memberof PathwayChannel + */ + lists: Array + /** + * Get the URL for the channel + * @type {string} + * @memberof PathwayChannel + */ + channel_url: string + /** + * + * @type {DepartmentChannelFeaturedList} + * @memberof PathwayChannel + */ + featured_list: DepartmentChannelFeaturedList | null + /** + * + * @type {Array} + * @memberof PathwayChannel + */ + sub_channels: Array + /** + * + * @type {PathwayChannelTypeEnum} + * @memberof PathwayChannel + */ + channel_type: PathwayChannelTypeEnum + /** + * + * @type {string} + * @memberof PathwayChannel + */ + created_on: string + /** + * + * @type {string} + * @memberof PathwayChannel + */ + updated_on: string + /** + * + * @type {string} + * @memberof PathwayChannel + */ + name: string + /** + * + * @type {string} + * @memberof PathwayChannel + */ + title: string + /** + * + * @type {any} + * @memberof PathwayChannel + */ + about?: any | null + /** + * + * @type {any} + * @memberof PathwayChannel + */ + configuration?: any | null + /** + * + * @type {string} + * @memberof PathwayChannel + */ + search_filter?: string + /** + * + * @type {string} + * @memberof PathwayChannel + */ + public_description?: string + /** + * + * @type {string} + * @memberof PathwayChannel + */ + ga_tracking_id?: string + /** + * + * @type {number} + * @memberof PathwayChannel + */ + widget_list?: number | null } - /** * * `pathway` - Pathway * @export @@ -1802,14 +1818,14 @@ export interface PathwayChannel { */ export const PathwayChannelTypeEnum = { - /** - * Pathway - */ - Pathway: 'pathway' -} as const; - -export type PathwayChannelTypeEnum = typeof PathwayChannelTypeEnum[keyof typeof PathwayChannelTypeEnum]; + /** + * Pathway + */ + Pathway: "pathway", +} as const +export type PathwayChannelTypeEnum = + (typeof PathwayChannelTypeEnum)[keyof typeof PathwayChannelTypeEnum] /** * Serializer for profile search preference filters @@ -1817,24 +1833,24 @@ export type PathwayChannelTypeEnum = typeof PathwayChannelTypeEnum[keyof typeof * @interface PreferencesSearch */ export interface PreferencesSearch { - /** - * - * @type {boolean} - * @memberof PreferencesSearch - */ - 'certification'?: boolean; - /** - * - * @type {Array} - * @memberof PreferencesSearch - */ - 'topic'?: Array; - /** - * - * @type {Array} - * @memberof PreferencesSearch - */ - 'delivery'?: Array; + /** + * + * @type {boolean} + * @memberof PreferencesSearch + */ + certification?: boolean + /** + * + * @type {Array} + * @memberof PreferencesSearch + */ + topic?: Array + /** + * + * @type {Array} + * @memberof PreferencesSearch + */ + delivery?: Array } /** * Serializer for Profile @@ -1842,126 +1858,126 @@ export interface PreferencesSearch { * @interface Profile */ export interface Profile { - /** - * Get the user\'s name - * @type {string} - * @memberof Profile - */ - 'name': string; - /** - * - * @type {string} - * @memberof Profile - */ - 'image'?: string | null; - /** - * - * @type {string} - * @memberof Profile - */ - 'image_small'?: string | null; - /** - * - * @type {string} - * @memberof Profile - */ - 'image_medium'?: string | null; - /** - * - * @type {string} - * @memberof Profile - */ - 'image_file': string | null; - /** - * - * @type {string} - * @memberof Profile - */ - 'image_small_file': string | null; - /** - * - * @type {string} - * @memberof Profile - */ - 'image_medium_file': string | null; - /** - * Custom getter for small profile image - * @type {string} - * @memberof Profile - */ - 'profile_image_small': string; - /** - * Custom getter for medium profile image - * @type {string} - * @memberof Profile - */ - 'profile_image_medium': string; - /** - * - * @type {string} - * @memberof Profile - */ - 'bio'?: string | null; - /** - * - * @type {string} - * @memberof Profile - */ - 'headline'?: string | null; - /** - * Custom getter for the username - * @type {string} - * @memberof Profile - */ - 'username': string; - /** - * Custom getter for location text - * @type {string} - * @memberof Profile - */ - 'placename': string; - /** - * - * @type {Array} - * @memberof Profile - */ - 'topic_interests'?: Array; - /** - * - * @type {Array} - * @memberof Profile - */ - 'goals'?: Array; - /** - * - * @type {PatchedProfileRequestCurrentEducation} - * @memberof Profile - */ - 'current_education'?: PatchedProfileRequestCurrentEducation; - /** - * - * @type {PatchedProfileRequestCertificateDesired} - * @memberof Profile - */ - 'certificate_desired'?: PatchedProfileRequestCertificateDesired; - /** - * - * @type {PatchedProfileRequestTimeCommitment} - * @memberof Profile - */ - 'time_commitment'?: PatchedProfileRequestTimeCommitment; - /** - * - * @type {Array} - * @memberof Profile - */ - 'delivery'?: Array; - /** - * - * @type {PreferencesSearch} - * @memberof Profile - */ - 'preference_search_filters': PreferencesSearch; + /** + * Get the user\'s name + * @type {string} + * @memberof Profile + */ + name: string + /** + * + * @type {string} + * @memberof Profile + */ + image?: string | null + /** + * + * @type {string} + * @memberof Profile + */ + image_small?: string | null + /** + * + * @type {string} + * @memberof Profile + */ + image_medium?: string | null + /** + * + * @type {string} + * @memberof Profile + */ + image_file: string | null + /** + * + * @type {string} + * @memberof Profile + */ + image_small_file: string | null + /** + * + * @type {string} + * @memberof Profile + */ + image_medium_file: string | null + /** + * Custom getter for small profile image + * @type {string} + * @memberof Profile + */ + profile_image_small: string + /** + * Custom getter for medium profile image + * @type {string} + * @memberof Profile + */ + profile_image_medium: string + /** + * + * @type {string} + * @memberof Profile + */ + bio?: string | null + /** + * + * @type {string} + * @memberof Profile + */ + headline?: string | null + /** + * Custom getter for the username + * @type {string} + * @memberof Profile + */ + username: string + /** + * Custom getter for location text + * @type {string} + * @memberof Profile + */ + placename: string + /** + * + * @type {Array} + * @memberof Profile + */ + topic_interests?: Array + /** + * + * @type {Array} + * @memberof Profile + */ + goals?: Array + /** + * + * @type {PatchedProfileRequestCurrentEducation} + * @memberof Profile + */ + current_education?: PatchedProfileRequestCurrentEducation + /** + * + * @type {PatchedProfileRequestCertificateDesired} + * @memberof Profile + */ + certificate_desired?: PatchedProfileRequestCertificateDesired + /** + * + * @type {PatchedProfileRequestTimeCommitment} + * @memberof Profile + */ + time_commitment?: PatchedProfileRequestTimeCommitment + /** + * + * @type {Array} + * @memberof Profile + */ + delivery?: Array + /** + * + * @type {PreferencesSearch} + * @memberof Profile + */ + preference_search_filters: PreferencesSearch } /** * Serializer for Profile @@ -1969,90 +1985,90 @@ export interface Profile { * @interface ProfileRequest */ export interface ProfileRequest { - /** - * - * @type {string} - * @memberof ProfileRequest - */ - 'image'?: string | null; - /** - * - * @type {string} - * @memberof ProfileRequest - */ - 'image_small'?: string | null; - /** - * - * @type {string} - * @memberof ProfileRequest - */ - 'image_medium'?: string | null; - /** - * - * @type {boolean} - * @memberof ProfileRequest - */ - 'email_optin'?: boolean; - /** - * - * @type {boolean} - * @memberof ProfileRequest - */ - 'toc_optin'?: boolean; - /** - * - * @type {string} - * @memberof ProfileRequest - */ - 'bio'?: string | null; - /** - * - * @type {string} - * @memberof ProfileRequest - */ - 'headline'?: string | null; - /** - * - * @type {any} - * @memberof ProfileRequest - */ - 'location'?: any | null; - /** - * - * @type {Array} - * @memberof ProfileRequest - */ - 'topic_interests'?: Array; - /** - * - * @type {Array} - * @memberof ProfileRequest - */ - 'goals'?: Array; - /** - * - * @type {PatchedProfileRequestCurrentEducation} - * @memberof ProfileRequest - */ - 'current_education'?: PatchedProfileRequestCurrentEducation; - /** - * - * @type {PatchedProfileRequestCertificateDesired} - * @memberof ProfileRequest - */ - 'certificate_desired'?: PatchedProfileRequestCertificateDesired; - /** - * - * @type {PatchedProfileRequestTimeCommitment} - * @memberof ProfileRequest - */ - 'time_commitment'?: PatchedProfileRequestTimeCommitment; - /** - * - * @type {Array} - * @memberof ProfileRequest - */ - 'delivery'?: Array; + /** + * + * @type {string} + * @memberof ProfileRequest + */ + image?: string | null + /** + * + * @type {string} + * @memberof ProfileRequest + */ + image_small?: string | null + /** + * + * @type {string} + * @memberof ProfileRequest + */ + image_medium?: string | null + /** + * + * @type {boolean} + * @memberof ProfileRequest + */ + email_optin?: boolean + /** + * + * @type {boolean} + * @memberof ProfileRequest + */ + toc_optin?: boolean + /** + * + * @type {string} + * @memberof ProfileRequest + */ + bio?: string | null + /** + * + * @type {string} + * @memberof ProfileRequest + */ + headline?: string | null + /** + * + * @type {any} + * @memberof ProfileRequest + */ + location?: any | null + /** + * + * @type {Array} + * @memberof ProfileRequest + */ + topic_interests?: Array + /** + * + * @type {Array} + * @memberof ProfileRequest + */ + goals?: Array + /** + * + * @type {PatchedProfileRequestCurrentEducation} + * @memberof ProfileRequest + */ + current_education?: PatchedProfileRequestCurrentEducation + /** + * + * @type {PatchedProfileRequestCertificateDesired} + * @memberof ProfileRequest + */ + certificate_desired?: PatchedProfileRequestCertificateDesired + /** + * + * @type {PatchedProfileRequestTimeCommitment} + * @memberof ProfileRequest + */ + time_commitment?: PatchedProfileRequestTimeCommitment + /** + * + * @type {Array} + * @memberof ProfileRequest + */ + delivery?: Array } /** * Serializer for Program Certificates @@ -2060,132 +2076,132 @@ export interface ProfileRequest { * @interface ProgramCertificate */ export interface ProgramCertificate { - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'record_hash': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_letter_generate_url': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_letter_share_url': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_title': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_full_name'?: string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_email': string; - /** - * - * @type {number} - * @memberof ProgramCertificate - */ - 'user_edxorg_id'?: number | null; - /** - * - * @type {number} - * @memberof ProgramCertificate - */ - 'micromasters_program_id'?: number | null; - /** - * - * @type {number} - * @memberof ProgramCertificate - */ - 'mitxonline_program_id'?: number | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_edxorg_username'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_gender'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_address_city'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_first_name'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_last_name'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_year_of_birth'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_country'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_address_postal_code'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_street_address'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_address_state_or_territory'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_mitxonline_username'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_completion_timestamp'?: string | null; + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + record_hash: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_letter_generate_url: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_letter_share_url: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_title: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_full_name?: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_email: string + /** + * + * @type {number} + * @memberof ProgramCertificate + */ + user_edxorg_id?: number | null + /** + * + * @type {number} + * @memberof ProgramCertificate + */ + micromasters_program_id?: number | null + /** + * + * @type {number} + * @memberof ProgramCertificate + */ + mitxonline_program_id?: number | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_edxorg_username?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_gender?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_address_city?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_first_name?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_last_name?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_year_of_birth?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_country?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_address_postal_code?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_street_address?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_address_state_or_territory?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_mitxonline_username?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_completion_timestamp?: string | null } /** * * `news` - news * `events` - events @@ -2194,18 +2210,18 @@ export interface ProgramCertificate { */ export const ResourceTypeEnum = { - /** - * news - */ - News: 'news', - /** - * events - */ - Events: 'events' -} as const; - -export type ResourceTypeEnum = typeof ResourceTypeEnum[keyof typeof ResourceTypeEnum]; + /** + * news + */ + News: "news", + /** + * events + */ + Events: "events", +} as const +export type ResourceTypeEnum = + (typeof ResourceTypeEnum)[keyof typeof ResourceTypeEnum] /** * * `facebook` - facebook * `linkedin` - linkedin * `personal` - personal * `twitter` - twitter @@ -2214,26 +2230,25 @@ export type ResourceTypeEnum = typeof ResourceTypeEnum[keyof typeof ResourceType */ export const SiteTypeEnum = { - /** - * facebook - */ - Facebook: 'facebook', - /** - * linkedin - */ - Linkedin: 'linkedin', - /** - * personal - */ - Personal: 'personal', - /** - * twitter - */ - Twitter: 'twitter' -} as const; - -export type SiteTypeEnum = typeof SiteTypeEnum[keyof typeof SiteTypeEnum]; - + /** + * facebook + */ + Facebook: "facebook", + /** + * linkedin + */ + Linkedin: "linkedin", + /** + * personal + */ + Personal: "personal", + /** + * twitter + */ + Twitter: "twitter", +} as const + +export type SiteTypeEnum = (typeof SiteTypeEnum)[keyof typeof SiteTypeEnum] /** * Serializer for SubChannels @@ -2241,24 +2256,24 @@ export type SiteTypeEnum = typeof SiteTypeEnum[keyof typeof SiteTypeEnum]; * @interface SubChannel */ export interface SubChannel { - /** - * - * @type {string} - * @memberof SubChannel - */ - 'parent_channel': string; - /** - * - * @type {string} - * @memberof SubChannel - */ - 'channel': string; - /** - * - * @type {number} - * @memberof SubChannel - */ - 'position'?: number; + /** + * + * @type {string} + * @memberof SubChannel + */ + parent_channel: string + /** + * + * @type {string} + * @memberof SubChannel + */ + channel: string + /** + * + * @type {number} + * @memberof SubChannel + */ + position?: number } /** * * `0-to-5-hours` - <5 hours/week * `5-to-10-hours` - 5-10 hours/week * `10-to-20-hours` - 10-20 hours/week * `20-to-30-hours` - 20-30 hours/week * `30-plus-hours` - 30+ hours/week @@ -2267,30 +2282,30 @@ export interface SubChannel { */ export const TimeCommitmentEnum = { - /** - * <5 hours/week - */ - _0To5Hours: '0-to-5-hours', - /** - * 5-10 hours/week - */ - _5To10Hours: '5-to-10-hours', - /** - * 10-20 hours/week - */ - _10To20Hours: '10-to-20-hours', - /** - * 20-30 hours/week - */ - _20To30Hours: '20-to-30-hours', - /** - * 30+ hours/week - */ - _30PlusHours: '30-plus-hours' -} as const; - -export type TimeCommitmentEnum = typeof TimeCommitmentEnum[keyof typeof TimeCommitmentEnum]; - + /** + * <5 hours/week + */ + _0To5Hours: "0-to-5-hours", + /** + * 5-10 hours/week + */ + _5To10Hours: "5-to-10-hours", + /** + * 10-20 hours/week + */ + _10To20Hours: "10-to-20-hours", + /** + * 20-30 hours/week + */ + _20To30Hours: "20-to-30-hours", + /** + * 30+ hours/week + */ + _30PlusHours: "30-plus-hours", +} as const + +export type TimeCommitmentEnum = + (typeof TimeCommitmentEnum)[keyof typeof TimeCommitmentEnum] /** * Serializer for Channel model of type topic @@ -2298,141 +2313,140 @@ export type TimeCommitmentEnum = typeof TimeCommitmentEnum[keyof typeof TimeComm * @interface TopicChannel */ export interface TopicChannel { - /** - * - * @type {number} - * @memberof TopicChannel - */ - 'id': number; - /** - * Get the avatar image URL - * @type {string} - * @memberof TopicChannel - */ - 'avatar'?: string | null; - /** - * Get the avatar image small URL - * @type {string} - * @memberof TopicChannel - */ - 'avatar_small': string | null; - /** - * Get the avatar image medium URL - * @type {string} - * @memberof TopicChannel - */ - 'avatar_medium': string | null; - /** - * Get the banner image URL - * @type {string} - * @memberof TopicChannel - */ - 'banner'?: string | null; - /** - * Return true if user is a moderator for the channel - * @type {boolean} - * @memberof TopicChannel - */ - 'is_moderator': boolean; - /** - * - * @type {Array} - * @memberof TopicChannel - */ - 'lists': Array; - /** - * Get the URL for the channel - * @type {string} - * @memberof TopicChannel - */ - 'channel_url': string; - /** - * - * @type {DepartmentChannelFeaturedList} - * @memberof TopicChannel - */ - 'featured_list': DepartmentChannelFeaturedList | null; - /** - * - * @type {Array} - * @memberof TopicChannel - */ - 'sub_channels': Array; - /** - * - * @type {TopicChannelTypeEnum} - * @memberof TopicChannel - */ - 'channel_type': TopicChannelTypeEnum; - /** - * - * @type {ChannelTopicDetail} - * @memberof TopicChannel - */ - 'topic_detail': ChannelTopicDetail; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'created_on': string; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'updated_on': string; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'name': string; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'title': string; - /** - * - * @type {any} - * @memberof TopicChannel - */ - 'about'?: any | null; - /** - * - * @type {any} - * @memberof TopicChannel - */ - 'configuration'?: any | null; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'search_filter'?: string; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'public_description'?: string; - /** - * - * @type {string} - * @memberof TopicChannel - */ - 'ga_tracking_id'?: string; - /** - * - * @type {number} - * @memberof TopicChannel - */ - 'widget_list'?: number | null; + /** + * + * @type {number} + * @memberof TopicChannel + */ + id: number + /** + * Get the avatar image URL + * @type {string} + * @memberof TopicChannel + */ + avatar?: string | null + /** + * Get the avatar image small URL + * @type {string} + * @memberof TopicChannel + */ + avatar_small: string | null + /** + * Get the avatar image medium URL + * @type {string} + * @memberof TopicChannel + */ + avatar_medium: string | null + /** + * Get the banner image URL + * @type {string} + * @memberof TopicChannel + */ + banner?: string | null + /** + * Return true if user is a moderator for the channel + * @type {boolean} + * @memberof TopicChannel + */ + is_moderator: boolean + /** + * + * @type {Array} + * @memberof TopicChannel + */ + lists: Array + /** + * Get the URL for the channel + * @type {string} + * @memberof TopicChannel + */ + channel_url: string + /** + * + * @type {DepartmentChannelFeaturedList} + * @memberof TopicChannel + */ + featured_list: DepartmentChannelFeaturedList | null + /** + * + * @type {Array} + * @memberof TopicChannel + */ + sub_channels: Array + /** + * + * @type {TopicChannelTypeEnum} + * @memberof TopicChannel + */ + channel_type: TopicChannelTypeEnum + /** + * + * @type {ChannelTopicDetail} + * @memberof TopicChannel + */ + topic_detail: ChannelTopicDetail + /** + * + * @type {string} + * @memberof TopicChannel + */ + created_on: string + /** + * + * @type {string} + * @memberof TopicChannel + */ + updated_on: string + /** + * + * @type {string} + * @memberof TopicChannel + */ + name: string + /** + * + * @type {string} + * @memberof TopicChannel + */ + title: string + /** + * + * @type {any} + * @memberof TopicChannel + */ + about?: any | null + /** + * + * @type {any} + * @memberof TopicChannel + */ + configuration?: any | null + /** + * + * @type {string} + * @memberof TopicChannel + */ + search_filter?: string + /** + * + * @type {string} + * @memberof TopicChannel + */ + public_description?: string + /** + * + * @type {string} + * @memberof TopicChannel + */ + ga_tracking_id?: string + /** + * + * @type {number} + * @memberof TopicChannel + */ + widget_list?: number | null } - /** * * `topic` - Topic * @export @@ -2440,14 +2454,14 @@ export interface TopicChannel { */ export const TopicChannelTypeEnum = { - /** - * Topic - */ - Topic: 'topic' -} as const; - -export type TopicChannelTypeEnum = typeof TopicChannelTypeEnum[keyof typeof TopicChannelTypeEnum]; + /** + * Topic + */ + Topic: "topic", +} as const +export type TopicChannelTypeEnum = + (typeof TopicChannelTypeEnum)[keyof typeof TopicChannelTypeEnum] /** * Serializer for Channel model of type unit @@ -2455,141 +2469,140 @@ export type TopicChannelTypeEnum = typeof TopicChannelTypeEnum[keyof typeof Topi * @interface UnitChannel */ export interface UnitChannel { - /** - * - * @type {number} - * @memberof UnitChannel - */ - 'id': number; - /** - * Get the avatar image URL - * @type {string} - * @memberof UnitChannel - */ - 'avatar'?: string | null; - /** - * Get the avatar image small URL - * @type {string} - * @memberof UnitChannel - */ - 'avatar_small': string | null; - /** - * Get the avatar image medium URL - * @type {string} - * @memberof UnitChannel - */ - 'avatar_medium': string | null; - /** - * Get the banner image URL - * @type {string} - * @memberof UnitChannel - */ - 'banner'?: string | null; - /** - * Return true if user is a moderator for the channel - * @type {boolean} - * @memberof UnitChannel - */ - 'is_moderator': boolean; - /** - * - * @type {Array} - * @memberof UnitChannel - */ - 'lists': Array; - /** - * Get the URL for the channel - * @type {string} - * @memberof UnitChannel - */ - 'channel_url': string; - /** - * - * @type {DepartmentChannelFeaturedList} - * @memberof UnitChannel - */ - 'featured_list': DepartmentChannelFeaturedList | null; - /** - * - * @type {Array} - * @memberof UnitChannel - */ - 'sub_channels': Array; - /** - * - * @type {UnitChannelTypeEnum} - * @memberof UnitChannel - */ - 'channel_type': UnitChannelTypeEnum; - /** - * - * @type {ChannelUnitDetail} - * @memberof UnitChannel - */ - 'unit_detail': ChannelUnitDetail; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'created_on': string; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'updated_on': string; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'name': string; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'title': string; - /** - * - * @type {any} - * @memberof UnitChannel - */ - 'about'?: any | null; - /** - * - * @type {any} - * @memberof UnitChannel - */ - 'configuration'?: any | null; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'search_filter'?: string; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'public_description'?: string; - /** - * - * @type {string} - * @memberof UnitChannel - */ - 'ga_tracking_id'?: string; - /** - * - * @type {number} - * @memberof UnitChannel - */ - 'widget_list'?: number | null; + /** + * + * @type {number} + * @memberof UnitChannel + */ + id: number + /** + * Get the avatar image URL + * @type {string} + * @memberof UnitChannel + */ + avatar?: string | null + /** + * Get the avatar image small URL + * @type {string} + * @memberof UnitChannel + */ + avatar_small: string | null + /** + * Get the avatar image medium URL + * @type {string} + * @memberof UnitChannel + */ + avatar_medium: string | null + /** + * Get the banner image URL + * @type {string} + * @memberof UnitChannel + */ + banner?: string | null + /** + * Return true if user is a moderator for the channel + * @type {boolean} + * @memberof UnitChannel + */ + is_moderator: boolean + /** + * + * @type {Array} + * @memberof UnitChannel + */ + lists: Array + /** + * Get the URL for the channel + * @type {string} + * @memberof UnitChannel + */ + channel_url: string + /** + * + * @type {DepartmentChannelFeaturedList} + * @memberof UnitChannel + */ + featured_list: DepartmentChannelFeaturedList | null + /** + * + * @type {Array} + * @memberof UnitChannel + */ + sub_channels: Array + /** + * + * @type {UnitChannelTypeEnum} + * @memberof UnitChannel + */ + channel_type: UnitChannelTypeEnum + /** + * + * @type {ChannelUnitDetail} + * @memberof UnitChannel + */ + unit_detail: ChannelUnitDetail + /** + * + * @type {string} + * @memberof UnitChannel + */ + created_on: string + /** + * + * @type {string} + * @memberof UnitChannel + */ + updated_on: string + /** + * + * @type {string} + * @memberof UnitChannel + */ + name: string + /** + * + * @type {string} + * @memberof UnitChannel + */ + title: string + /** + * + * @type {any} + * @memberof UnitChannel + */ + about?: any | null + /** + * + * @type {any} + * @memberof UnitChannel + */ + configuration?: any | null + /** + * + * @type {string} + * @memberof UnitChannel + */ + search_filter?: string + /** + * + * @type {string} + * @memberof UnitChannel + */ + public_description?: string + /** + * + * @type {string} + * @memberof UnitChannel + */ + ga_tracking_id?: string + /** + * + * @type {number} + * @memberof UnitChannel + */ + widget_list?: number | null } - /** * * `unit` - Unit * @export @@ -2597,14 +2610,14 @@ export interface UnitChannel { */ export const UnitChannelTypeEnum = { - /** - * Unit - */ - Unit: 'unit' -} as const; - -export type UnitChannelTypeEnum = typeof UnitChannelTypeEnum[keyof typeof UnitChannelTypeEnum]; + /** + * Unit + */ + Unit: "unit", +} as const +export type UnitChannelTypeEnum = + (typeof UnitChannelTypeEnum)[keyof typeof UnitChannelTypeEnum] /** * Serializer for User @@ -2612,48 +2625,48 @@ export type UnitChannelTypeEnum = typeof UnitChannelTypeEnum[keyof typeof UnitCh * @interface User */ export interface User { - /** - * - * @type {number} - * @memberof User - */ - 'id': number; - /** - * - * @type {string} - * @memberof User - */ - 'username': string; - /** - * - * @type {Profile} - * @memberof User - */ - 'profile': Profile; - /** - * - * @type {string} - * @memberof User - */ - 'first_name': string; - /** - * - * @type {string} - * @memberof User - */ - 'last_name': string; - /** - * - * @type {boolean} - * @memberof User - */ - 'is_article_editor': boolean; - /** - * - * @type {boolean} - * @memberof User - */ - 'is_learning_path_editor': boolean; + /** + * + * @type {number} + * @memberof User + */ + id: number + /** + * + * @type {string} + * @memberof User + */ + username: string + /** + * + * @type {Profile} + * @memberof User + */ + profile: Profile + /** + * + * @type {string} + * @memberof User + */ + first_name: string + /** + * + * @type {string} + * @memberof User + */ + last_name: string + /** + * + * @type {boolean} + * @memberof User + */ + is_article_editor: boolean + /** + * + * @type {boolean} + * @memberof User + */ + is_learning_path_editor: boolean } /** * Serializer for User @@ -2661,18 +2674,18 @@ export interface User { * @interface UserRequest */ export interface UserRequest { - /** - * - * @type {ProfileRequest} - * @memberof UserRequest - */ - 'profile': ProfileRequest; - /** - * - * @type {string} - * @memberof UserRequest - */ - 'email': string; + /** + * + * @type {ProfileRequest} + * @memberof UserRequest + */ + profile: ProfileRequest + /** + * + * @type {string} + * @memberof UserRequest + */ + email: string } /** * Serializer for UserWebsite @@ -2680,51 +2693,50 @@ export interface UserRequest { * @interface UserWebsite */ export interface UserWebsite { - /** - * - * @type {number} - * @memberof UserWebsite - */ - 'id': number; - /** - * - * @type {number} - * @memberof UserWebsite - */ - 'profile': number; - /** - * - * @type {string} - * @memberof UserWebsite - */ - 'url': string; - /** - * - * @type {SiteTypeEnum} - * @memberof UserWebsite - */ - 'site_type': SiteTypeEnum; + /** + * + * @type {number} + * @memberof UserWebsite + */ + id: number + /** + * + * @type {number} + * @memberof UserWebsite + */ + profile: number + /** + * + * @type {string} + * @memberof UserWebsite + */ + url: string + /** + * + * @type {SiteTypeEnum} + * @memberof UserWebsite + */ + site_type: SiteTypeEnum } - /** * Serializer for UserWebsite * @export * @interface UserWebsiteRequest */ export interface UserWebsiteRequest { - /** - * - * @type {number} - * @memberof UserWebsiteRequest - */ - 'profile': number; - /** - * - * @type {string} - * @memberof UserWebsiteRequest - */ - 'url': string; + /** + * + * @type {number} + * @memberof UserWebsiteRequest + */ + profile: number + /** + * + * @type {string} + * @memberof UserWebsiteRequest + */ + url: string } /** * WidgetInstance serializer @@ -2732,88 +2744,87 @@ export interface UserWebsiteRequest { * @interface WidgetInstance */ export interface WidgetInstance { - /** - * - * @type {number} - * @memberof WidgetInstance - */ - 'id': number; - /** - * - * @type {WidgetTypeEnum} - * @memberof WidgetInstance - */ - 'widget_type': WidgetTypeEnum; - /** - * - * @type {string} - * @memberof WidgetInstance - */ - 'title': string; - /** - * Returns the configuration to serialize - * @type {{ [key: string]: any; }} - * @memberof WidgetInstance - */ - 'configuration'?: { [key: string]: any; }; - /** - * Renders the widget to json based on configuration - * @type {{ [key: string]: any; }} - * @memberof WidgetInstance - */ - 'json': { [key: string]: any; } | null; + /** + * + * @type {number} + * @memberof WidgetInstance + */ + id: number + /** + * + * @type {WidgetTypeEnum} + * @memberof WidgetInstance + */ + widget_type: WidgetTypeEnum + /** + * + * @type {string} + * @memberof WidgetInstance + */ + title: string + /** + * Returns the configuration to serialize + * @type {{ [key: string]: any; }} + * @memberof WidgetInstance + */ + configuration?: { [key: string]: any } + /** + * Renders the widget to json based on configuration + * @type {{ [key: string]: any; }} + * @memberof WidgetInstance + */ + json: { [key: string]: any } | null } - /** * Serializer for WidgetLists * @export * @interface WidgetList */ export interface WidgetList { - /** - * - * @type {number} - * @memberof WidgetList - */ - 'id': number; - /** - * - * @type {Array} - * @memberof WidgetList - */ - 'widgets'?: Array | null; - /** - * - * @type {Array} - * @memberof WidgetList - */ - 'available_widgets': Array; + /** + * + * @type {number} + * @memberof WidgetList + */ + id: number + /** + * + * @type {Array} + * @memberof WidgetList + */ + widgets?: Array | null + /** + * + * @type {Array} + * @memberof WidgetList + */ + available_widgets: Array } /** - * + * * @export * @interface WidgetListAvailableWidgetsInner */ export interface WidgetListAvailableWidgetsInner { - /** - * - * @type {string} - * @memberof WidgetListAvailableWidgetsInner - */ - 'widget_type'?: string; - /** - * - * @type {string} - * @memberof WidgetListAvailableWidgetsInner - */ - 'description'?: string; - /** - * - * @type {object} - * @memberof WidgetListAvailableWidgetsInner - */ - 'form_spec'?: object; + /** + * + * @type {string} + * @memberof WidgetListAvailableWidgetsInner + */ + widget_type?: string + /** + * + * @type {string} + * @memberof WidgetListAvailableWidgetsInner + */ + description?: string + /** + * + * @type {object} + * @memberof WidgetListAvailableWidgetsInner + */ + form_spec?: object } /** * Serializer for WidgetLists @@ -2821,12 +2832,12 @@ export interface WidgetListAvailableWidgetsInner { * @interface WidgetListRequest */ export interface WidgetListRequest { - /** - * - * @type {Array} - * @memberof WidgetListRequest - */ - 'widgets'?: Array | null; + /** + * + * @type {Array} + * @memberof WidgetListRequest + */ + widgets?: Array | null } /** * * `Markdown` - Markdown * `URL` - URL * `RSS Feed` - RSS Feed * `People` - People @@ -2835,2307 +2846,3352 @@ export interface WidgetListRequest { */ export const WidgetTypeEnum = { - /** - * Markdown - */ - Markdown: 'Markdown', - /** - * URL - */ - Url: 'URL', - /** - * RSS Feed - */ - RssFeed: 'RSS Feed', - /** - * People - */ - People: 'People' -} as const; - -export type WidgetTypeEnum = typeof WidgetTypeEnum[keyof typeof WidgetTypeEnum]; - - + /** + * Markdown + */ + Markdown: "Markdown", + /** + * URL + */ + Url: "URL", + /** + * RSS Feed + */ + RssFeed: "RSS Feed", + /** + * People + */ + People: "People", +} as const + +export type WidgetTypeEnum = + (typeof WidgetTypeEnum)[keyof typeof WidgetTypeEnum] /** * ChannelsApi - axios parameter creator * @export */ -export const ChannelsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * View for retrieving an individual channel by type and name - * @summary Channel Detail Lookup by channel type and name - * @param {string} channel_type - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsCountsList: async (channel_type: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channel_type' is not null or undefined - assertParamExists('channelsCountsList', 'channel_type', channel_type) - const localVarPath = `/api/v0/channels/counts/{channel_type}/` - .replace(`{${"channel_type"}}`, encodeURIComponent(String(channel_type))); - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Create - * @param {ChannelCreateRequest} ChannelCreateRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsCreate: async (ChannelCreateRequest: ChannelCreateRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'ChannelCreateRequest' is not null or undefined - assertParamExists('channelsCreate', 'ChannelCreateRequest', ChannelCreateRequest) - const localVarPath = `/api/v0/channels/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(ChannelCreateRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Destroy - * @param {number} id A unique integer value identifying this channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsDestroy: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelsDestroy', 'id', id) - const localVarPath = `/api/v0/channels/{id}/` - .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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary List - * @param {ChannelsListChannelTypeEnum} [channel_type] * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsList: async (channel_type?: ChannelsListChannelTypeEnum, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/channels/`; - // 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 (channel_type !== undefined) { - localVarQueryParameter['channel_type'] = channel_type; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for listing and adding moderators - * @summary Channel Moderators Create - * @param {string} id - * @param {ChannelModeratorRequest} [ChannelModeratorRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsModeratorsCreate: async (id: string, ChannelModeratorRequest?: ChannelModeratorRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelsModeratorsCreate', 'id', id) - const localVarPath = `/api/v0/channels/{id}/moderators/` - .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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(ChannelModeratorRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Remove the user from the moderator groups for this website - * @summary Channel Moderators Destroy - * @param {string} id - * @param {string} moderator_name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsModeratorsDestroy: async (id: string, moderator_name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelsModeratorsDestroy', 'id', id) - // verify required parameter 'moderator_name' is not null or undefined - assertParamExists('channelsModeratorsDestroy', 'moderator_name', moderator_name) - const localVarPath = `/api/v0/channels/{id}/moderators/{moderator_name}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"moderator_name"}}`, encodeURIComponent(String(moderator_name))); - // 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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for listing and adding moderators - * @summary Channel Moderators List - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsModeratorsList: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelsModeratorsList', 'id', id) - const localVarPath = `/api/v0/channels/{id}/moderators/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Update - * @param {number} id A unique integer value identifying this channel. - * @param {PatchedChannelWriteRequest} [PatchedChannelWriteRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsPartialUpdate: async (id: number, PatchedChannelWriteRequest?: PatchedChannelWriteRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelsPartialUpdate', 'id', id) - const localVarPath = `/api/v0/channels/{id}/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedChannelWriteRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Retrieve - * @param {number} id A unique integer value identifying this channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('channelsRetrieve', 'id', id) - const localVarPath = `/api/v0/channels/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for retrieving an individual channel by type and name - * @summary Channel Detail Lookup by channel type and name - * @param {string} channel_type - * @param {string} name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsTypeRetrieve: async (channel_type: string, name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'channel_type' is not null or undefined - assertParamExists('channelsTypeRetrieve', 'channel_type', channel_type) - // verify required parameter 'name' is not null or undefined - assertParamExists('channelsTypeRetrieve', 'name', name) - const localVarPath = `/api/v0/channels/type/{channel_type}/{name}/` - .replace(`{${"channel_type"}}`, encodeURIComponent(String(channel_type))) - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ChannelsApi - functional programming interface - * @export - */ -export const ChannelsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ChannelsApiAxiosParamCreator(configuration) - return { - /** - * View for retrieving an individual channel by type and name - * @summary Channel Detail Lookup by channel type and name - * @param {string} channel_type - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsCountsList(channel_type: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsCountsList(channel_type, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsCountsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Create - * @param {ChannelCreateRequest} ChannelCreateRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsCreate(ChannelCreateRequest: ChannelCreateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsCreate(ChannelCreateRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Destroy - * @param {number} id A unique integer value identifying this channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsDestroy(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsDestroy(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary List - * @param {ChannelsListChannelTypeEnum} [channel_type] * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsList(channel_type?: ChannelsListChannelTypeEnum, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsList(channel_type, limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for listing and adding moderators - * @summary Channel Moderators Create - * @param {string} id - * @param {ChannelModeratorRequest} [ChannelModeratorRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsModeratorsCreate(id: string, ChannelModeratorRequest?: ChannelModeratorRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsModeratorsCreate(id, ChannelModeratorRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsModeratorsCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Remove the user from the moderator groups for this website - * @summary Channel Moderators Destroy - * @param {string} id - * @param {string} moderator_name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsModeratorsDestroy(id: string, moderator_name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsModeratorsDestroy(id, moderator_name, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsModeratorsDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for listing and adding moderators - * @summary Channel Moderators List - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsModeratorsList(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsModeratorsList(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsModeratorsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Update - * @param {number} id A unique integer value identifying this channel. - * @param {PatchedChannelWriteRequest} [PatchedChannelWriteRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsPartialUpdate(id: number, PatchedChannelWriteRequest?: PatchedChannelWriteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsPartialUpdate(id, PatchedChannelWriteRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Retrieve - * @param {number} id A unique integer value identifying this channel. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for retrieving an individual channel by type and name - * @summary Channel Detail Lookup by channel type and name - * @param {string} channel_type - * @param {string} name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async channelsTypeRetrieve(channel_type: string, name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.channelsTypeRetrieve(channel_type, name, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ChannelsApi.channelsTypeRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * ChannelsApi - factory interface - * @export - */ -export const ChannelsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ChannelsApiFp(configuration) - return { - /** - * View for retrieving an individual channel by type and name - * @summary Channel Detail Lookup by channel type and name - * @param {ChannelsApiChannelsCountsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsCountsList(requestParameters: ChannelsApiChannelsCountsListRequest, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.channelsCountsList(requestParameters.channel_type, options).then((request) => request(axios, basePath)); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Create - * @param {ChannelsApiChannelsCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsCreate(requestParameters: ChannelsApiChannelsCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsCreate(requestParameters.ChannelCreateRequest, options).then((request) => request(axios, basePath)); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Destroy - * @param {ChannelsApiChannelsDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsDestroy(requestParameters: ChannelsApiChannelsDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsDestroy(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary List - * @param {ChannelsApiChannelsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsList(requestParameters: ChannelsApiChannelsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsList(requestParameters.channel_type, requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * View for listing and adding moderators - * @summary Channel Moderators Create - * @param {ChannelsApiChannelsModeratorsCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsModeratorsCreate(requestParameters: ChannelsApiChannelsModeratorsCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsModeratorsCreate(requestParameters.id, requestParameters.ChannelModeratorRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Remove the user from the moderator groups for this website - * @summary Channel Moderators Destroy - * @param {ChannelsApiChannelsModeratorsDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsModeratorsDestroy(requestParameters: ChannelsApiChannelsModeratorsDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsModeratorsDestroy(requestParameters.id, requestParameters.moderator_name, options).then((request) => request(axios, basePath)); - }, - /** - * View for listing and adding moderators - * @summary Channel Moderators List - * @param {ChannelsApiChannelsModeratorsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsModeratorsList(requestParameters: ChannelsApiChannelsModeratorsListRequest, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.channelsModeratorsList(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Update - * @param {ChannelsApiChannelsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsPartialUpdate(requestParameters: ChannelsApiChannelsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsPartialUpdate(requestParameters.id, requestParameters.PatchedChannelWriteRequest, options).then((request) => request(axios, basePath)); - }, - /** - * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. - * @summary Retrieve - * @param {ChannelsApiChannelsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsRetrieve(requestParameters: ChannelsApiChannelsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * View for retrieving an individual channel by type and name - * @summary Channel Detail Lookup by channel type and name - * @param {ChannelsApiChannelsTypeRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - channelsTypeRetrieve(requestParameters: ChannelsApiChannelsTypeRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.channelsTypeRetrieve(requestParameters.channel_type, requestParameters.name, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for channelsCountsList operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsCountsListRequest - */ -export interface ChannelsApiChannelsCountsListRequest { +export const ChannelsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * - * @type {string} - * @memberof ChannelsApiChannelsCountsList + * View for retrieving an individual channel by type and name + * @summary Channel Detail Lookup by channel type and name + * @param {string} channel_type + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly channel_type: string -} - -/** - * Request parameters for channelsCreate operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsCreateRequest - */ -export interface ChannelsApiChannelsCreateRequest { + channelsCountsList: async ( + channel_type: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'channel_type' is not null or undefined + assertParamExists("channelsCountsList", "channel_type", channel_type) + const localVarPath = `/api/v0/channels/counts/{channel_type}/`.replace( + `{${"channel_type"}}`, + encodeURIComponent(String(channel_type)), + ) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {ChannelCreateRequest} - * @memberof ChannelsApiChannelsCreate + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Create + * @param {ChannelCreateRequest} ChannelCreateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly ChannelCreateRequest: ChannelCreateRequest -} - -/** - * Request parameters for channelsDestroy operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsDestroyRequest - */ -export interface ChannelsApiChannelsDestroyRequest { + channelsCreate: async ( + ChannelCreateRequest: ChannelCreateRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'ChannelCreateRequest' is not null or undefined + assertParamExists( + "channelsCreate", + "ChannelCreateRequest", + ChannelCreateRequest, + ) + const localVarPath = `/api/v0/channels/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + ChannelCreateRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this channel. - * @type {number} - * @memberof ChannelsApiChannelsDestroy + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Destroy + * @param {number} id A unique integer value identifying this channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number -} - -/** - * Request parameters for channelsList operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsListRequest - */ -export interface ChannelsApiChannelsListRequest { + channelsDestroy: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("channelsDestroy", "id", id) + const localVarPath = `/api/v0/channels/{id}/`.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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway - * @type {'department' | 'pathway' | 'topic' | 'unit'} - * @memberof ChannelsApiChannelsList + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary List + * @param {ChannelsListChannelTypeEnum} [channel_type] * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly channel_type?: ChannelsListChannelTypeEnum - + channelsList: async ( + channel_type?: ChannelsListChannelTypeEnum, + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/channels/` + // 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 (channel_type !== undefined) { + localVarQueryParameter["channel_type"] = channel_type + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Number of results to return per page. - * @type {number} - * @memberof ChannelsApiChannelsList + * View for listing and adding moderators + * @summary Channel Moderators Create + * @param {string} id + * @param {ChannelModeratorRequest} [ChannelModeratorRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + channelsModeratorsCreate: async ( + id: string, + ChannelModeratorRequest?: ChannelModeratorRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("channelsModeratorsCreate", "id", id) + const localVarPath = `/api/v0/channels/{id}/moderators/`.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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + ChannelModeratorRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof ChannelsApiChannelsList + * Remove the user from the moderator groups for this website + * @summary Channel Moderators Destroy + * @param {string} id + * @param {string} moderator_name + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number -} - -/** - * Request parameters for channelsModeratorsCreate operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsModeratorsCreateRequest - */ -export interface ChannelsApiChannelsModeratorsCreateRequest { + channelsModeratorsDestroy: async ( + id: string, + moderator_name: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("channelsModeratorsDestroy", "id", id) + // verify required parameter 'moderator_name' is not null or undefined + assertParamExists( + "channelsModeratorsDestroy", + "moderator_name", + moderator_name, + ) + const localVarPath = `/api/v0/channels/{id}/moderators/{moderator_name}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"moderator_name"}}`, + encodeURIComponent(String(moderator_name)), + ) + // 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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {string} - * @memberof ChannelsApiChannelsModeratorsCreate + * View for listing and adding moderators + * @summary Channel Moderators List + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: string - + channelsModeratorsList: async ( + id: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("channelsModeratorsList", "id", id) + const localVarPath = `/api/v0/channels/{id}/moderators/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {ChannelModeratorRequest} - * @memberof ChannelsApiChannelsModeratorsCreate + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Update + * @param {number} id A unique integer value identifying this channel. + * @param {PatchedChannelWriteRequest} [PatchedChannelWriteRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly ChannelModeratorRequest?: ChannelModeratorRequest + channelsPartialUpdate: async ( + id: number, + PatchedChannelWriteRequest?: PatchedChannelWriteRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("channelsPartialUpdate", "id", id) + const localVarPath = `/api/v0/channels/{id}/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedChannelWriteRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Retrieve + * @param {number} id A unique integer value identifying this channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("channelsRetrieve", "id", id) + const localVarPath = `/api/v0/channels/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * View for retrieving an individual channel by type and name + * @summary Channel Detail Lookup by channel type and name + * @param {string} channel_type + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + channelsTypeRetrieve: async ( + channel_type: string, + name: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'channel_type' is not null or undefined + assertParamExists("channelsTypeRetrieve", "channel_type", channel_type) + // verify required parameter 'name' is not null or undefined + assertParamExists("channelsTypeRetrieve", "name", name) + const localVarPath = `/api/v0/channels/type/{channel_type}/{name}/` + .replace( + `{${"channel_type"}}`, + encodeURIComponent(String(channel_type)), + ) + .replace(`{${"name"}}`, encodeURIComponent(String(name))) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for channelsModeratorsDestroy operation in ChannelsApi. + * ChannelsApi - functional programming interface * @export - * @interface ChannelsApiChannelsModeratorsDestroyRequest */ -export interface ChannelsApiChannelsModeratorsDestroyRequest { +export const ChannelsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ChannelsApiAxiosParamCreator(configuration) + return { + /** + * View for retrieving an individual channel by type and name + * @summary Channel Detail Lookup by channel type and name + * @param {string} channel_type + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async channelsCountsList( + channel_type: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsCountsList( + channel_type, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsCountsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Create + * @param {ChannelCreateRequest} ChannelCreateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async channelsCreate( + ChannelCreateRequest: ChannelCreateRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelsCreate( + ChannelCreateRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof ChannelsApiChannelsModeratorsDestroy + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Destroy + * @param {number} id A unique integer value identifying this channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: string - + async channelsDestroy( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelsDestroy( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsDestroy"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof ChannelsApiChannelsModeratorsDestroy + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary List + * @param {ChannelsListChannelTypeEnum} [channel_type] * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly moderator_name: string -} - -/** - * Request parameters for channelsModeratorsList operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsModeratorsListRequest - */ -export interface ChannelsApiChannelsModeratorsListRequest { + async channelsList( + channel_type?: ChannelsListChannelTypeEnum, + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.channelsList( + channel_type, + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof ChannelsApiChannelsModeratorsList + * View for listing and adding moderators + * @summary Channel Moderators Create + * @param {string} id + * @param {ChannelModeratorRequest} [ChannelModeratorRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: string -} - -/** - * Request parameters for channelsPartialUpdate operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsPartialUpdateRequest - */ -export interface ChannelsApiChannelsPartialUpdateRequest { + async channelsModeratorsCreate( + id: string, + ChannelModeratorRequest?: ChannelModeratorRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsModeratorsCreate( + id, + ChannelModeratorRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsModeratorsCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this channel. - * @type {number} - * @memberof ChannelsApiChannelsPartialUpdate + * Remove the user from the moderator groups for this website + * @summary Channel Moderators Destroy + * @param {string} id + * @param {string} moderator_name + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async channelsModeratorsDestroy( + id: string, + moderator_name: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsModeratorsDestroy( + id, + moderator_name, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsModeratorsDestroy"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {PatchedChannelWriteRequest} - * @memberof ChannelsApiChannelsPartialUpdate + * View for listing and adding moderators + * @summary Channel Moderators List + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedChannelWriteRequest?: PatchedChannelWriteRequest -} - -/** - * Request parameters for channelsRetrieve operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsRetrieveRequest - */ -export interface ChannelsApiChannelsRetrieveRequest { + async channelsModeratorsList( + id: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsModeratorsList(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsModeratorsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this channel. - * @type {number} - * @memberof ChannelsApiChannelsRetrieve + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Update + * @param {number} id A unique integer value identifying this channel. + * @param {PatchedChannelWriteRequest} [PatchedChannelWriteRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number -} - -/** - * Request parameters for channelsTypeRetrieve operation in ChannelsApi. - * @export - * @interface ChannelsApiChannelsTypeRetrieveRequest - */ -export interface ChannelsApiChannelsTypeRetrieveRequest { + async channelsPartialUpdate( + id: number, + PatchedChannelWriteRequest?: PatchedChannelWriteRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsPartialUpdate( + id, + PatchedChannelWriteRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsPartialUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof ChannelsApiChannelsTypeRetrieve + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Retrieve + * @param {number} id A unique integer value identifying this channel. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly channel_type: string - + async channelsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof ChannelsApiChannelsTypeRetrieve + * View for retrieving an individual channel by type and name + * @summary Channel Detail Lookup by channel type and name + * @param {string} channel_type + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly name: string + async channelsTypeRetrieve( + channel_type: string, + name: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.channelsTypeRetrieve( + channel_type, + name, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ChannelsApi.channelsTypeRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * ChannelsApi - object-oriented interface + * ChannelsApi - factory interface * @export - * @class ChannelsApi - * @extends {BaseAPI} */ -export class ChannelsApi extends BaseAPI { +export const ChannelsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ChannelsApiFp(configuration) + return { /** * View for retrieving an individual channel by type and name * @summary Channel Detail Lookup by channel type and name * @param {ChannelsApiChannelsCountsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsCountsList(requestParameters: ChannelsApiChannelsCountsListRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsCountsList(requestParameters.channel_type, options).then((request) => request(this.axios, this.basePath)); - } - + channelsCountsList( + requestParameters: ChannelsApiChannelsCountsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .channelsCountsList(requestParameters.channel_type, options) + .then((request) => request(axios, basePath)) + }, /** * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. * @summary Create * @param {ChannelsApiChannelsCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsCreate(requestParameters: ChannelsApiChannelsCreateRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsCreate(requestParameters.ChannelCreateRequest, options).then((request) => request(this.axios, this.basePath)); - } - + channelsCreate( + requestParameters: ChannelsApiChannelsCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsCreate(requestParameters.ChannelCreateRequest, options) + .then((request) => request(axios, basePath)) + }, /** * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. * @summary Destroy * @param {ChannelsApiChannelsDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsDestroy(requestParameters: ChannelsApiChannelsDestroyRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsDestroy(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - + channelsDestroy( + requestParameters: ChannelsApiChannelsDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsDestroy(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. * @summary List * @param {ChannelsApiChannelsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsList(requestParameters: ChannelsApiChannelsListRequest = {}, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsList(requestParameters.channel_type, requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + channelsList( + requestParameters: ChannelsApiChannelsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsList( + requestParameters.channel_type, + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * View for listing and adding moderators * @summary Channel Moderators Create * @param {ChannelsApiChannelsModeratorsCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsModeratorsCreate(requestParameters: ChannelsApiChannelsModeratorsCreateRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsModeratorsCreate(requestParameters.id, requestParameters.ChannelModeratorRequest, options).then((request) => request(this.axios, this.basePath)); - } - + channelsModeratorsCreate( + requestParameters: ChannelsApiChannelsModeratorsCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsModeratorsCreate( + requestParameters.id, + requestParameters.ChannelModeratorRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Remove the user from the moderator groups for this website * @summary Channel Moderators Destroy * @param {ChannelsApiChannelsModeratorsDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsModeratorsDestroy(requestParameters: ChannelsApiChannelsModeratorsDestroyRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsModeratorsDestroy(requestParameters.id, requestParameters.moderator_name, options).then((request) => request(this.axios, this.basePath)); - } - + channelsModeratorsDestroy( + requestParameters: ChannelsApiChannelsModeratorsDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsModeratorsDestroy( + requestParameters.id, + requestParameters.moderator_name, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * View for listing and adding moderators * @summary Channel Moderators List * @param {ChannelsApiChannelsModeratorsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsModeratorsList(requestParameters: ChannelsApiChannelsModeratorsListRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsModeratorsList(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - + channelsModeratorsList( + requestParameters: ChannelsApiChannelsModeratorsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .channelsModeratorsList(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. * @summary Update * @param {ChannelsApiChannelsPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsPartialUpdate(requestParameters: ChannelsApiChannelsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsPartialUpdate(requestParameters.id, requestParameters.PatchedChannelWriteRequest, options).then((request) => request(this.axios, this.basePath)); - } - + channelsPartialUpdate( + requestParameters: ChannelsApiChannelsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsPartialUpdate( + requestParameters.id, + requestParameters.PatchedChannelWriteRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. * @summary Retrieve * @param {ChannelsApiChannelsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsRetrieve(requestParameters: ChannelsApiChannelsRetrieveRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - + channelsRetrieve( + requestParameters: ChannelsApiChannelsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** * View for retrieving an individual channel by type and name * @summary Channel Detail Lookup by channel type and name * @param {ChannelsApiChannelsTypeRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ChannelsApi */ - public channelsTypeRetrieve(requestParameters: ChannelsApiChannelsTypeRetrieveRequest, options?: RawAxiosRequestConfig) { - return ChannelsApiFp(this.configuration).channelsTypeRetrieve(requestParameters.channel_type, requestParameters.name, options).then((request) => request(this.axios, this.basePath)); - } + channelsTypeRetrieve( + requestParameters: ChannelsApiChannelsTypeRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .channelsTypeRetrieve( + requestParameters.channel_type, + requestParameters.name, + options, + ) + .then((request) => request(axios, basePath)) + }, + } } /** + * Request parameters for channelsCountsList operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsCountsListRequest */ -export const ChannelsListChannelTypeEnum = { - Department: 'department', - Pathway: 'pathway', - Topic: 'topic', - Unit: 'unit' -} as const; -export type ChannelsListChannelTypeEnum = typeof ChannelsListChannelTypeEnum[keyof typeof ChannelsListChannelTypeEnum]; - +export interface ChannelsApiChannelsCountsListRequest { + /** + * + * @type {string} + * @memberof ChannelsApiChannelsCountsList + */ + readonly channel_type: string +} /** - * CkeditorApi - axios parameter creator + * Request parameters for channelsCreate operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsCreateRequest */ -export const CkeditorApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get the settings response - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - ckeditorRetrieve: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/ckeditor`; - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface ChannelsApiChannelsCreateRequest { + /** + * + * @type {ChannelCreateRequest} + * @memberof ChannelsApiChannelsCreate + */ + readonly ChannelCreateRequest: ChannelCreateRequest +} /** - * CkeditorApi - functional programming interface + * Request parameters for channelsDestroy operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsDestroyRequest */ -export const CkeditorApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CkeditorApiAxiosParamCreator(configuration) - return { - /** - * Get the settings response - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async ckeditorRetrieve(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.ckeditorRetrieve(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['CkeditorApi.ckeditorRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface ChannelsApiChannelsDestroyRequest { + /** + * A unique integer value identifying this channel. + * @type {number} + * @memberof ChannelsApiChannelsDestroy + */ + readonly id: number +} /** - * CkeditorApi - factory interface + * Request parameters for channelsList operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsListRequest */ -export const CkeditorApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CkeditorApiFp(configuration) - return { - /** - * Get the settings response - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - ckeditorRetrieve(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.ckeditorRetrieve(options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface ChannelsApiChannelsListRequest { + /** + * * `topic` - Topic * `department` - Department * `unit` - Unit * `pathway` - Pathway + * @type {'department' | 'pathway' | 'topic' | 'unit'} + * @memberof ChannelsApiChannelsList + */ + readonly channel_type?: ChannelsListChannelTypeEnum + + /** + * Number of results to return per page. + * @type {number} + * @memberof ChannelsApiChannelsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof ChannelsApiChannelsList + */ + readonly offset?: number +} /** - * CkeditorApi - object-oriented interface + * Request parameters for channelsModeratorsCreate operation in ChannelsApi. * @export - * @class CkeditorApi - * @extends {BaseAPI} + * @interface ChannelsApiChannelsModeratorsCreateRequest */ -export class CkeditorApi extends BaseAPI { - /** - * Get the settings response - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CkeditorApi - */ - public ckeditorRetrieve(options?: RawAxiosRequestConfig) { - return CkeditorApiFp(this.configuration).ckeditorRetrieve(options).then((request) => request(this.axios, this.basePath)); - } +export interface ChannelsApiChannelsModeratorsCreateRequest { + /** + * + * @type {string} + * @memberof ChannelsApiChannelsModeratorsCreate + */ + readonly id: string + + /** + * + * @type {ChannelModeratorRequest} + * @memberof ChannelsApiChannelsModeratorsCreate + */ + readonly ChannelModeratorRequest?: ChannelModeratorRequest } +/** + * Request parameters for channelsModeratorsDestroy operation in ChannelsApi. + * @export + * @interface ChannelsApiChannelsModeratorsDestroyRequest + */ +export interface ChannelsApiChannelsModeratorsDestroyRequest { + /** + * + * @type {string} + * @memberof ChannelsApiChannelsModeratorsDestroy + */ + readonly id: string + + /** + * + * @type {string} + * @memberof ChannelsApiChannelsModeratorsDestroy + */ + readonly moderator_name: string +} +/** + * Request parameters for channelsModeratorsList operation in ChannelsApi. + * @export + * @interface ChannelsApiChannelsModeratorsListRequest + */ +export interface ChannelsApiChannelsModeratorsListRequest { + /** + * + * @type {string} + * @memberof ChannelsApiChannelsModeratorsList + */ + readonly id: string +} /** - * LearningResourcesSearchAdminParamsApi - axios parameter creator + * Request parameters for channelsPartialUpdate operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsPartialUpdateRequest */ -export const LearningResourcesSearchAdminParamsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Learning resource search default admin param values - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesSearchAdminParamsRetrieve: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/learning_resources_search_admin_params/`; - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface ChannelsApiChannelsPartialUpdateRequest { + /** + * A unique integer value identifying this channel. + * @type {number} + * @memberof ChannelsApiChannelsPartialUpdate + */ + readonly id: number + + /** + * + * @type {PatchedChannelWriteRequest} + * @memberof ChannelsApiChannelsPartialUpdate + */ + readonly PatchedChannelWriteRequest?: PatchedChannelWriteRequest +} /** - * LearningResourcesSearchAdminParamsApi - functional programming interface + * Request parameters for channelsRetrieve operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsRetrieveRequest */ -export const LearningResourcesSearchAdminParamsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LearningResourcesSearchAdminParamsApiAxiosParamCreator(configuration) - return { - /** - * Learning resource search default admin param values - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesSearchAdminParamsRetrieve(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesSearchAdminParamsRetrieve(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesSearchAdminParamsApi.learningResourcesSearchAdminParamsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface ChannelsApiChannelsRetrieveRequest { + /** + * A unique integer value identifying this channel. + * @type {number} + * @memberof ChannelsApiChannelsRetrieve + */ + readonly id: number +} /** - * LearningResourcesSearchAdminParamsApi - factory interface + * Request parameters for channelsTypeRetrieve operation in ChannelsApi. * @export + * @interface ChannelsApiChannelsTypeRetrieveRequest */ -export const LearningResourcesSearchAdminParamsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LearningResourcesSearchAdminParamsApiFp(configuration) - return { - /** - * Learning resource search default admin param values - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesSearchAdminParamsRetrieve(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesSearchAdminParamsRetrieve(options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface ChannelsApiChannelsTypeRetrieveRequest { + /** + * + * @type {string} + * @memberof ChannelsApiChannelsTypeRetrieve + */ + readonly channel_type: string + + /** + * + * @type {string} + * @memberof ChannelsApiChannelsTypeRetrieve + */ + readonly name: string +} /** - * LearningResourcesSearchAdminParamsApi - object-oriented interface + * ChannelsApi - object-oriented interface * @export - * @class LearningResourcesSearchAdminParamsApi + * @class ChannelsApi * @extends {BaseAPI} */ -export class LearningResourcesSearchAdminParamsApi extends BaseAPI { +export class ChannelsApi extends BaseAPI { + /** + * View for retrieving an individual channel by type and name + * @summary Channel Detail Lookup by channel type and name + * @param {ChannelsApiChannelsCountsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsCountsList( + requestParameters: ChannelsApiChannelsCountsListRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsCountsList(requestParameters.channel_type, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Create + * @param {ChannelsApiChannelsCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsCreate( + requestParameters: ChannelsApiChannelsCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsCreate(requestParameters.ChannelCreateRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Destroy + * @param {ChannelsApiChannelsDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsDestroy( + requestParameters: ChannelsApiChannelsDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsDestroy(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary List + * @param {ChannelsApiChannelsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsList( + requestParameters: ChannelsApiChannelsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsList( + requestParameters.channel_type, + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for listing and adding moderators + * @summary Channel Moderators Create + * @param {ChannelsApiChannelsModeratorsCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsModeratorsCreate( + requestParameters: ChannelsApiChannelsModeratorsCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsModeratorsCreate( + requestParameters.id, + requestParameters.ChannelModeratorRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Remove the user from the moderator groups for this website + * @summary Channel Moderators Destroy + * @param {ChannelsApiChannelsModeratorsDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsModeratorsDestroy( + requestParameters: ChannelsApiChannelsModeratorsDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsModeratorsDestroy( + requestParameters.id, + requestParameters.moderator_name, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for listing and adding moderators + * @summary Channel Moderators List + * @param {ChannelsApiChannelsModeratorsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsModeratorsList( + requestParameters: ChannelsApiChannelsModeratorsListRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsModeratorsList(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Update + * @param {ChannelsApiChannelsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsPartialUpdate( + requestParameters: ChannelsApiChannelsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsPartialUpdate( + requestParameters.id, + requestParameters.PatchedChannelWriteRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * CRUD Operations related to Channels. Channels may represent groups or organizations at MIT and are a high-level categorization of content. + * @summary Retrieve + * @param {ChannelsApiChannelsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsRetrieve( + requestParameters: ChannelsApiChannelsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for retrieving an individual channel by type and name + * @summary Channel Detail Lookup by channel type and name + * @param {ChannelsApiChannelsTypeRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ChannelsApi + */ + public channelsTypeRetrieve( + requestParameters: ChannelsApiChannelsTypeRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ChannelsApiFp(this.configuration) + .channelsTypeRetrieve( + requestParameters.channel_type, + requestParameters.name, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * @export + */ +export const ChannelsListChannelTypeEnum = { + Department: "department", + Pathway: "pathway", + Topic: "topic", + Unit: "unit", +} as const +export type ChannelsListChannelTypeEnum = + (typeof ChannelsListChannelTypeEnum)[keyof typeof ChannelsListChannelTypeEnum] + +/** + * CkeditorApi - axios parameter creator + * @export + */ +export const CkeditorApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Learning resource search default admin param values + * Get the settings response * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningResourcesSearchAdminParamsApi */ - public learningResourcesSearchAdminParamsRetrieve(options?: RawAxiosRequestConfig) { - return LearningResourcesSearchAdminParamsApiFp(this.configuration).learningResourcesSearchAdminParamsRetrieve(options).then((request) => request(this.axios, this.basePath)); - } + ckeditorRetrieve: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/ckeditor` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } - - /** - * NewsEventsApi - axios parameter creator + * CkeditorApi - functional programming interface * @export */ -export const NewsEventsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a paginated list of feed items. - * @param {Array} [feed_type] The type of item * `news` - News * `events` - Events - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {NewsEventsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `event_date` - Event date ascending * `-event_date` - Event date descending * `news_date` - Creation date ascending * `-news_date` - Creation date descending - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsList: async (feed_type?: Array, limit?: number, offset?: number, sortby?: NewsEventsListSortbyEnum, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/news_events/`; - // 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 (feed_type) { - localVarQueryParameter['feed_type'] = feed_type; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single feed item. - * @param {number} id A unique integer value identifying this feed item. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('newsEventsRetrieve', 'id', id) - const localVarPath = `/api/v0/news_events/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export const CkeditorApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = CkeditorApiAxiosParamCreator(configuration) + return { + /** + * Get the settings response + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async ckeditorRetrieve( + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.ckeditorRetrieve(options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["CkeditorApi.ckeditorRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} /** - * NewsEventsApi - functional programming interface + * CkeditorApi - factory interface * @export */ -export const NewsEventsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = NewsEventsApiAxiosParamCreator(configuration) - return { - /** - * Get a paginated list of feed items. - * @param {Array} [feed_type] The type of item * `news` - News * `events` - Events - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {NewsEventsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `event_date` - Event date ascending * `-event_date` - Event date descending * `news_date` - Creation date ascending * `-news_date` - Creation date descending - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async newsEventsList(feed_type?: Array, limit?: number, offset?: number, sortby?: NewsEventsListSortbyEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.newsEventsList(feed_type, limit, offset, sortby, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['NewsEventsApi.newsEventsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single feed item. - * @param {number} id A unique integer value identifying this feed item. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async newsEventsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.newsEventsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['NewsEventsApi.newsEventsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export const CkeditorApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = CkeditorApiFp(configuration) + return { + /** + * Get the settings response + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + ckeditorRetrieve( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .ckeditorRetrieve(options) + .then((request) => request(axios, basePath)) + }, + } +} /** - * NewsEventsApi - factory interface + * CkeditorApi - object-oriented interface * @export + * @class CkeditorApi + * @extends {BaseAPI} */ -export const NewsEventsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = NewsEventsApiFp(configuration) - return { - /** - * Get a paginated list of feed items. - * @param {NewsEventsApiNewsEventsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsList(requestParameters: NewsEventsApiNewsEventsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.newsEventsList(requestParameters.feed_type, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a single feed item. - * @param {NewsEventsApiNewsEventsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsRetrieve(requestParameters: NewsEventsApiNewsEventsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.newsEventsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export class CkeditorApi extends BaseAPI { + /** + * Get the settings response + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CkeditorApi + */ + public ckeditorRetrieve(options?: RawAxiosRequestConfig) { + return CkeditorApiFp(this.configuration) + .ckeditorRetrieve(options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for newsEventsList operation in NewsEventsApi. + * LearningResourcesSearchAdminParamsApi - axios parameter creator * @export - * @interface NewsEventsApiNewsEventsListRequest */ -export interface NewsEventsApiNewsEventsListRequest { +export const LearningResourcesSearchAdminParamsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * The type of item * `news` - News * `events` - Events - * @type {Array<'events' | 'news'>} - * @memberof NewsEventsApiNewsEventsList + * Learning resource search default admin param values + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly feed_type?: Array + learningResourcesSearchAdminParamsRetrieve: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/learning_resources_search_admin_params/` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} +/** + * LearningResourcesSearchAdminParamsApi - functional programming interface + * @export + */ +export const LearningResourcesSearchAdminParamsApiFp = function ( + configuration?: Configuration, +) { + const localVarAxiosParamCreator = + LearningResourcesSearchAdminParamsApiAxiosParamCreator(configuration) + return { /** - * Number of results to return per page. - * @type {number} - * @memberof NewsEventsApiNewsEventsList + * Learning resource search default admin param values + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number + async learningResourcesSearchAdminParamsRetrieve( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesSearchAdminParamsRetrieve( + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesSearchAdminParamsApi.learningResourcesSearchAdminParamsRetrieve" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} +/** + * LearningResourcesSearchAdminParamsApi - factory interface + * @export + */ +export const LearningResourcesSearchAdminParamsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LearningResourcesSearchAdminParamsApiFp(configuration) + return { /** - * The initial index from which to return the results. - * @type {number} - * @memberof NewsEventsApiNewsEventsList + * Learning resource search default admin param values + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + learningResourcesSearchAdminParamsRetrieve( + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesSearchAdminParamsRetrieve(options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * LearningResourcesSearchAdminParamsApi - object-oriented interface + * @export + * @class LearningResourcesSearchAdminParamsApi + * @extends {BaseAPI} + */ +export class LearningResourcesSearchAdminParamsApi extends BaseAPI { + /** + * Learning resource search default admin param values + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesSearchAdminParamsApi + */ + public learningResourcesSearchAdminParamsRetrieve( + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesSearchAdminParamsApiFp(this.configuration) + .learningResourcesSearchAdminParamsRetrieve(options) + .then((request) => request(this.axios, this.basePath)) + } +} +/** + * NewsEventsApi - axios parameter creator + * @export + */ +export const NewsEventsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Get a paginated list of feed items. + * @param {Array} [feed_type] The type of item * `news` - News * `events` - Events + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {NewsEventsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `event_date` - Event date ascending * `-event_date` - Event date descending * `news_date` - Creation date ascending * `-news_date` - Creation date descending + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + newsEventsList: async ( + feed_type?: Array, + limit?: number, + offset?: number, + sortby?: NewsEventsListSortbyEnum, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/news_events/` + // 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 (feed_type) { + localVarQueryParameter["feed_type"] = feed_type + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `event_date` - Event date ascending * `-event_date` - Event date descending * `news_date` - Creation date ascending * `-news_date` - Creation date descending - * @type {'-event_date' | '-id' | '-news_date' | 'event_date' | 'id' | 'news_date'} - * @memberof NewsEventsApiNewsEventsList + * Retrieve a single feed item. + * @param {number} id A unique integer value identifying this feed item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: NewsEventsListSortbyEnum + newsEventsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("newsEventsRetrieve", "id", id) + const localVarPath = `/api/v0/news_events/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for newsEventsRetrieve operation in NewsEventsApi. + * NewsEventsApi - functional programming interface * @export - * @interface NewsEventsApiNewsEventsRetrieveRequest */ -export interface NewsEventsApiNewsEventsRetrieveRequest { +export const NewsEventsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + NewsEventsApiAxiosParamCreator(configuration) + return { + /** + * Get a paginated list of feed items. + * @param {Array} [feed_type] The type of item * `news` - News * `events` - Events + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {NewsEventsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `event_date` - Event date ascending * `-event_date` - Event date descending * `news_date` - Creation date ascending * `-news_date` - Creation date descending + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async newsEventsList( + feed_type?: Array, + limit?: number, + offset?: number, + sortby?: NewsEventsListSortbyEnum, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.newsEventsList( + feed_type, + limit, + offset, + sortby, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["NewsEventsApi.newsEventsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this feed item. - * @type {number} - * @memberof NewsEventsApiNewsEventsRetrieve + * Retrieve a single feed item. + * @param {number} id A unique integer value identifying this feed item. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async newsEventsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.newsEventsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["NewsEventsApi.newsEventsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * NewsEventsApi - object-oriented interface + * NewsEventsApi - factory interface * @export - * @class NewsEventsApi - * @extends {BaseAPI} */ -export class NewsEventsApi extends BaseAPI { +export const NewsEventsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = NewsEventsApiFp(configuration) + return { /** * Get a paginated list of feed items. * @param {NewsEventsApiNewsEventsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof NewsEventsApi */ - public newsEventsList(requestParameters: NewsEventsApiNewsEventsListRequest = {}, options?: RawAxiosRequestConfig) { - return NewsEventsApiFp(this.configuration).newsEventsList(requestParameters.feed_type, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(this.axios, this.basePath)); - } - + newsEventsList( + requestParameters: NewsEventsApiNewsEventsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .newsEventsList( + requestParameters.feed_type, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Retrieve a single feed item. * @param {NewsEventsApiNewsEventsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof NewsEventsApi */ - public newsEventsRetrieve(requestParameters: NewsEventsApiNewsEventsRetrieveRequest, options?: RawAxiosRequestConfig) { - return NewsEventsApiFp(this.configuration).newsEventsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + newsEventsRetrieve( + requestParameters: NewsEventsApiNewsEventsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .newsEventsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } /** + * Request parameters for newsEventsList operation in NewsEventsApi. * @export + * @interface NewsEventsApiNewsEventsListRequest */ -export const NewsEventsListFeedTypeEnum = { - Events: 'events', - News: 'news' -} as const; -export type NewsEventsListFeedTypeEnum = typeof NewsEventsListFeedTypeEnum[keyof typeof NewsEventsListFeedTypeEnum]; +export interface NewsEventsApiNewsEventsListRequest { + /** + * The type of item * `news` - News * `events` - Events + * @type {Array<'events' | 'news'>} + * @memberof NewsEventsApiNewsEventsList + */ + readonly feed_type?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof NewsEventsApiNewsEventsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof NewsEventsApiNewsEventsList + */ + readonly offset?: number + + /** + * Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `event_date` - Event date ascending * `-event_date` - Event date descending * `news_date` - Creation date ascending * `-news_date` - Creation date descending + * @type {'-event_date' | '-id' | '-news_date' | 'event_date' | 'id' | 'news_date'} + * @memberof NewsEventsApiNewsEventsList + */ + readonly sortby?: NewsEventsListSortbyEnum +} + /** + * Request parameters for newsEventsRetrieve operation in NewsEventsApi. * @export + * @interface NewsEventsApiNewsEventsRetrieveRequest */ -export const NewsEventsListSortbyEnum = { - EventDate: '-event_date', - Id: '-id', - NewsDate: '-news_date', - EventDate2: 'event_date', - Id2: 'id', - NewsDate2: 'news_date' -} as const; -export type NewsEventsListSortbyEnum = typeof NewsEventsListSortbyEnum[keyof typeof NewsEventsListSortbyEnum]; - +export interface NewsEventsApiNewsEventsRetrieveRequest { + /** + * A unique integer value identifying this feed item. + * @type {number} + * @memberof NewsEventsApiNewsEventsRetrieve + */ + readonly id: number +} /** - * NewsEventsSourcesApi - axios parameter creator + * NewsEventsApi - object-oriented interface * @export + * @class NewsEventsApi + * @extends {BaseAPI} */ -export const NewsEventsSourcesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a paginated list of news/event feed sources. - * @param {Array} [feed_type] The type of source * `news` - News * `events` - Events - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsSourcesList: async (feed_type?: Array, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/news_events_sources/`; - // 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 (feed_type) { - localVarQueryParameter['feed_type'] = feed_type; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single news/event feed source. - * @param {number} id A unique integer value identifying this feed source. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsSourcesRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('newsEventsSourcesRetrieve', 'id', id) - const localVarPath = `/api/v0/news_events_sources/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export class NewsEventsApi extends BaseAPI { + /** + * Get a paginated list of feed items. + * @param {NewsEventsApiNewsEventsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NewsEventsApi + */ + public newsEventsList( + requestParameters: NewsEventsApiNewsEventsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return NewsEventsApiFp(this.configuration) + .newsEventsList( + requestParameters.feed_type, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Retrieve a single feed item. + * @param {NewsEventsApiNewsEventsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NewsEventsApi + */ + public newsEventsRetrieve( + requestParameters: NewsEventsApiNewsEventsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return NewsEventsApiFp(this.configuration) + .newsEventsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * NewsEventsSourcesApi - functional programming interface * @export */ -export const NewsEventsSourcesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = NewsEventsSourcesApiAxiosParamCreator(configuration) - return { - /** - * Get a paginated list of news/event feed sources. - * @param {Array} [feed_type] The type of source * `news` - News * `events` - Events - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async newsEventsSourcesList(feed_type?: Array, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.newsEventsSourcesList(feed_type, limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['NewsEventsSourcesApi.newsEventsSourcesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single news/event feed source. - * @param {number} id A unique integer value identifying this feed source. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async newsEventsSourcesRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.newsEventsSourcesRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['NewsEventsSourcesApi.newsEventsSourcesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - +export const NewsEventsListFeedTypeEnum = { + Events: "events", + News: "news", +} as const +export type NewsEventsListFeedTypeEnum = + (typeof NewsEventsListFeedTypeEnum)[keyof typeof NewsEventsListFeedTypeEnum] /** - * NewsEventsSourcesApi - factory interface * @export */ -export const NewsEventsSourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = NewsEventsSourcesApiFp(configuration) - return { - /** - * Get a paginated list of news/event feed sources. - * @param {NewsEventsSourcesApiNewsEventsSourcesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsSourcesList(requestParameters: NewsEventsSourcesApiNewsEventsSourcesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.newsEventsSourcesList(requestParameters.feed_type, requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a single news/event feed source. - * @param {NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - newsEventsSourcesRetrieve(requestParameters: NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.newsEventsSourcesRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const NewsEventsListSortbyEnum = { + EventDate: "-event_date", + Id: "-id", + NewsDate: "-news_date", + EventDate2: "event_date", + Id2: "id", + NewsDate2: "news_date", +} as const +export type NewsEventsListSortbyEnum = + (typeof NewsEventsListSortbyEnum)[keyof typeof NewsEventsListSortbyEnum] /** - * Request parameters for newsEventsSourcesList operation in NewsEventsSourcesApi. + * NewsEventsSourcesApi - axios parameter creator * @export - * @interface NewsEventsSourcesApiNewsEventsSourcesListRequest */ -export interface NewsEventsSourcesApiNewsEventsSourcesListRequest { - /** - * The type of source * `news` - News * `events` - Events - * @type {Array<'events' | 'news'>} - * @memberof NewsEventsSourcesApiNewsEventsSourcesList - */ - readonly feed_type?: Array - +export const NewsEventsSourcesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Number of results to return per page. - * @type {number} - * @memberof NewsEventsSourcesApiNewsEventsSourcesList + * Get a paginated list of news/event feed sources. + * @param {Array} [feed_type] The type of source * `news` - News * `events` - Events + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + newsEventsSourcesList: async ( + feed_type?: Array, + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/news_events_sources/` + // 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 (feed_type) { + localVarQueryParameter["feed_type"] = feed_type + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof NewsEventsSourcesApiNewsEventsSourcesList + * Retrieve a single news/event feed source. + * @param {number} id A unique integer value identifying this feed source. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + newsEventsSourcesRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("newsEventsSourcesRetrieve", "id", id) + const localVarPath = `/api/v0/news_events_sources/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for newsEventsSourcesRetrieve operation in NewsEventsSourcesApi. + * NewsEventsSourcesApi - functional programming interface * @export - * @interface NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest */ -export interface NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest { +export const NewsEventsSourcesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + NewsEventsSourcesApiAxiosParamCreator(configuration) + return { + /** + * Get a paginated list of news/event feed sources. + * @param {Array} [feed_type] The type of source * `news` - News * `events` - Events + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async newsEventsSourcesList( + feed_type?: Array, + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.newsEventsSourcesList( + feed_type, + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["NewsEventsSourcesApi.newsEventsSourcesList"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this feed source. - * @type {number} - * @memberof NewsEventsSourcesApiNewsEventsSourcesRetrieve + * Retrieve a single news/event feed source. + * @param {number} id A unique integer value identifying this feed source. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async newsEventsSourcesRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.newsEventsSourcesRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["NewsEventsSourcesApi.newsEventsSourcesRetrieve"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * NewsEventsSourcesApi - object-oriented interface + * NewsEventsSourcesApi - factory interface * @export - * @class NewsEventsSourcesApi - * @extends {BaseAPI} */ -export class NewsEventsSourcesApi extends BaseAPI { +export const NewsEventsSourcesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = NewsEventsSourcesApiFp(configuration) + return { /** * Get a paginated list of news/event feed sources. * @param {NewsEventsSourcesApiNewsEventsSourcesListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof NewsEventsSourcesApi */ - public newsEventsSourcesList(requestParameters: NewsEventsSourcesApiNewsEventsSourcesListRequest = {}, options?: RawAxiosRequestConfig) { - return NewsEventsSourcesApiFp(this.configuration).newsEventsSourcesList(requestParameters.feed_type, requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + newsEventsSourcesList( + requestParameters: NewsEventsSourcesApiNewsEventsSourcesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .newsEventsSourcesList( + requestParameters.feed_type, + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Retrieve a single news/event feed source. * @param {NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof NewsEventsSourcesApi */ - public newsEventsSourcesRetrieve(requestParameters: NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest, options?: RawAxiosRequestConfig) { - return NewsEventsSourcesApiFp(this.configuration).newsEventsSourcesRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + newsEventsSourcesRetrieve( + requestParameters: NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .newsEventsSourcesRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } /** + * Request parameters for newsEventsSourcesList operation in NewsEventsSourcesApi. * @export + * @interface NewsEventsSourcesApiNewsEventsSourcesListRequest */ -export const NewsEventsSourcesListFeedTypeEnum = { - Events: 'events', - News: 'news' -} as const; -export type NewsEventsSourcesListFeedTypeEnum = typeof NewsEventsSourcesListFeedTypeEnum[keyof typeof NewsEventsSourcesListFeedTypeEnum]; - +export interface NewsEventsSourcesApiNewsEventsSourcesListRequest { + /** + * The type of source * `news` - News * `events` - Events + * @type {Array<'events' | 'news'>} + * @memberof NewsEventsSourcesApiNewsEventsSourcesList + */ + readonly feed_type?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof NewsEventsSourcesApiNewsEventsSourcesList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof NewsEventsSourcesApiNewsEventsSourcesList + */ + readonly offset?: number +} /** - * ProfilesApi - axios parameter creator + * Request parameters for newsEventsSourcesRetrieve operation in NewsEventsSourcesApi. * @export + * @interface NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest */ -export const ProfilesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * View for profile - * @param {string} user__username - * @param {PatchedProfileRequest} [PatchedProfileRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - profilesPartialUpdate: async (user__username: string, PatchedProfileRequest?: PatchedProfileRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'user__username' is not null or undefined - assertParamExists('profilesPartialUpdate', 'user__username', user__username) - const localVarPath = `/api/v0/profiles/{user__username}/` - .replace(`{${"user__username"}}`, encodeURIComponent(String(user__username))); - // 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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedProfileRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for profile - * @param {string} user__username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - profilesRetrieve: async (user__username: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'user__username' is not null or undefined - assertParamExists('profilesRetrieve', 'user__username', user__username) - const localVarPath = `/api/v0/profiles/{user__username}/` - .replace(`{${"user__username"}}`, encodeURIComponent(String(user__username))); - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for profile - * @param {string} user__username - * @param {ProfileRequest} [ProfileRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - profilesUpdate: async (user__username: string, ProfileRequest?: ProfileRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'user__username' is not null or undefined - assertParamExists('profilesUpdate', 'user__username', user__username) - const localVarPath = `/api/v0/profiles/{user__username}/` - .replace(`{${"user__username"}}`, encodeURIComponent(String(user__username))); - // 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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(ProfileRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest { + /** + * A unique integer value identifying this feed source. + * @type {number} + * @memberof NewsEventsSourcesApiNewsEventsSourcesRetrieve + */ + readonly id: number +} /** - * ProfilesApi - functional programming interface + * NewsEventsSourcesApi - object-oriented interface * @export + * @class NewsEventsSourcesApi + * @extends {BaseAPI} */ -export const ProfilesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ProfilesApiAxiosParamCreator(configuration) - return { - /** - * View for profile - * @param {string} user__username - * @param {PatchedProfileRequest} [PatchedProfileRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async profilesPartialUpdate(user__username: string, PatchedProfileRequest?: PatchedProfileRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.profilesPartialUpdate(user__username, PatchedProfileRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ProfilesApi.profilesPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for profile - * @param {string} user__username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async profilesRetrieve(user__username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.profilesRetrieve(user__username, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ProfilesApi.profilesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for profile - * @param {string} user__username - * @param {ProfileRequest} [ProfileRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async profilesUpdate(user__username: string, ProfileRequest?: ProfileRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.profilesUpdate(user__username, ProfileRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ProfilesApi.profilesUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export class NewsEventsSourcesApi extends BaseAPI { + /** + * Get a paginated list of news/event feed sources. + * @param {NewsEventsSourcesApiNewsEventsSourcesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NewsEventsSourcesApi + */ + public newsEventsSourcesList( + requestParameters: NewsEventsSourcesApiNewsEventsSourcesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return NewsEventsSourcesApiFp(this.configuration) + .newsEventsSourcesList( + requestParameters.feed_type, + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Retrieve a single news/event feed source. + * @param {NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NewsEventsSourcesApi + */ + public newsEventsSourcesRetrieve( + requestParameters: NewsEventsSourcesApiNewsEventsSourcesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return NewsEventsSourcesApiFp(this.configuration) + .newsEventsSourcesRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * ProfilesApi - factory interface * @export */ -export const ProfilesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ProfilesApiFp(configuration) - return { - /** - * View for profile - * @param {ProfilesApiProfilesPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - profilesPartialUpdate(requestParameters: ProfilesApiProfilesPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.profilesPartialUpdate(requestParameters.user__username, requestParameters.PatchedProfileRequest, options).then((request) => request(axios, basePath)); - }, - /** - * View for profile - * @param {ProfilesApiProfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - profilesRetrieve(requestParameters: ProfilesApiProfilesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.profilesRetrieve(requestParameters.user__username, options).then((request) => request(axios, basePath)); - }, - /** - * View for profile - * @param {ProfilesApiProfilesUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - profilesUpdate(requestParameters: ProfilesApiProfilesUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.profilesUpdate(requestParameters.user__username, requestParameters.ProfileRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const NewsEventsSourcesListFeedTypeEnum = { + Events: "events", + News: "news", +} as const +export type NewsEventsSourcesListFeedTypeEnum = + (typeof NewsEventsSourcesListFeedTypeEnum)[keyof typeof NewsEventsSourcesListFeedTypeEnum] /** - * Request parameters for profilesPartialUpdate operation in ProfilesApi. + * ProfilesApi - axios parameter creator * @export - * @interface ProfilesApiProfilesPartialUpdateRequest */ -export interface ProfilesApiProfilesPartialUpdateRequest { +export const ProfilesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * - * @type {string} - * @memberof ProfilesApiProfilesPartialUpdate + * View for profile + * @param {string} user__username + * @param {PatchedProfileRequest} [PatchedProfileRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly user__username: string - + profilesPartialUpdate: async ( + user__username: string, + PatchedProfileRequest?: PatchedProfileRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'user__username' is not null or undefined + assertParamExists( + "profilesPartialUpdate", + "user__username", + user__username, + ) + const localVarPath = `/api/v0/profiles/{user__username}/`.replace( + `{${"user__username"}}`, + encodeURIComponent(String(user__username)), + ) + // 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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedProfileRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {PatchedProfileRequest} - * @memberof ProfilesApiProfilesPartialUpdate + * View for profile + * @param {string} user__username + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedProfileRequest?: PatchedProfileRequest -} - -/** - * Request parameters for profilesRetrieve operation in ProfilesApi. - * @export - * @interface ProfilesApiProfilesRetrieveRequest - */ -export interface ProfilesApiProfilesRetrieveRequest { + profilesRetrieve: async ( + user__username: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'user__username' is not null or undefined + assertParamExists("profilesRetrieve", "user__username", user__username) + const localVarPath = `/api/v0/profiles/{user__username}/`.replace( + `{${"user__username"}}`, + encodeURIComponent(String(user__username)), + ) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {string} - * @memberof ProfilesApiProfilesRetrieve + * View for profile + * @param {string} user__username + * @param {ProfileRequest} [ProfileRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly user__username: string + profilesUpdate: async ( + user__username: string, + ProfileRequest?: ProfileRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'user__username' is not null or undefined + assertParamExists("profilesUpdate", "user__username", user__username) + const localVarPath = `/api/v0/profiles/{user__username}/`.replace( + `{${"user__username"}}`, + encodeURIComponent(String(user__username)), + ) + // 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: "PUT", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + ProfileRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for profilesUpdate operation in ProfilesApi. + * ProfilesApi - functional programming interface * @export - * @interface ProfilesApiProfilesUpdateRequest */ -export interface ProfilesApiProfilesUpdateRequest { +export const ProfilesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ProfilesApiAxiosParamCreator(configuration) + return { + /** + * View for profile + * @param {string} user__username + * @param {PatchedProfileRequest} [PatchedProfileRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async profilesPartialUpdate( + user__username: string, + PatchedProfileRequest?: PatchedProfileRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.profilesPartialUpdate( + user__username, + PatchedProfileRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ProfilesApi.profilesPartialUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof ProfilesApiProfilesUpdate + * View for profile + * @param {string} user__username + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly user__username: string - + async profilesRetrieve( + user__username: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.profilesRetrieve( + user__username, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ProfilesApi.profilesRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {ProfileRequest} - * @memberof ProfilesApiProfilesUpdate + * View for profile + * @param {string} user__username + * @param {ProfileRequest} [ProfileRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly ProfileRequest?: ProfileRequest + async profilesUpdate( + user__username: string, + ProfileRequest?: ProfileRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.profilesUpdate( + user__username, + ProfileRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ProfilesApi.profilesUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * ProfilesApi - object-oriented interface + * ProfilesApi - factory interface * @export - * @class ProfilesApi - * @extends {BaseAPI} */ -export class ProfilesApi extends BaseAPI { +export const ProfilesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ProfilesApiFp(configuration) + return { /** * View for profile * @param {ProfilesApiProfilesPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ProfilesApi */ - public profilesPartialUpdate(requestParameters: ProfilesApiProfilesPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return ProfilesApiFp(this.configuration).profilesPartialUpdate(requestParameters.user__username, requestParameters.PatchedProfileRequest, options).then((request) => request(this.axios, this.basePath)); - } - + profilesPartialUpdate( + requestParameters: ProfilesApiProfilesPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .profilesPartialUpdate( + requestParameters.user__username, + requestParameters.PatchedProfileRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * View for profile * @param {ProfilesApiProfilesRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ProfilesApi */ - public profilesRetrieve(requestParameters: ProfilesApiProfilesRetrieveRequest, options?: RawAxiosRequestConfig) { - return ProfilesApiFp(this.configuration).profilesRetrieve(requestParameters.user__username, options).then((request) => request(this.axios, this.basePath)); - } - + profilesRetrieve( + requestParameters: ProfilesApiProfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .profilesRetrieve(requestParameters.user__username, options) + .then((request) => request(axios, basePath)) + }, /** * View for profile * @param {ProfilesApiProfilesUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ProfilesApi */ - public profilesUpdate(requestParameters: ProfilesApiProfilesUpdateRequest, options?: RawAxiosRequestConfig) { - return ProfilesApiFp(this.configuration).profilesUpdate(requestParameters.user__username, requestParameters.ProfileRequest, options).then((request) => request(this.axios, this.basePath)); - } + profilesUpdate( + requestParameters: ProfilesApiProfilesUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .profilesUpdate( + requestParameters.user__username, + requestParameters.ProfileRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, + } } - +/** + * Request parameters for profilesPartialUpdate operation in ProfilesApi. + * @export + * @interface ProfilesApiProfilesPartialUpdateRequest + */ +export interface ProfilesApiProfilesPartialUpdateRequest { + /** + * + * @type {string} + * @memberof ProfilesApiProfilesPartialUpdate + */ + readonly user__username: string + + /** + * + * @type {PatchedProfileRequest} + * @memberof ProfilesApiProfilesPartialUpdate + */ + readonly PatchedProfileRequest?: PatchedProfileRequest +} /** - * ProgramCertificatesApi - axios parameter creator + * Request parameters for profilesRetrieve operation in ProfilesApi. * @export + * @interface ProfilesApiProfilesRetrieveRequest */ -export const ProgramCertificatesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * View for listing program certificates for a user (includes program letter links) - * @param {number} [micromasters_program_id] - * @param {string} [program_title] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programCertificatesList: async (micromasters_program_id?: number, program_title?: string, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/program_certificates/`; - // 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 (micromasters_program_id !== undefined) { - localVarQueryParameter['micromasters_program_id'] = micromasters_program_id; - } - - if (program_title !== undefined) { - localVarQueryParameter['program_title'] = program_title; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface ProfilesApiProfilesRetrieveRequest { + /** + * + * @type {string} + * @memberof ProfilesApiProfilesRetrieve + */ + readonly user__username: string +} /** - * ProgramCertificatesApi - functional programming interface + * Request parameters for profilesUpdate operation in ProfilesApi. * @export + * @interface ProfilesApiProfilesUpdateRequest */ -export const ProgramCertificatesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ProgramCertificatesApiAxiosParamCreator(configuration) - return { - /** - * View for listing program certificates for a user (includes program letter links) - * @param {number} [micromasters_program_id] - * @param {string} [program_title] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programCertificatesList(micromasters_program_id?: number, program_title?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.programCertificatesList(micromasters_program_id, program_title, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ProgramCertificatesApi.programCertificatesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface ProfilesApiProfilesUpdateRequest { + /** + * + * @type {string} + * @memberof ProfilesApiProfilesUpdate + */ + readonly user__username: string + + /** + * + * @type {ProfileRequest} + * @memberof ProfilesApiProfilesUpdate + */ + readonly ProfileRequest?: ProfileRequest +} /** - * ProgramCertificatesApi - factory interface + * ProfilesApi - object-oriented interface * @export + * @class ProfilesApi + * @extends {BaseAPI} */ -export const ProgramCertificatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ProgramCertificatesApiFp(configuration) - return { - /** - * View for listing program certificates for a user (includes program letter links) - * @param {ProgramCertificatesApiProgramCertificatesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programCertificatesList(requestParameters: ProgramCertificatesApiProgramCertificatesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.programCertificatesList(requestParameters.micromasters_program_id, requestParameters.program_title, options).then((request) => request(axios, basePath)); - }, - }; -}; +export class ProfilesApi extends BaseAPI { + /** + * View for profile + * @param {ProfilesApiProfilesPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilesApi + */ + public profilesPartialUpdate( + requestParameters: ProfilesApiProfilesPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return ProfilesApiFp(this.configuration) + .profilesPartialUpdate( + requestParameters.user__username, + requestParameters.PatchedProfileRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for profile + * @param {ProfilesApiProfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilesApi + */ + public profilesRetrieve( + requestParameters: ProfilesApiProfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ProfilesApiFp(this.configuration) + .profilesRetrieve(requestParameters.user__username, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for profile + * @param {ProfilesApiProfilesUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilesApi + */ + public profilesUpdate( + requestParameters: ProfilesApiProfilesUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return ProfilesApiFp(this.configuration) + .profilesUpdate( + requestParameters.user__username, + requestParameters.ProfileRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for programCertificatesList operation in ProgramCertificatesApi. + * ProgramCertificatesApi - axios parameter creator * @export - * @interface ProgramCertificatesApiProgramCertificatesListRequest */ -export interface ProgramCertificatesApiProgramCertificatesListRequest { +export const ProgramCertificatesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * - * @type {number} - * @memberof ProgramCertificatesApiProgramCertificatesList + * View for listing program certificates for a user (includes program letter links) + * @param {number} [micromasters_program_id] + * @param {string} [program_title] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly micromasters_program_id?: number + programCertificatesList: async ( + micromasters_program_id?: number, + program_title?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/program_certificates/` + // 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 (micromasters_program_id !== undefined) { + localVarQueryParameter["micromasters_program_id"] = + micromasters_program_id + } + + if (program_title !== undefined) { + localVarQueryParameter["program_title"] = program_title + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} +/** + * ProgramCertificatesApi - functional programming interface + * @export + */ +export const ProgramCertificatesApiFp = function ( + configuration?: Configuration, +) { + const localVarAxiosParamCreator = + ProgramCertificatesApiAxiosParamCreator(configuration) + return { /** - * - * @type {string} - * @memberof ProgramCertificatesApiProgramCertificatesList + * View for listing program certificates for a user (includes program letter links) + * @param {number} [micromasters_program_id] + * @param {string} [program_title] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly program_title?: string + async programCertificatesList( + micromasters_program_id?: number, + program_title?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.programCertificatesList( + micromasters_program_id, + program_title, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ProgramCertificatesApi.programCertificatesList"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * ProgramCertificatesApi - object-oriented interface + * ProgramCertificatesApi - factory interface * @export - * @class ProgramCertificatesApi - * @extends {BaseAPI} */ -export class ProgramCertificatesApi extends BaseAPI { +export const ProgramCertificatesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ProgramCertificatesApiFp(configuration) + return { /** * View for listing program certificates for a user (includes program letter links) * @param {ProgramCertificatesApiProgramCertificatesListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ProgramCertificatesApi */ - public programCertificatesList(requestParameters: ProgramCertificatesApiProgramCertificatesListRequest = {}, options?: RawAxiosRequestConfig) { - return ProgramCertificatesApiFp(this.configuration).programCertificatesList(requestParameters.micromasters_program_id, requestParameters.program_title, options).then((request) => request(this.axios, this.basePath)); - } + programCertificatesList( + requestParameters: ProgramCertificatesApiProgramCertificatesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .programCertificatesList( + requestParameters.micromasters_program_id, + requestParameters.program_title, + options, + ) + .then((request) => request(axios, basePath)) + }, + } } - - /** - * TestimonialsApi - axios parameter creator + * Request parameters for programCertificatesList operation in ProgramCertificatesApi. * @export + * @interface ProgramCertificatesApiProgramCertificatesListRequest */ -export const TestimonialsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * List all testimonials. - * @summary List - * @param {Array} [channels] The channels the attestation is for - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offerors] The offerors the attestation is for - * @param {number} [offset] The initial index from which to return the results. - * @param {number} [position] Only show items that exist at this position - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - testimonialsList: async (channels?: Array, limit?: number, offerors?: Array, offset?: number, position?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/testimonials/`; - // 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 (channels) { - localVarQueryParameter['channels'] = channels; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offerors) { - localVarQueryParameter['offerors'] = offerors; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (position !== undefined) { - localVarQueryParameter['position'] = position; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a testimonial. - * @summary Retrieve - * @param {number} id A unique integer value identifying this attestation. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - testimonialsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('testimonialsRetrieve', 'id', id) - const localVarPath = `/api/v0/testimonials/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface ProgramCertificatesApiProgramCertificatesListRequest { + /** + * + * @type {number} + * @memberof ProgramCertificatesApiProgramCertificatesList + */ + readonly micromasters_program_id?: number + + /** + * + * @type {string} + * @memberof ProgramCertificatesApiProgramCertificatesList + */ + readonly program_title?: string +} /** - * TestimonialsApi - functional programming interface + * ProgramCertificatesApi - object-oriented interface * @export + * @class ProgramCertificatesApi + * @extends {BaseAPI} */ -export const TestimonialsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TestimonialsApiAxiosParamCreator(configuration) - return { - /** - * List all testimonials. - * @summary List - * @param {Array} [channels] The channels the attestation is for - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offerors] The offerors the attestation is for - * @param {number} [offset] The initial index from which to return the results. - * @param {number} [position] Only show items that exist at this position - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async testimonialsList(channels?: Array, limit?: number, offerors?: Array, offset?: number, position?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.testimonialsList(channels, limit, offerors, offset, position, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['TestimonialsApi.testimonialsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a testimonial. - * @summary Retrieve - * @param {number} id A unique integer value identifying this attestation. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async testimonialsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.testimonialsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['TestimonialsApi.testimonialsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export class ProgramCertificatesApi extends BaseAPI { + /** + * View for listing program certificates for a user (includes program letter links) + * @param {ProgramCertificatesApiProgramCertificatesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProgramCertificatesApi + */ + public programCertificatesList( + requestParameters: ProgramCertificatesApiProgramCertificatesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ProgramCertificatesApiFp(this.configuration) + .programCertificatesList( + requestParameters.micromasters_program_id, + requestParameters.program_title, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * TestimonialsApi - factory interface + * TestimonialsApi - axios parameter creator * @export */ -export const TestimonialsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TestimonialsApiFp(configuration) - return { - /** - * List all testimonials. - * @summary List - * @param {TestimonialsApiTestimonialsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - testimonialsList(requestParameters: TestimonialsApiTestimonialsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.testimonialsList(requestParameters.channels, requestParameters.limit, requestParameters.offerors, requestParameters.offset, requestParameters.position, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a testimonial. - * @summary Retrieve - * @param {TestimonialsApiTestimonialsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - testimonialsRetrieve(requestParameters: TestimonialsApiTestimonialsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.testimonialsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const TestimonialsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * List all testimonials. + * @summary List + * @param {Array} [channels] The channels the attestation is for + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offerors] The offerors the attestation is for + * @param {number} [offset] The initial index from which to return the results. + * @param {number} [position] Only show items that exist at this position + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testimonialsList: async ( + channels?: Array, + limit?: number, + offerors?: Array, + offset?: number, + position?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/testimonials/` + // 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 (channels) { + localVarQueryParameter["channels"] = channels + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offerors) { + localVarQueryParameter["offerors"] = offerors + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (position !== undefined) { + localVarQueryParameter["position"] = position + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Retrieve a testimonial. + * @summary Retrieve + * @param {number} id A unique integer value identifying this attestation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testimonialsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("testimonialsRetrieve", "id", id) + const localVarPath = `/api/v0/testimonials/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} /** - * Request parameters for testimonialsList operation in TestimonialsApi. + * TestimonialsApi - functional programming interface * @export - * @interface TestimonialsApiTestimonialsListRequest */ -export interface TestimonialsApiTestimonialsListRequest { +export const TestimonialsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + TestimonialsApiAxiosParamCreator(configuration) + return { /** - * The channels the attestation is for - * @type {Array} - * @memberof TestimonialsApiTestimonialsList + * List all testimonials. + * @summary List + * @param {Array} [channels] The channels the attestation is for + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offerors] The offerors the attestation is for + * @param {number} [offset] The initial index from which to return the results. + * @param {number} [position] Only show items that exist at this position + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly channels?: Array - + async testimonialsList( + channels?: Array, + limit?: number, + offerors?: Array, + offset?: number, + position?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.testimonialsList( + channels, + limit, + offerors, + offset, + position, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["TestimonialsApi.testimonialsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Number of results to return per page. - * @type {number} - * @memberof TestimonialsApiTestimonialsList + * Retrieve a testimonial. + * @summary Retrieve + * @param {number} id A unique integer value identifying this attestation. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number + async testimonialsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.testimonialsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["TestimonialsApi.testimonialsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} +/** + * TestimonialsApi - factory interface + * @export + */ +export const TestimonialsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TestimonialsApiFp(configuration) + return { /** - * The offerors the attestation is for - * @type {Array} - * @memberof TestimonialsApiTestimonialsList + * List all testimonials. + * @summary List + * @param {TestimonialsApiTestimonialsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offerors?: Array - + testimonialsList( + requestParameters: TestimonialsApiTestimonialsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .testimonialsList( + requestParameters.channels, + requestParameters.limit, + requestParameters.offerors, + requestParameters.offset, + requestParameters.position, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof TestimonialsApiTestimonialsList + * Retrieve a testimonial. + * @summary Retrieve + * @param {TestimonialsApiTestimonialsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + testimonialsRetrieve( + requestParameters: TestimonialsApiTestimonialsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .testimonialsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} - /** - * Only show items that exist at this position - * @type {number} - * @memberof TestimonialsApiTestimonialsList - */ - readonly position?: number +/** + * Request parameters for testimonialsList operation in TestimonialsApi. + * @export + * @interface TestimonialsApiTestimonialsListRequest + */ +export interface TestimonialsApiTestimonialsListRequest { + /** + * The channels the attestation is for + * @type {Array} + * @memberof TestimonialsApiTestimonialsList + */ + readonly channels?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof TestimonialsApiTestimonialsList + */ + readonly limit?: number + + /** + * The offerors the attestation is for + * @type {Array} + * @memberof TestimonialsApiTestimonialsList + */ + readonly offerors?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof TestimonialsApiTestimonialsList + */ + readonly offset?: number + + /** + * Only show items that exist at this position + * @type {number} + * @memberof TestimonialsApiTestimonialsList + */ + readonly position?: number } /** @@ -5144,12 +6200,12 @@ export interface TestimonialsApiTestimonialsListRequest { * @interface TestimonialsApiTestimonialsRetrieveRequest */ export interface TestimonialsApiTestimonialsRetrieveRequest { - /** - * A unique integer value identifying this attestation. - * @type {number} - * @memberof TestimonialsApiTestimonialsRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this attestation. + * @type {number} + * @memberof TestimonialsApiTestimonialsRetrieve + */ + readonly id: number } /** @@ -5159,1107 +6215,1624 @@ export interface TestimonialsApiTestimonialsRetrieveRequest { * @extends {BaseAPI} */ export class TestimonialsApi extends BaseAPI { + /** + * List all testimonials. + * @summary List + * @param {TestimonialsApiTestimonialsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestimonialsApi + */ + public testimonialsList( + requestParameters: TestimonialsApiTestimonialsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return TestimonialsApiFp(this.configuration) + .testimonialsList( + requestParameters.channels, + requestParameters.limit, + requestParameters.offerors, + requestParameters.offset, + requestParameters.position, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Retrieve a testimonial. + * @summary Retrieve + * @param {TestimonialsApiTestimonialsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TestimonialsApi + */ + public testimonialsRetrieve( + requestParameters: TestimonialsApiTestimonialsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return TestimonialsApiFp(this.configuration) + .testimonialsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * UsersApi - axios parameter creator + * @export + */ +export const UsersApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * View for users + * @param {UserRequest} UserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersCreate: async ( + UserRequest: UserRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'UserRequest' is not null or undefined + assertParamExists("usersCreate", "UserRequest", UserRequest) + const localVarPath = `/api/v0/users/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + UserRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * View for users + * @param {string} username + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersDestroy: async ( + username: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists("usersDestroy", "username", username) + const localVarPath = `/api/v0/users/{username}/`.replace( + `{${"username"}}`, + encodeURIComponent(String(username)), + ) + // 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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * View for users + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersList: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/users/` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * User retrieve and update viewsets for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersMeRetrieve: async ( + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v0/users/me/` + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * View for users + * @param {string} username + * @param {PatchedUserRequest} [PatchedUserRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + usersPartialUpdate: async ( + username: string, + PatchedUserRequest?: PatchedUserRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists("usersPartialUpdate", "username", username) + const localVarPath = `/api/v0/users/{username}/`.replace( + `{${"username"}}`, + encodeURIComponent(String(username)), + ) + // 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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedUserRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * List all testimonials. - * @summary List - * @param {TestimonialsApiTestimonialsListRequest} requestParameters Request parameters. + * View for users + * @param {string} username * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TestimonialsApi */ - public testimonialsList(requestParameters: TestimonialsApiTestimonialsListRequest = {}, options?: RawAxiosRequestConfig) { - return TestimonialsApiFp(this.configuration).testimonialsList(requestParameters.channels, requestParameters.limit, requestParameters.offerors, requestParameters.offset, requestParameters.position, options).then((request) => request(this.axios, this.basePath)); - } - + usersRetrieve: async ( + username: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists("usersRetrieve", "username", username) + const localVarPath = `/api/v0/users/{username}/`.replace( + `{${"username"}}`, + encodeURIComponent(String(username)), + ) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Retrieve a testimonial. - * @summary Retrieve - * @param {TestimonialsApiTestimonialsRetrieveRequest} requestParameters Request parameters. + * View for users + * @param {string} username + * @param {UserRequest} UserRequest * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TestimonialsApi */ - public testimonialsRetrieve(requestParameters: TestimonialsApiTestimonialsRetrieveRequest, options?: RawAxiosRequestConfig) { - return TestimonialsApiFp(this.configuration).testimonialsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + usersUpdate: async ( + username: string, + UserRequest: UserRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'username' is not null or undefined + assertParamExists("usersUpdate", "username", username) + // verify required parameter 'UserRequest' is not null or undefined + assertParamExists("usersUpdate", "UserRequest", UserRequest) + const localVarPath = `/api/v0/users/{username}/`.replace( + `{${"username"}}`, + encodeURIComponent(String(username)), + ) + // 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: "PUT", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + UserRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } - - -/** - * UsersApi - axios parameter creator - * @export - */ -export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * View for users - * @param {UserRequest} UserRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersCreate: async (UserRequest: UserRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'UserRequest' is not null or undefined - assertParamExists('usersCreate', 'UserRequest', UserRequest) - const localVarPath = `/api/v0/users/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(UserRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for users - * @param {string} username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersDestroy: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('usersDestroy', 'username', username) - const localVarPath = `/api/v0/users/{username}/` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); - // 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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for users - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersList: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/users/`; - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * User retrieve and update viewsets for the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersMeRetrieve: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v0/users/me/`; - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for users - * @param {string} username - * @param {PatchedUserRequest} [PatchedUserRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersPartialUpdate: async (username: string, PatchedUserRequest?: PatchedUserRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('usersPartialUpdate', 'username', username) - const localVarPath = `/api/v0/users/{username}/` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); - // 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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedUserRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for users - * @param {string} username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersRetrieve: async (username: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('usersRetrieve', 'username', username) - const localVarPath = `/api/v0/users/{username}/` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for users - * @param {string} username - * @param {UserRequest} UserRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUpdate: async (username: string, UserRequest: UserRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'username' is not null or undefined - assertParamExists('usersUpdate', 'username', username) - // verify required parameter 'UserRequest' is not null or undefined - assertParamExists('usersUpdate', 'UserRequest', UserRequest) - const localVarPath = `/api/v0/users/{username}/` - .replace(`{${"username"}}`, encodeURIComponent(String(username))); - // 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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(UserRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - /** * UsersApi - functional programming interface * @export */ -export const UsersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) - return { - /** - * View for users - * @param {UserRequest} UserRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersCreate(UserRequest: UserRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersCreate(UserRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for users - * @param {string} username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersDestroy(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersDestroy(username, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for users - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersList(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersList(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * User retrieve and update viewsets for the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersMeRetrieve(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersMeRetrieve(options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersMeRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for users - * @param {string} username - * @param {PatchedUserRequest} [PatchedUserRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersPartialUpdate(username: string, PatchedUserRequest?: PatchedUserRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersPartialUpdate(username, PatchedUserRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for users - * @param {string} username - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersRetrieve(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersRetrieve(username, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for users - * @param {string} username - * @param {UserRequest} UserRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async usersUpdate(username: string, UserRequest: UserRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.usersUpdate(username, UserRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UsersApi.usersUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * UsersApi - factory interface - * @export - */ -export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UsersApiFp(configuration) - return { - /** - * View for users - * @param {UsersApiUsersCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersCreate(requestParameters: UsersApiUsersCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.usersCreate(requestParameters.UserRequest, options).then((request) => request(axios, basePath)); - }, - /** - * View for users - * @param {UsersApiUsersDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersDestroy(requestParameters: UsersApiUsersDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.usersDestroy(requestParameters.username, options).then((request) => request(axios, basePath)); - }, - /** - * View for users - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersList(options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.usersList(options).then((request) => request(axios, basePath)); - }, - /** - * User retrieve and update viewsets for the current user - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersMeRetrieve(options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.usersMeRetrieve(options).then((request) => request(axios, basePath)); - }, - /** - * View for users - * @param {UsersApiUsersPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersPartialUpdate(requestParameters: UsersApiUsersPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.usersPartialUpdate(requestParameters.username, requestParameters.PatchedUserRequest, options).then((request) => request(axios, basePath)); - }, - /** - * View for users - * @param {UsersApiUsersRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersRetrieve(requestParameters: UsersApiUsersRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.usersRetrieve(requestParameters.username, options).then((request) => request(axios, basePath)); - }, - /** - * View for users - * @param {UsersApiUsersUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - usersUpdate(requestParameters: UsersApiUsersUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.usersUpdate(requestParameters.username, requestParameters.UserRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for usersCreate operation in UsersApi. - * @export - * @interface UsersApiUsersCreateRequest - */ -export interface UsersApiUsersCreateRequest { +export const UsersApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) + return { /** - * - * @type {UserRequest} - * @memberof UsersApiUsersCreate + * View for users + * @param {UserRequest} UserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly UserRequest: UserRequest -} - -/** - * Request parameters for usersDestroy operation in UsersApi. - * @export - * @interface UsersApiUsersDestroyRequest - */ -export interface UsersApiUsersDestroyRequest { + async usersCreate( + UserRequest: UserRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersCreate( + UserRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof UsersApiUsersDestroy + * View for users + * @param {string} username + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly username: string -} - -/** - * Request parameters for usersPartialUpdate operation in UsersApi. - * @export - * @interface UsersApiUsersPartialUpdateRequest - */ -export interface UsersApiUsersPartialUpdateRequest { + async usersDestroy( + username: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersDestroy( + username, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersDestroy"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof UsersApiUsersPartialUpdate + * View for users + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly username: string - + async usersList( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.usersList(options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {PatchedUserRequest} - * @memberof UsersApiUsersPartialUpdate + * User retrieve and update viewsets for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedUserRequest?: PatchedUserRequest -} - -/** - * Request parameters for usersRetrieve operation in UsersApi. - * @export - * @interface UsersApiUsersRetrieveRequest - */ -export interface UsersApiUsersRetrieveRequest { + async usersMeRetrieve( + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.usersMeRetrieve(options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersMeRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof UsersApiUsersRetrieve + * View for users + * @param {string} username + * @param {PatchedUserRequest} [PatchedUserRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly username: string -} - -/** - * Request parameters for usersUpdate operation in UsersApi. - * @export - * @interface UsersApiUsersUpdateRequest - */ -export interface UsersApiUsersUpdateRequest { + async usersPartialUpdate( + username: string, + PatchedUserRequest?: PatchedUserRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.usersPartialUpdate( + username, + PatchedUserRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersPartialUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof UsersApiUsersUpdate + * View for users + * @param {string} username + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly username: string - + async usersRetrieve( + username: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersRetrieve( + username, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {UserRequest} - * @memberof UsersApiUsersUpdate + * View for users + * @param {string} username + * @param {UserRequest} UserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly UserRequest: UserRequest + async usersUpdate( + username: string, + UserRequest: UserRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.usersUpdate( + username, + UserRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UsersApi.usersUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * UsersApi - object-oriented interface + * UsersApi - factory interface * @export - * @class UsersApi - * @extends {BaseAPI} */ -export class UsersApi extends BaseAPI { +export const UsersApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = UsersApiFp(configuration) + return { /** * View for users * @param {UsersApiUsersCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersCreate(requestParameters: UsersApiUsersCreateRequest, options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersCreate(requestParameters.UserRequest, options).then((request) => request(this.axios, this.basePath)); - } - + usersCreate( + requestParameters: UsersApiUsersCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .usersCreate(requestParameters.UserRequest, options) + .then((request) => request(axios, basePath)) + }, /** * View for users * @param {UsersApiUsersDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersDestroy(requestParameters: UsersApiUsersDestroyRequest, options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersDestroy(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); - } - + usersDestroy( + requestParameters: UsersApiUsersDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .usersDestroy(requestParameters.username, options) + .then((request) => request(axios, basePath)) + }, /** * View for users * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersList(options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersList(options).then((request) => request(this.axios, this.basePath)); - } - + usersList(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp + .usersList(options) + .then((request) => request(axios, basePath)) + }, /** * User retrieve and update viewsets for the current user * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersMeRetrieve(options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersMeRetrieve(options).then((request) => request(this.axios, this.basePath)); - } - + usersMeRetrieve(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp + .usersMeRetrieve(options) + .then((request) => request(axios, basePath)) + }, /** * View for users * @param {UsersApiUsersPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersPartialUpdate(requestParameters: UsersApiUsersPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersPartialUpdate(requestParameters.username, requestParameters.PatchedUserRequest, options).then((request) => request(this.axios, this.basePath)); - } - + usersPartialUpdate( + requestParameters: UsersApiUsersPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .usersPartialUpdate( + requestParameters.username, + requestParameters.PatchedUserRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * View for users * @param {UsersApiUsersRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersRetrieve(requestParameters: UsersApiUsersRetrieveRequest, options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersRetrieve(requestParameters.username, options).then((request) => request(this.axios, this.basePath)); - } - + usersRetrieve( + requestParameters: UsersApiUsersRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .usersRetrieve(requestParameters.username, options) + .then((request) => request(axios, basePath)) + }, /** * View for users * @param {UsersApiUsersUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UsersApi */ - public usersUpdate(requestParameters: UsersApiUsersUpdateRequest, options?: RawAxiosRequestConfig) { - return UsersApiFp(this.configuration).usersUpdate(requestParameters.username, requestParameters.UserRequest, options).then((request) => request(this.axios, this.basePath)); - } + usersUpdate( + requestParameters: UsersApiUsersUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .usersUpdate( + requestParameters.username, + requestParameters.UserRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, + } } +/** + * Request parameters for usersCreate operation in UsersApi. + * @export + * @interface UsersApiUsersCreateRequest + */ +export interface UsersApiUsersCreateRequest { + /** + * + * @type {UserRequest} + * @memberof UsersApiUsersCreate + */ + readonly UserRequest: UserRequest +} +/** + * Request parameters for usersDestroy operation in UsersApi. + * @export + * @interface UsersApiUsersDestroyRequest + */ +export interface UsersApiUsersDestroyRequest { + /** + * + * @type {string} + * @memberof UsersApiUsersDestroy + */ + readonly username: string +} /** - * WebsitesApi - axios parameter creator + * Request parameters for usersPartialUpdate operation in UsersApi. * @export + * @interface UsersApiUsersPartialUpdateRequest */ -export const WebsitesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * View for user websites - * @param {UserWebsiteRequest} UserWebsiteRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - websitesCreate: async (UserWebsiteRequest: UserWebsiteRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'UserWebsiteRequest' is not null or undefined - assertParamExists('websitesCreate', 'UserWebsiteRequest', UserWebsiteRequest) - const localVarPath = `/api/v0/websites/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(UserWebsiteRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for user websites - * @param {number} id A unique integer value identifying this user website. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - websitesDestroy: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('websitesDestroy', 'id', id) - const localVarPath = `/api/v0/websites/{id}/` - .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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface UsersApiUsersPartialUpdateRequest { + /** + * + * @type {string} + * @memberof UsersApiUsersPartialUpdate + */ + readonly username: string + + /** + * + * @type {PatchedUserRequest} + * @memberof UsersApiUsersPartialUpdate + */ + readonly PatchedUserRequest?: PatchedUserRequest +} /** - * WebsitesApi - functional programming interface + * Request parameters for usersRetrieve operation in UsersApi. * @export + * @interface UsersApiUsersRetrieveRequest */ -export const WebsitesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = WebsitesApiAxiosParamCreator(configuration) - return { - /** - * View for user websites - * @param {UserWebsiteRequest} UserWebsiteRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async websitesCreate(UserWebsiteRequest: UserWebsiteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.websitesCreate(UserWebsiteRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['WebsitesApi.websitesCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for user websites - * @param {number} id A unique integer value identifying this user website. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async websitesDestroy(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.websitesDestroy(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['WebsitesApi.websitesDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface UsersApiUsersRetrieveRequest { + /** + * + * @type {string} + * @memberof UsersApiUsersRetrieve + */ + readonly username: string +} /** - * WebsitesApi - factory interface + * Request parameters for usersUpdate operation in UsersApi. * @export + * @interface UsersApiUsersUpdateRequest */ -export const WebsitesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = WebsitesApiFp(configuration) - return { - /** - * View for user websites - * @param {WebsitesApiWebsitesCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - websitesCreate(requestParameters: WebsitesApiWebsitesCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.websitesCreate(requestParameters.UserWebsiteRequest, options).then((request) => request(axios, basePath)); - }, - /** - * View for user websites - * @param {WebsitesApiWebsitesDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - websitesDestroy(requestParameters: WebsitesApiWebsitesDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.websitesDestroy(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface UsersApiUsersUpdateRequest { + /** + * + * @type {string} + * @memberof UsersApiUsersUpdate + */ + readonly username: string + + /** + * + * @type {UserRequest} + * @memberof UsersApiUsersUpdate + */ + readonly UserRequest: UserRequest +} /** - * Request parameters for websitesCreate operation in WebsitesApi. + * UsersApi - object-oriented interface * @export - * @interface WebsitesApiWebsitesCreateRequest + * @class UsersApi + * @extends {BaseAPI} */ -export interface WebsitesApiWebsitesCreateRequest { +export class UsersApi extends BaseAPI { + /** + * View for users + * @param {UsersApiUsersCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersCreate( + requestParameters: UsersApiUsersCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return UsersApiFp(this.configuration) + .usersCreate(requestParameters.UserRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for users + * @param {UsersApiUsersDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersDestroy( + requestParameters: UsersApiUsersDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return UsersApiFp(this.configuration) + .usersDestroy(requestParameters.username, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for users + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersList(options?: RawAxiosRequestConfig) { + return UsersApiFp(this.configuration) + .usersList(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * User retrieve and update viewsets for the current user + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersMeRetrieve(options?: RawAxiosRequestConfig) { + return UsersApiFp(this.configuration) + .usersMeRetrieve(options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for users + * @param {UsersApiUsersPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersPartialUpdate( + requestParameters: UsersApiUsersPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return UsersApiFp(this.configuration) + .usersPartialUpdate( + requestParameters.username, + requestParameters.PatchedUserRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for users + * @param {UsersApiUsersRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersRetrieve( + requestParameters: UsersApiUsersRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return UsersApiFp(this.configuration) + .usersRetrieve(requestParameters.username, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for users + * @param {UsersApiUsersUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public usersUpdate( + requestParameters: UsersApiUsersUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return UsersApiFp(this.configuration) + .usersUpdate( + requestParameters.username, + requestParameters.UserRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} + +/** + * WebsitesApi - axios parameter creator + * @export + */ +export const WebsitesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * View for user websites + * @param {UserWebsiteRequest} UserWebsiteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + websitesCreate: async ( + UserWebsiteRequest: UserWebsiteRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'UserWebsiteRequest' is not null or undefined + assertParamExists( + "websitesCreate", + "UserWebsiteRequest", + UserWebsiteRequest, + ) + const localVarPath = `/api/v0/websites/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + UserWebsiteRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {UserWebsiteRequest} - * @memberof WebsitesApiWebsitesCreate + * View for user websites + * @param {number} id A unique integer value identifying this user website. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly UserWebsiteRequest: UserWebsiteRequest + websitesDestroy: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("websitesDestroy", "id", id) + const localVarPath = `/api/v0/websites/{id}/`.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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for websitesDestroy operation in WebsitesApi. + * WebsitesApi - functional programming interface * @export - * @interface WebsitesApiWebsitesDestroyRequest */ -export interface WebsitesApiWebsitesDestroyRequest { +export const WebsitesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = WebsitesApiAxiosParamCreator(configuration) + return { + /** + * View for user websites + * @param {UserWebsiteRequest} UserWebsiteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async websitesCreate( + UserWebsiteRequest: UserWebsiteRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.websitesCreate( + UserWebsiteRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["WebsitesApi.websitesCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this user website. - * @type {number} - * @memberof WebsitesApiWebsitesDestroy + * View for user websites + * @param {number} id A unique integer value identifying this user website. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async websitesDestroy( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.websitesDestroy( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["WebsitesApi.websitesDestroy"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * WebsitesApi - object-oriented interface + * WebsitesApi - factory interface * @export - * @class WebsitesApi - * @extends {BaseAPI} */ -export class WebsitesApi extends BaseAPI { +export const WebsitesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = WebsitesApiFp(configuration) + return { /** * View for user websites * @param {WebsitesApiWebsitesCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WebsitesApi */ - public websitesCreate(requestParameters: WebsitesApiWebsitesCreateRequest, options?: RawAxiosRequestConfig) { - return WebsitesApiFp(this.configuration).websitesCreate(requestParameters.UserWebsiteRequest, options).then((request) => request(this.axios, this.basePath)); - } - + websitesCreate( + requestParameters: WebsitesApiWebsitesCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .websitesCreate(requestParameters.UserWebsiteRequest, options) + .then((request) => request(axios, basePath)) + }, /** * View for user websites * @param {WebsitesApiWebsitesDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WebsitesApi */ - public websitesDestroy(requestParameters: WebsitesApiWebsitesDestroyRequest, options?: RawAxiosRequestConfig) { - return WebsitesApiFp(this.configuration).websitesDestroy(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + websitesDestroy( + requestParameters: WebsitesApiWebsitesDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .websitesDestroy(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } - - /** - * WidgetListsApi - axios parameter creator + * Request parameters for websitesCreate operation in WebsitesApi. * @export + * @interface WebsitesApiWebsitesCreateRequest */ -export const WidgetListsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * API for managing widget lists - * @param {number} id A unique integer value identifying this widget list. - * @param {PatchedWidgetListRequest} [PatchedWidgetListRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - widgetListsPartialUpdate: async (id: number, PatchedWidgetListRequest?: PatchedWidgetListRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('widgetListsPartialUpdate', 'id', id) - const localVarPath = `/api/v0/widget_lists/{id}/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedWidgetListRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * API for managing widget lists - * @param {number} id A unique integer value identifying this widget list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - widgetListsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('widgetListsRetrieve', 'id', id) - const localVarPath = `/api/v0/widget_lists/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * API for managing widget lists - * @param {number} id A unique integer value identifying this widget list. - * @param {WidgetListRequest} [WidgetListRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - widgetListsUpdate: async (id: number, WidgetListRequest?: WidgetListRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('widgetListsUpdate', 'id', id) - const localVarPath = `/api/v0/widget_lists/{id}/` - .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: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(WidgetListRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface WebsitesApiWebsitesCreateRequest { + /** + * + * @type {UserWebsiteRequest} + * @memberof WebsitesApiWebsitesCreate + */ + readonly UserWebsiteRequest: UserWebsiteRequest +} /** - * WidgetListsApi - functional programming interface + * Request parameters for websitesDestroy operation in WebsitesApi. * @export + * @interface WebsitesApiWebsitesDestroyRequest */ -export const WidgetListsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = WidgetListsApiAxiosParamCreator(configuration) - return { - /** - * API for managing widget lists - * @param {number} id A unique integer value identifying this widget list. - * @param {PatchedWidgetListRequest} [PatchedWidgetListRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async widgetListsPartialUpdate(id: number, PatchedWidgetListRequest?: PatchedWidgetListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.widgetListsPartialUpdate(id, PatchedWidgetListRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['WidgetListsApi.widgetListsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * API for managing widget lists - * @param {number} id A unique integer value identifying this widget list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async widgetListsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.widgetListsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['WidgetListsApi.widgetListsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * API for managing widget lists - * @param {number} id A unique integer value identifying this widget list. - * @param {WidgetListRequest} [WidgetListRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async widgetListsUpdate(id: number, WidgetListRequest?: WidgetListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.widgetListsUpdate(id, WidgetListRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['WidgetListsApi.widgetListsUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface WebsitesApiWebsitesDestroyRequest { + /** + * A unique integer value identifying this user website. + * @type {number} + * @memberof WebsitesApiWebsitesDestroy + */ + readonly id: number +} /** - * WidgetListsApi - factory interface + * WebsitesApi - object-oriented interface * @export + * @class WebsitesApi + * @extends {BaseAPI} */ -export const WidgetListsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = WidgetListsApiFp(configuration) - return { - /** - * API for managing widget lists - * @param {WidgetListsApiWidgetListsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - widgetListsPartialUpdate(requestParameters: WidgetListsApiWidgetListsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.widgetListsPartialUpdate(requestParameters.id, requestParameters.PatchedWidgetListRequest, options).then((request) => request(axios, basePath)); - }, - /** - * API for managing widget lists - * @param {WidgetListsApiWidgetListsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - widgetListsRetrieve(requestParameters: WidgetListsApiWidgetListsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.widgetListsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * API for managing widget lists - * @param {WidgetListsApiWidgetListsUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - widgetListsUpdate(requestParameters: WidgetListsApiWidgetListsUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.widgetListsUpdate(requestParameters.id, requestParameters.WidgetListRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; +export class WebsitesApi extends BaseAPI { + /** + * View for user websites + * @param {WebsitesApiWebsitesCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebsitesApi + */ + public websitesCreate( + requestParameters: WebsitesApiWebsitesCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return WebsitesApiFp(this.configuration) + .websitesCreate(requestParameters.UserWebsiteRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for user websites + * @param {WebsitesApiWebsitesDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WebsitesApi + */ + public websitesDestroy( + requestParameters: WebsitesApiWebsitesDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return WebsitesApiFp(this.configuration) + .websitesDestroy(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for widgetListsPartialUpdate operation in WidgetListsApi. + * WidgetListsApi - axios parameter creator * @export - * @interface WidgetListsApiWidgetListsPartialUpdateRequest */ -export interface WidgetListsApiWidgetListsPartialUpdateRequest { +export const WidgetListsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * A unique integer value identifying this widget list. - * @type {number} - * @memberof WidgetListsApiWidgetListsPartialUpdate + * API for managing widget lists + * @param {number} id A unique integer value identifying this widget list. + * @param {PatchedWidgetListRequest} [PatchedWidgetListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + widgetListsPartialUpdate: async ( + id: number, + PatchedWidgetListRequest?: PatchedWidgetListRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("widgetListsPartialUpdate", "id", id) + const localVarPath = `/api/v0/widget_lists/{id}/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedWidgetListRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * API for managing widget lists + * @param {number} id A unique integer value identifying this widget list. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + widgetListsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("widgetListsRetrieve", "id", id) + const localVarPath = `/api/v0/widget_lists/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {PatchedWidgetListRequest} - * @memberof WidgetListsApiWidgetListsPartialUpdate + * API for managing widget lists + * @param {number} id A unique integer value identifying this widget list. + * @param {WidgetListRequest} [WidgetListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedWidgetListRequest?: PatchedWidgetListRequest + widgetListsUpdate: async ( + id: number, + WidgetListRequest?: WidgetListRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("widgetListsUpdate", "id", id) + const localVarPath = `/api/v0/widget_lists/{id}/`.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: "PUT", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + WidgetListRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for widgetListsRetrieve operation in WidgetListsApi. + * WidgetListsApi - functional programming interface * @export - * @interface WidgetListsApiWidgetListsRetrieveRequest */ -export interface WidgetListsApiWidgetListsRetrieveRequest { +export const WidgetListsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + WidgetListsApiAxiosParamCreator(configuration) + return { /** - * A unique integer value identifying this widget list. - * @type {number} - * @memberof WidgetListsApiWidgetListsRetrieve + * API for managing widget lists + * @param {number} id A unique integer value identifying this widget list. + * @param {PatchedWidgetListRequest} [PatchedWidgetListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number -} - -/** - * Request parameters for widgetListsUpdate operation in WidgetListsApi. - * @export - * @interface WidgetListsApiWidgetListsUpdateRequest - */ -export interface WidgetListsApiWidgetListsUpdateRequest { + async widgetListsPartialUpdate( + id: number, + PatchedWidgetListRequest?: PatchedWidgetListRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.widgetListsPartialUpdate( + id, + PatchedWidgetListRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["WidgetListsApi.widgetListsPartialUpdate"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this widget list. - * @type {number} - * @memberof WidgetListsApiWidgetListsUpdate + * API for managing widget lists + * @param {number} id A unique integer value identifying this widget list. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async widgetListsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.widgetListsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["WidgetListsApi.widgetListsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {WidgetListRequest} - * @memberof WidgetListsApiWidgetListsUpdate + * API for managing widget lists + * @param {number} id A unique integer value identifying this widget list. + * @param {WidgetListRequest} [WidgetListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly WidgetListRequest?: WidgetListRequest + async widgetListsUpdate( + id: number, + WidgetListRequest?: WidgetListRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.widgetListsUpdate( + id, + WidgetListRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["WidgetListsApi.widgetListsUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * WidgetListsApi - object-oriented interface + * WidgetListsApi - factory interface * @export - * @class WidgetListsApi - * @extends {BaseAPI} */ -export class WidgetListsApi extends BaseAPI { +export const WidgetListsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = WidgetListsApiFp(configuration) + return { /** * API for managing widget lists * @param {WidgetListsApiWidgetListsPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WidgetListsApi */ - public widgetListsPartialUpdate(requestParameters: WidgetListsApiWidgetListsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return WidgetListsApiFp(this.configuration).widgetListsPartialUpdate(requestParameters.id, requestParameters.PatchedWidgetListRequest, options).then((request) => request(this.axios, this.basePath)); - } - + widgetListsPartialUpdate( + requestParameters: WidgetListsApiWidgetListsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .widgetListsPartialUpdate( + requestParameters.id, + requestParameters.PatchedWidgetListRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * API for managing widget lists * @param {WidgetListsApiWidgetListsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WidgetListsApi */ - public widgetListsRetrieve(requestParameters: WidgetListsApiWidgetListsRetrieveRequest, options?: RawAxiosRequestConfig) { - return WidgetListsApiFp(this.configuration).widgetListsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - + widgetListsRetrieve( + requestParameters: WidgetListsApiWidgetListsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .widgetListsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** * API for managing widget lists * @param {WidgetListsApiWidgetListsUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof WidgetListsApi */ - public widgetListsUpdate(requestParameters: WidgetListsApiWidgetListsUpdateRequest, options?: RawAxiosRequestConfig) { - return WidgetListsApiFp(this.configuration).widgetListsUpdate(requestParameters.id, requestParameters.WidgetListRequest, options).then((request) => request(this.axios, this.basePath)); - } + widgetListsUpdate( + requestParameters: WidgetListsApiWidgetListsUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .widgetListsUpdate( + requestParameters.id, + requestParameters.WidgetListRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for widgetListsPartialUpdate operation in WidgetListsApi. + * @export + * @interface WidgetListsApiWidgetListsPartialUpdateRequest + */ +export interface WidgetListsApiWidgetListsPartialUpdateRequest { + /** + * A unique integer value identifying this widget list. + * @type {number} + * @memberof WidgetListsApiWidgetListsPartialUpdate + */ + readonly id: number + + /** + * + * @type {PatchedWidgetListRequest} + * @memberof WidgetListsApiWidgetListsPartialUpdate + */ + readonly PatchedWidgetListRequest?: PatchedWidgetListRequest } +/** + * Request parameters for widgetListsRetrieve operation in WidgetListsApi. + * @export + * @interface WidgetListsApiWidgetListsRetrieveRequest + */ +export interface WidgetListsApiWidgetListsRetrieveRequest { + /** + * A unique integer value identifying this widget list. + * @type {number} + * @memberof WidgetListsApiWidgetListsRetrieve + */ + readonly id: number +} +/** + * Request parameters for widgetListsUpdate operation in WidgetListsApi. + * @export + * @interface WidgetListsApiWidgetListsUpdateRequest + */ +export interface WidgetListsApiWidgetListsUpdateRequest { + /** + * A unique integer value identifying this widget list. + * @type {number} + * @memberof WidgetListsApiWidgetListsUpdate + */ + readonly id: number + + /** + * + * @type {WidgetListRequest} + * @memberof WidgetListsApiWidgetListsUpdate + */ + readonly WidgetListRequest?: WidgetListRequest +} +/** + * WidgetListsApi - object-oriented interface + * @export + * @class WidgetListsApi + * @extends {BaseAPI} + */ +export class WidgetListsApi extends BaseAPI { + /** + * API for managing widget lists + * @param {WidgetListsApiWidgetListsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetListsApi + */ + public widgetListsPartialUpdate( + requestParameters: WidgetListsApiWidgetListsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return WidgetListsApiFp(this.configuration) + .widgetListsPartialUpdate( + requestParameters.id, + requestParameters.PatchedWidgetListRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * API for managing widget lists + * @param {WidgetListsApiWidgetListsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetListsApi + */ + public widgetListsRetrieve( + requestParameters: WidgetListsApiWidgetListsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return WidgetListsApiFp(this.configuration) + .widgetListsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * API for managing widget lists + * @param {WidgetListsApiWidgetListsUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WidgetListsApi + */ + public widgetListsUpdate( + requestParameters: WidgetListsApiWidgetListsUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return WidgetListsApiFp(this.configuration) + .widgetListsUpdate( + requestParameters.id, + requestParameters.WidgetListRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} diff --git a/src/typescript/mit-open-api-axios/src/v0/base.ts b/src/typescript/mit-open-api-axios/src/v0/base.ts index c96f3b5..c8312e8 100644 --- a/src/typescript/mit-open-api-axios/src/v0/base.ts +++ b/src/typescript/mit-open-api-axios/src/v0/base.ts @@ -5,32 +5,31 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v0) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from './configuration'; +import type { Configuration } from "./configuration" // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios" +import globalAxios from "axios" -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); +export const BASE_PATH = "http://localhost".replace(/\/+$/, "") /** * * @export */ export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +} /** * @@ -38,8 +37,8 @@ export const COLLECTION_FORMATS = { * @interface RequestArgs */ export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; + url: string + options: RawAxiosRequestConfig } /** @@ -48,15 +47,19 @@ export interface RequestArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration | undefined; + protected configuration: Configuration | undefined - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath ?? basePath; - } + constructor( + configuration?: Configuration, + protected basePath: string = BASE_PATH, + protected axios: AxiosInstance = globalAxios, + ) { + if (configuration) { + this.configuration = configuration + this.basePath = configuration.basePath ?? basePath } -}; + } +} /** * @@ -65,22 +68,24 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } + constructor( + public field: string, + msg?: string, + ) { + super(msg) + this.name = "RequiredError" + } } interface ServerMap { - [key: string]: { - url: string, - description: string, - }[]; + [key: string]: { + url: string + description: string + }[] } /** * * @export */ -export const operationServerMap: ServerMap = { -} +export const operationServerMap: ServerMap = {} diff --git a/src/typescript/mit-open-api-axios/src/v0/common.ts b/src/typescript/mit-open-api-axios/src/v0/common.ts index 886678a..6297706 100644 --- a/src/typescript/mit-open-api-axios/src/v0/common.ts +++ b/src/typescript/mit-open-api-axios/src/v0/common.ts @@ -5,105 +5,139 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v0) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; +import type { Configuration } from "./configuration" +import type { RequestArgs } from "./base" +import type { AxiosInstance, AxiosResponse } from "axios" +import { RequiredError } from "./base" /** * * @export */ -export const DUMMY_BASE_URL = 'https://example.com' +export const DUMMY_BASE_URL = "https://example.com" /** * * @throws {RequiredError} * @export */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } +export const assertParamExists = function ( + functionName: string, + paramName: string, + paramValue: unknown, +) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError( + paramName, + `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, + ) + } } /** * * @export */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } +export const setApiKeyToObject = async function ( + object: any, + keyParamName: string, + configuration?: Configuration, +) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = + typeof configuration.apiKey === "function" + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey + object[keyParamName] = localVarApiKeyValue + } } /** * * @export */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; +export const setBasicAuthToObject = function ( + object: any, + configuration?: Configuration, +) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { + username: configuration.username, + password: configuration.password, } + } } /** * * @export */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } +export const setBearerAuthToObject = async function ( + object: any, + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const accessToken = + typeof configuration.accessToken === "function" + ? await configuration.accessToken() + : await configuration.accessToken + object["Authorization"] = "Bearer " + accessToken + } } /** * * @export */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } +export const setOAuthToObject = async function ( + object: any, + name: string, + scopes: string[], + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = + typeof configuration.accessToken === "function" + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken + object["Authorization"] = "Bearer " + localVarAccessTokenValue + } } -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } +function setFlattenedQueryParams( + urlSearchParams: URLSearchParams, + parameter: any, + key: string = "", +): void { + if (parameter == null) return + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + ;(parameter as any[]).forEach((item) => + setFlattenedQueryParams(urlSearchParams, item, key), + ) + } else { + Object.keys(parameter).forEach((currentKey) => + setFlattenedQueryParams( + urlSearchParams, + parameter[currentKey], + `${key}${key !== "" ? "." : ""}${currentKey}`, + ), + ) } + } else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter) + } else { + urlSearchParams.set(key, parameter) + } + } } /** @@ -111,23 +145,28 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an * @export */ export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); + const searchParams = new URLSearchParams(url.search) + setFlattenedQueryParams(searchParams, objects) + url.search = searchParams.toString() } /** * * @export */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); +export const serializeDataIfNeeded = function ( + value: any, + requestOptions: any, + configuration?: Configuration, +) { + const nonString = typeof value !== "string" + const needsSerialization = + nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) + : nonString + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : value || "" } /** @@ -135,16 +174,29 @@ export const serializeDataIfNeeded = function (value: any, requestOptions: any, * @export */ export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash + return url.pathname + url.search + url.hash } /** * * @export */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; +export const createRequestFunction = function ( + axiosArgs: RequestArgs, + globalAxios: AxiosInstance, + BASE_PATH: string, + configuration?: Configuration, +) { + return >( + axios: AxiosInstance = globalAxios, + basePath: string = BASE_PATH, + ) => { + const axiosRequestArgs = { + ...axiosArgs.options, + url: + (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + + axiosArgs.url, + } + return axios.request(axiosRequestArgs) + } } diff --git a/src/typescript/mit-open-api-axios/src/v0/configuration.ts b/src/typescript/mit-open-api-axios/src/v0/configuration.ts index 2a4d963..e175572 100644 --- a/src/typescript/mit-open-api-axios/src/v0/configuration.ts +++ b/src/typescript/mit-open-api-axios/src/v0/configuration.ts @@ -5,106 +5,128 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v0) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; + apiKey?: + | string + | Promise + | ((name: string) => string) + | ((name: string) => Promise) + username?: string + password?: string + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + basePath?: string + serverIndex?: number + baseOptions?: any + formDataCtor?: new () => any } export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * override server index - * - * @type {number} - * @memberof Configuration - */ - serverIndex?: number; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: + | string + | Promise + | ((name: string) => string) + | ((name: string) => Promise) + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey + this.username = param.username + this.password = param.password + this.accessToken = param.accessToken + this.basePath = param.basePath + this.serverIndex = param.serverIndex + this.baseOptions = param.baseOptions + this.formDataCtor = param.formDataCtor + } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp( + "^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$", + "i", + ) + return ( + mime !== null && + (jsonMime.test(mime) || + mime.toLowerCase() === "application/json-patch+json") + ) + } } diff --git a/src/typescript/mit-open-api-axios/src/v0/index.ts b/src/typescript/mit-open-api-axios/src/v0/index.ts index a2ad950..80a30a8 100644 --- a/src/typescript/mit-open-api-axios/src/v0/index.ts +++ b/src/typescript/mit-open-api-axios/src/v0/index.ts @@ -5,14 +5,12 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v0) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export * from "./api"; -export * from "./configuration"; - +export * from "./api" +export * from "./configuration" diff --git a/src/typescript/mit-open-api-axios/src/v1/.openapi-generator/VERSION b/src/typescript/mit-open-api-axios/src/v1/.openapi-generator/VERSION index 4b49d9b..0ee843c 100644 --- a/src/typescript/mit-open-api-axios/src/v1/.openapi-generator/VERSION +++ b/src/typescript/mit-open-api-axios/src/v1/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.2.0 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 0986c59..47f9628 100644 --- a/src/typescript/mit-open-api-axios/src/v1/api.ts +++ b/src/typescript/mit-open-api-axios/src/v1/api.ts @@ -5,23 +5,39 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v1) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; +import type { Configuration } from "./configuration" +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios" +import globalAxios from "axios" // Some imports not used depending on template conditions // @ts-ignore -import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; -import type { RequestArgs } from './base'; +import { + DUMMY_BASE_URL, + assertParamExists, + setApiKeyToObject, + setBasicAuthToObject, + setBearerAuthToObject, + setOAuthToObject, + setSearchParams, + serializeDataIfNeeded, + toPathString, + createRequestFunction, +} from "./common" +import type { RequestArgs } from "./base" // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; +import { + BASE_PATH, + COLLECTION_FORMATS, + BaseAPI, + RequiredError, + operationServerMap, +} from "./base" /** * * `resource_type` - resource_type * `certification` - certification * `certification_type` - certification_type * `offered_by` - offered_by * `platform` - platform * `topic` - topic * `department` - department * `level` - level * `course_feature` - course_feature * `professional` - professional * `free` - free * `delivery` - delivery * `resource_category` - resource_category @@ -30,62 +46,62 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerM */ export const AggregationsEnum = { - /** - * resource_type - */ - ResourceType: 'resource_type', - /** - * certification - */ - Certification: 'certification', - /** - * certification_type - */ - CertificationType: 'certification_type', - /** - * offered_by - */ - OfferedBy: 'offered_by', - /** - * platform - */ - Platform: 'platform', - /** - * topic - */ - Topic: 'topic', - /** - * department - */ - Department: 'department', - /** - * level - */ - Level: 'level', - /** - * course_feature - */ - CourseFeature: 'course_feature', - /** - * professional - */ - Professional: 'professional', - /** - * free - */ - Free: 'free', - /** - * delivery - */ - Delivery: 'delivery', - /** - * resource_category - */ - ResourceCategory: 'resource_category' -} as const; - -export type AggregationsEnum = typeof AggregationsEnum[keyof typeof AggregationsEnum]; - + /** + * resource_type + */ + ResourceType: "resource_type", + /** + * certification + */ + Certification: "certification", + /** + * certification_type + */ + CertificationType: "certification_type", + /** + * offered_by + */ + OfferedBy: "offered_by", + /** + * platform + */ + Platform: "platform", + /** + * topic + */ + Topic: "topic", + /** + * department + */ + Department: "department", + /** + * level + */ + Level: "level", + /** + * course_feature + */ + CourseFeature: "course_feature", + /** + * professional + */ + Professional: "professional", + /** + * free + */ + Free: "free", + /** + * delivery + */ + Delivery: "delivery", + /** + * resource_category + */ + ResourceCategory: "resource_category", +} as const + +export type AggregationsEnum = + (typeof AggregationsEnum)[keyof typeof AggregationsEnum] /** * Serializer for LearningResourceInstructor model @@ -93,24 +109,24 @@ export type AggregationsEnum = typeof AggregationsEnum[keyof typeof Aggregations * @interface Article */ export interface Article { - /** - * - * @type {string} - * @memberof Article - */ - 'html': string; - /** - * - * @type {number} - * @memberof Article - */ - 'id': number; - /** - * - * @type {string} - * @memberof Article - */ - 'title': string; + /** + * + * @type {string} + * @memberof Article + */ + html: string + /** + * + * @type {number} + * @memberof Article + */ + id: number + /** + * + * @type {string} + * @memberof Article + */ + title: string } /** * Serializer for LearningResourceInstructor model @@ -118,18 +134,18 @@ export interface Article { * @interface ArticleRequest */ export interface ArticleRequest { - /** - * - * @type {string} - * @memberof ArticleRequest - */ - 'html': string; - /** - * - * @type {string} - * @memberof ArticleRequest - */ - 'title': string; + /** + * + * @type {string} + * @memberof ArticleRequest + */ + html: string + /** + * + * @type {string} + * @memberof ArticleRequest + */ + title: string } /** * * `dated` - Dated * `anytime` - Anytime @@ -138,18 +154,18 @@ export interface ArticleRequest { */ export const AvailabilityEnum = { - /** - * Dated - */ - Dated: 'dated', - /** - * Anytime - */ - Anytime: 'anytime' -} as const; - -export type AvailabilityEnum = typeof AvailabilityEnum[keyof typeof AvailabilityEnum]; + /** + * Dated + */ + Dated: "dated", + /** + * Anytime + */ + Anytime: "anytime", +} as const +export type AvailabilityEnum = + (typeof AvailabilityEnum)[keyof typeof AvailabilityEnum] /** * * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate @@ -158,26 +174,26 @@ export type AvailabilityEnum = typeof AvailabilityEnum[keyof typeof Availability */ export const CertificationTypeEnum = { - /** - * Micromasters Credential - */ - Micromasters: 'micromasters', - /** - * Professional Certificate - */ - Professional: 'professional', - /** - * Certificate of Completion - */ - Completion: 'completion', - /** - * No Certificate - */ - None: 'none' -} as const; - -export type CertificationTypeEnum = typeof CertificationTypeEnum[keyof typeof CertificationTypeEnum]; - + /** + * Micromasters Credential + */ + Micromasters: "micromasters", + /** + * Professional Certificate + */ + Professional: "professional", + /** + * Certificate of Completion + */ + Completion: "completion", + /** + * No Certificate + */ + None: "none", +} as const + +export type CertificationTypeEnum = + (typeof CertificationTypeEnum)[keyof typeof CertificationTypeEnum] /** * Serializer class for course run ContentFiles @@ -185,245 +201,248 @@ export type CertificationTypeEnum = typeof CertificationTypeEnum[keyof typeof Ce * @interface ContentFile */ export interface ContentFile { - /** - * - * @type {number} - * @memberof ContentFile - */ - 'id': number; - /** - * - * @type {number} - * @memberof ContentFile - */ - 'run_id': number; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'run_title': string; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'run_slug': string; - /** - * - * @type {Array} - * @memberof ContentFile - */ - 'departments': Array; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'semester': string; - /** - * - * @type {number} - * @memberof ContentFile - */ - 'year': number; - /** - * - * @type {Array} - * @memberof ContentFile - */ - 'topics': Array; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'key'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'uid'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'title'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof ContentFile - */ - 'content_feature_type': Array; - /** - * - * @type {ContentTypeEnum} - * @memberof ContentFile - */ - 'content_type'?: ContentTypeEnum; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'content'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'content_title'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'content_author'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'content_language'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'image_src'?: string | null; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'resource_id': string; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'resource_readable_id': string; - /** - * Extract the course number(s) from the associated course - * @type {Array} - * @memberof ContentFile - */ - 'course_number': Array; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'file_type'?: string | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof ContentFile - */ - 'offered_by': LearningResourceOfferor; - /** - * - * @type {LearningResourcePlatform} - * @memberof ContentFile - */ - 'platform': LearningResourcePlatform; - /** - * - * @type {string} - * @memberof ContentFile - */ - 'run_readable_id': string; + /** + * + * @type {number} + * @memberof ContentFile + */ + id: number + /** + * + * @type {number} + * @memberof ContentFile + */ + run_id: number + /** + * + * @type {string} + * @memberof ContentFile + */ + run_title: string + /** + * + * @type {string} + * @memberof ContentFile + */ + run_slug: string + /** + * + * @type {Array} + * @memberof ContentFile + */ + departments: Array + /** + * + * @type {string} + * @memberof ContentFile + */ + semester: string + /** + * + * @type {number} + * @memberof ContentFile + */ + year: number + /** + * + * @type {Array} + * @memberof ContentFile + */ + topics: Array + /** + * + * @type {string} + * @memberof ContentFile + */ + key?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + uid?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + title?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + description?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + url?: string | null + /** + * + * @type {Array} + * @memberof ContentFile + */ + content_feature_type: Array + /** + * + * @type {ContentTypeEnum} + * @memberof ContentFile + */ + content_type?: ContentTypeEnum + /** + * + * @type {string} + * @memberof ContentFile + */ + content?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + content_title?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + content_author?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + content_language?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + image_src?: string | null + /** + * + * @type {string} + * @memberof ContentFile + */ + resource_id: string + /** + * + * @type {string} + * @memberof ContentFile + */ + resource_readable_id: string + /** + * Extract the course number(s) from the associated course + * @type {Array} + * @memberof ContentFile + */ + course_number: Array + /** + * + * @type {string} + * @memberof ContentFile + */ + file_type?: string | null + /** + * + * @type {LearningResourceOfferor} + * @memberof ContentFile + */ + offered_by: LearningResourceOfferor + /** + * + * @type {LearningResourcePlatform} + * @memberof ContentFile + */ + platform: LearningResourcePlatform + /** + * + * @type {string} + * @memberof ContentFile + */ + run_readable_id: string } - /** * SearchResponseSerializer with OpenAPI annotations for Content Files search * @export * @interface ContentFileSearchResponse */ export interface ContentFileSearchResponse { - /** - * - * @type {number} - * @memberof ContentFileSearchResponse - */ - 'count': number; - /** - * - * @type {string} - * @memberof ContentFileSearchResponse - */ - 'next': string | null; - /** - * - * @type {string} - * @memberof ContentFileSearchResponse - */ - 'previous': string | null; - /** - * - * @type {Array} - * @memberof ContentFileSearchResponse - */ - 'results': Array; - /** - * - * @type {ContentFileSearchResponseMetadata} - * @memberof ContentFileSearchResponse - */ - 'metadata': ContentFileSearchResponseMetadata; + /** + * + * @type {number} + * @memberof ContentFileSearchResponse + */ + count: number + /** + * + * @type {string} + * @memberof ContentFileSearchResponse + */ + next: string | null + /** + * + * @type {string} + * @memberof ContentFileSearchResponse + */ + previous: string | null + /** + * + * @type {Array} + * @memberof ContentFileSearchResponse + */ + results: Array + /** + * + * @type {ContentFileSearchResponseMetadata} + * @memberof ContentFileSearchResponse + */ + metadata: ContentFileSearchResponseMetadata } /** - * + * * @export * @interface ContentFileSearchResponseMetadata */ export interface ContentFileSearchResponseMetadata { - /** - * - * @type {{ [key: string]: Array; }} - * @memberof ContentFileSearchResponseMetadata - */ - 'aggregations': { [key: string]: Array; }; - /** - * - * @type {Array} - * @memberof ContentFileSearchResponseMetadata - */ - 'suggestions': Array; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof ContentFileSearchResponseMetadata + */ + aggregations: { + [ + key: string + ]: Array + } + /** + * + * @type {Array} + * @memberof ContentFileSearchResponseMetadata + */ + suggestions: Array } /** - * + * * @export * @interface ContentFileSearchResponseMetadataAggregationsValueInner */ export interface ContentFileSearchResponseMetadataAggregationsValueInner { - /** - * - * @type {string} - * @memberof ContentFileSearchResponseMetadataAggregationsValueInner - */ - 'key': string; - /** - * - * @type {number} - * @memberof ContentFileSearchResponseMetadataAggregationsValueInner - */ - 'doc_count': number; + /** + * + * @type {string} + * @memberof ContentFileSearchResponseMetadataAggregationsValueInner + */ + key: string + /** + * + * @type {number} + * @memberof ContentFileSearchResponseMetadataAggregationsValueInner + */ + doc_count: number } /** * * `page` - page * `file` - file * `vertical` - vertical @@ -432,22 +451,22 @@ export interface ContentFileSearchResponseMetadataAggregationsValueInner { */ export const ContentTypeEnum = { - /** - * page - */ - Page: 'page', - /** - * file - */ - File: 'file', - /** - * vertical - */ - Vertical: 'vertical' -} as const; - -export type ContentTypeEnum = typeof ContentTypeEnum[keyof typeof ContentTypeEnum]; - + /** + * page + */ + Page: "page", + /** + * file + */ + File: "file", + /** + * vertical + */ + Vertical: "vertical", +} as const + +export type ContentTypeEnum = + (typeof ContentTypeEnum)[keyof typeof ContentTypeEnum] /** * Serializer for the Course model @@ -455,12 +474,12 @@ export type ContentTypeEnum = typeof ContentTypeEnum[keyof typeof ContentTypeEnu * @interface Course */ export interface Course { - /** - * - * @type {Array} - * @memberof Course - */ - 'course_numbers': Array | null; + /** + * + * @type {Array} + * @memberof Course + */ + course_numbers: Array | null } /** * Serializer for CourseNumber @@ -468,24 +487,24 @@ export interface Course { * @interface CourseNumber */ export interface CourseNumber { - /** - * - * @type {string} - * @memberof CourseNumber - */ - 'value': string; - /** - * - * @type {LearningResourceDepartment} - * @memberof CourseNumber - */ - 'department': LearningResourceDepartment; - /** - * - * @type {string} - * @memberof CourseNumber - */ - 'listing_type': string; + /** + * + * @type {string} + * @memberof CourseNumber + */ + value: string + /** + * + * @type {LearningResourceDepartment} + * @memberof CourseNumber + */ + department: LearningResourceDepartment + /** + * + * @type {string} + * @memberof CourseNumber + */ + listing_type: string } /** * Serializer for CourseNumber @@ -493,24 +512,24 @@ export interface CourseNumber { * @interface CourseNumberRequest */ export interface CourseNumberRequest { - /** - * - * @type {string} - * @memberof CourseNumberRequest - */ - 'value': string; - /** - * - * @type {LearningResourceDepartmentRequest} - * @memberof CourseNumberRequest - */ - 'department': LearningResourceDepartmentRequest; - /** - * - * @type {string} - * @memberof CourseNumberRequest - */ - 'listing_type': string; + /** + * + * @type {string} + * @memberof CourseNumberRequest + */ + value: string + /** + * + * @type {LearningResourceDepartmentRequest} + * @memberof CourseNumberRequest + */ + department: LearningResourceDepartmentRequest + /** + * + * @type {string} + * @memberof CourseNumberRequest + */ + listing_type: string } /** * Serializer for the Course model @@ -518,12 +537,12 @@ export interface CourseNumberRequest { * @interface CourseRequest */ export interface CourseRequest { - /** - * - * @type {Array} - * @memberof CourseRequest - */ - 'course_numbers': Array | null; + /** + * + * @type {Array} + * @memberof CourseRequest + */ + course_numbers: Array | null } /** * Serializer for course resources @@ -531,354 +550,357 @@ export interface CourseRequest { * @interface CourseResource */ export interface CourseResource { - /** - * - * @type {number} - * @memberof CourseResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'topics'?: Array; - /** - * - * @type {number} - * @memberof CourseResource - */ - 'position': number | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof CourseResource - */ - 'offered_by': LearningResourceOfferor | null; - /** - * - * @type {LearningResourcePlatform} - * @memberof CourseResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof CourseResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof CourseResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof CourseResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof CourseResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof CourseResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof CourseResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'pace': Array; - /** - * - * @type {CourseResourceResourceTypeEnum} - * @memberof CourseResource - */ - 'resource_type': CourseResourceResourceTypeEnum; - /** - * - * @type {Course} - * @memberof CourseResource - */ - 'course': Course; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof CourseResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof CourseResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof CourseResource - */ - 'professional': boolean; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof CourseResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof CourseResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof CourseResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof CourseResource - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof CourseResource + */ + id: number + /** + * + * @type {Array} + * @memberof CourseResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof CourseResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof CourseResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof CourseResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof CourseResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof CourseResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof CourseResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof CourseResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof CourseResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof CourseResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof CourseResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof CourseResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof CourseResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof CourseResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof CourseResource + */ + views: number + /** + * + * @type {Array} + * @memberof CourseResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof CourseResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof CourseResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof CourseResource + */ + format: Array + /** + * + * @type {Array} + * @memberof CourseResource + */ + pace: Array + /** + * + * @type {CourseResourceResourceTypeEnum} + * @memberof CourseResource + */ + resource_type: CourseResourceResourceTypeEnum + /** + * + * @type {Course} + * @memberof CourseResource + */ + course: Course + /** + * + * @type {string} + * @memberof CourseResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof CourseResource + */ + title: string + /** + * + * @type {string} + * @memberof CourseResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof CourseResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof CourseResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof CourseResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof CourseResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof CourseResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof CourseResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof CourseResource + */ + professional: boolean + /** + * + * @type {string} + * @memberof CourseResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof CourseResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof CourseResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof CourseResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof CourseResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof CourseResource + */ + location?: string } - /** - * + * * @export * @interface CourseResourceCertificationType */ export interface CourseResourceCertificationType { - /** - * - * @type {string} - * @memberof CourseResourceCertificationType - */ - 'code': CourseResourceCertificationTypeCodeEnum; - /** - * - * @type {string} - * @memberof CourseResourceCertificationType - */ - 'name': string; + /** + * + * @type {string} + * @memberof CourseResourceCertificationType + */ + code: CourseResourceCertificationTypeCodeEnum + /** + * + * @type {string} + * @memberof CourseResourceCertificationType + */ + name: string } export const CourseResourceCertificationTypeCodeEnum = { - Micromasters: 'micromasters', - Professional: 'professional', - Completion: 'completion', - None: 'none' -} as const; + Micromasters: "micromasters", + Professional: "professional", + Completion: "completion", + None: "none", +} as const -export type CourseResourceCertificationTypeCodeEnum = typeof CourseResourceCertificationTypeCodeEnum[keyof typeof 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; + /** + * + * @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; + Online: "online", + Hybrid: "hybrid", + InPerson: "in_person", + Offline: "offline", +} as const -export type CourseResourceDeliveryInnerCodeEnum = typeof CourseResourceDeliveryInnerCodeEnum[keyof typeof CourseResourceDeliveryInnerCodeEnum]; +export type CourseResourceDeliveryInnerCodeEnum = + (typeof CourseResourceDeliveryInnerCodeEnum)[keyof typeof CourseResourceDeliveryInnerCodeEnum] /** - * + * * @export * @interface CourseResourceFormatInner */ export interface CourseResourceFormatInner { - /** - * - * @type {string} - * @memberof CourseResourceFormatInner - */ - 'code': CourseResourceFormatInnerCodeEnum; - /** - * - * @type {string} - * @memberof CourseResourceFormatInner - */ - 'name': string; + /** + * + * @type {string} + * @memberof CourseResourceFormatInner + */ + code: CourseResourceFormatInnerCodeEnum + /** + * + * @type {string} + * @memberof CourseResourceFormatInner + */ + name: string } export const CourseResourceFormatInnerCodeEnum = { - Synchronous: 'synchronous', - Asynchronous: 'asynchronous' -} as const; + Synchronous: "synchronous", + Asynchronous: "asynchronous", +} as const -export type CourseResourceFormatInnerCodeEnum = typeof CourseResourceFormatInnerCodeEnum[keyof typeof CourseResourceFormatInnerCodeEnum]; +export type CourseResourceFormatInnerCodeEnum = + (typeof CourseResourceFormatInnerCodeEnum)[keyof typeof CourseResourceFormatInnerCodeEnum] /** - * + * * @export * @interface CourseResourcePaceInner */ export interface CourseResourcePaceInner { - /** - * - * @type {string} - * @memberof CourseResourcePaceInner - */ - 'code': CourseResourcePaceInnerCodeEnum; - /** - * - * @type {string} - * @memberof CourseResourcePaceInner - */ - 'name': string; + /** + * + * @type {string} + * @memberof CourseResourcePaceInner + */ + code: CourseResourcePaceInnerCodeEnum + /** + * + * @type {string} + * @memberof CourseResourcePaceInner + */ + name: string } export const CourseResourcePaceInnerCodeEnum = { - SelfPaced: 'self_paced', - InstructorPaced: 'instructor_paced' -} as const; + SelfPaced: "self_paced", + InstructorPaced: "instructor_paced", +} as const -export type CourseResourcePaceInnerCodeEnum = typeof CourseResourcePaceInnerCodeEnum[keyof typeof CourseResourcePaceInnerCodeEnum]; +export type CourseResourcePaceInnerCodeEnum = + (typeof CourseResourcePaceInnerCodeEnum)[keyof typeof CourseResourcePaceInnerCodeEnum] /** * Serializer for course resources @@ -886,117 +908,116 @@ export type CourseResourcePaceInnerCodeEnum = typeof CourseResourcePaceInnerCode * @interface CourseResourceRequest */ export interface CourseResourceRequest { - /** - * - * @type {Array} - * @memberof CourseResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof CourseResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof CourseResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof CourseResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof CourseResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof CourseResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof CourseResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof CourseResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof CourseResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + readable_id: string + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof CourseResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof CourseResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof CourseResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof CourseResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof CourseResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof CourseResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof CourseResourceRequest + */ + location?: string } - /** - * + * * @export * @enum {string} */ export const CourseResourceResourceTypeEnum = { - Course: 'course' -} as const; - -export type CourseResourceResourceTypeEnum = typeof CourseResourceResourceTypeEnum[keyof typeof CourseResourceResourceTypeEnum]; + Course: "course", +} as const +export type CourseResourceResourceTypeEnum = + (typeof CourseResourceResourceTypeEnum)[keyof typeof CourseResourceResourceTypeEnum] /** * * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline @@ -1005,26 +1026,25 @@ export type CourseResourceResourceTypeEnum = typeof CourseResourceResourceTypeEn */ 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]; - + /** + * 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 @@ -1033,158 +1053,158 @@ export type DeliveryEnum = typeof DeliveryEnum[keyof typeof DeliveryEnum]; */ export const DepartmentEnum = { - /** - * Civil and Environmental Engineering - */ - _1: '1', - /** - * Mechanical Engineering - */ - _2: '2', - /** - * Materials Science and Engineering - */ - _3: '3', - /** - * Architecture - */ - _4: '4', - /** - * Chemistry - */ - _5: '5', - /** - * Electrical Engineering and Computer Science - */ - _6: '6', - /** - * Biology - */ - _7: '7', - /** - * Physics - */ - _8: '8', - /** - * Brain and Cognitive Sciences - */ - _9: '9', - /** - * Chemical Engineering - */ - _10: '10', - /** - * Urban Studies and Planning - */ - _11: '11', - /** - * Earth, Atmospheric, and Planetary Sciences - */ - _12: '12', - /** - * Economics - */ - _14: '14', - /** - * Management - */ - _15: '15', - /** - * Aeronautics and Astronautics - */ - _16: '16', - /** - * Political Science - */ - _17: '17', - /** - * Mathematics - */ - _18: '18', - /** - * Biological Engineering - */ - _20: '20', - /** - * Anthropology - */ - _21A: '21A', - /** - * Global Languages - */ - _21G: '21G', - /** - * History - */ - _21H: '21H', - /** - * Literature - */ - _21L: '21L', - /** - * Music and Theater Arts - */ - _21M: '21M', - /** - * Nuclear Science and Engineering - */ - _22: '22', - /** - * Linguistics and Philosophy - */ - _24: '24', - /** - * Concourse - */ - Cc: 'CC', - /** - * Comparative Media Studies/Writing - */ - CmsW: 'CMS-W', - /** - * Edgerton Center - */ - Ec: 'EC', - /** - * Experimental Study Group - */ - Es: 'ES', - /** - * Engineering Systems Division - */ - Esd: 'ESD', - /** - * Medical Engineering and Science - */ - Hst: 'HST', - /** - * Data, Systems, and Society - */ - Ids: 'IDS', - /** - * Media Arts and Sciences - */ - Mas: 'MAS', - /** - * Athletics, Physical Education and Recreation - */ - Pe: 'PE', - /** - * Special Programs - */ - Sp: 'SP', - /** - * Science, Technology, and Society - */ - Sts: 'STS', - /** - * Women's and Gender Studies - */ - Wgs: 'WGS' -} as const; - -export type DepartmentEnum = typeof DepartmentEnum[keyof typeof DepartmentEnum]; - + /** + * Civil and Environmental Engineering + */ + _1: "1", + /** + * Mechanical Engineering + */ + _2: "2", + /** + * Materials Science and Engineering + */ + _3: "3", + /** + * Architecture + */ + _4: "4", + /** + * Chemistry + */ + _5: "5", + /** + * Electrical Engineering and Computer Science + */ + _6: "6", + /** + * Biology + */ + _7: "7", + /** + * Physics + */ + _8: "8", + /** + * Brain and Cognitive Sciences + */ + _9: "9", + /** + * Chemical Engineering + */ + _10: "10", + /** + * Urban Studies and Planning + */ + _11: "11", + /** + * Earth, Atmospheric, and Planetary Sciences + */ + _12: "12", + /** + * Economics + */ + _14: "14", + /** + * Management + */ + _15: "15", + /** + * Aeronautics and Astronautics + */ + _16: "16", + /** + * Political Science + */ + _17: "17", + /** + * Mathematics + */ + _18: "18", + /** + * Biological Engineering + */ + _20: "20", + /** + * Anthropology + */ + _21A: "21A", + /** + * Global Languages + */ + _21G: "21G", + /** + * History + */ + _21H: "21H", + /** + * Literature + */ + _21L: "21L", + /** + * Music and Theater Arts + */ + _21M: "21M", + /** + * Nuclear Science and Engineering + */ + _22: "22", + /** + * Linguistics and Philosophy + */ + _24: "24", + /** + * Concourse + */ + Cc: "CC", + /** + * Comparative Media Studies/Writing + */ + CmsW: "CMS-W", + /** + * Edgerton Center + */ + Ec: "EC", + /** + * Experimental Study Group + */ + Es: "ES", + /** + * Engineering Systems Division + */ + Esd: "ESD", + /** + * Medical Engineering and Science + */ + Hst: "HST", + /** + * Data, Systems, and Society + */ + Ids: "IDS", + /** + * Media Arts and Sciences + */ + Mas: "MAS", + /** + * Athletics, Physical Education and Recreation + */ + Pe: "PE", + /** + * Special Programs + */ + Sp: "SP", + /** + * Science, Technology, and Society + */ + Sts: "STS", + /** + * Women's and Gender Studies + */ + Wgs: "WGS", +} as const + +export type DepartmentEnum = + (typeof DepartmentEnum)[keyof typeof DepartmentEnum] /** * Serializer for the LearningPath model @@ -1192,18 +1212,18 @@ export type DepartmentEnum = typeof DepartmentEnum[keyof typeof DepartmentEnum]; * @interface LearningPath */ export interface LearningPath { - /** - * - * @type {number} - * @memberof LearningPath - */ - 'id': number; - /** - * Return the number of items in the list - * @type {number} - * @memberof LearningPath - */ - 'item_count': number; + /** + * + * @type {number} + * @memberof LearningPath + */ + id: number + /** + * Return the number of items in the list + * @type {number} + * @memberof LearningPath + */ + item_count: number } /** * Specialized serializer for a LearningPath relationship @@ -1211,36 +1231,36 @@ export interface LearningPath { * @interface LearningPathRelationship */ export interface LearningPathRelationship { - /** - * - * @type {number} - * @memberof LearningPathRelationship - */ - 'id': number; - /** - * - * @type {LearningResource} - * @memberof LearningPathRelationship - */ - 'resource': LearningResource; - /** - * - * @type {number} - * @memberof LearningPathRelationship - */ - 'position'?: number; - /** - * - * @type {number} - * @memberof LearningPathRelationship - */ - 'parent': number; - /** - * - * @type {number} - * @memberof LearningPathRelationship - */ - 'child': number; + /** + * + * @type {number} + * @memberof LearningPathRelationship + */ + id: number + /** + * + * @type {LearningResource} + * @memberof LearningPathRelationship + */ + resource: LearningResource + /** + * + * @type {number} + * @memberof LearningPathRelationship + */ + position?: number + /** + * + * @type {number} + * @memberof LearningPathRelationship + */ + parent: number + /** + * + * @type {number} + * @memberof LearningPathRelationship + */ + child: number } /** * Specialized serializer for a LearningPath relationship @@ -1248,24 +1268,24 @@ export interface LearningPathRelationship { * @interface LearningPathRelationshipRequest */ export interface LearningPathRelationshipRequest { - /** - * - * @type {number} - * @memberof LearningPathRelationshipRequest - */ - 'position'?: number; - /** - * - * @type {number} - * @memberof LearningPathRelationshipRequest - */ - 'parent': number; - /** - * - * @type {number} - * @memberof LearningPathRelationshipRequest - */ - 'child': number; + /** + * + * @type {number} + * @memberof LearningPathRelationshipRequest + */ + position?: number + /** + * + * @type {number} + * @memberof LearningPathRelationshipRequest + */ + parent: number + /** + * + * @type {number} + * @memberof LearningPathRelationshipRequest + */ + child: number } /** * CRUD serializer for LearningPath resources @@ -1273,366 +1293,371 @@ export interface LearningPathRelationshipRequest { * @interface LearningPathResource */ export interface LearningPathResource { - /** - * - * @type {number} - * @memberof LearningPathResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'topics'?: Array; - /** - * - * @type {number} - * @memberof LearningPathResource - */ - 'position': number | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof LearningPathResource - */ - 'offered_by': LearningResourceOfferor | null; - /** - * - * @type {LearningResourcePlatform} - * @memberof LearningPathResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof LearningPathResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof LearningPathResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof LearningPathResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof LearningPathResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof LearningPathResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof LearningPathResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'pace': Array; - /** - * - * @type {LearningPathResourceResourceTypeEnum} - * @memberof LearningPathResource - */ - 'resource_type': LearningPathResourceResourceTypeEnum; - /** - * - * @type {LearningPath} - * @memberof LearningPathResource - */ - 'learning_path': LearningPath; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof LearningPathResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof LearningPathResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof LearningPathResource - */ - 'professional'?: boolean; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof LearningPathResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof LearningPathResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof LearningPathResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof LearningPathResource - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof LearningPathResource + */ + id: number + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof LearningPathResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof LearningPathResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof LearningPathResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof LearningPathResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof LearningPathResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof LearningPathResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof LearningPathResource + */ + views: number + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof LearningPathResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof LearningPathResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + format: Array + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + pace: Array + /** + * + * @type {LearningPathResourceResourceTypeEnum} + * @memberof LearningPathResource + */ + resource_type: LearningPathResourceResourceTypeEnum + /** + * + * @type {LearningPath} + * @memberof LearningPathResource + */ + learning_path: LearningPath + /** + * + * @type {string} + * @memberof LearningPathResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof LearningPathResource + */ + title: string + /** + * + * @type {string} + * @memberof LearningPathResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof LearningPathResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof LearningPathResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof LearningPathResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof LearningPathResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof LearningPathResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof LearningPathResource + */ + professional?: boolean + /** + * + * @type {string} + * @memberof LearningPathResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof LearningPathResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof LearningPathResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof LearningPathResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof LearningPathResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof LearningPathResource + */ + location?: string } - /** * CRUD serializer for LearningPath resources * @export * @interface LearningPathResourceRequest */ export interface LearningPathResourceRequest { - /** - * - * @type {Array} - * @memberof LearningPathResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof LearningPathResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof LearningPathResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof LearningPathResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof LearningPathResourceRequest - */ - 'professional'?: boolean; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof LearningPathResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof LearningPathResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof LearningPathResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof LearningPathResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof LearningPathResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof LearningPathResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof LearningPathResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof LearningPathResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof LearningPathResourceRequest + */ + professional?: boolean + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof LearningPathResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof LearningPathResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof LearningPathResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof LearningPathResourceRequest + */ + location?: string } - /** - * + * * @export * @enum {string} */ export const LearningPathResourceResourceTypeEnum = { - LearningPath: 'learning_path' -} as const; - -export type LearningPathResourceResourceTypeEnum = typeof LearningPathResourceResourceTypeEnum[keyof typeof LearningPathResourceResourceTypeEnum]; + LearningPath: "learning_path", +} as const +export type LearningPathResourceResourceTypeEnum = + (typeof LearningPathResourceResourceTypeEnum)[keyof typeof LearningPathResourceResourceTypeEnum] /** * @type LearningResource * @export */ -export type LearningResource = { resource_type: 'course' } & CourseResource | { resource_type: 'learning_path' } & LearningPathResource | { resource_type: 'podcast' } & PodcastResource | { resource_type: 'podcast_episode' } & PodcastEpisodeResource | { resource_type: 'program' } & ProgramResource | { resource_type: 'video' } & VideoResource | { resource_type: 'video_playlist' } & VideoPlaylistResource; +export type LearningResource = + | ({ resource_type: "course" } & CourseResource) + | ({ resource_type: "learning_path" } & LearningPathResource) + | ({ resource_type: "podcast" } & PodcastResource) + | ({ resource_type: "podcast_episode" } & PodcastEpisodeResource) + | ({ resource_type: "program" } & ProgramResource) + | ({ resource_type: "video" } & VideoResource) + | ({ resource_type: "video_playlist" } & VideoPlaylistResource) /** * Serializer for LearningResourceDepartment, minus school The absence of the departments list is to avoid a circular serialization structure. @@ -1640,24 +1665,24 @@ export type LearningResource = { resource_type: 'course' } & CourseResource | { * @interface LearningResourceBaseDepartment */ export interface LearningResourceBaseDepartment { - /** - * - * @type {string} - * @memberof LearningResourceBaseDepartment - */ - 'department_id': string; - /** - * - * @type {string} - * @memberof LearningResourceBaseDepartment - */ - 'name': string; - /** - * - * @type {string} - * @memberof LearningResourceBaseDepartment - */ - 'channel_url': string | null; + /** + * + * @type {string} + * @memberof LearningResourceBaseDepartment + */ + department_id: string + /** + * + * @type {string} + * @memberof LearningResourceBaseDepartment + */ + name: string + /** + * + * @type {string} + * @memberof LearningResourceBaseDepartment + */ + channel_url: string | null } /** * Base serializer for LearningResourceSchool model, minus departments list The absence of the departments list is to avoid a circular serialization structure. @@ -1665,24 +1690,24 @@ export interface LearningResourceBaseDepartment { * @interface LearningResourceBaseSchool */ export interface LearningResourceBaseSchool { - /** - * - * @type {number} - * @memberof LearningResourceBaseSchool - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceBaseSchool - */ - 'name': string; - /** - * - * @type {string} - * @memberof LearningResourceBaseSchool - */ - 'url': string; + /** + * + * @type {number} + * @memberof LearningResourceBaseSchool + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceBaseSchool + */ + name: string + /** + * + * @type {string} + * @memberof LearningResourceBaseSchool + */ + url: string } /** * Base serializer for LearningResourceSchool model, minus departments list The absence of the departments list is to avoid a circular serialization structure. @@ -1690,18 +1715,18 @@ export interface LearningResourceBaseSchool { * @interface LearningResourceBaseSchoolRequest */ export interface LearningResourceBaseSchoolRequest { - /** - * - * @type {string} - * @memberof LearningResourceBaseSchoolRequest - */ - 'name': string; - /** - * - * @type {string} - * @memberof LearningResourceBaseSchoolRequest - */ - 'url': string; + /** + * + * @type {string} + * @memberof LearningResourceBaseSchoolRequest + */ + name: string + /** + * + * @type {string} + * @memberof LearningResourceBaseSchoolRequest + */ + url: string } /** * Serializer for LearningResourceContentTag @@ -1709,18 +1734,18 @@ export interface LearningResourceBaseSchoolRequest { * @interface LearningResourceContentTag */ export interface LearningResourceContentTag { - /** - * - * @type {number} - * @memberof LearningResourceContentTag - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceContentTag - */ - 'name': string; + /** + * + * @type {number} + * @memberof LearningResourceContentTag + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceContentTag + */ + name: string } /** * Full serializer for LearningResourceDepartment, including school @@ -1728,30 +1753,30 @@ export interface LearningResourceContentTag { * @interface LearningResourceDepartment */ export interface LearningResourceDepartment { - /** - * - * @type {string} - * @memberof LearningResourceDepartment - */ - 'department_id': string; - /** - * - * @type {string} - * @memberof LearningResourceDepartment - */ - 'name': string; - /** - * - * @type {string} - * @memberof LearningResourceDepartment - */ - 'channel_url': string | null; - /** - * - * @type {LearningResourceBaseSchool} - * @memberof LearningResourceDepartment - */ - 'school': LearningResourceBaseSchool | null; + /** + * + * @type {string} + * @memberof LearningResourceDepartment + */ + department_id: string + /** + * + * @type {string} + * @memberof LearningResourceDepartment + */ + name: string + /** + * + * @type {string} + * @memberof LearningResourceDepartment + */ + channel_url: string | null + /** + * + * @type {LearningResourceBaseSchool} + * @memberof LearningResourceDepartment + */ + school: LearningResourceBaseSchool | null } /** * Full serializer for LearningResourceDepartment, including school @@ -1759,18 +1784,18 @@ export interface LearningResourceDepartment { * @interface LearningResourceDepartmentRequest */ export interface LearningResourceDepartmentRequest { - /** - * - * @type {string} - * @memberof LearningResourceDepartmentRequest - */ - 'department_id': string; - /** - * - * @type {string} - * @memberof LearningResourceDepartmentRequest - */ - 'name': string; + /** + * + * @type {string} + * @memberof LearningResourceDepartmentRequest + */ + department_id: string + /** + * + * @type {string} + * @memberof LearningResourceDepartmentRequest + */ + name: string } /** * Serializer for LearningResourceImage @@ -1778,30 +1803,30 @@ export interface LearningResourceDepartmentRequest { * @interface LearningResourceImage */ export interface LearningResourceImage { - /** - * - * @type {number} - * @memberof LearningResourceImage - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceImage - */ - 'url': string; - /** - * - * @type {string} - * @memberof LearningResourceImage - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceImage - */ - 'alt'?: string | null; + /** + * + * @type {number} + * @memberof LearningResourceImage + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceImage + */ + url: string + /** + * + * @type {string} + * @memberof LearningResourceImage + */ + description?: string | null + /** + * + * @type {string} + * @memberof LearningResourceImage + */ + alt?: string | null } /** * Serializer for LearningResourceImage @@ -1809,24 +1834,24 @@ export interface LearningResourceImage { * @interface LearningResourceImageRequest */ export interface LearningResourceImageRequest { - /** - * - * @type {string} - * @memberof LearningResourceImageRequest - */ - 'url': string; - /** - * - * @type {string} - * @memberof LearningResourceImageRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceImageRequest - */ - 'alt'?: string | null; + /** + * + * @type {string} + * @memberof LearningResourceImageRequest + */ + url: string + /** + * + * @type {string} + * @memberof LearningResourceImageRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof LearningResourceImageRequest + */ + alt?: string | null } /** * Serializer for LearningResourceInstructor model @@ -1834,30 +1859,30 @@ export interface LearningResourceImageRequest { * @interface LearningResourceInstructor */ export interface LearningResourceInstructor { - /** - * - * @type {number} - * @memberof LearningResourceInstructor - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceInstructor - */ - 'first_name'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceInstructor - */ - 'last_name'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceInstructor - */ - 'full_name'?: string | null; + /** + * + * @type {number} + * @memberof LearningResourceInstructor + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceInstructor + */ + first_name?: string | null + /** + * + * @type {string} + * @memberof LearningResourceInstructor + */ + last_name?: string | null + /** + * + * @type {string} + * @memberof LearningResourceInstructor + */ + full_name?: string | null } /** * Serializer for LearningResourceInstructor model @@ -1865,24 +1890,24 @@ export interface LearningResourceInstructor { * @interface LearningResourceInstructorRequest */ export interface LearningResourceInstructorRequest { - /** - * - * @type {string} - * @memberof LearningResourceInstructorRequest - */ - 'first_name'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceInstructorRequest - */ - 'last_name'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceInstructorRequest - */ - 'full_name'?: string | null; + /** + * + * @type {string} + * @memberof LearningResourceInstructorRequest + */ + first_name?: string | null + /** + * + * @type {string} + * @memberof LearningResourceInstructorRequest + */ + last_name?: string | null + /** + * + * @type {string} + * @memberof LearningResourceInstructorRequest + */ + full_name?: string | null } /** * Serializer for LearningResourceOfferor with basic details @@ -1890,24 +1915,24 @@ export interface LearningResourceInstructorRequest { * @interface LearningResourceOfferor */ export interface LearningResourceOfferor { - /** - * - * @type {string} - * @memberof LearningResourceOfferor - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourceOfferor - */ - 'name': string; - /** - * - * @type {string} - * @memberof LearningResourceOfferor - */ - 'channel_url': string | null; + /** + * + * @type {string} + * @memberof LearningResourceOfferor + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourceOfferor + */ + name: string + /** + * + * @type {string} + * @memberof LearningResourceOfferor + */ + channel_url: string | null } /** * Serializer for LearningResourceOfferor with all details @@ -1915,78 +1940,78 @@ export interface LearningResourceOfferor { * @interface LearningResourceOfferorDetail */ export interface LearningResourceOfferorDetail { - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'channel_url': string | null; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'name': string; - /** - * - * @type {boolean} - * @memberof LearningResourceOfferorDetail - */ - 'professional'?: boolean; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'offerings'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'audience'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'formats'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'fee'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'certifications'?: Array; - /** - * - * @type {Array} - * @memberof LearningResourceOfferorDetail - */ - 'content_types'?: Array; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'more_information'?: string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorDetail - */ - 'value_prop'?: string; + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + channel_url: string | null + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + name: string + /** + * + * @type {boolean} + * @memberof LearningResourceOfferorDetail + */ + professional?: boolean + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + offerings?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + audience?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + formats?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + fee?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + certifications?: Array + /** + * + * @type {Array} + * @memberof LearningResourceOfferorDetail + */ + content_types?: Array + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + more_information?: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorDetail + */ + value_prop?: string } /** * Serializer for LearningResourceOfferor with basic details @@ -1994,18 +2019,18 @@ export interface LearningResourceOfferorDetail { * @interface LearningResourceOfferorRequest */ export interface LearningResourceOfferorRequest { - /** - * - * @type {string} - * @memberof LearningResourceOfferorRequest - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourceOfferorRequest - */ - 'name': string; + /** + * + * @type {string} + * @memberof LearningResourceOfferorRequest + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourceOfferorRequest + */ + name: string } /** * Serializer for LearningResourcePlatform @@ -2013,18 +2038,18 @@ export interface LearningResourceOfferorRequest { * @interface LearningResourcePlatform */ export interface LearningResourcePlatform { - /** - * - * @type {string} - * @memberof LearningResourcePlatform - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourcePlatform - */ - 'name'?: string; + /** + * + * @type {string} + * @memberof LearningResourcePlatform + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourcePlatform + */ + name?: string } /** * Serializer for LearningResourcePlatform @@ -2032,18 +2057,18 @@ export interface LearningResourcePlatform { * @interface LearningResourcePlatformRequest */ export interface LearningResourcePlatformRequest { - /** - * - * @type {string} - * @memberof LearningResourcePlatformRequest - */ - 'code': string; - /** - * - * @type {string} - * @memberof LearningResourcePlatformRequest - */ - 'name'?: string; + /** + * + * @type {string} + * @memberof LearningResourcePlatformRequest + */ + code: string + /** + * + * @type {string} + * @memberof LearningResourcePlatformRequest + */ + name?: string } /** * Serializer for LearningResourcePrice model @@ -2051,18 +2076,18 @@ export interface LearningResourcePlatformRequest { * @interface LearningResourcePrice */ export interface LearningResourcePrice { - /** - * - * @type {string} - * @memberof LearningResourcePrice - */ - 'amount': string; - /** - * - * @type {string} - * @memberof LearningResourcePrice - */ - 'currency': string; + /** + * + * @type {string} + * @memberof LearningResourcePrice + */ + amount: string + /** + * + * @type {string} + * @memberof LearningResourcePrice + */ + currency: string } /** * Serializer for LearningResourcePrice model @@ -2070,18 +2095,18 @@ export interface LearningResourcePrice { * @interface LearningResourcePriceRequest */ export interface LearningResourcePriceRequest { - /** - * - * @type {string} - * @memberof LearningResourcePriceRequest - */ - 'amount': string; - /** - * - * @type {string} - * @memberof LearningResourcePriceRequest - */ - 'currency': string; + /** + * + * @type {string} + * @memberof LearningResourcePriceRequest + */ + amount: string + /** + * + * @type {string} + * @memberof LearningResourcePriceRequest + */ + currency: string } /** * CRUD serializer for LearningResourceRelationship @@ -2089,50 +2114,56 @@ export interface LearningResourcePriceRequest { * @interface LearningResourceRelationship */ export interface LearningResourceRelationship { - /** - * - * @type {number} - * @memberof LearningResourceRelationship - */ - 'id': number; - /** - * - * @type {LearningResource} - * @memberof LearningResourceRelationship - */ - 'resource': LearningResource; - /** - * - * @type {number} - * @memberof LearningResourceRelationship - */ - 'position'?: number; - /** - * - * @type {RelationTypeEnum} - * @memberof LearningResourceRelationship - */ - 'relation_type'?: RelationTypeEnum; - /** - * - * @type {number} - * @memberof LearningResourceRelationship - */ - 'parent': number; - /** - * - * @type {number} - * @memberof LearningResourceRelationship - */ - 'child': number; + /** + * + * @type {number} + * @memberof LearningResourceRelationship + */ + id: number + /** + * + * @type {LearningResource} + * @memberof LearningResourceRelationship + */ + resource: LearningResource + /** + * + * @type {number} + * @memberof LearningResourceRelationship + */ + position?: number + /** + * + * @type {RelationTypeEnum} + * @memberof LearningResourceRelationship + */ + relation_type?: RelationTypeEnum + /** + * + * @type {number} + * @memberof LearningResourceRelationship + */ + parent: number + /** + * + * @type {number} + * @memberof LearningResourceRelationship + */ + child: number } - /** * @type LearningResourceRequest * @export */ -export type LearningResourceRequest = { resource_type: 'course' } & CourseResourceRequest | { resource_type: 'learning_path' } & LearningPathResourceRequest | { resource_type: 'podcast' } & PodcastResourceRequest | { resource_type: 'podcast_episode' } & PodcastEpisodeResourceRequest | { resource_type: 'program' } & ProgramResourceRequest | { resource_type: 'video' } & VideoResourceRequest | { resource_type: 'video_playlist' } & VideoPlaylistResourceRequest; +export type LearningResourceRequest = + | ({ resource_type: "course" } & CourseResourceRequest) + | ({ resource_type: "learning_path" } & LearningPathResourceRequest) + | ({ resource_type: "podcast" } & PodcastResourceRequest) + | ({ resource_type: "podcast_episode" } & PodcastEpisodeResourceRequest) + | ({ resource_type: "program" } & ProgramResourceRequest) + | ({ resource_type: "video" } & VideoResourceRequest) + | ({ resource_type: "video_playlist" } & VideoPlaylistResourceRequest) /** * Serializer for the LearningResourceRun model @@ -2140,202 +2171,202 @@ export type LearningResourceRequest = { resource_type: 'course' } & CourseResour * @interface LearningResourceRun */ export interface LearningResourceRun { - /** - * - * @type {number} - * @memberof LearningResourceRun - */ - 'id': number; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'instructors': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof LearningResourceRun - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'level': Array; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'delivery': Array; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'pace': Array; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'resource_prices': Array; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'run_id': string; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'title': string; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof LearningResourceRun - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'url'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'slug'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'semester'?: string | null; - /** - * - * @type {number} - * @memberof LearningResourceRun - */ - 'year'?: number | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'start_date'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'end_date'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'enrollment_start'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'enrollment_end'?: string | null; - /** - * - * @type {Array} - * @memberof LearningResourceRun - */ - 'prices'?: Array | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'checksum'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof LearningResourceRun - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {string} - * @memberof LearningResourceRun - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof LearningResourceRun + */ + id: number + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + instructors: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof LearningResourceRun + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + level: Array + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + delivery: Array + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + format: Array + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + pace: Array + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + resource_prices: Array + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + run_id: string + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + title: string + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + description?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof LearningResourceRun + */ + published?: boolean + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + url?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + slug?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + semester?: string | null + /** + * + * @type {number} + * @memberof LearningResourceRun + */ + year?: number | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + start_date?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + end_date?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + enrollment_start?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + enrollment_end?: string | null + /** + * + * @type {Array} + * @memberof LearningResourceRun + */ + prices?: Array | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + checksum?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof LearningResourceRun + */ + availability?: AvailabilityEnum | null + /** + * + * @type {string} + * @memberof LearningResourceRun + */ + location?: string } - /** - * + * * @export * @interface LearningResourceRunLevelInner */ export interface LearningResourceRunLevelInner { - /** - * - * @type {string} - * @memberof LearningResourceRunLevelInner - */ - 'code': LearningResourceRunLevelInnerCodeEnum; - /** - * - * @type {string} - * @memberof LearningResourceRunLevelInner - */ - 'name': string; + /** + * + * @type {string} + * @memberof LearningResourceRunLevelInner + */ + code: LearningResourceRunLevelInnerCodeEnum + /** + * + * @type {string} + * @memberof LearningResourceRunLevelInner + */ + name: string } export const LearningResourceRunLevelInnerCodeEnum = { - Undergraduate: 'undergraduate', - Graduate: 'graduate', - HighSchool: 'high_school', - Noncredit: 'noncredit', - Advanced: 'advanced', - Intermediate: 'intermediate', - Introductory: 'introductory' -} as const; + Undergraduate: "undergraduate", + Graduate: "graduate", + HighSchool: "high_school", + Noncredit: "noncredit", + Advanced: "advanced", + Intermediate: "intermediate", + Introductory: "introductory", +} as const -export type LearningResourceRunLevelInnerCodeEnum = typeof LearningResourceRunLevelInnerCodeEnum[keyof typeof LearningResourceRunLevelInnerCodeEnum]; +export type LearningResourceRunLevelInnerCodeEnum = + (typeof LearningResourceRunLevelInnerCodeEnum)[keyof typeof LearningResourceRunLevelInnerCodeEnum] /** * Serializer for the LearningResourceRun model @@ -2343,159 +2374,158 @@ export type LearningResourceRunLevelInnerCodeEnum = typeof LearningResourceRunLe * @interface LearningResourceRunRequest */ export interface LearningResourceRunRequest { - /** - * - * @type {Array} - * @memberof LearningResourceRunRequest - */ - 'level': Array; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'run_id': string; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof LearningResourceRunRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof LearningResourceRunRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'url'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'slug'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'semester'?: string | null; - /** - * - * @type {number} - * @memberof LearningResourceRunRequest - */ - 'year'?: number | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'start_date'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'end_date'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'enrollment_start'?: string | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'enrollment_end'?: string | null; - /** - * - * @type {Array} - * @memberof LearningResourceRunRequest - */ - 'prices'?: Array | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'checksum'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof LearningResourceRunRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {string} - * @memberof LearningResourceRunRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof LearningResourceRunRequest + */ + level: Array + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + run_id: string + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + title: string + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof LearningResourceRunRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof LearningResourceRunRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + url?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + slug?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + semester?: string | null + /** + * + * @type {number} + * @memberof LearningResourceRunRequest + */ + year?: number | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + start_date?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + end_date?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + enrollment_start?: string | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + enrollment_end?: string | null + /** + * + * @type {Array} + * @memberof LearningResourceRunRequest + */ + prices?: Array | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + checksum?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof LearningResourceRunRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {string} + * @memberof LearningResourceRunRequest + */ + location?: string } - /** * Serializer for LearningResourceSchool model, including list of departments * @export * @interface LearningResourceSchool */ export interface LearningResourceSchool { - /** - * - * @type {number} - * @memberof LearningResourceSchool - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceSchool - */ - 'name': string; - /** - * - * @type {string} - * @memberof LearningResourceSchool - */ - 'url': string; - /** - * - * @type {Array} - * @memberof LearningResourceSchool - */ - 'departments': Array; + /** + * + * @type {number} + * @memberof LearningResourceSchool + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceSchool + */ + name: string + /** + * + * @type {string} + * @memberof LearningResourceSchool + */ + url: string + /** + * + * @type {Array} + * @memberof LearningResourceSchool + */ + departments: Array } /** * Serializer for LearningResourceTopic model @@ -2503,36 +2533,36 @@ export interface LearningResourceSchool { * @interface LearningResourceTopic */ export interface LearningResourceTopic { - /** - * - * @type {number} - * @memberof LearningResourceTopic - */ - 'id': number; - /** - * - * @type {string} - * @memberof LearningResourceTopic - */ - 'name': string; - /** - * The icon to display for the topic. - * @type {string} - * @memberof LearningResourceTopic - */ - 'icon'?: string; - /** - * - * @type {number} - * @memberof LearningResourceTopic - */ - 'parent'?: number | null; - /** - * - * @type {string} - * @memberof LearningResourceTopic - */ - 'channel_url': string | null; + /** + * + * @type {number} + * @memberof LearningResourceTopic + */ + id: number + /** + * + * @type {string} + * @memberof LearningResourceTopic + */ + name: string + /** + * The icon to display for the topic. + * @type {string} + * @memberof LearningResourceTopic + */ + icon?: string + /** + * + * @type {number} + * @memberof LearningResourceTopic + */ + parent?: number | null + /** + * + * @type {string} + * @memberof LearningResourceTopic + */ + channel_url: string | null } /** * SearchResponseSerializer with OpenAPI annotations for Learning Resources search @@ -2540,36 +2570,36 @@ export interface LearningResourceTopic { * @interface LearningResourcesSearchResponse */ export interface LearningResourcesSearchResponse { - /** - * - * @type {number} - * @memberof LearningResourcesSearchResponse - */ - 'count': number; - /** - * - * @type {string} - * @memberof LearningResourcesSearchResponse - */ - 'next': string | null; - /** - * - * @type {string} - * @memberof LearningResourcesSearchResponse - */ - 'previous': string | null; - /** - * - * @type {Array} - * @memberof LearningResourcesSearchResponse - */ - 'results': Array; - /** - * - * @type {ContentFileSearchResponseMetadata} - * @memberof LearningResourcesSearchResponse - */ - 'metadata': ContentFileSearchResponseMetadata; + /** + * + * @type {number} + * @memberof LearningResourcesSearchResponse + */ + count: number + /** + * + * @type {string} + * @memberof LearningResourcesSearchResponse + */ + next: string | null + /** + * + * @type {string} + * @memberof LearningResourcesSearchResponse + */ + previous: string | null + /** + * + * @type {Array} + * @memberof LearningResourcesSearchResponse + */ + results: Array + /** + * + * @type {ContentFileSearchResponseMetadata} + * @memberof LearningResourcesSearchResponse + */ + metadata: ContentFileSearchResponseMetadata } /** * * `undergraduate` - Undergraduate * `graduate` - Graduate * `high_school` - High School * `noncredit` - Non-Credit * `advanced` - Advanced * `intermediate` - Intermediate * `introductory` - Introductory @@ -2578,38 +2608,37 @@ export interface LearningResourcesSearchResponse { */ export const LevelEnum = { - /** - * Undergraduate - */ - Undergraduate: 'undergraduate', - /** - * Graduate - */ - Graduate: 'graduate', - /** - * High School - */ - HighSchool: 'high_school', - /** - * Non-Credit - */ - Noncredit: 'noncredit', - /** - * Advanced - */ - Advanced: 'advanced', - /** - * Intermediate - */ - Intermediate: 'intermediate', - /** - * Introductory - */ - Introductory: 'introductory' -} as const; - -export type LevelEnum = typeof LevelEnum[keyof typeof LevelEnum]; - + /** + * Undergraduate + */ + Undergraduate: "undergraduate", + /** + * Graduate + */ + Graduate: "graduate", + /** + * High School + */ + HighSchool: "high_school", + /** + * Non-Credit + */ + Noncredit: "noncredit", + /** + * Advanced + */ + Advanced: "advanced", + /** + * Intermediate + */ + Intermediate: "intermediate", + /** + * Introductory + */ + Introductory: "introductory", +} as const + +export type LevelEnum = (typeof LevelEnum)[keyof typeof LevelEnum] /** * Serializer containing only parent and child ids for a learning path relationship @@ -2617,24 +2646,24 @@ export type LevelEnum = typeof LevelEnum[keyof typeof LevelEnum]; * @interface MicroLearningPathRelationship */ export interface MicroLearningPathRelationship { - /** - * - * @type {number} - * @memberof MicroLearningPathRelationship - */ - 'id': number; - /** - * The id of the parent learning resource - * @type {number} - * @memberof MicroLearningPathRelationship - */ - 'parent': number; - /** - * - * @type {number} - * @memberof MicroLearningPathRelationship - */ - 'child': number; + /** + * + * @type {number} + * @memberof MicroLearningPathRelationship + */ + id: number + /** + * The id of the parent learning resource + * @type {number} + * @memberof MicroLearningPathRelationship + */ + parent: number + /** + * + * @type {number} + * @memberof MicroLearningPathRelationship + */ + child: number } /** * Serializer containing only parent and child ids for a user list relationship @@ -2642,37 +2671,36 @@ export interface MicroLearningPathRelationship { * @interface MicroUserListRelationship */ export interface MicroUserListRelationship { - /** - * - * @type {number} - * @memberof MicroUserListRelationship - */ - 'id': number; - /** - * The id of the parent learning resource - * @type {number} - * @memberof MicroUserListRelationship - */ - 'parent': number; - /** - * - * @type {number} - * @memberof MicroUserListRelationship - */ - 'child': number; + /** + * + * @type {number} + * @memberof MicroUserListRelationship + */ + id: number + /** + * The id of the parent learning resource + * @type {number} + * @memberof MicroUserListRelationship + */ + parent: number + /** + * + * @type {number} + * @memberof MicroUserListRelationship + */ + child: number } /** - * + * * @export * @enum {string} */ export const NullEnum = { - Null: 'null' -} as const; - -export type NullEnum = typeof NullEnum[keyof typeof NullEnum]; + Null: "null", +} as const +export type NullEnum = (typeof NullEnum)[keyof typeof NullEnum] /** * * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education @@ -2681,654 +2709,653 @@ export type NullEnum = typeof NullEnum[keyof typeof NullEnum]; */ export const OfferedByEnum = { - /** - * MITx - */ - Mitx: 'mitx', - /** - * MIT OpenCourseWare - */ - Ocw: 'ocw', - /** - * Bootcamps - */ - Bootcamps: 'bootcamps', - /** - * MIT xPRO - */ - Xpro: 'xpro', - /** - * MIT Professional Education - */ - Mitpe: 'mitpe', - /** - * MIT Sloan Executive Education - */ - See: 'see' -} as const; - -export type OfferedByEnum = typeof OfferedByEnum[keyof typeof OfferedByEnum]; - + /** + * MITx + */ + Mitx: "mitx", + /** + * MIT OpenCourseWare + */ + Ocw: "ocw", + /** + * Bootcamps + */ + Bootcamps: "bootcamps", + /** + * MIT xPRO + */ + Xpro: "xpro", + /** + * MIT Professional Education + */ + Mitpe: "mitpe", + /** + * MIT Sloan Executive Education + */ + See: "see", +} as const + +export type OfferedByEnum = (typeof OfferedByEnum)[keyof typeof OfferedByEnum] /** - * + * * @export * @interface PaginatedArticleList */ export interface PaginatedArticleList { - /** - * - * @type {number} - * @memberof PaginatedArticleList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedArticleList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedArticleList - */ - 'previous'?: string | null; - /** - * - * @type {Array
} - * @memberof PaginatedArticleList - */ - 'results': Array
; + /** + * + * @type {number} + * @memberof PaginatedArticleList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedArticleList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedArticleList + */ + previous?: string | null + /** + * + * @type {Array
} + * @memberof PaginatedArticleList + */ + results: Array
} /** - * + * * @export * @interface PaginatedContentFileList */ export interface PaginatedContentFileList { - /** - * - * @type {number} - * @memberof PaginatedContentFileList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedContentFileList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedContentFileList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedContentFileList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedContentFileList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedContentFileList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedContentFileList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedContentFileList + */ + results: Array } /** - * + * * @export * @interface PaginatedCourseResourceList */ export interface PaginatedCourseResourceList { - /** - * - * @type {number} - * @memberof PaginatedCourseResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedCourseResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedCourseResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedCourseResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedCourseResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedCourseResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedCourseResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedCourseResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningPathRelationshipList */ export interface PaginatedLearningPathRelationshipList { - /** - * - * @type {number} - * @memberof PaginatedLearningPathRelationshipList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningPathRelationshipList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningPathRelationshipList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningPathRelationshipList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningPathRelationshipList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningPathRelationshipList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningPathRelationshipList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningPathRelationshipList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningPathResourceList */ export interface PaginatedLearningPathResourceList { - /** - * - * @type {number} - * @memberof PaginatedLearningPathResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningPathResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningPathResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningPathResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningPathResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningPathResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningPathResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningPathResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceContentTagList */ export interface PaginatedLearningResourceContentTagList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceContentTagList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceContentTagList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceContentTagList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceContentTagList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceContentTagList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceContentTagList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceContentTagList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceContentTagList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceDepartmentList */ export interface PaginatedLearningResourceDepartmentList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceDepartmentList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceDepartmentList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceDepartmentList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceDepartmentList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceDepartmentList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceDepartmentList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceDepartmentList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceDepartmentList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceList */ export interface PaginatedLearningResourceList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceOfferorDetailList */ export interface PaginatedLearningResourceOfferorDetailList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceOfferorDetailList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceOfferorDetailList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceOfferorDetailList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceOfferorDetailList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceOfferorDetailList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceOfferorDetailList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceOfferorDetailList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceOfferorDetailList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourcePlatformList */ export interface PaginatedLearningResourcePlatformList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourcePlatformList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourcePlatformList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourcePlatformList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourcePlatformList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourcePlatformList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourcePlatformList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourcePlatformList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourcePlatformList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceRelationshipList */ export interface PaginatedLearningResourceRelationshipList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceRelationshipList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceRelationshipList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceRelationshipList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceRelationshipList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceRelationshipList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceRelationshipList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceRelationshipList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceRelationshipList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceSchoolList */ export interface PaginatedLearningResourceSchoolList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceSchoolList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceSchoolList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceSchoolList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceSchoolList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceSchoolList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceSchoolList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceSchoolList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceSchoolList + */ + results: Array } /** - * + * * @export * @interface PaginatedLearningResourceTopicList */ export interface PaginatedLearningResourceTopicList { - /** - * - * @type {number} - * @memberof PaginatedLearningResourceTopicList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceTopicList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedLearningResourceTopicList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedLearningResourceTopicList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedLearningResourceTopicList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedLearningResourceTopicList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedLearningResourceTopicList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedLearningResourceTopicList + */ + results: Array } /** - * + * * @export * @interface PaginatedPodcastEpisodeResourceList */ export interface PaginatedPodcastEpisodeResourceList { - /** - * - * @type {number} - * @memberof PaginatedPodcastEpisodeResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedPodcastEpisodeResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedPodcastEpisodeResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedPodcastEpisodeResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedPodcastEpisodeResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedPodcastEpisodeResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedPodcastEpisodeResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedPodcastEpisodeResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedPodcastResourceList */ export interface PaginatedPodcastResourceList { - /** - * - * @type {number} - * @memberof PaginatedPodcastResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedPodcastResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedPodcastResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedPodcastResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedPodcastResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedPodcastResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedPodcastResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedPodcastResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedProgramResourceList */ export interface PaginatedProgramResourceList { - /** - * - * @type {number} - * @memberof PaginatedProgramResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedProgramResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedProgramResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedProgramResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedProgramResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedProgramResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedProgramResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedProgramResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedUserListList */ export interface PaginatedUserListList { - /** - * - * @type {number} - * @memberof PaginatedUserListList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedUserListList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedUserListList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedUserListList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedUserListList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedUserListList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedUserListList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedUserListList + */ + results: Array } /** - * + * * @export * @interface PaginatedUserListRelationshipList */ export interface PaginatedUserListRelationshipList { - /** - * - * @type {number} - * @memberof PaginatedUserListRelationshipList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedUserListRelationshipList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedUserListRelationshipList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedUserListRelationshipList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedUserListRelationshipList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedUserListRelationshipList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedUserListRelationshipList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedUserListRelationshipList + */ + results: Array } /** - * + * * @export * @interface PaginatedVideoPlaylistResourceList */ export interface PaginatedVideoPlaylistResourceList { - /** - * - * @type {number} - * @memberof PaginatedVideoPlaylistResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedVideoPlaylistResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedVideoPlaylistResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedVideoPlaylistResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedVideoPlaylistResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedVideoPlaylistResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedVideoPlaylistResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedVideoPlaylistResourceList + */ + results: Array } /** - * + * * @export * @interface PaginatedVideoResourceList */ export interface PaginatedVideoResourceList { - /** - * - * @type {number} - * @memberof PaginatedVideoResourceList - */ - 'count': number; - /** - * - * @type {string} - * @memberof PaginatedVideoResourceList - */ - 'next'?: string | null; - /** - * - * @type {string} - * @memberof PaginatedVideoResourceList - */ - 'previous'?: string | null; - /** - * - * @type {Array} - * @memberof PaginatedVideoResourceList - */ - 'results': Array; + /** + * + * @type {number} + * @memberof PaginatedVideoResourceList + */ + count: number + /** + * + * @type {string} + * @memberof PaginatedVideoResourceList + */ + next?: string | null + /** + * + * @type {string} + * @memberof PaginatedVideoResourceList + */ + previous?: string | null + /** + * + * @type {Array} + * @memberof PaginatedVideoResourceList + */ + results: Array } /** * Serializer for LearningResourceInstructor model @@ -3336,18 +3363,18 @@ export interface PaginatedVideoResourceList { * @interface PatchedArticleRequest */ export interface PatchedArticleRequest { - /** - * - * @type {string} - * @memberof PatchedArticleRequest - */ - 'html'?: string; - /** - * - * @type {string} - * @memberof PatchedArticleRequest - */ - 'title'?: string; + /** + * + * @type {string} + * @memberof PatchedArticleRequest + */ + html?: string + /** + * + * @type {string} + * @memberof PatchedArticleRequest + */ + title?: string } /** * Specialized serializer for a LearningPath relationship @@ -3355,24 +3382,24 @@ export interface PatchedArticleRequest { * @interface PatchedLearningPathRelationshipRequest */ export interface PatchedLearningPathRelationshipRequest { - /** - * - * @type {number} - * @memberof PatchedLearningPathRelationshipRequest - */ - 'position'?: number; - /** - * - * @type {number} - * @memberof PatchedLearningPathRelationshipRequest - */ - 'parent'?: number; - /** - * - * @type {number} - * @memberof PatchedLearningPathRelationshipRequest - */ - 'child'?: number; + /** + * + * @type {number} + * @memberof PatchedLearningPathRelationshipRequest + */ + position?: number + /** + * + * @type {number} + * @memberof PatchedLearningPathRelationshipRequest + */ + parent?: number + /** + * + * @type {number} + * @memberof PatchedLearningPathRelationshipRequest + */ + child?: number } /** * CRUD serializer for LearningPath resources @@ -3380,162 +3407,160 @@ export interface PatchedLearningPathRelationshipRequest { * @interface PatchedLearningPathResourceRequest */ export interface PatchedLearningPathResourceRequest { - /** - * - * @type {Array} - * @memberof PatchedLearningPathResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof PatchedLearningPathResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof PatchedLearningPathResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof PatchedLearningPathResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof PatchedLearningPathResourceRequest - */ - 'professional'?: boolean; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof PatchedLearningPathResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof PatchedLearningPathResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof PatchedLearningPathResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof PatchedLearningPathResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof PatchedLearningPathResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + title?: string + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof PatchedLearningPathResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof PatchedLearningPathResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof PatchedLearningPathResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof PatchedLearningPathResourceRequest + */ + professional?: boolean + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof PatchedLearningPathResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof PatchedLearningPathResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof PatchedLearningPathResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof PatchedLearningPathResourceRequest + */ + location?: string } - /** * CRUD serializer for LearningResourceRelationship * @export * @interface PatchedLearningResourceRelationshipRequest */ export interface PatchedLearningResourceRelationshipRequest { - /** - * - * @type {number} - * @memberof PatchedLearningResourceRelationshipRequest - */ - 'position'?: number; - /** - * - * @type {RelationTypeEnum} - * @memberof PatchedLearningResourceRelationshipRequest - */ - 'relation_type'?: RelationTypeEnum; - /** - * - * @type {number} - * @memberof PatchedLearningResourceRelationshipRequest - */ - 'parent'?: number; - /** - * - * @type {number} - * @memberof PatchedLearningResourceRelationshipRequest - */ - 'child'?: number; + /** + * + * @type {number} + * @memberof PatchedLearningResourceRelationshipRequest + */ + position?: number + /** + * + * @type {RelationTypeEnum} + * @memberof PatchedLearningResourceRelationshipRequest + */ + relation_type?: RelationTypeEnum + /** + * + * @type {number} + * @memberof PatchedLearningResourceRelationshipRequest + */ + parent?: number + /** + * + * @type {number} + * @memberof PatchedLearningResourceRelationshipRequest + */ + child?: number } - /** * Serializer for UserListRelationship model * @export * @interface PatchedUserListRelationshipRequest */ export interface PatchedUserListRelationshipRequest { - /** - * - * @type {number} - * @memberof PatchedUserListRelationshipRequest - */ - 'position'?: number; - /** - * - * @type {number} - * @memberof PatchedUserListRelationshipRequest - */ - 'parent'?: number; - /** - * - * @type {number} - * @memberof PatchedUserListRelationshipRequest - */ - 'child'?: number; + /** + * + * @type {number} + * @memberof PatchedUserListRelationshipRequest + */ + position?: number + /** + * + * @type {number} + * @memberof PatchedUserListRelationshipRequest + */ + parent?: number + /** + * + * @type {number} + * @memberof PatchedUserListRelationshipRequest + */ + child?: number } /** * Simplified serializer for UserList model. @@ -3543,261 +3568,258 @@ export interface PatchedUserListRelationshipRequest { * @interface PatchedUserListRequest */ export interface PatchedUserListRequest { - /** - * - * @type {Array} - * @memberof PatchedUserListRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof PatchedUserListRequest - */ - 'title'?: string; - /** - * - * @type {string} - * @memberof PatchedUserListRequest - */ - 'description'?: string; - /** - * - * @type {PrivacyLevelEnum} - * @memberof PatchedUserListRequest - */ - 'privacy_level'?: PrivacyLevelEnum; + /** + * + * @type {Array} + * @memberof PatchedUserListRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof PatchedUserListRequest + */ + title?: string + /** + * + * @type {string} + * @memberof PatchedUserListRequest + */ + description?: string + /** + * + * @type {PrivacyLevelEnum} + * @memberof PatchedUserListRequest + */ + privacy_level?: PrivacyLevelEnum } - /** * Serializer for PercolateQuery objects * @export * @interface PercolateQuery */ export interface PercolateQuery { - /** - * - * @type {number} - * @memberof PercolateQuery - */ - 'id': number; - /** - * - * @type {string} - * @memberof PercolateQuery - */ - 'source_description': string; - /** - * - * @type {string} - * @memberof PercolateQuery - */ - 'source_label': string; - /** - * - * @type {any} - * @memberof PercolateQuery - */ - 'original_query': any; - /** - * - * @type {any} - * @memberof PercolateQuery - */ - 'query': any; - /** - * - * @type {SourceTypeEnum} - * @memberof PercolateQuery - */ - 'source_type': SourceTypeEnum; - /** - * Friendly display label for the query - * @type {string} - * @memberof PercolateQuery - */ - 'display_label'?: string; + /** + * + * @type {number} + * @memberof PercolateQuery + */ + id: number + /** + * + * @type {string} + * @memberof PercolateQuery + */ + source_description: string + /** + * + * @type {string} + * @memberof PercolateQuery + */ + source_label: string + /** + * + * @type {any} + * @memberof PercolateQuery + */ + original_query: any + /** + * + * @type {any} + * @memberof PercolateQuery + */ + query: any + /** + * + * @type {SourceTypeEnum} + * @memberof PercolateQuery + */ + source_type: SourceTypeEnum + /** + * Friendly display label for the query + * @type {string} + * @memberof PercolateQuery + */ + display_label?: string } - /** * PercolateQuerySubscriptionRequestSerializer with OpenAPI annotations for Percolate Subscription requests * @export * @interface PercolateQuerySubscriptionRequestRequest */ export interface PercolateQuerySubscriptionRequestRequest { - /** - * The search text - * @type {string} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'q'?: string; - /** - * The initial index from which to return the results - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'offset'?: number; - /** - * Number of results to return per page - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'limit'?: number; - /** - * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'offered_by'?: Array; - /** - * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'platform'?: Array; - /** - * The topic name. To see a list of options go to api/v1/topics/ - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'topic'?: Array; - /** - * The ocw topic name. - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'ocw_topic'?: Array; - /** - * If true return raw open search results with score explanations - * @type {boolean} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'dev_mode'?: boolean | null; - /** - * The id value for the learning resource - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'id'?: Array; - /** - * - * @type {SortbyEnum} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'sortby'?: SortbyEnum; - /** - * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'resource_type'?: Array; - /** - * - * @type {boolean} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'free'?: boolean | null; - /** - * - * @type {boolean} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'professional'?: boolean | null; - /** - * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'yearly_decay_percent'?: number | null; - /** - * True if the learning resource offers a certificate - * @type {boolean} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'certification'?: boolean | null; - /** - * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'certification_type'?: 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} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'department'?: Array; - /** - * - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'level'?: Array; - /** - * The course feature. Possible options are at api/v1/course_features/ - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'course_feature'?: Array; - /** - * Show resource counts by category - * @type {Array} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'aggregations'?: 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} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'resource_category'?: Array; - /** - * - * @type {SearchModeEnum} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'search_mode'?: SearchModeEnum; - /** - * Allowed distance for phrase search - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'slop'?: number | null; - /** - * Minimum score value a text query result needs to have to be displayed - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'min_score'?: number | null; - /** - * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'max_incompleteness_penalty'?: number | null; - /** - * Score weight for content file data. 1 is the default. 0 means content files are ignored - * @type {number} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'content_file_score_weight'?: number | null; - /** - * - * @type {SourceTypeEnum} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - 'source_type'?: SourceTypeEnum; + /** + * The search text + * @type {string} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + q?: string + /** + * The initial index from which to return the results + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + offset?: number + /** + * Number of results to return per page + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + limit?: number + /** + * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + offered_by?: Array + /** + * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + platform?: Array + /** + * The topic name. To see a list of options go to api/v1/topics/ + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + topic?: Array + /** + * The ocw topic name. + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + ocw_topic?: Array + /** + * If true return raw open search results with score explanations + * @type {boolean} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + dev_mode?: boolean | null + /** + * The id value for the learning resource + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + id?: Array + /** + * + * @type {SortbyEnum} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + sortby?: SortbyEnum + /** + * The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + resource_type?: Array + /** + * + * @type {boolean} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + free?: boolean | null + /** + * + * @type {boolean} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + professional?: boolean | null + /** + * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + yearly_decay_percent?: number | null + /** + * True if the learning resource offers a certificate + * @type {boolean} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + certification?: boolean | null + /** + * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + certification_type?: 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} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + department?: Array + /** + * + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + level?: Array + /** + * The course feature. Possible options are at api/v1/course_features/ + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + course_feature?: Array + /** + * Show resource counts by category + * @type {Array} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + aggregations?: 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} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + resource_category?: Array + /** + * + * @type {SearchModeEnum} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + search_mode?: SearchModeEnum + /** + * Allowed distance for phrase search + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + slop?: number | null + /** + * Minimum score value a text query result needs to have to be displayed + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + min_score?: number | null + /** + * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + max_incompleteness_penalty?: number | null + /** + * Score weight for content file data. 1 is the default. 0 means content files are ignored + * @type {number} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + content_file_score_weight?: number | null + /** + * + * @type {SourceTypeEnum} + * @memberof PercolateQuerySubscriptionRequestRequest + */ + source_type?: SourceTypeEnum } - /** * * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist * @export @@ -3805,38 +3827,38 @@ export interface PercolateQuerySubscriptionRequestRequest { */ export const PercolateQuerySubscriptionRequestResourceTypeEnum = { - /** - * course - */ - Course: 'course', - /** - * program - */ - Program: 'program', - /** - * learning path - */ - LearningPath: 'learning_path', - /** - * podcast - */ - Podcast: 'podcast', - /** - * podcast episode - */ - PodcastEpisode: 'podcast_episode', - /** - * video - */ - Video: 'video', - /** - * video playlist - */ - VideoPlaylist: 'video_playlist' -} as const; - -export type PercolateQuerySubscriptionRequestResourceTypeEnum = typeof PercolateQuerySubscriptionRequestResourceTypeEnum[keyof typeof PercolateQuerySubscriptionRequestResourceTypeEnum]; - + /** + * course + */ + Course: "course", + /** + * program + */ + Program: "program", + /** + * learning path + */ + LearningPath: "learning_path", + /** + * podcast + */ + Podcast: "podcast", + /** + * podcast episode + */ + PodcastEpisode: "podcast_episode", + /** + * video + */ + Video: "video", + /** + * video playlist + */ + VideoPlaylist: "video_playlist", +} as const + +export type PercolateQuerySubscriptionRequestResourceTypeEnum = + (typeof PercolateQuerySubscriptionRequestResourceTypeEnum)[keyof typeof PercolateQuerySubscriptionRequestResourceTypeEnum] /** * * `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 @@ -3845,82 +3867,81 @@ export type PercolateQuerySubscriptionRequestResourceTypeEnum = typeof Percolate */ export const PlatformEnum = { - /** - * edX - */ - Edx: 'edx', - /** - * MIT OpenCourseWare - */ - Ocw: 'ocw', - /** - * Open Learning Library - */ - Oll: 'oll', - /** - * MITx Online - */ - Mitxonline: 'mitxonline', - /** - * Bootcamps - */ - Bootcamps: 'bootcamps', - /** - * MIT xPRO - */ - Xpro: 'xpro', - /** - * CSAIL - */ - Csail: 'csail', - /** - * MIT Professional Education - */ - Mitpe: 'mitpe', - /** - * MIT Sloan Executive Education - */ - See: 'see', - /** - * Schwarzman College of Computing - */ - Scc: 'scc', - /** - * Center for Transportation & Logistics - */ - Ctl: 'ctl', - /** - * WHU - */ - Whu: 'whu', - /** - * Susskind - */ - Susskind: 'susskind', - /** - * Global Alumni - */ - Globalalumni: 'globalalumni', - /** - * Simplilearn - */ - Simplilearn: 'simplilearn', - /** - * Emeritus - */ - Emeritus: 'emeritus', - /** - * Podcast - */ - Podcast: 'podcast', - /** - * YouTube - */ - Youtube: 'youtube' -} as const; - -export type PlatformEnum = typeof PlatformEnum[keyof typeof PlatformEnum]; - + /** + * edX + */ + Edx: "edx", + /** + * MIT OpenCourseWare + */ + Ocw: "ocw", + /** + * Open Learning Library + */ + Oll: "oll", + /** + * MITx Online + */ + Mitxonline: "mitxonline", + /** + * Bootcamps + */ + Bootcamps: "bootcamps", + /** + * MIT xPRO + */ + Xpro: "xpro", + /** + * CSAIL + */ + Csail: "csail", + /** + * MIT Professional Education + */ + Mitpe: "mitpe", + /** + * MIT Sloan Executive Education + */ + See: "see", + /** + * Schwarzman College of Computing + */ + Scc: "scc", + /** + * Center for Transportation & Logistics + */ + Ctl: "ctl", + /** + * WHU + */ + Whu: "whu", + /** + * Susskind + */ + Susskind: "susskind", + /** + * Global Alumni + */ + Globalalumni: "globalalumni", + /** + * Simplilearn + */ + Simplilearn: "simplilearn", + /** + * Emeritus + */ + Emeritus: "emeritus", + /** + * Podcast + */ + Podcast: "podcast", + /** + * YouTube + */ + Youtube: "youtube", +} as const + +export type PlatformEnum = (typeof PlatformEnum)[keyof typeof PlatformEnum] /** * Serializer for Podcasts @@ -3928,36 +3949,36 @@ export type PlatformEnum = typeof PlatformEnum[keyof typeof PlatformEnum]; * @interface Podcast */ export interface Podcast { - /** - * - * @type {number} - * @memberof Podcast - */ - 'id': number; - /** - * - * @type {number} - * @memberof Podcast - */ - 'episode_count': number; - /** - * - * @type {string} - * @memberof Podcast - */ - 'apple_podcasts_url'?: string | null; - /** - * - * @type {string} - * @memberof Podcast - */ - 'google_podcasts_url'?: string | null; - /** - * - * @type {string} - * @memberof Podcast - */ - 'rss_url'?: string | null; + /** + * + * @type {number} + * @memberof Podcast + */ + id: number + /** + * + * @type {number} + * @memberof Podcast + */ + episode_count: number + /** + * + * @type {string} + * @memberof Podcast + */ + apple_podcasts_url?: string | null + /** + * + * @type {string} + * @memberof Podcast + */ + google_podcasts_url?: string | null + /** + * + * @type {string} + * @memberof Podcast + */ + rss_url?: string | null } /** * Serializer for PodcastEpisode @@ -3965,36 +3986,36 @@ export interface Podcast { * @interface PodcastEpisode */ export interface PodcastEpisode { - /** - * - * @type {number} - * @memberof PodcastEpisode - */ - 'id': number; - /** - * - * @type {string} - * @memberof PodcastEpisode - */ - 'transcript'?: string; - /** - * - * @type {string} - * @memberof PodcastEpisode - */ - 'episode_link'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisode - */ - 'duration'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisode - */ - 'rss'?: string | null; + /** + * + * @type {number} + * @memberof PodcastEpisode + */ + id: number + /** + * + * @type {string} + * @memberof PodcastEpisode + */ + transcript?: string + /** + * + * @type {string} + * @memberof PodcastEpisode + */ + episode_link?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisode + */ + duration?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisode + */ + rss?: string | null } /** * Serializer for PodcastEpisode @@ -4002,30 +4023,30 @@ export interface PodcastEpisode { * @interface PodcastEpisodeRequest */ export interface PodcastEpisodeRequest { - /** - * - * @type {string} - * @memberof PodcastEpisodeRequest - */ - 'transcript'?: string; - /** - * - * @type {string} - * @memberof PodcastEpisodeRequest - */ - 'episode_link'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeRequest - */ - 'duration'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeRequest - */ - 'rss'?: string | null; + /** + * + * @type {string} + * @memberof PodcastEpisodeRequest + */ + transcript?: string + /** + * + * @type {string} + * @memberof PodcastEpisodeRequest + */ + episode_link?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeRequest + */ + duration?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeRequest + */ + rss?: string | null } /** * Serializer for podcast episode resources @@ -4033,360 +4054,358 @@ export interface PodcastEpisodeRequest { * @interface PodcastEpisodeResource */ export interface PodcastEpisodeResource { - /** - * - * @type {number} - * @memberof PodcastEpisodeResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'topics'?: Array; - /** - * - * @type {number} - * @memberof PodcastEpisodeResource - */ - 'position': number | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof PodcastEpisodeResource - */ - 'offered_by': LearningResourceOfferor | null; - /** - * - * @type {LearningResourcePlatform} - * @memberof PodcastEpisodeResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof PodcastEpisodeResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof PodcastEpisodeResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof PodcastEpisodeResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof PodcastEpisodeResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof PodcastEpisodeResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'pace': Array; - /** - * - * @type {PodcastEpisodeResourceResourceTypeEnum} - * @memberof PodcastEpisodeResource - */ - 'resource_type': PodcastEpisodeResourceResourceTypeEnum; - /** - * - * @type {PodcastEpisode} - * @memberof PodcastEpisodeResource - */ - 'podcast_episode': PodcastEpisode; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof PodcastEpisodeResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof PodcastEpisodeResource - */ - 'professional': boolean; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof PodcastEpisodeResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof PodcastEpisodeResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof PodcastEpisodeResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResource - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof PodcastEpisodeResource + */ + id: number + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof PodcastEpisodeResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof PodcastEpisodeResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof PodcastEpisodeResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof PodcastEpisodeResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof PodcastEpisodeResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof PodcastEpisodeResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof PodcastEpisodeResource + */ + views: number + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof PodcastEpisodeResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof PodcastEpisodeResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + format: Array + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + pace: Array + /** + * + * @type {PodcastEpisodeResourceResourceTypeEnum} + * @memberof PodcastEpisodeResource + */ + resource_type: PodcastEpisodeResourceResourceTypeEnum + /** + * + * @type {PodcastEpisode} + * @memberof PodcastEpisodeResource + */ + podcast_episode: PodcastEpisode + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + title: string + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof PodcastEpisodeResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof PodcastEpisodeResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof PodcastEpisodeResource + */ + professional: boolean + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof PodcastEpisodeResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof PodcastEpisodeResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof PodcastEpisodeResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResource + */ + location?: string } - /** * Serializer for podcast episode resources * @export * @interface PodcastEpisodeResourceRequest */ export interface PodcastEpisodeResourceRequest { - /** - * - * @type {Array} - * @memberof PodcastEpisodeResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof PodcastEpisodeResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof PodcastEpisodeResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof PodcastEpisodeResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof PodcastEpisodeResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof PodcastEpisodeResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof PodcastEpisodeResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof PodcastEpisodeResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + readable_id: string + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof PodcastEpisodeResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof PodcastEpisodeResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof PodcastEpisodeResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof PodcastEpisodeResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof PodcastEpisodeResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof PodcastEpisodeResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof PodcastEpisodeResourceRequest + */ + location?: string } - /** - * + * * @export * @enum {string} */ export const PodcastEpisodeResourceResourceTypeEnum = { - PodcastEpisode: 'podcast_episode' -} as const; - -export type PodcastEpisodeResourceResourceTypeEnum = typeof PodcastEpisodeResourceResourceTypeEnum[keyof typeof PodcastEpisodeResourceResourceTypeEnum]; + PodcastEpisode: "podcast_episode", +} as const +export type PodcastEpisodeResourceResourceTypeEnum = + (typeof PodcastEpisodeResourceResourceTypeEnum)[keyof typeof PodcastEpisodeResourceResourceTypeEnum] /** * Serializer for Podcasts @@ -4394,30 +4413,30 @@ export type PodcastEpisodeResourceResourceTypeEnum = typeof PodcastEpisodeResour * @interface PodcastRequest */ export interface PodcastRequest { - /** - * - * @type {number} - * @memberof PodcastRequest - */ - 'episode_count': number; - /** - * - * @type {string} - * @memberof PodcastRequest - */ - 'apple_podcasts_url'?: string | null; - /** - * - * @type {string} - * @memberof PodcastRequest - */ - 'google_podcasts_url'?: string | null; - /** - * - * @type {string} - * @memberof PodcastRequest - */ - 'rss_url'?: string | null; + /** + * + * @type {number} + * @memberof PodcastRequest + */ + episode_count: number + /** + * + * @type {string} + * @memberof PodcastRequest + */ + apple_podcasts_url?: string | null + /** + * + * @type {string} + * @memberof PodcastRequest + */ + google_podcasts_url?: string | null + /** + * + * @type {string} + * @memberof PodcastRequest + */ + rss_url?: string | null } /** * Serializer for podcast resources @@ -4425,360 +4444,358 @@ export interface PodcastRequest { * @interface PodcastResource */ export interface PodcastResource { - /** - * - * @type {number} - * @memberof PodcastResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'topics'?: Array; - /** - * - * @type {number} - * @memberof PodcastResource - */ - 'position': number | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof PodcastResource - */ - 'offered_by': LearningResourceOfferor | null; - /** - * - * @type {LearningResourcePlatform} - * @memberof PodcastResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof PodcastResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof PodcastResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof PodcastResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof PodcastResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof PodcastResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof PodcastResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'pace': Array; - /** - * - * @type {PodcastResourceResourceTypeEnum} - * @memberof PodcastResource - */ - 'resource_type': PodcastResourceResourceTypeEnum; - /** - * - * @type {Podcast} - * @memberof PodcastResource - */ - 'podcast': Podcast; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof PodcastResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof PodcastResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof PodcastResource - */ - 'professional': boolean; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof PodcastResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof PodcastResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof PodcastResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof PodcastResource - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof PodcastResource + */ + id: number + /** + * + * @type {Array} + * @memberof PodcastResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof PodcastResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof PodcastResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof PodcastResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof PodcastResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof PodcastResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof PodcastResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof PodcastResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof PodcastResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof PodcastResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof PodcastResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof PodcastResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof PodcastResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof PodcastResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof PodcastResource + */ + views: number + /** + * + * @type {Array} + * @memberof PodcastResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof PodcastResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof PodcastResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof PodcastResource + */ + format: Array + /** + * + * @type {Array} + * @memberof PodcastResource + */ + pace: Array + /** + * + * @type {PodcastResourceResourceTypeEnum} + * @memberof PodcastResource + */ + resource_type: PodcastResourceResourceTypeEnum + /** + * + * @type {Podcast} + * @memberof PodcastResource + */ + podcast: Podcast + /** + * + * @type {string} + * @memberof PodcastResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof PodcastResource + */ + title: string + /** + * + * @type {string} + * @memberof PodcastResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof PodcastResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof PodcastResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof PodcastResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof PodcastResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof PodcastResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof PodcastResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof PodcastResource + */ + professional: boolean + /** + * + * @type {string} + * @memberof PodcastResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof PodcastResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof PodcastResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof PodcastResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof PodcastResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof PodcastResource + */ + location?: string } - /** * Serializer for podcast resources * @export * @interface PodcastResourceRequest */ export interface PodcastResourceRequest { - /** - * - * @type {Array} - * @memberof PodcastResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof PodcastResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof PodcastResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof PodcastResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof PodcastResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof PodcastResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof PodcastResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof PodcastResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof PodcastResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + readable_id: string + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof PodcastResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof PodcastResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof PodcastResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof PodcastResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof PodcastResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof PodcastResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof PodcastResourceRequest + */ + location?: string } - /** - * + * * @export * @enum {string} */ export const PodcastResourceResourceTypeEnum = { - Podcast: 'podcast' -} as const; - -export type PodcastResourceResourceTypeEnum = typeof PodcastResourceResourceTypeEnum[keyof typeof PodcastResourceResourceTypeEnum]; + Podcast: "podcast", +} as const +export type PodcastResourceResourceTypeEnum = + (typeof PodcastResourceResourceTypeEnum)[keyof typeof PodcastResourceResourceTypeEnum] /** * * `private` - private * `unlisted` - unlisted @@ -4787,18 +4804,18 @@ export type PodcastResourceResourceTypeEnum = typeof PodcastResourceResourceType */ export const PrivacyLevelEnum = { - /** - * private - */ - Private: 'private', - /** - * unlisted - */ - Unlisted: 'unlisted' -} as const; - -export type PrivacyLevelEnum = typeof PrivacyLevelEnum[keyof typeof PrivacyLevelEnum]; + /** + * private + */ + Private: "private", + /** + * unlisted + */ + Unlisted: "unlisted", +} as const +export type PrivacyLevelEnum = + (typeof PrivacyLevelEnum)[keyof typeof PrivacyLevelEnum] /** * Serializer for the Program model @@ -4806,12 +4823,12 @@ export type PrivacyLevelEnum = typeof PrivacyLevelEnum[keyof typeof PrivacyLevel * @interface Program */ export interface Program { - /** - * - * @type {number} - * @memberof Program - */ - 'course_count': number; + /** + * + * @type {number} + * @memberof Program + */ + course_count: number } /** * Serializer for Program Certificates @@ -4819,132 +4836,132 @@ export interface Program { * @interface ProgramCertificate */ export interface ProgramCertificate { - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'record_hash': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_letter_generate_url': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_letter_share_url': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_title': string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_full_name'?: string; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_email': string; - /** - * - * @type {number} - * @memberof ProgramCertificate - */ - 'user_edxorg_id'?: number | null; - /** - * - * @type {number} - * @memberof ProgramCertificate - */ - 'micromasters_program_id'?: number | null; - /** - * - * @type {number} - * @memberof ProgramCertificate - */ - 'mitxonline_program_id'?: number | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_edxorg_username'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_gender'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_address_city'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_first_name'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_last_name'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_year_of_birth'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_country'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_address_postal_code'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_street_address'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_address_state_or_territory'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'user_mitxonline_username'?: string | null; - /** - * - * @type {string} - * @memberof ProgramCertificate - */ - 'program_completion_timestamp'?: string | null; + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + record_hash: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_letter_generate_url: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_letter_share_url: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_title: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_full_name?: string + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_email: string + /** + * + * @type {number} + * @memberof ProgramCertificate + */ + user_edxorg_id?: number | null + /** + * + * @type {number} + * @memberof ProgramCertificate + */ + micromasters_program_id?: number | null + /** + * + * @type {number} + * @memberof ProgramCertificate + */ + mitxonline_program_id?: number | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_edxorg_username?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_gender?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_address_city?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_first_name?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_last_name?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_year_of_birth?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_country?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_address_postal_code?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_street_address?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_address_state_or_territory?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + user_mitxonline_username?: string | null + /** + * + * @type {string} + * @memberof ProgramCertificate + */ + program_completion_timestamp?: string | null } /** * Serializer for Program Letters @@ -4952,24 +4969,24 @@ export interface ProgramCertificate { * @interface ProgramLetter */ export interface ProgramLetter { - /** - * - * @type {string} - * @memberof ProgramLetter - */ - 'id': string; - /** - * - * @type {ProgramLetterTemplateField} - * @memberof ProgramLetter - */ - 'template_fields': ProgramLetterTemplateField; - /** - * - * @type {ProgramCertificate} - * @memberof ProgramLetter - */ - 'certificate': ProgramCertificate; + /** + * + * @type {string} + * @memberof ProgramLetter + */ + id: string + /** + * + * @type {ProgramLetterTemplateField} + * @memberof ProgramLetter + */ + template_fields: ProgramLetterTemplateField + /** + * + * @type {ProgramCertificate} + * @memberof ProgramLetter + */ + certificate: ProgramCertificate } /** * Seriializer for program letter template data which is configured in micromasters @@ -4977,66 +4994,66 @@ export interface ProgramLetter { * @interface ProgramLetterTemplateField */ export interface ProgramLetterTemplateField { - /** - * - * @type {number} - * @memberof ProgramLetterTemplateField - */ - 'id': number; - /** - * - * @type {any} - * @memberof ProgramLetterTemplateField - */ - 'meta': any; - /** - * - * @type {string} - * @memberof ProgramLetterTemplateField - */ - 'title': string; - /** - * - * @type {number} - * @memberof ProgramLetterTemplateField - */ - 'program_id': number; - /** - * - * @type {any} - * @memberof ProgramLetterTemplateField - */ - 'program_letter_footer': any; - /** - * - * @type {string} - * @memberof ProgramLetterTemplateField - */ - 'program_letter_footer_text': string; - /** - * - * @type {string} - * @memberof ProgramLetterTemplateField - */ - 'program_letter_header_text': string; - /** - * - * @type {string} - * @memberof ProgramLetterTemplateField - */ - 'program_letter_text': string; - /** - * - * @type {any} - * @memberof ProgramLetterTemplateField - */ - 'program_letter_logo': any; - /** - * - * @type {Array} - * @memberof ProgramLetterTemplateField - */ - 'program_letter_signatories': Array; + /** + * + * @type {number} + * @memberof ProgramLetterTemplateField + */ + id: number + /** + * + * @type {any} + * @memberof ProgramLetterTemplateField + */ + meta: any + /** + * + * @type {string} + * @memberof ProgramLetterTemplateField + */ + title: string + /** + * + * @type {number} + * @memberof ProgramLetterTemplateField + */ + program_id: number + /** + * + * @type {any} + * @memberof ProgramLetterTemplateField + */ + program_letter_footer: any + /** + * + * @type {string} + * @memberof ProgramLetterTemplateField + */ + program_letter_footer_text: string + /** + * + * @type {string} + * @memberof ProgramLetterTemplateField + */ + program_letter_header_text: string + /** + * + * @type {string} + * @memberof ProgramLetterTemplateField + */ + program_letter_text: string + /** + * + * @type {any} + * @memberof ProgramLetterTemplateField + */ + program_letter_logo: any + /** + * + * @type {Array} + * @memberof ProgramLetterTemplateField + */ + program_letter_signatories: Array } /** * Serializer for program resources @@ -5044,360 +5061,358 @@ export interface ProgramLetterTemplateField { * @interface ProgramResource */ export interface ProgramResource { - /** - * - * @type {number} - * @memberof ProgramResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'topics'?: Array; - /** - * - * @type {number} - * @memberof ProgramResource - */ - 'position': number | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof ProgramResource - */ - 'offered_by': LearningResourceOfferor | null; - /** - * - * @type {LearningResourcePlatform} - * @memberof ProgramResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof ProgramResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof ProgramResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof ProgramResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof ProgramResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof ProgramResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof ProgramResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'pace': Array; - /** - * - * @type {ProgramResourceResourceTypeEnum} - * @memberof ProgramResource - */ - 'resource_type': ProgramResourceResourceTypeEnum; - /** - * - * @type {Program} - * @memberof ProgramResource - */ - 'program': Program; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof ProgramResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof ProgramResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof ProgramResource - */ - 'professional': boolean; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof ProgramResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof ProgramResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof ProgramResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof ProgramResource - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof ProgramResource + */ + id: number + /** + * + * @type {Array} + * @memberof ProgramResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof ProgramResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof ProgramResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof ProgramResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof ProgramResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof ProgramResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof ProgramResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof ProgramResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof ProgramResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof ProgramResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof ProgramResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof ProgramResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof ProgramResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof ProgramResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof ProgramResource + */ + views: number + /** + * + * @type {Array} + * @memberof ProgramResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof ProgramResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof ProgramResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof ProgramResource + */ + format: Array + /** + * + * @type {Array} + * @memberof ProgramResource + */ + pace: Array + /** + * + * @type {ProgramResourceResourceTypeEnum} + * @memberof ProgramResource + */ + resource_type: ProgramResourceResourceTypeEnum + /** + * + * @type {Program} + * @memberof ProgramResource + */ + program: Program + /** + * + * @type {string} + * @memberof ProgramResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof ProgramResource + */ + title: string + /** + * + * @type {string} + * @memberof ProgramResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof ProgramResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof ProgramResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof ProgramResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof ProgramResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof ProgramResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof ProgramResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof ProgramResource + */ + professional: boolean + /** + * + * @type {string} + * @memberof ProgramResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof ProgramResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof ProgramResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof ProgramResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof ProgramResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof ProgramResource + */ + location?: string } - /** * Serializer for program resources * @export * @interface ProgramResourceRequest */ export interface ProgramResourceRequest { - /** - * - * @type {Array} - * @memberof ProgramResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof ProgramResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof ProgramResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof ProgramResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof ProgramResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof ProgramResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof ProgramResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof ProgramResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof ProgramResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + readable_id: string + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof ProgramResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof ProgramResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof ProgramResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof ProgramResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof ProgramResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof ProgramResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof ProgramResourceRequest + */ + location?: string } - /** - * + * * @export * @enum {string} */ export const ProgramResourceResourceTypeEnum = { - Program: 'program' -} as const; - -export type ProgramResourceResourceTypeEnum = typeof ProgramResourceResourceTypeEnum[keyof typeof ProgramResourceResourceTypeEnum]; + Program: "program", +} as const +export type ProgramResourceResourceTypeEnum = + (typeof ProgramResourceResourceTypeEnum)[keyof typeof ProgramResourceResourceTypeEnum] /** * * `PROGRAM_COURSES` - Program Courses * `LEARNING_PATH_ITEMS` - Learning Path Items * `PODCAST_EPISODES` - Podcast Episodes * `PLAYLIST_VIDEOS` - Playlist Videos @@ -5406,26 +5421,26 @@ export type ProgramResourceResourceTypeEnum = typeof ProgramResourceResourceType */ export const RelationTypeEnum = { - /** - * Program Courses - */ - ProgramCourses: 'PROGRAM_COURSES', - /** - * Learning Path Items - */ - LearningPathItems: 'LEARNING_PATH_ITEMS', - /** - * Podcast Episodes - */ - PodcastEpisodes: 'PODCAST_EPISODES', - /** - * Playlist Videos - */ - PlaylistVideos: 'PLAYLIST_VIDEOS' -} as const; - -export type RelationTypeEnum = typeof RelationTypeEnum[keyof typeof RelationTypeEnum]; - + /** + * Program Courses + */ + ProgramCourses: "PROGRAM_COURSES", + /** + * Learning Path Items + */ + LearningPathItems: "LEARNING_PATH_ITEMS", + /** + * Podcast Episodes + */ + PodcastEpisodes: "PODCAST_EPISODES", + /** + * Playlist Videos + */ + PlaylistVideos: "PLAYLIST_VIDEOS", +} as const + +export type RelationTypeEnum = + (typeof RelationTypeEnum)[keyof typeof RelationTypeEnum] /** * * `course` - Course * `program` - Program * `learning_material` - Learning Material @@ -5434,22 +5449,22 @@ export type RelationTypeEnum = typeof RelationTypeEnum[keyof typeof RelationType */ export const ResourceCategoryEnum = { - /** - * Course - */ - Course: 'course', - /** - * Program - */ - Program: 'program', - /** - * Learning Material - */ - LearningMaterial: 'learning_material' -} as const; - -export type ResourceCategoryEnum = typeof ResourceCategoryEnum[keyof typeof ResourceCategoryEnum]; - + /** + * Course + */ + Course: "course", + /** + * Program + */ + Program: "program", + /** + * Learning Material + */ + LearningMaterial: "learning_material", +} as const + +export type ResourceCategoryEnum = + (typeof ResourceCategoryEnum)[keyof typeof ResourceCategoryEnum] /** * * `course` - course * `program` - program * `learning_path` - learning_path * `podcast` - podcast * `podcast_episode` - podcast_episode * `video` - video * `video_playlist` - video_playlist @@ -5458,38 +5473,38 @@ export type ResourceCategoryEnum = typeof ResourceCategoryEnum[keyof typeof Reso */ export const ResourceTypeEnum = { - /** - * course - */ - Course: 'course', - /** - * program - */ - Program: 'program', - /** - * learning_path - */ - LearningPath: 'learning_path', - /** - * podcast - */ - Podcast: 'podcast', - /** - * podcast_episode - */ - PodcastEpisode: 'podcast_episode', - /** - * video - */ - Video: 'video', - /** - * video_playlist - */ - VideoPlaylist: 'video_playlist' -} as const; - -export type ResourceTypeEnum = typeof ResourceTypeEnum[keyof typeof ResourceTypeEnum]; - + /** + * course + */ + Course: "course", + /** + * program + */ + Program: "program", + /** + * learning_path + */ + LearningPath: "learning_path", + /** + * podcast + */ + Podcast: "podcast", + /** + * podcast_episode + */ + PodcastEpisode: "podcast_episode", + /** + * video + */ + Video: "video", + /** + * video_playlist + */ + VideoPlaylist: "video_playlist", +} as const + +export type ResourceTypeEnum = + (typeof ResourceTypeEnum)[keyof typeof ResourceTypeEnum] /** * * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase @@ -5498,22 +5513,22 @@ export type ResourceTypeEnum = typeof ResourceTypeEnum[keyof typeof ResourceType */ export const SearchModeEnum = { - /** - * best_fields - */ - BestFields: 'best_fields', - /** - * most_fields - */ - MostFields: 'most_fields', - /** - * phrase - */ - Phrase: 'phrase' -} as const; - -export type SearchModeEnum = typeof SearchModeEnum[keyof typeof SearchModeEnum]; - + /** + * best_fields + */ + BestFields: "best_fields", + /** + * most_fields + */ + MostFields: "most_fields", + /** + * phrase + */ + Phrase: "phrase", +} as const + +export type SearchModeEnum = + (typeof SearchModeEnum)[keyof typeof SearchModeEnum] /** * * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending @@ -5522,70 +5537,69 @@ export type SearchModeEnum = typeof SearchModeEnum[keyof typeof SearchModeEnum]; */ export const SortbyEnum = { - /** - * Featured - */ - Featured: 'featured', - /** - * Object ID ascending - */ - Id: 'id', - /** - * Object ID descending - */ - Id2: '-id', - /** - * Readable ID ascending - */ - ReadableId: 'readable_id', - /** - * Readable ID descending - */ - ReadableId2: '-readable_id', - /** - * Last Modified Date ascending - */ - LastModified: 'last_modified', - /** - * Last Modified Date descending - */ - LastModified2: '-last_modified', - /** - * Newest resources first - */ - New: 'new', - /** - * Start Date ascending - */ - StartDate: 'start_date', - /** - * Start Date descending - */ - StartDate2: '-start_date', - /** - * MIT course number ascending - */ - Mitcoursenumber: 'mitcoursenumber', - /** - * MIT course number descending - */ - Mitcoursenumber2: '-mitcoursenumber', - /** - * Popularity ascending - */ - Views: 'views', - /** - * Popularity descending - */ - Views2: '-views', - /** - * Next start date ascending - */ - Upcoming: 'upcoming' -} as const; - -export type SortbyEnum = typeof SortbyEnum[keyof typeof SortbyEnum]; - + /** + * Featured + */ + Featured: "featured", + /** + * Object ID ascending + */ + Id: "id", + /** + * Object ID descending + */ + Id2: "-id", + /** + * Readable ID ascending + */ + ReadableId: "readable_id", + /** + * Readable ID descending + */ + ReadableId2: "-readable_id", + /** + * Last Modified Date ascending + */ + LastModified: "last_modified", + /** + * Last Modified Date descending + */ + LastModified2: "-last_modified", + /** + * Newest resources first + */ + New: "new", + /** + * Start Date ascending + */ + StartDate: "start_date", + /** + * Start Date descending + */ + StartDate2: "-start_date", + /** + * MIT course number ascending + */ + Mitcoursenumber: "mitcoursenumber", + /** + * MIT course number descending + */ + Mitcoursenumber2: "-mitcoursenumber", + /** + * Popularity ascending + */ + Views: "views", + /** + * Popularity descending + */ + Views2: "-views", + /** + * Next start date ascending + */ + Upcoming: "upcoming", +} as const + +export type SortbyEnum = (typeof SortbyEnum)[keyof typeof SortbyEnum] /** * * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type @@ -5594,18 +5608,18 @@ export type SortbyEnum = typeof SortbyEnum[keyof typeof SortbyEnum]; */ export const SourceTypeEnum = { - /** - * search_subscription_type - */ - SearchSubscriptionType: 'search_subscription_type', - /** - * channel_subscription_type - */ - ChannelSubscriptionType: 'channel_subscription_type' -} as const; - -export type SourceTypeEnum = typeof SourceTypeEnum[keyof typeof SourceTypeEnum]; + /** + * search_subscription_type + */ + SearchSubscriptionType: "search_subscription_type", + /** + * channel_subscription_type + */ + ChannelSubscriptionType: "channel_subscription_type", +} as const +export type SourceTypeEnum = + (typeof SourceTypeEnum)[keyof typeof SourceTypeEnum] /** * Simplified serializer for UserList model. @@ -5613,93 +5627,92 @@ export type SourceTypeEnum = typeof SourceTypeEnum[keyof typeof SourceTypeEnum]; * @interface UserList */ export interface UserList { - /** - * - * @type {number} - * @memberof UserList - */ - 'id': number; - /** - * - * @type {Array} - * @memberof UserList - */ - 'topics'?: Array; - /** - * Return the number of items in the list - * @type {number} - * @memberof UserList - */ - 'item_count': number; - /** - * Return the image of the first item - * @type {{ [key: string]: any; }} - * @memberof UserList - */ - 'image': { [key: string]: any; }; - /** - * - * @type {string} - * @memberof UserList - */ - 'title': string; - /** - * - * @type {string} - * @memberof UserList - */ - 'description'?: string; - /** - * - * @type {PrivacyLevelEnum} - * @memberof UserList - */ - 'privacy_level'?: PrivacyLevelEnum; - /** - * - * @type {number} - * @memberof UserList - */ - 'author': number; + /** + * + * @type {number} + * @memberof UserList + */ + id: number + /** + * + * @type {Array} + * @memberof UserList + */ + topics?: Array + /** + * Return the number of items in the list + * @type {number} + * @memberof UserList + */ + item_count: number + /** + * Return the image of the first item + * @type {{ [key: string]: any; }} + * @memberof UserList + */ + image: { [key: string]: any } + /** + * + * @type {string} + * @memberof UserList + */ + title: string + /** + * + * @type {string} + * @memberof UserList + */ + description?: string + /** + * + * @type {PrivacyLevelEnum} + * @memberof UserList + */ + privacy_level?: PrivacyLevelEnum + /** + * + * @type {number} + * @memberof UserList + */ + author: number } - /** * Serializer for UserListRelationship model * @export * @interface UserListRelationship */ export interface UserListRelationship { - /** - * - * @type {number} - * @memberof UserListRelationship - */ - 'id': number; - /** - * - * @type {LearningResource} - * @memberof UserListRelationship - */ - 'resource': LearningResource; - /** - * - * @type {number} - * @memberof UserListRelationship - */ - 'position'?: number; - /** - * - * @type {number} - * @memberof UserListRelationship - */ - 'parent': number; - /** - * - * @type {number} - * @memberof UserListRelationship - */ - 'child': number; + /** + * + * @type {number} + * @memberof UserListRelationship + */ + id: number + /** + * + * @type {LearningResource} + * @memberof UserListRelationship + */ + resource: LearningResource + /** + * + * @type {number} + * @memberof UserListRelationship + */ + position?: number + /** + * + * @type {number} + * @memberof UserListRelationship + */ + parent: number + /** + * + * @type {number} + * @memberof UserListRelationship + */ + child: number } /** * Serializer for UserListRelationship model @@ -5707,24 +5720,24 @@ export interface UserListRelationship { * @interface UserListRelationshipRequest */ export interface UserListRelationshipRequest { - /** - * - * @type {number} - * @memberof UserListRelationshipRequest - */ - 'position'?: number; - /** - * - * @type {number} - * @memberof UserListRelationshipRequest - */ - 'parent': number; - /** - * - * @type {number} - * @memberof UserListRelationshipRequest - */ - 'child': number; + /** + * + * @type {number} + * @memberof UserListRelationshipRequest + */ + position?: number + /** + * + * @type {number} + * @memberof UserListRelationshipRequest + */ + parent: number + /** + * + * @type {number} + * @memberof UserListRelationshipRequest + */ + child: number } /** * Simplified serializer for UserList model. @@ -5732,57 +5745,56 @@ export interface UserListRelationshipRequest { * @interface UserListRequest */ export interface UserListRequest { - /** - * - * @type {Array} - * @memberof UserListRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof UserListRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof UserListRequest - */ - 'description'?: string; - /** - * - * @type {PrivacyLevelEnum} - * @memberof UserListRequest - */ - 'privacy_level'?: PrivacyLevelEnum; + /** + * + * @type {Array} + * @memberof UserListRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof UserListRequest + */ + title: string + /** + * + * @type {string} + * @memberof UserListRequest + */ + description?: string + /** + * + * @type {PrivacyLevelEnum} + * @memberof UserListRequest + */ + privacy_level?: PrivacyLevelEnum } - /** * Serializer for the Video model * @export * @interface Video */ export interface Video { - /** - * - * @type {number} - * @memberof Video - */ - 'id': number; - /** - * - * @type {string} - * @memberof Video - */ - 'duration': string; - /** - * - * @type {string} - * @memberof Video - */ - 'transcript'?: string; + /** + * + * @type {number} + * @memberof Video + */ + id: number + /** + * + * @type {string} + * @memberof Video + */ + duration: string + /** + * + * @type {string} + * @memberof Video + */ + transcript?: string } /** * Serializer for the VideoChannel model @@ -5790,18 +5802,18 @@ export interface Video { * @interface VideoChannel */ export interface VideoChannel { - /** - * - * @type {string} - * @memberof VideoChannel - */ - 'channel_id': string; - /** - * - * @type {string} - * @memberof VideoChannel - */ - 'title': string; + /** + * + * @type {string} + * @memberof VideoChannel + */ + channel_id: string + /** + * + * @type {string} + * @memberof VideoChannel + */ + title: string } /** * Serializer for the VideoChannel model @@ -5809,18 +5821,18 @@ export interface VideoChannel { * @interface VideoChannelRequest */ export interface VideoChannelRequest { - /** - * - * @type {string} - * @memberof VideoChannelRequest - */ - 'channel_id': string; - /** - * - * @type {string} - * @memberof VideoChannelRequest - */ - 'title': string; + /** + * + * @type {string} + * @memberof VideoChannelRequest + */ + channel_id: string + /** + * + * @type {string} + * @memberof VideoChannelRequest + */ + title: string } /** * Serializer for the VideoPlaylist model @@ -5828,24 +5840,24 @@ export interface VideoChannelRequest { * @interface VideoPlaylist */ export interface VideoPlaylist { - /** - * - * @type {number} - * @memberof VideoPlaylist - */ - 'id': number; - /** - * - * @type {VideoChannel} - * @memberof VideoPlaylist - */ - 'channel': VideoChannel | null; - /** - * - * @type {number} - * @memberof VideoPlaylist - */ - 'video_count': number; + /** + * + * @type {number} + * @memberof VideoPlaylist + */ + id: number + /** + * + * @type {VideoChannel} + * @memberof VideoPlaylist + */ + channel: VideoChannel | null + /** + * + * @type {number} + * @memberof VideoPlaylist + */ + video_count: number } /** * Serializer for the VideoPlaylist model @@ -5853,12 +5865,12 @@ export interface VideoPlaylist { * @interface VideoPlaylistRequest */ export interface VideoPlaylistRequest { - /** - * - * @type {number} - * @memberof VideoPlaylistRequest - */ - 'video_count': number; + /** + * + * @type {number} + * @memberof VideoPlaylistRequest + */ + video_count: number } /** * Serializer for video playlist resources @@ -5866,360 +5878,358 @@ export interface VideoPlaylistRequest { * @interface VideoPlaylistResource */ export interface VideoPlaylistResource { - /** - * - * @type {number} - * @memberof VideoPlaylistResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'topics'?: Array; - /** - * - * @type {number} - * @memberof VideoPlaylistResource - */ - 'position': number | null; - /** - * - * @type {LearningResourceOfferor} - * @memberof VideoPlaylistResource - */ - 'offered_by': LearningResourceOfferor | null; - /** - * - * @type {LearningResourcePlatform} - * @memberof VideoPlaylistResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof VideoPlaylistResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof VideoPlaylistResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof VideoPlaylistResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof VideoPlaylistResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof VideoPlaylistResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof VideoPlaylistResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'pace': Array; - /** - * - * @type {VideoPlaylistResourceResourceTypeEnum} - * @memberof VideoPlaylistResource - */ - 'resource_type': VideoPlaylistResourceResourceTypeEnum; - /** - * - * @type {VideoPlaylist} - * @memberof VideoPlaylistResource - */ - 'video_playlist': VideoPlaylist; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof VideoPlaylistResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof VideoPlaylistResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof VideoPlaylistResource - */ - 'professional': boolean; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof VideoPlaylistResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof VideoPlaylistResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof VideoPlaylistResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResource - */ - 'location'?: string; + /** + * + * @type {number} + * @memberof VideoPlaylistResource + */ + id: number + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof VideoPlaylistResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof VideoPlaylistResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof VideoPlaylistResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof VideoPlaylistResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof VideoPlaylistResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof VideoPlaylistResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof VideoPlaylistResource + */ + views: number + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof VideoPlaylistResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof VideoPlaylistResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + format: Array + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + pace: Array + /** + * + * @type {VideoPlaylistResourceResourceTypeEnum} + * @memberof VideoPlaylistResource + */ + resource_type: VideoPlaylistResourceResourceTypeEnum + /** + * + * @type {VideoPlaylist} + * @memberof VideoPlaylistResource + */ + video_playlist: VideoPlaylist + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + title: string + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof VideoPlaylistResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof VideoPlaylistResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof VideoPlaylistResource + */ + professional: boolean + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof VideoPlaylistResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof VideoPlaylistResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof VideoPlaylistResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResource + */ + location?: string } - /** * Serializer for video playlist resources * @export * @interface VideoPlaylistResourceRequest */ export interface VideoPlaylistResourceRequest { - /** - * - * @type {Array} - * @memberof VideoPlaylistResourceRequest - */ - 'topics'?: Array; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof VideoPlaylistResourceRequest - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof VideoPlaylistResourceRequest - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof VideoPlaylistResourceRequest - */ - 'ocw_topics'?: Array; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof VideoPlaylistResourceRequest - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof VideoPlaylistResourceRequest - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof VideoPlaylistResourceRequest - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'continuing_ed_credits'?: string | null; - /** - * - * @type {string} - * @memberof VideoPlaylistResourceRequest - */ - 'location'?: string; + /** + * + * @type {Array} + * @memberof VideoPlaylistResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + readable_id: string + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof VideoPlaylistResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof VideoPlaylistResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof VideoPlaylistResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof VideoPlaylistResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof VideoPlaylistResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof VideoPlaylistResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof VideoPlaylistResourceRequest + */ + location?: string } - /** - * + * * @export * @enum {string} */ export const VideoPlaylistResourceResourceTypeEnum = { - VideoPlaylist: 'video_playlist' -} as const; - -export type VideoPlaylistResourceResourceTypeEnum = typeof VideoPlaylistResourceResourceTypeEnum[keyof typeof VideoPlaylistResourceResourceTypeEnum]; + VideoPlaylist: "video_playlist", +} as const +export type VideoPlaylistResourceResourceTypeEnum = + (typeof VideoPlaylistResourceResourceTypeEnum)[keyof typeof VideoPlaylistResourceResourceTypeEnum] /** * Serializer for the Video model @@ -6227,18 +6237,18 @@ export type VideoPlaylistResourceResourceTypeEnum = typeof VideoPlaylistResource * @interface VideoRequest */ export interface VideoRequest { - /** - * - * @type {string} - * @memberof VideoRequest - */ - 'duration': string; - /** - * - * @type {string} - * @memberof VideoRequest - */ - 'transcript'?: string; + /** + * + * @type {string} + * @memberof VideoRequest + */ + duration: string + /** + * + * @type {string} + * @memberof VideoRequest + */ + transcript?: string } /** * Serializer for video resources @@ -6246,702 +6256,885 @@ export interface VideoRequest { * @interface VideoResource */ export interface VideoResource { + /** + * + * @type {number} + * @memberof VideoResource + */ + id: number + /** + * + * @type {Array} + * @memberof VideoResource + */ + topics?: Array + /** + * + * @type {number} + * @memberof VideoResource + */ + position: number | null + /** + * + * @type {LearningResourceOfferor} + * @memberof VideoResource + */ + offered_by: LearningResourceOfferor | null + /** + * + * @type {LearningResourcePlatform} + * @memberof VideoResource + */ + platform: LearningResourcePlatform | null + /** + * + * @type {Array} + * @memberof VideoResource + */ + course_feature: Array | null + /** + * + * @type {Array} + * @memberof VideoResource + */ + departments: Array | null + /** + * + * @type {boolean} + * @memberof VideoResource + */ + certification: boolean + /** + * + * @type {CourseResourceCertificationType} + * @memberof VideoResource + */ + certification_type: CourseResourceCertificationType + /** + * + * @type {Array} + * @memberof VideoResource + */ + prices: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + resource_prices: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + runs: Array | null + /** + * + * @type {LearningResourceImage} + * @memberof VideoResource + */ + image: LearningResourceImage | null + /** + * + * @type {Array} + * @memberof VideoResource + */ + learning_path_parents: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + user_list_parents: Array + /** + * + * @type {number} + * @memberof VideoResource + */ + views: number + /** + * + * @type {Array} + * @memberof VideoResource + */ + delivery: Array + /** + * Return true if the resource is free/has a free option + * @type {boolean} + * @memberof VideoResource + */ + free: boolean + /** + * Return the resource category of the resource + * @type {string} + * @memberof VideoResource + */ + resource_category: string + /** + * + * @type {Array} + * @memberof VideoResource + */ + format: Array + /** + * + * @type {Array} + * @memberof VideoResource + */ + pace: Array + /** + * + * @type {VideoResourceResourceTypeEnum} + * @memberof VideoResource + */ + resource_type: VideoResourceResourceTypeEnum + /** + * + * @type {Video} + * @memberof VideoResource + */ + video: Video + /** + * + * @type {string} + * @memberof VideoResource + */ + readable_id: string + /** + * + * @type {string} + * @memberof VideoResource + */ + title: string + /** + * + * @type {string} + * @memberof VideoResource + */ + description?: string | null + /** + * + * @type {string} + * @memberof VideoResource + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof VideoResource + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof VideoResource + */ + published?: boolean + /** + * + * @type {Array} + * @memberof VideoResource + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof VideoResource + */ + url?: string | null + /** + * + * @type {Array} + * @memberof VideoResource + */ + ocw_topics?: Array + /** + * + * @type {boolean} + * @memberof VideoResource + */ + professional: boolean + /** + * + * @type {string} + * @memberof VideoResource + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof VideoResource + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof VideoResource + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof VideoResource + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof VideoResource + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof VideoResource + */ + location?: string +} + +/** + * Serializer for video resources + * @export + * @interface VideoResourceRequest + */ +export interface VideoResourceRequest { + /** + * + * @type {Array} + * @memberof VideoResourceRequest + */ + topics?: Array + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + readable_id: string + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + title: string + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + description?: string | null + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + full_description?: string | null + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + last_modified?: string | null + /** + * + * @type {boolean} + * @memberof VideoResourceRequest + */ + published?: boolean + /** + * + * @type {Array} + * @memberof VideoResourceRequest + */ + languages?: Array | null + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + url?: string | null + /** + * + * @type {Array} + * @memberof VideoResourceRequest + */ + ocw_topics?: Array + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + next_start_date?: string | null + /** + * + * @type {AvailabilityEnum} + * @memberof VideoResourceRequest + */ + availability?: AvailabilityEnum | null + /** + * + * @type {number} + * @memberof VideoResourceRequest + */ + completeness?: number + /** + * + * @type {boolean} + * @memberof VideoResourceRequest + */ + license_cc?: boolean + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + continuing_ed_credits?: string | null + /** + * + * @type {string} + * @memberof VideoResourceRequest + */ + location?: string +} + +/** + * + * @export + * @enum {string} + */ + +export const VideoResourceResourceTypeEnum = { + Video: "video", +} as const + +export type VideoResourceResourceTypeEnum = + (typeof VideoResourceResourceTypeEnum)[keyof typeof VideoResourceResourceTypeEnum] + +/** + * ArticlesApi - axios parameter creator + * @export + */ +export const ArticlesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * - * @type {number} - * @memberof VideoResource - */ - 'id': number; - /** - * - * @type {Array} - * @memberof VideoResource + * Create a new article + * @summary Create + * @param {ArticleRequest} ArticleRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'topics'?: Array; + articlesCreate: async ( + ArticleRequest: ArticleRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'ArticleRequest' is not null or undefined + assertParamExists("articlesCreate", "ArticleRequest", ArticleRequest) + const localVarPath = `/api/v1/articles/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + ArticleRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {number} - * @memberof VideoResource + * Delete an article + * @summary Destroy + * @param {number} id A unique integer value identifying this article. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'position': number | null; + articlesDestroy: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("articlesDestroy", "id", id) + const localVarPath = `/api/v1/articles/{id}/`.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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {LearningResourceOfferor} - * @memberof VideoResource + * Get a paginated list of articles + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'offered_by': LearningResourceOfferor | null; + articlesList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/articles/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {LearningResourcePlatform} - * @memberof VideoResource - */ - 'platform': LearningResourcePlatform | null; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'course_feature': Array | null; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'departments': Array | null; - /** - * - * @type {boolean} - * @memberof VideoResource - */ - 'certification': boolean; - /** - * - * @type {CourseResourceCertificationType} - * @memberof VideoResource - */ - 'certification_type': CourseResourceCertificationType; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'prices': Array; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'resource_prices': Array; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'runs': Array | null; - /** - * - * @type {LearningResourceImage} - * @memberof VideoResource - */ - 'image': LearningResourceImage | null; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'learning_path_parents': Array; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'user_list_parents': Array; - /** - * - * @type {number} - * @memberof VideoResource - */ - 'views': number; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'delivery': Array; - /** - * Return true if the resource is free/has a free option - * @type {boolean} - * @memberof VideoResource - */ - 'free': boolean; - /** - * Return the resource category of the resource - * @type {string} - * @memberof VideoResource - */ - 'resource_category': string; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'format': Array; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'pace': Array; - /** - * - * @type {VideoResourceResourceTypeEnum} - * @memberof VideoResource - */ - 'resource_type': VideoResourceResourceTypeEnum; - /** - * - * @type {Video} - * @memberof VideoResource - */ - 'video': Video; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'title': string; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof VideoResource - */ - 'published'?: boolean; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'languages'?: Array | null; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'url'?: string | null; - /** - * - * @type {Array} - * @memberof VideoResource - */ - 'ocw_topics'?: Array; - /** - * - * @type {boolean} - * @memberof VideoResource - */ - 'professional': boolean; - /** - * - * @type {string} - * @memberof VideoResource - */ - 'next_start_date'?: string | null; - /** - * - * @type {AvailabilityEnum} - * @memberof VideoResource - */ - 'availability'?: AvailabilityEnum | null; - /** - * - * @type {number} - * @memberof VideoResource - */ - 'completeness'?: number; - /** - * - * @type {boolean} - * @memberof VideoResource - */ - 'license_cc'?: boolean; - /** - * - * @type {string} - * @memberof VideoResource + * Update an article + * @summary Update + * @param {number} id A unique integer value identifying this article. + * @param {PatchedArticleRequest} [PatchedArticleRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'continuing_ed_credits'?: string | null; + articlesPartialUpdate: async ( + id: number, + PatchedArticleRequest?: PatchedArticleRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("articlesPartialUpdate", "id", id) + const localVarPath = `/api/v1/articles/{id}/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedArticleRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {string} - * @memberof VideoResource + * Retrieve a single article + * @summary Retrieve + * @param {number} id A unique integer value identifying this article. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'location'?: string; + articlesRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("articlesRetrieve", "id", id) + const localVarPath = `/api/v1/articles/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } - /** - * Serializer for video resources + * ArticlesApi - functional programming interface * @export - * @interface VideoResourceRequest */ -export interface VideoResourceRequest { - /** - * - * @type {Array} - * @memberof VideoResourceRequest - */ - 'topics'?: Array; +export const ArticlesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ArticlesApiAxiosParamCreator(configuration) + return { /** - * - * @type {string} - * @memberof VideoResourceRequest - */ - 'readable_id': string; - /** - * - * @type {string} - * @memberof VideoResourceRequest - */ - 'title': string; - /** - * - * @type {string} - * @memberof VideoResourceRequest - */ - 'description'?: string | null; - /** - * - * @type {string} - * @memberof VideoResourceRequest - */ - 'full_description'?: string | null; - /** - * - * @type {string} - * @memberof VideoResourceRequest - */ - 'last_modified'?: string | null; - /** - * - * @type {boolean} - * @memberof VideoResourceRequest + * Create a new article + * @summary Create + * @param {ArticleRequest} ArticleRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'published'?: boolean; + async articlesCreate( + ArticleRequest: ArticleRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise
+ > { + const localVarAxiosArgs = await localVarAxiosParamCreator.articlesCreate( + ArticleRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ArticlesApi.articlesCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {Array} - * @memberof VideoResourceRequest + * Delete an article + * @summary Destroy + * @param {number} id A unique integer value identifying this article. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'languages'?: Array | null; + async articlesDestroy( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.articlesDestroy( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ArticlesApi.articlesDestroy"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof VideoResourceRequest + * Get a paginated list of articles + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'url'?: string | null; + async articlesList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.articlesList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ArticlesApi.articlesList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {Array} - * @memberof VideoResourceRequest + * Update an article + * @summary Update + * @param {number} id A unique integer value identifying this article. + * @param {PatchedArticleRequest} [PatchedArticleRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'ocw_topics'?: Array; + async articlesPartialUpdate( + id: number, + PatchedArticleRequest?: PatchedArticleRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise
+ > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.articlesPartialUpdate( + id, + PatchedArticleRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ArticlesApi.articlesPartialUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {string} - * @memberof VideoResourceRequest + * Retrieve a single article + * @summary Retrieve + * @param {number} id A unique integer value identifying this article. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'next_start_date'?: string | null; + async articlesRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise
+ > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.articlesRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ArticlesApi.articlesRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} + +/** + * ArticlesApi - factory interface + * @export + */ +export const ArticlesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ArticlesApiFp(configuration) + return { /** - * - * @type {AvailabilityEnum} - * @memberof VideoResourceRequest + * Create a new article + * @summary Create + * @param {ArticlesApiArticlesCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'availability'?: AvailabilityEnum | null; + articlesCreate( + requestParameters: ArticlesApiArticlesCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise
{ + return localVarFp + .articlesCreate(requestParameters.ArticleRequest, options) + .then((request) => request(axios, basePath)) + }, /** - * - * @type {number} - * @memberof VideoResourceRequest + * Delete an article + * @summary Destroy + * @param {ArticlesApiArticlesDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'completeness'?: number; + articlesDestroy( + requestParameters: ArticlesApiArticlesDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .articlesDestroy(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** - * - * @type {boolean} - * @memberof VideoResourceRequest + * Get a paginated list of articles + * @summary List + * @param {ArticlesApiArticlesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'license_cc'?: boolean; + articlesList( + requestParameters: ArticlesApiArticlesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .articlesList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * - * @type {string} - * @memberof VideoResourceRequest + * Update an article + * @summary Update + * @param {ArticlesApiArticlesPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'continuing_ed_credits'?: string | null; + articlesPartialUpdate( + requestParameters: ArticlesApiArticlesPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise
{ + return localVarFp + .articlesPartialUpdate( + requestParameters.id, + requestParameters.PatchedArticleRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * - * @type {string} - * @memberof VideoResourceRequest + * Retrieve a single article + * @summary Retrieve + * @param {ArticlesApiArticlesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - 'location'?: string; + articlesRetrieve( + requestParameters: ArticlesApiArticlesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise
{ + return localVarFp + .articlesRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } - -/** - * - * @export - * @enum {string} - */ - -export const VideoResourceResourceTypeEnum = { - Video: 'video' -} as const; - -export type VideoResourceResourceTypeEnum = typeof VideoResourceResourceTypeEnum[keyof typeof VideoResourceResourceTypeEnum]; - - - -/** - * ArticlesApi - axios parameter creator - * @export - */ -export const ArticlesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Create a new article - * @summary Create - * @param {ArticleRequest} ArticleRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesCreate: async (ArticleRequest: ArticleRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'ArticleRequest' is not null or undefined - assertParamExists('articlesCreate', 'ArticleRequest', ArticleRequest) - const localVarPath = `/api/v1/articles/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(ArticleRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Delete an article - * @summary Destroy - * @param {number} id A unique integer value identifying this article. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesDestroy: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('articlesDestroy', 'id', id) - const localVarPath = `/api/v1/articles/{id}/` - .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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a paginated list of articles - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/articles/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update an article - * @summary Update - * @param {number} id A unique integer value identifying this article. - * @param {PatchedArticleRequest} [PatchedArticleRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesPartialUpdate: async (id: number, PatchedArticleRequest?: PatchedArticleRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('articlesPartialUpdate', 'id', id) - const localVarPath = `/api/v1/articles/{id}/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedArticleRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single article - * @summary Retrieve - * @param {number} id A unique integer value identifying this article. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('articlesRetrieve', 'id', id) - const localVarPath = `/api/v1/articles/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ArticlesApi - functional programming interface - * @export - */ -export const ArticlesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ArticlesApiAxiosParamCreator(configuration) - return { - /** - * Create a new article - * @summary Create - * @param {ArticleRequest} ArticleRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async articlesCreate(ArticleRequest: ArticleRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
> { - const localVarAxiosArgs = await localVarAxiosParamCreator.articlesCreate(ArticleRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ArticlesApi.articlesCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Delete an article - * @summary Destroy - * @param {number} id A unique integer value identifying this article. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async articlesDestroy(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.articlesDestroy(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ArticlesApi.articlesDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a paginated list of articles - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async articlesList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.articlesList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ArticlesApi.articlesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Update an article - * @summary Update - * @param {number} id A unique integer value identifying this article. - * @param {PatchedArticleRequest} [PatchedArticleRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async articlesPartialUpdate(id: number, PatchedArticleRequest?: PatchedArticleRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
> { - const localVarAxiosArgs = await localVarAxiosParamCreator.articlesPartialUpdate(id, PatchedArticleRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ArticlesApi.articlesPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single article - * @summary Retrieve - * @param {number} id A unique integer value identifying this article. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async articlesRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise
> { - const localVarAxiosArgs = await localVarAxiosParamCreator.articlesRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ArticlesApi.articlesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * ArticlesApi - factory interface - * @export - */ -export const ArticlesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ArticlesApiFp(configuration) - return { - /** - * Create a new article - * @summary Create - * @param {ArticlesApiArticlesCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesCreate(requestParameters: ArticlesApiArticlesCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise
{ - return localVarFp.articlesCreate(requestParameters.ArticleRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Delete an article - * @summary Destroy - * @param {ArticlesApiArticlesDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesDestroy(requestParameters: ArticlesApiArticlesDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.articlesDestroy(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * Get a paginated list of articles - * @summary List - * @param {ArticlesApiArticlesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesList(requestParameters: ArticlesApiArticlesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.articlesList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * Update an article - * @summary Update - * @param {ArticlesApiArticlesPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesPartialUpdate(requestParameters: ArticlesApiArticlesPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise
{ - return localVarFp.articlesPartialUpdate(requestParameters.id, requestParameters.PatchedArticleRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Retrieve a single article - * @summary Retrieve - * @param {ArticlesApiArticlesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - articlesRetrieve(requestParameters: ArticlesApiArticlesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise
{ - return localVarFp.articlesRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; - /** * Request parameters for articlesCreate operation in ArticlesApi. * @export * @interface ArticlesApiArticlesCreateRequest */ export interface ArticlesApiArticlesCreateRequest { - /** - * - * @type {ArticleRequest} - * @memberof ArticlesApiArticlesCreate - */ - readonly ArticleRequest: ArticleRequest + /** + * + * @type {ArticleRequest} + * @memberof ArticlesApiArticlesCreate + */ + readonly ArticleRequest: ArticleRequest } /** @@ -6950,12 +7143,12 @@ export interface ArticlesApiArticlesCreateRequest { * @interface ArticlesApiArticlesDestroyRequest */ export interface ArticlesApiArticlesDestroyRequest { - /** - * A unique integer value identifying this article. - * @type {number} - * @memberof ArticlesApiArticlesDestroy - */ - readonly id: number + /** + * A unique integer value identifying this article. + * @type {number} + * @memberof ArticlesApiArticlesDestroy + */ + readonly id: number } /** @@ -6964,19 +7157,19 @@ export interface ArticlesApiArticlesDestroyRequest { * @interface ArticlesApiArticlesListRequest */ export interface ArticlesApiArticlesListRequest { - /** - * Number of results to return per page. - * @type {number} - * @memberof ArticlesApiArticlesList - */ - readonly limit?: number - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof ArticlesApiArticlesList - */ - readonly offset?: number + /** + * Number of results to return per page. + * @type {number} + * @memberof ArticlesApiArticlesList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof ArticlesApiArticlesList + */ + readonly offset?: number } /** @@ -6985,19 +7178,19 @@ export interface ArticlesApiArticlesListRequest { * @interface ArticlesApiArticlesPartialUpdateRequest */ export interface ArticlesApiArticlesPartialUpdateRequest { - /** - * A unique integer value identifying this article. - * @type {number} - * @memberof ArticlesApiArticlesPartialUpdate - */ - readonly id: number - - /** - * - * @type {PatchedArticleRequest} - * @memberof ArticlesApiArticlesPartialUpdate - */ - readonly PatchedArticleRequest?: PatchedArticleRequest + /** + * A unique integer value identifying this article. + * @type {number} + * @memberof ArticlesApiArticlesPartialUpdate + */ + readonly id: number + + /** + * + * @type {PatchedArticleRequest} + * @memberof ArticlesApiArticlesPartialUpdate + */ + readonly PatchedArticleRequest?: PatchedArticleRequest } /** @@ -7006,12 +7199,12 @@ export interface ArticlesApiArticlesPartialUpdateRequest { * @interface ArticlesApiArticlesRetrieveRequest */ export interface ArticlesApiArticlesRetrieveRequest { - /** - * A unique integer value identifying this article. - * @type {number} - * @memberof ArticlesApiArticlesRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this article. + * @type {number} + * @memberof ArticlesApiArticlesRetrieve + */ + readonly id: number } /** @@ -7021,1589 +7214,2247 @@ export interface ArticlesApiArticlesRetrieveRequest { * @extends {BaseAPI} */ export class ArticlesApi extends BaseAPI { - /** - * Create a new article - * @summary Create - * @param {ArticlesApiArticlesCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArticlesApi - */ - public articlesCreate(requestParameters: ArticlesApiArticlesCreateRequest, options?: RawAxiosRequestConfig) { - return ArticlesApiFp(this.configuration).articlesCreate(requestParameters.ArticleRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Delete an article - * @summary Destroy - * @param {ArticlesApiArticlesDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ArticlesApi - */ - public articlesDestroy(requestParameters: ArticlesApiArticlesDestroyRequest, options?: RawAxiosRequestConfig) { - return ArticlesApiFp(this.configuration).articlesDestroy(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Create a new article + * @summary Create + * @param {ArticlesApiArticlesCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArticlesApi + */ + public articlesCreate( + requestParameters: ArticlesApiArticlesCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return ArticlesApiFp(this.configuration) + .articlesCreate(requestParameters.ArticleRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Delete an article + * @summary Destroy + * @param {ArticlesApiArticlesDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArticlesApi + */ + public articlesDestroy( + requestParameters: ArticlesApiArticlesDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return ArticlesApiFp(this.configuration) + .articlesDestroy(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of articles + * @summary List + * @param {ArticlesApiArticlesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArticlesApi + */ + public articlesList( + requestParameters: ArticlesApiArticlesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ArticlesApiFp(this.configuration) + .articlesList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Update an article + * @summary Update + * @param {ArticlesApiArticlesPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArticlesApi + */ + public articlesPartialUpdate( + requestParameters: ArticlesApiArticlesPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return ArticlesApiFp(this.configuration) + .articlesPartialUpdate( + requestParameters.id, + requestParameters.PatchedArticleRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Retrieve a single article + * @summary Retrieve + * @param {ArticlesApiArticlesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ArticlesApi + */ + public articlesRetrieve( + requestParameters: ArticlesApiArticlesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ArticlesApiFp(this.configuration) + .articlesRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} +/** + * ContentFileSearchApi - axios parameter creator + * @export + */ +export const ContentFileSearchApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Get a paginated list of articles - * @summary List - * @param {ArticlesApiArticlesListRequest} requestParameters Request parameters. + * Search for content files + * @summary Search + * @param {Array} [aggregations] Show resource counts by category + * @param {Array} [content_feature_type] The feature type of the content file. Possible options are at api/v1/course_features/ + * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations + * @param {Array} [id] The id value for the content file + * @param {number} [limit] Number of results to return per page + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {string} [q] The search text + * @param {Array} [resource_id] The id value of the parent learning resource for the content file + * @param {Array} [run_id] The id value of the run that the content file belongs to + * @param {ContentFileSearchRetrieveSortbyEnum} [sortby] if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ArticlesApi */ - public articlesList(requestParameters: ArticlesApiArticlesListRequest = {}, options?: RawAxiosRequestConfig) { - return ArticlesApiFp(this.configuration).articlesList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } + contentFileSearchRetrieve: async ( + aggregations?: Array, + content_feature_type?: Array, + dev_mode?: boolean | null, + id?: Array, + limit?: number, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + q?: string, + resource_id?: Array, + run_id?: Array, + sortby?: ContentFileSearchRetrieveSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/content_file_search/` + // 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 (aggregations) { + localVarQueryParameter["aggregations"] = aggregations + } + + if (content_feature_type) { + localVarQueryParameter["content_feature_type"] = content_feature_type + } + + if (dev_mode !== undefined) { + localVarQueryParameter["dev_mode"] = dev_mode + } + + if (id) { + localVarQueryParameter["id"] = id + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (ocw_topic) { + localVarQueryParameter["ocw_topic"] = ocw_topic + } + + if (offered_by) { + localVarQueryParameter["offered_by"] = offered_by + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (platform) { + localVarQueryParameter["platform"] = platform + } + + if (q !== undefined) { + localVarQueryParameter["q"] = q + } + + if (resource_id) { + localVarQueryParameter["resource_id"] = resource_id + } + + if (run_id) { + localVarQueryParameter["run_id"] = run_id + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + if (topic) { + localVarQueryParameter["topic"] = topic + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} +/** + * ContentFileSearchApi - functional programming interface + * @export + */ +export const ContentFileSearchApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + ContentFileSearchApiAxiosParamCreator(configuration) + return { /** - * Update an article - * @summary Update - * @param {ArticlesApiArticlesPartialUpdateRequest} requestParameters Request parameters. + * Search for content files + * @summary Search + * @param {Array} [aggregations] Show resource counts by category + * @param {Array} [content_feature_type] The feature type of the content file. Possible options are at api/v1/course_features/ + * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations + * @param {Array} [id] The id value for the content file + * @param {number} [limit] Number of results to return per page + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {string} [q] The search text + * @param {Array} [resource_id] The id value of the parent learning resource for the content file + * @param {Array} [run_id] The id value of the run that the content file belongs to + * @param {ContentFileSearchRetrieveSortbyEnum} [sortby] if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ArticlesApi */ - public articlesPartialUpdate(requestParameters: ArticlesApiArticlesPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return ArticlesApiFp(this.configuration).articlesPartialUpdate(requestParameters.id, requestParameters.PatchedArticleRequest, options).then((request) => request(this.axios, this.basePath)); - } + async contentFileSearchRetrieve( + aggregations?: Array, + content_feature_type?: Array, + dev_mode?: boolean | null, + id?: Array, + limit?: number, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + q?: string, + resource_id?: Array, + run_id?: Array, + sortby?: ContentFileSearchRetrieveSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.contentFileSearchRetrieve( + aggregations, + content_feature_type, + dev_mode, + id, + limit, + ocw_topic, + offered_by, + offset, + platform, + q, + resource_id, + run_id, + sortby, + topic, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ContentFileSearchApi.contentFileSearchRetrieve"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} +/** + * ContentFileSearchApi - factory interface + * @export + */ +export const ContentFileSearchApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentFileSearchApiFp(configuration) + return { /** - * Retrieve a single article - * @summary Retrieve - * @param {ArticlesApiArticlesRetrieveRequest} requestParameters Request parameters. + * Search for content files + * @summary Search + * @param {ContentFileSearchApiContentFileSearchRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ArticlesApi */ - public articlesRetrieve(requestParameters: ArticlesApiArticlesRetrieveRequest, options?: RawAxiosRequestConfig) { - return ArticlesApiFp(this.configuration).articlesRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + contentFileSearchRetrieve( + requestParameters: ContentFileSearchApiContentFileSearchRetrieveRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .contentFileSearchRetrieve( + requestParameters.aggregations, + requestParameters.content_feature_type, + requestParameters.dev_mode, + requestParameters.id, + requestParameters.limit, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.q, + requestParameters.resource_id, + requestParameters.run_id, + requestParameters.sortby, + requestParameters.topic, + options, + ) + .then((request) => request(axios, basePath)) + }, + } } - - /** - * ContentFileSearchApi - axios parameter creator + * Request parameters for contentFileSearchRetrieve operation in ContentFileSearchApi. * @export + * @interface ContentFileSearchApiContentFileSearchRetrieveRequest */ -export const ContentFileSearchApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Search for content files - * @summary Search - * @param {Array} [aggregations] Show resource counts by category - * @param {Array} [content_feature_type] The feature type of the content file. Possible options are at api/v1/course_features/ - * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations - * @param {Array} [id] The id value for the content file - * @param {number} [limit] Number of results to return per page - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {string} [q] The search text - * @param {Array} [resource_id] The id value of the parent learning resource for the content file - * @param {Array} [run_id] The id value of the run that the content file belongs to - * @param {ContentFileSearchRetrieveSortbyEnum} [sortby] if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - contentFileSearchRetrieve: async (aggregations?: Array, content_feature_type?: Array, dev_mode?: boolean | null, id?: Array, limit?: number, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, q?: string, resource_id?: Array, run_id?: Array, sortby?: ContentFileSearchRetrieveSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/content_file_search/`; - // 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 (aggregations) { - localVarQueryParameter['aggregations'] = aggregations; - } - - if (content_feature_type) { - localVarQueryParameter['content_feature_type'] = content_feature_type; - } - - if (dev_mode !== undefined) { - localVarQueryParameter['dev_mode'] = dev_mode; - } - - if (id) { - localVarQueryParameter['id'] = id; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (ocw_topic) { - localVarQueryParameter['ocw_topic'] = ocw_topic; - } - - if (offered_by) { - localVarQueryParameter['offered_by'] = offered_by; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (platform) { - localVarQueryParameter['platform'] = platform; - } - - if (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (resource_id) { - localVarQueryParameter['resource_id'] = resource_id; - } - - if (run_id) { - localVarQueryParameter['run_id'] = run_id; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - if (topic) { - localVarQueryParameter['topic'] = topic; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface ContentFileSearchApiContentFileSearchRetrieveRequest { + /** + * Show resource counts by category + * @type {Array<'topic' | 'content_feature_type' | 'platform' | 'offered_by'>} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly aggregations?: Array + + /** + * The feature type of the content file. Possible options are at api/v1/course_features/ + * @type {Array} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly content_feature_type?: Array + + /** + * If true return raw open search results with score explanations + * @type {boolean} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly dev_mode?: boolean | null + + /** + * The id value for the content file + * @type {Array} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly id?: Array + + /** + * Number of results to return per page + * @type {number} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly limit?: number + + /** + * The ocw topic name. + * @type {Array} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly ocw_topic?: Array + + /** + * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results + * @type {number} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly offset?: number + + /** + * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly platform?: Array + + /** + * The search text + * @type {string} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly q?: string + + /** + * The id value of the parent learning resource for the content file + * @type {Array} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly resource_id?: Array + + /** + * The id value of the run that the content file belongs to + * @type {Array} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly run_id?: Array + + /** + * if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id + * @type {'id' | '-id' | 'resource_readable_id' | '-resource_readable_id'} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly sortby?: ContentFileSearchRetrieveSortbyEnum + + /** + * The topic name. To see a list of options go to api/v1/topics/ + * @type {Array} + * @memberof ContentFileSearchApiContentFileSearchRetrieve + */ + readonly topic?: Array +} /** - * ContentFileSearchApi - functional programming interface + * ContentFileSearchApi - object-oriented interface * @export + * @class ContentFileSearchApi + * @extends {BaseAPI} */ -export const ContentFileSearchApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ContentFileSearchApiAxiosParamCreator(configuration) - return { - /** - * Search for content files - * @summary Search - * @param {Array} [aggregations] Show resource counts by category - * @param {Array} [content_feature_type] The feature type of the content file. Possible options are at api/v1/course_features/ - * @param {boolean | null} [dev_mode] If true return raw open search results with score explanations - * @param {Array} [id] The id value for the content file - * @param {number} [limit] Number of results to return per page - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {string} [q] The search text - * @param {Array} [resource_id] The id value of the parent learning resource for the content file - * @param {Array} [run_id] The id value of the run that the content file belongs to - * @param {ContentFileSearchRetrieveSortbyEnum} [sortby] if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async contentFileSearchRetrieve(aggregations?: Array, content_feature_type?: Array, dev_mode?: boolean | null, id?: Array, limit?: number, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, q?: string, resource_id?: Array, run_id?: Array, sortby?: ContentFileSearchRetrieveSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.contentFileSearchRetrieve(aggregations, content_feature_type, dev_mode, id, limit, ocw_topic, offered_by, offset, platform, q, resource_id, run_id, sortby, topic, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ContentFileSearchApi.contentFileSearchRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export class ContentFileSearchApi extends BaseAPI { + /** + * Search for content files + * @summary Search + * @param {ContentFileSearchApiContentFileSearchRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentFileSearchApi + */ + public contentFileSearchRetrieve( + requestParameters: ContentFileSearchApiContentFileSearchRetrieveRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ContentFileSearchApiFp(this.configuration) + .contentFileSearchRetrieve( + requestParameters.aggregations, + requestParameters.content_feature_type, + requestParameters.dev_mode, + requestParameters.id, + requestParameters.limit, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.q, + requestParameters.resource_id, + requestParameters.run_id, + requestParameters.sortby, + requestParameters.topic, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * ContentFileSearchApi - factory interface * @export */ -export const ContentFileSearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ContentFileSearchApiFp(configuration) - return { - /** - * Search for content files - * @summary Search - * @param {ContentFileSearchApiContentFileSearchRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - contentFileSearchRetrieve(requestParameters: ContentFileSearchApiContentFileSearchRetrieveRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.contentFileSearchRetrieve(requestParameters.aggregations, requestParameters.content_feature_type, requestParameters.dev_mode, requestParameters.id, requestParameters.limit, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.q, requestParameters.resource_id, requestParameters.run_id, requestParameters.sortby, requestParameters.topic, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for contentFileSearchRetrieve operation in ContentFileSearchApi. - * @export - * @interface ContentFileSearchApiContentFileSearchRetrieveRequest - */ -export interface ContentFileSearchApiContentFileSearchRetrieveRequest { - /** - * Show resource counts by category - * @type {Array<'topic' | 'content_feature_type' | 'platform' | 'offered_by'>} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly aggregations?: Array - - /** - * The feature type of the content file. Possible options are at api/v1/course_features/ - * @type {Array} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly content_feature_type?: Array - - /** - * If true return raw open search results with score explanations - * @type {boolean} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly dev_mode?: boolean | null - - /** - * The id value for the content file - * @type {Array} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly id?: Array - - /** - * Number of results to return per page - * @type {number} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly limit?: number - - /** - * The ocw topic name. - * @type {Array} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly ocw_topic?: Array - - /** - * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education - * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results - * @type {number} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly offset?: number - - /** - * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly platform?: Array - - /** - * The search text - * @type {string} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly q?: string - - /** - * The id value of the parent learning resource for the content file - * @type {Array} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly resource_id?: Array - - /** - * The id value of the run that the content file belongs to - * @type {Array} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly run_id?: Array - - /** - * if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id - * @type {'id' | '-id' | 'resource_readable_id' | '-resource_readable_id'} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly sortby?: ContentFileSearchRetrieveSortbyEnum - - /** - * The topic name. To see a list of options go to api/v1/topics/ - * @type {Array} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly topic?: Array -} - -/** - * ContentFileSearchApi - object-oriented interface - * @export - * @class ContentFileSearchApi - * @extends {BaseAPI} - */ -export class ContentFileSearchApi extends BaseAPI { - /** - * Search for content files - * @summary Search - * @param {ContentFileSearchApiContentFileSearchRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ContentFileSearchApi - */ - public contentFileSearchRetrieve(requestParameters: ContentFileSearchApiContentFileSearchRetrieveRequest = {}, options?: RawAxiosRequestConfig) { - return ContentFileSearchApiFp(this.configuration).contentFileSearchRetrieve(requestParameters.aggregations, requestParameters.content_feature_type, requestParameters.dev_mode, requestParameters.id, requestParameters.limit, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.q, requestParameters.resource_id, requestParameters.run_id, requestParameters.sortby, requestParameters.topic, options).then((request) => request(this.axios, this.basePath)); - } -} - -/** - * @export - */ -export const ContentFileSearchRetrieveAggregationsEnum = { - Topic: 'topic', - ContentFeatureType: 'content_feature_type', - Platform: 'platform', - OfferedBy: 'offered_by' -} as const; -export type ContentFileSearchRetrieveAggregationsEnum = typeof ContentFileSearchRetrieveAggregationsEnum[keyof typeof ContentFileSearchRetrieveAggregationsEnum]; +export const ContentFileSearchRetrieveAggregationsEnum = { + Topic: "topic", + ContentFeatureType: "content_feature_type", + Platform: "platform", + OfferedBy: "offered_by", +} as const +export type ContentFileSearchRetrieveAggregationsEnum = + (typeof ContentFileSearchRetrieveAggregationsEnum)[keyof typeof ContentFileSearchRetrieveAggregationsEnum] /** * @export */ export const ContentFileSearchRetrieveOfferedByEnum = { - Mitx: 'mitx', - Ocw: 'ocw', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Mitpe: 'mitpe', - See: 'see' -} as const; -export type ContentFileSearchRetrieveOfferedByEnum = typeof ContentFileSearchRetrieveOfferedByEnum[keyof typeof ContentFileSearchRetrieveOfferedByEnum]; + Mitx: "mitx", + Ocw: "ocw", + Bootcamps: "bootcamps", + Xpro: "xpro", + Mitpe: "mitpe", + See: "see", +} as const +export type ContentFileSearchRetrieveOfferedByEnum = + (typeof ContentFileSearchRetrieveOfferedByEnum)[keyof typeof ContentFileSearchRetrieveOfferedByEnum] /** * @export */ export const ContentFileSearchRetrievePlatformEnum = { - Edx: 'edx', - Ocw: 'ocw', - Oll: 'oll', - Mitxonline: 'mitxonline', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Csail: 'csail', - Mitpe: 'mitpe', - See: 'see', - Scc: 'scc', - Ctl: 'ctl', - Whu: 'whu', - Susskind: 'susskind', - Globalalumni: 'globalalumni', - Simplilearn: 'simplilearn', - Emeritus: 'emeritus', - Podcast: 'podcast', - Youtube: 'youtube' -} as const; -export type ContentFileSearchRetrievePlatformEnum = typeof ContentFileSearchRetrievePlatformEnum[keyof typeof ContentFileSearchRetrievePlatformEnum]; + Edx: "edx", + Ocw: "ocw", + Oll: "oll", + Mitxonline: "mitxonline", + Bootcamps: "bootcamps", + Xpro: "xpro", + Csail: "csail", + Mitpe: "mitpe", + See: "see", + Scc: "scc", + Ctl: "ctl", + Whu: "whu", + Susskind: "susskind", + Globalalumni: "globalalumni", + Simplilearn: "simplilearn", + Emeritus: "emeritus", + Podcast: "podcast", + Youtube: "youtube", +} as const +export type ContentFileSearchRetrievePlatformEnum = + (typeof ContentFileSearchRetrievePlatformEnum)[keyof typeof ContentFileSearchRetrievePlatformEnum] /** * @export */ export const ContentFileSearchRetrieveSortbyEnum = { - Id: 'id', - Id2: '-id', - ResourceReadableId: 'resource_readable_id', - ResourceReadableId2: '-resource_readable_id' -} as const; -export type ContentFileSearchRetrieveSortbyEnum = typeof ContentFileSearchRetrieveSortbyEnum[keyof typeof ContentFileSearchRetrieveSortbyEnum]; - + Id: "id", + Id2: "-id", + ResourceReadableId: "resource_readable_id", + ResourceReadableId2: "-resource_readable_id", +} as const +export type ContentFileSearchRetrieveSortbyEnum = + (typeof ContentFileSearchRetrieveSortbyEnum)[keyof typeof ContentFileSearchRetrieveSortbyEnum] /** * ContentfilesApi - axios parameter creator * @export */ -export const ContentfilesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Viewset for ContentFiles - * @summary List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - contentfilesList: async (learning_resource_id: number, content_feature_type?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, run_id?: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('contentfilesList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/contentfiles/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (content_feature_type) { - localVarQueryParameter['content_feature_type'] = content_feature_type.join(COLLECTION_FORMATS.csv); - } - - 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 (resource_id) { - localVarQueryParameter['resource_id'] = resource_id.join(COLLECTION_FORMATS.csv); - } - - if (run_id) { - localVarQueryParameter['run_id'] = run_id.join(COLLECTION_FORMATS.csv); - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for ContentFiles - * @summary Retrieve - * @param {number} id A unique integer value identifying this contentfile. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - contentfilesRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('contentfilesRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('contentfilesRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/contentfiles/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * ContentfilesApi - functional programming interface - * @export - */ -export const ContentfilesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ContentfilesApiAxiosParamCreator(configuration) - return { - /** - * Viewset for ContentFiles - * @summary List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async contentfilesList(learning_resource_id: number, content_feature_type?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, run_id?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.contentfilesList(learning_resource_id, content_feature_type, limit, offered_by, offset, platform, resource_id, run_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ContentfilesApi.contentfilesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for ContentFiles - * @summary Retrieve - * @param {number} id A unique integer value identifying this contentfile. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async contentfilesRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.contentfilesRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ContentfilesApi.contentfilesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * ContentfilesApi - factory interface - * @export - */ -export const ContentfilesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ContentfilesApiFp(configuration) - return { - /** - * Viewset for ContentFiles - * @summary List - * @param {ContentfilesApiContentfilesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - contentfilesList(requestParameters: ContentfilesApiContentfilesListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.contentfilesList(requestParameters.learning_resource_id, requestParameters.content_feature_type, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.resource_id, requestParameters.run_id, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for ContentFiles - * @summary Retrieve - * @param {ContentfilesApiContentfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - contentfilesRetrieve(requestParameters: ContentfilesApiContentfilesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.contentfilesRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for contentfilesList operation in ContentfilesApi. - * @export - * @interface ContentfilesApiContentfilesListRequest - */ -export interface ContentfilesApiContentfilesListRequest { - /** - * id of the parent learning resource - * @type {number} - * @memberof ContentfilesApiContentfilesList - */ - readonly learning_resource_id: number - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ContentfilesApiContentfilesList - */ - readonly content_feature_type?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof ContentfilesApiContentfilesList - */ - readonly limit?: number - - /** - * The organization that offers a learning resource the content file belongs to * `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 ContentfilesApiContentfilesList - */ - readonly offered_by?: Array - +export const ContentfilesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * The initial index from which to return the results. - * @type {number} - * @memberof ContentfilesApiContentfilesList - */ - readonly offset?: number - - /** - * The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof ContentfilesApiContentfilesList - */ - readonly platform?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ContentfilesApiContentfilesList + * Viewset for ContentFiles + * @summary List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_id?: Array - + contentfilesList: async ( + learning_resource_id: number, + content_feature_type?: Array, + limit?: number, + offered_by?: Array, + offset?: number, + platform?: Array, + resource_id?: Array, + run_id?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "contentfilesList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = `/api/v1/contentfiles/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (content_feature_type) { + localVarQueryParameter["content_feature_type"] = + content_feature_type.join(COLLECTION_FORMATS.csv) + } + + 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 (resource_id) { + localVarQueryParameter["resource_id"] = resource_id.join( + COLLECTION_FORMATS.csv, + ) + } + + if (run_id) { + localVarQueryParameter["run_id"] = run_id.join(COLLECTION_FORMATS.csv) + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ContentfilesApiContentfilesList + * Viewset for ContentFiles + * @summary Retrieve + * @param {number} id A unique integer value identifying this contentfile. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly run_id?: Array + contentfilesRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("contentfilesRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "contentfilesRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = `/api/v1/contentfiles/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for contentfilesRetrieve operation in ContentfilesApi. + * ContentfilesApi - functional programming interface * @export - * @interface ContentfilesApiContentfilesRetrieveRequest */ -export interface ContentfilesApiContentfilesRetrieveRequest { +export const ContentfilesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + ContentfilesApiAxiosParamCreator(configuration) + return { /** - * A unique integer value identifying this contentfile. - * @type {number} - * @memberof ContentfilesApiContentfilesRetrieve + * Viewset for ContentFiles + * @summary List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async contentfilesList( + learning_resource_id: number, + content_feature_type?: Array, + limit?: number, + offered_by?: Array, + offset?: number, + platform?: Array, + resource_id?: Array, + run_id?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.contentfilesList( + learning_resource_id, + content_feature_type, + limit, + offered_by, + offset, + platform, + resource_id, + run_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ContentfilesApi.contentfilesList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * id of the parent learning resource - * @type {number} - * @memberof ContentfilesApiContentfilesRetrieve + * Viewset for ContentFiles + * @summary Retrieve + * @param {number} id A unique integer value identifying this contentfile. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number + async contentfilesRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.contentfilesRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ContentfilesApi.contentfilesRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * ContentfilesApi - object-oriented interface + * ContentfilesApi - factory interface * @export - * @class ContentfilesApi - * @extends {BaseAPI} */ -export class ContentfilesApi extends BaseAPI { +export const ContentfilesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ContentfilesApiFp(configuration) + return { /** * Viewset for ContentFiles * @summary List * @param {ContentfilesApiContentfilesListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ContentfilesApi */ - public contentfilesList(requestParameters: ContentfilesApiContentfilesListRequest, options?: RawAxiosRequestConfig) { - return ContentfilesApiFp(this.configuration).contentfilesList(requestParameters.learning_resource_id, requestParameters.content_feature_type, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.resource_id, requestParameters.run_id, options).then((request) => request(this.axios, this.basePath)); - } - + contentfilesList( + requestParameters: ContentfilesApiContentfilesListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .contentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for ContentFiles * @summary Retrieve * @param {ContentfilesApiContentfilesRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ContentfilesApi */ - public contentfilesRetrieve(requestParameters: ContentfilesApiContentfilesRetrieveRequest, options?: RawAxiosRequestConfig) { - return ContentfilesApiFp(this.configuration).contentfilesRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } + contentfilesRetrieve( + requestParameters: ContentfilesApiContentfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .contentfilesRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, + } } /** + * Request parameters for contentfilesList operation in ContentfilesApi. * @export + * @interface ContentfilesApiContentfilesListRequest */ -export const ContentfilesListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type ContentfilesListOfferedByEnum = typeof ContentfilesListOfferedByEnum[keyof typeof ContentfilesListOfferedByEnum]; +export interface ContentfilesApiContentfilesListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof ContentfilesApiContentfilesList + */ + readonly learning_resource_id: number + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof ContentfilesApiContentfilesList + */ + readonly content_feature_type?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof ContentfilesApiContentfilesList + */ + readonly limit?: number + + /** + * The organization that offers a learning resource the content file belongs to * `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 ContentfilesApiContentfilesList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof ContentfilesApiContentfilesList + */ + readonly offset?: number + + /** + * The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} + * @memberof ContentfilesApiContentfilesList + */ + readonly platform?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof ContentfilesApiContentfilesList + */ + readonly resource_id?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof ContentfilesApiContentfilesList + */ + readonly run_id?: Array +} + /** + * Request parameters for contentfilesRetrieve operation in ContentfilesApi. * @export + * @interface ContentfilesApiContentfilesRetrieveRequest */ -export const ContentfilesListPlatformEnum = { - 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 ContentfilesListPlatformEnum = typeof ContentfilesListPlatformEnum[keyof typeof ContentfilesListPlatformEnum]; - +export interface ContentfilesApiContentfilesRetrieveRequest { + /** + * A unique integer value identifying this contentfile. + * @type {number} + * @memberof ContentfilesApiContentfilesRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof ContentfilesApiContentfilesRetrieve + */ + readonly learning_resource_id: number +} /** - * CourseFeaturesApi - axios parameter creator + * ContentfilesApi - object-oriented interface * @export + * @class ContentfilesApi + * @extends {BaseAPI} */ -export const CourseFeaturesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Course Features and Content Feature Types - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - courseFeaturesList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/course_features/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Course Features and Content Feature Types - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource content tag. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - courseFeaturesRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('courseFeaturesRetrieve', 'id', id) - const localVarPath = `/api/v1/course_features/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export class ContentfilesApi extends BaseAPI { + /** + * Viewset for ContentFiles + * @summary List + * @param {ContentfilesApiContentfilesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentfilesApi + */ + public contentfilesList( + requestParameters: ContentfilesApiContentfilesListRequest, + options?: RawAxiosRequestConfig, + ) { + return ContentfilesApiFp(this.configuration) + .contentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for ContentFiles + * @summary Retrieve + * @param {ContentfilesApiContentfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContentfilesApi + */ + public contentfilesRetrieve( + requestParameters: ContentfilesApiContentfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ContentfilesApiFp(this.configuration) + .contentfilesRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * CourseFeaturesApi - functional programming interface * @export */ -export const CourseFeaturesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CourseFeaturesApiAxiosParamCreator(configuration) - return { - /** - * Course Features and Content Feature Types - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async courseFeaturesList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.courseFeaturesList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['CourseFeaturesApi.courseFeaturesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Course Features and Content Feature Types - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource content tag. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async courseFeaturesRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.courseFeaturesRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['CourseFeaturesApi.courseFeaturesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - +export const ContentfilesListOfferedByEnum = { + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type ContentfilesListOfferedByEnum = + (typeof ContentfilesListOfferedByEnum)[keyof typeof ContentfilesListOfferedByEnum] /** - * CourseFeaturesApi - factory interface * @export */ -export const CourseFeaturesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CourseFeaturesApiFp(configuration) - return { - /** - * Course Features and Content Feature Types - * @summary List - * @param {CourseFeaturesApiCourseFeaturesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - courseFeaturesList(requestParameters: CourseFeaturesApiCourseFeaturesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.courseFeaturesList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * Course Features and Content Feature Types - * @summary Retrieve - * @param {CourseFeaturesApiCourseFeaturesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - courseFeaturesRetrieve(requestParameters: CourseFeaturesApiCourseFeaturesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.courseFeaturesRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const ContentfilesListPlatformEnum = { + 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 ContentfilesListPlatformEnum = + (typeof ContentfilesListPlatformEnum)[keyof typeof ContentfilesListPlatformEnum] /** - * Request parameters for courseFeaturesList operation in CourseFeaturesApi. + * CourseFeaturesApi - axios parameter creator * @export - * @interface CourseFeaturesApiCourseFeaturesListRequest */ -export interface CourseFeaturesApiCourseFeaturesListRequest { +export const CourseFeaturesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Number of results to return per page. - * @type {number} - * @memberof CourseFeaturesApiCourseFeaturesList + * Course Features and Content Feature Types + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + courseFeaturesList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/course_features/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof CourseFeaturesApiCourseFeaturesList + * Course Features and Content Feature Types + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource content tag. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + courseFeaturesRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("courseFeaturesRetrieve", "id", id) + const localVarPath = `/api/v1/course_features/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for courseFeaturesRetrieve operation in CourseFeaturesApi. + * CourseFeaturesApi - functional programming interface * @export - * @interface CourseFeaturesApiCourseFeaturesRetrieveRequest */ -export interface CourseFeaturesApiCourseFeaturesRetrieveRequest { +export const CourseFeaturesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + CourseFeaturesApiAxiosParamCreator(configuration) + return { + /** + * Course Features and Content Feature Types + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async courseFeaturesList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.courseFeaturesList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["CourseFeaturesApi.courseFeaturesList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource content tag. - * @type {number} - * @memberof CourseFeaturesApiCourseFeaturesRetrieve + * Course Features and Content Feature Types + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource content tag. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async courseFeaturesRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.courseFeaturesRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["CourseFeaturesApi.courseFeaturesRetrieve"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * CourseFeaturesApi - object-oriented interface + * CourseFeaturesApi - factory interface * @export - * @class CourseFeaturesApi - * @extends {BaseAPI} */ -export class CourseFeaturesApi extends BaseAPI { +export const CourseFeaturesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = CourseFeaturesApiFp(configuration) + return { /** * Course Features and Content Feature Types * @summary List * @param {CourseFeaturesApiCourseFeaturesListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof CourseFeaturesApi */ - public courseFeaturesList(requestParameters: CourseFeaturesApiCourseFeaturesListRequest = {}, options?: RawAxiosRequestConfig) { - return CourseFeaturesApiFp(this.configuration).courseFeaturesList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + courseFeaturesList( + requestParameters: CourseFeaturesApiCourseFeaturesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .courseFeaturesList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Course Features and Content Feature Types * @summary Retrieve * @param {CourseFeaturesApiCourseFeaturesRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof CourseFeaturesApi */ - public courseFeaturesRetrieve(requestParameters: CourseFeaturesApiCourseFeaturesRetrieveRequest, options?: RawAxiosRequestConfig) { - return CourseFeaturesApiFp(this.configuration).courseFeaturesRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + courseFeaturesRetrieve( + requestParameters: CourseFeaturesApiCourseFeaturesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .courseFeaturesRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } - - /** - * CoursesApi - axios parameter creator + * Request parameters for courseFeaturesList operation in CourseFeaturesApi. * @export + * @interface CourseFeaturesApiCourseFeaturesListRequest */ -export const CoursesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesContentfilesList: async (learning_resource_id: number, content_feature_type?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, run_id?: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('coursesContentfilesList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/courses/{learning_resource_id}/contentfiles/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (content_feature_type) { - localVarQueryParameter['content_feature_type'] = content_feature_type.join(COLLECTION_FORMATS.csv); - } - - 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 (resource_id) { - localVarQueryParameter['resource_id'] = resource_id.join(COLLECTION_FORMATS.csv); - } - - if (run_id) { - localVarQueryParameter['run_id'] = run_id.join(COLLECTION_FORMATS.csv); - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {number} id A unique integer value identifying this contentfile. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesContentfilesRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('coursesContentfilesRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('coursesContentfilesRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/courses/{learning_resource_id}/contentfiles/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a paginated list of courses - * @summary List - * @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] Number of results to return per page. - * @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 {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesList: async (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?: CoursesListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/courses/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single course - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('coursesRetrieve', 'id', id) - const localVarPath = `/api/v1/courses/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface CourseFeaturesApiCourseFeaturesListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof CourseFeaturesApiCourseFeaturesList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof CourseFeaturesApiCourseFeaturesList + */ + readonly offset?: number +} /** - * CoursesApi - functional programming interface + * Request parameters for courseFeaturesRetrieve operation in CourseFeaturesApi. * @export + * @interface CourseFeaturesApiCourseFeaturesRetrieveRequest */ -export const CoursesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = CoursesApiAxiosParamCreator(configuration) - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesContentfilesList(learning_resource_id: number, content_feature_type?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, run_id?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.coursesContentfilesList(learning_resource_id, content_feature_type, limit, offered_by, offset, platform, resource_id, run_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['CoursesApi.coursesContentfilesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {number} id A unique integer value identifying this contentfile. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesContentfilesRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.coursesContentfilesRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['CoursesApi.coursesContentfilesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a paginated list of courses - * @summary List - * @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] Number of results to return per page. - * @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 {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesList(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?: CoursesListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.coursesList(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['CoursesApi.coursesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single course - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async coursesRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.coursesRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['CoursesApi.coursesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface CourseFeaturesApiCourseFeaturesRetrieveRequest { + /** + * A unique integer value identifying this learning resource content tag. + * @type {number} + * @memberof CourseFeaturesApiCourseFeaturesRetrieve + */ + readonly id: number +} /** - * CoursesApi - factory interface + * CourseFeaturesApi - object-oriented interface * @export + * @class CourseFeaturesApi + * @extends {BaseAPI} */ -export const CoursesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = CoursesApiFp(configuration) - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {CoursesApiCoursesContentfilesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesContentfilesList(requestParameters: CoursesApiCoursesContentfilesListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.coursesContentfilesList(requestParameters.learning_resource_id, requestParameters.content_feature_type, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.resource_id, requestParameters.run_id, options).then((request) => request(axios, basePath)); - }, - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {CoursesApiCoursesContentfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesContentfilesRetrieve(requestParameters: CoursesApiCoursesContentfilesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.coursesContentfilesRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Get a paginated list of courses - * @summary List - * @param {CoursesApiCoursesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesList(requestParameters: CoursesApiCoursesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.coursesList(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)); - }, - /** - * Retrieve a single course - * @summary Retrieve - * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - coursesRetrieve(requestParameters: CoursesApiCoursesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.coursesRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export class CourseFeaturesApi extends BaseAPI { + /** + * Course Features and Content Feature Types + * @summary List + * @param {CourseFeaturesApiCourseFeaturesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CourseFeaturesApi + */ + public courseFeaturesList( + requestParameters: CourseFeaturesApiCourseFeaturesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return CourseFeaturesApiFp(this.configuration) + .courseFeaturesList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Course Features and Content Feature Types + * @summary Retrieve + * @param {CourseFeaturesApiCourseFeaturesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CourseFeaturesApi + */ + public courseFeaturesRetrieve( + requestParameters: CourseFeaturesApiCourseFeaturesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return CourseFeaturesApiFp(this.configuration) + .courseFeaturesRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for coursesContentfilesList operation in CoursesApi. + * CoursesApi - axios parameter creator * @export - * @interface CoursesApiCoursesContentfilesListRequest */ -export interface CoursesApiCoursesContentfilesListRequest { +export const CoursesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * id of the parent learning resource - * @type {number} - * @memberof CoursesApiCoursesContentfilesList + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number - + coursesContentfilesList: async ( + learning_resource_id: number, + content_feature_type?: Array, + limit?: number, + offered_by?: Array, + offset?: number, + platform?: Array, + resource_id?: Array, + run_id?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "coursesContentfilesList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/courses/{learning_resource_id}/contentfiles/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (content_feature_type) { + localVarQueryParameter["content_feature_type"] = + content_feature_type.join(COLLECTION_FORMATS.csv) + } + + 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 (resource_id) { + localVarQueryParameter["resource_id"] = resource_id.join( + COLLECTION_FORMATS.csv, + ) + } + + if (run_id) { + localVarQueryParameter["run_id"] = run_id.join(COLLECTION_FORMATS.csv) + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesContentfilesList + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {number} id A unique integer value identifying this contentfile. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly content_feature_type?: Array - + coursesContentfilesRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("coursesContentfilesRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "coursesContentfilesRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/courses/{learning_resource_id}/contentfiles/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Number of results to return per page. - * @type {number} - * @memberof CoursesApiCoursesContentfilesList + * Get a paginated list of courses + * @summary List + * @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] Number of results to return per page. + * @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 {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + coursesList: async ( + 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?: CoursesListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/courses/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The organization that offers a learning resource the content file belongs to * `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 CoursesApiCoursesContentfilesList + * Retrieve a single course + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offered_by?: Array + coursesRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("coursesRetrieve", "id", id) + const localVarPath = `/api/v1/courses/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} +/** + * CoursesApi - functional programming interface + * @export + */ +export const CoursesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = CoursesApiAxiosParamCreator(configuration) + return { /** - * The initial index from which to return the results. - * @type {number} - * @memberof CoursesApiCoursesContentfilesList + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number - + async coursesContentfilesList( + learning_resource_id: number, + content_feature_type?: Array, + limit?: number, + offered_by?: Array, + offset?: number, + platform?: Array, + resource_id?: Array, + run_id?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.coursesContentfilesList( + learning_resource_id, + content_feature_type, + limit, + offered_by, + offset, + platform, + resource_id, + run_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["CoursesApi.coursesContentfilesList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof CoursesApiCoursesContentfilesList + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {number} id A unique integer value identifying this contentfile. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly platform?: Array - + async coursesContentfilesRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.coursesContentfilesRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["CoursesApi.coursesContentfilesRetrieve"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesContentfilesList + * Get a paginated list of courses + * @summary List + * @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] Number of results to return per page. + * @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 {CoursesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_id?: Array - + async coursesList( + 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?: CoursesListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.coursesList( + 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["CoursesApi.coursesList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesContentfilesList + * Retrieve a single course + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly run_id?: Array + async coursesRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.coursesRetrieve( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["CoursesApi.coursesRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * Request parameters for coursesContentfilesRetrieve operation in CoursesApi. + * CoursesApi - factory interface * @export - * @interface CoursesApiCoursesContentfilesRetrieveRequest */ -export interface CoursesApiCoursesContentfilesRetrieveRequest { +export const CoursesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = CoursesApiFp(configuration) + return { /** - * A unique integer value identifying this contentfile. - * @type {number} - * @memberof CoursesApiCoursesContentfilesRetrieve + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {CoursesApiCoursesContentfilesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + coursesContentfilesList( + requestParameters: CoursesApiCoursesContentfilesListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .coursesContentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * id of the parent learning resource - * @type {number} - * @memberof CoursesApiCoursesContentfilesRetrieve - */ - readonly learning_resource_id: number -} - -/** - * Request parameters for coursesList operation in CoursesApi. - * @export - * @interface CoursesApiCoursesListRequest - */ -export interface CoursesApiCoursesListRequest { - /** - * - * @type {boolean} - * @memberof CoursesApiCoursesList - */ - 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 CoursesApiCoursesList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesList - */ - 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'>} - * @memberof CoursesApiCoursesList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof CoursesApiCoursesList - */ - 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 CoursesApiCoursesList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof CoursesApiCoursesList - */ - 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 CoursesApiCoursesList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof CoursesApiCoursesList - */ - 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 CoursesApiCoursesList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof CoursesApiCoursesList + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {CoursesApiCoursesContentfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly professional?: boolean - + coursesContentfilesRetrieve( + requestParameters: CoursesApiCoursesContentfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .coursesContentfilesRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesList + * Get a paginated list of courses + * @summary List + * @param {CoursesApiCoursesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly readable_id?: Array - + coursesList( + requestParameters: CoursesApiCoursesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .coursesList( + 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)) + }, /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof CoursesApiCoursesList + * Retrieve a single course + * @summary Retrieve + * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_category?: Array + coursesRetrieve( + requestParameters: CoursesApiCoursesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .coursesRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} - /** - * 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 CoursesApiCoursesList - */ - readonly resource_type?: Array +/** + * Request parameters for coursesContentfilesList operation in CoursesApi. + * @export + * @interface CoursesApiCoursesContentfilesListRequest + */ +export interface CoursesApiCoursesContentfilesListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly learning_resource_id: number + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly content_feature_type?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly limit?: number + + /** + * The organization that offers a learning resource the content file belongs to * `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 CoursesApiCoursesContentfilesList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly offset?: number + + /** + * The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly platform?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly resource_id?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof CoursesApiCoursesContentfilesList + */ + readonly run_id?: 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 CoursesApiCoursesList - */ - readonly sortby?: CoursesListSortbyEnum +/** + * Request parameters for coursesContentfilesRetrieve operation in CoursesApi. + * @export + * @interface CoursesApiCoursesContentfilesRetrieveRequest + */ +export interface CoursesApiCoursesContentfilesRetrieveRequest { + /** + * A unique integer value identifying this contentfile. + * @type {number} + * @memberof CoursesApiCoursesContentfilesRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof CoursesApiCoursesContentfilesRetrieve + */ + readonly learning_resource_id: number +} - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof CoursesApiCoursesList - */ - readonly topic?: Array +/** + * Request parameters for coursesList operation in CoursesApi. + * @export + * @interface CoursesApiCoursesListRequest + */ +export interface CoursesApiCoursesListRequest { + /** + * + * @type {boolean} + * @memberof CoursesApiCoursesList + */ + 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 CoursesApiCoursesList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof CoursesApiCoursesList + */ + 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'>} + * @memberof CoursesApiCoursesList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof CoursesApiCoursesList + */ + 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 CoursesApiCoursesList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof CoursesApiCoursesList + */ + 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 CoursesApiCoursesList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof CoursesApiCoursesList + */ + 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 CoursesApiCoursesList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof CoursesApiCoursesList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof CoursesApiCoursesList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof CoursesApiCoursesList + */ + readonly resource_category?: Array + + /** + * 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 CoursesApiCoursesList + */ + 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 CoursesApiCoursesList + */ + readonly sortby?: CoursesListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof CoursesApiCoursesList + */ + readonly topic?: Array } /** @@ -8612,12 +9463,12 @@ export interface CoursesApiCoursesListRequest { * @interface CoursesApiCoursesRetrieveRequest */ export interface CoursesApiCoursesRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof CoursesApiCoursesRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof CoursesApiCoursesRetrieve + */ + readonly id: number } /** @@ -8627,2159 +9478,3100 @@ export interface CoursesApiCoursesRetrieveRequest { * @extends {BaseAPI} */ export class CoursesApi extends BaseAPI { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {CoursesApiCoursesContentfilesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesContentfilesList(requestParameters: CoursesApiCoursesContentfilesListRequest, options?: RawAxiosRequestConfig) { - return CoursesApiFp(this.configuration).coursesContentfilesList(requestParameters.learning_resource_id, requestParameters.content_feature_type, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.resource_id, requestParameters.run_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {CoursesApiCoursesContentfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesContentfilesRetrieve(requestParameters: CoursesApiCoursesContentfilesRetrieveRequest, options?: RawAxiosRequestConfig) { - return CoursesApiFp(this.configuration).coursesContentfilesRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a paginated list of courses - * @summary List - * @param {CoursesApiCoursesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesList(requestParameters: CoursesApiCoursesListRequest = {}, options?: RawAxiosRequestConfig) { - return CoursesApiFp(this.configuration).coursesList(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)); - } - - /** - * Retrieve a single course - * @summary Retrieve - * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof CoursesApi - */ - public coursesRetrieve(requestParameters: CoursesApiCoursesRetrieveRequest, options?: RawAxiosRequestConfig) { - return CoursesApiFp(this.configuration).coursesRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {CoursesApiCoursesContentfilesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CoursesApi + */ + public coursesContentfilesList( + requestParameters: CoursesApiCoursesContentfilesListRequest, + options?: RawAxiosRequestConfig, + ) { + return CoursesApiFp(this.configuration) + .coursesContentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {CoursesApiCoursesContentfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CoursesApi + */ + public coursesContentfilesRetrieve( + requestParameters: CoursesApiCoursesContentfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return CoursesApiFp(this.configuration) + .coursesContentfilesRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of courses + * @summary List + * @param {CoursesApiCoursesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CoursesApi + */ + public coursesList( + requestParameters: CoursesApiCoursesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return CoursesApiFp(this.configuration) + .coursesList( + 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)) + } + + /** + * Retrieve a single course + * @summary Retrieve + * @param {CoursesApiCoursesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CoursesApi + */ + public coursesRetrieve( + requestParameters: CoursesApiCoursesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return CoursesApiFp(this.configuration) + .coursesRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const CoursesContentfilesListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type CoursesContentfilesListOfferedByEnum = typeof CoursesContentfilesListOfferedByEnum[keyof typeof CoursesContentfilesListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type CoursesContentfilesListOfferedByEnum = + (typeof CoursesContentfilesListOfferedByEnum)[keyof typeof CoursesContentfilesListOfferedByEnum] /** * @export */ export const CoursesContentfilesListPlatformEnum = { - 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 CoursesContentfilesListPlatformEnum = typeof CoursesContentfilesListPlatformEnum[keyof typeof CoursesContentfilesListPlatformEnum]; + 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 CoursesContentfilesListPlatformEnum = + (typeof CoursesContentfilesListPlatformEnum)[keyof typeof CoursesContentfilesListPlatformEnum] /** * @export */ export const CoursesListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type CoursesListCertificationTypeEnum = typeof CoursesListCertificationTypeEnum[keyof typeof CoursesListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type CoursesListCertificationTypeEnum = + (typeof CoursesListCertificationTypeEnum)[keyof typeof CoursesListCertificationTypeEnum] /** * @export */ export const CoursesListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type CoursesListDeliveryEnum = typeof CoursesListDeliveryEnum[keyof typeof 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', - _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 CoursesListDepartmentEnum = typeof CoursesListDepartmentEnum[keyof typeof CoursesListDepartmentEnum]; + _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 CoursesListDepartmentEnum = + (typeof CoursesListDepartmentEnum)[keyof typeof CoursesListDepartmentEnum] /** * @export */ export const CoursesListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type CoursesListLevelEnum = typeof CoursesListLevelEnum[keyof typeof CoursesListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type CoursesListLevelEnum = + (typeof CoursesListLevelEnum)[keyof typeof CoursesListLevelEnum] /** * @export */ export const CoursesListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type CoursesListOfferedByEnum = typeof CoursesListOfferedByEnum[keyof typeof CoursesListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type CoursesListOfferedByEnum = + (typeof CoursesListOfferedByEnum)[keyof typeof CoursesListOfferedByEnum] /** * @export */ export const CoursesListPlatformEnum = { - 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 CoursesListPlatformEnum = typeof CoursesListPlatformEnum[keyof typeof CoursesListPlatformEnum]; + 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 CoursesListPlatformEnum = + (typeof CoursesListPlatformEnum)[keyof typeof CoursesListPlatformEnum] /** * @export */ export const CoursesListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type CoursesListResourceCategoryEnum = typeof CoursesListResourceCategoryEnum[keyof typeof CoursesListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type CoursesListResourceCategoryEnum = + (typeof CoursesListResourceCategoryEnum)[keyof typeof CoursesListResourceCategoryEnum] /** * @export */ export const CoursesListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type CoursesListResourceTypeEnum = typeof CoursesListResourceTypeEnum[keyof typeof CoursesListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type CoursesListResourceTypeEnum = + (typeof CoursesListResourceTypeEnum)[keyof typeof CoursesListResourceTypeEnum] /** * @export */ export const CoursesListSortbyEnum = { - 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 CoursesListSortbyEnum = typeof CoursesListSortbyEnum[keyof typeof CoursesListSortbyEnum]; - + 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 CoursesListSortbyEnum = + (typeof CoursesListSortbyEnum)[keyof typeof CoursesListSortbyEnum] /** * DepartmentsApi - axios parameter creator * @export */ -export const DepartmentsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * MIT academic departments - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - departmentsList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/departments/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * MIT academic departments - * @summary Retrieve - * @param {string} department_id A unique value identifying this learning resource department. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - departmentsRetrieve: async (department_id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'department_id' is not null or undefined - assertParamExists('departmentsRetrieve', 'department_id', department_id) - const localVarPath = `/api/v1/departments/{department_id}/` - .replace(`{${"department_id"}}`, encodeURIComponent(String(department_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * DepartmentsApi - functional programming interface - * @export - */ -export const DepartmentsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = DepartmentsApiAxiosParamCreator(configuration) - return { - /** - * MIT academic departments - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async departmentsList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.departmentsList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['DepartmentsApi.departmentsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * MIT academic departments - * @summary Retrieve - * @param {string} department_id A unique value identifying this learning resource department. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async departmentsRetrieve(department_id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.departmentsRetrieve(department_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['DepartmentsApi.departmentsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * DepartmentsApi - factory interface - * @export - */ -export const DepartmentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = DepartmentsApiFp(configuration) - return { - /** - * MIT academic departments - * @summary List - * @param {DepartmentsApiDepartmentsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - departmentsList(requestParameters: DepartmentsApiDepartmentsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.departmentsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * MIT academic departments - * @summary Retrieve - * @param {DepartmentsApiDepartmentsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - departmentsRetrieve(requestParameters: DepartmentsApiDepartmentsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.departmentsRetrieve(requestParameters.department_id, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for departmentsList operation in DepartmentsApi. - * @export - * @interface DepartmentsApiDepartmentsListRequest - */ -export interface DepartmentsApiDepartmentsListRequest { +export const DepartmentsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Number of results to return per page. - * @type {number} - * @memberof DepartmentsApiDepartmentsList + * MIT academic departments + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + departmentsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/departments/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof DepartmentsApiDepartmentsList + * MIT academic departments + * @summary Retrieve + * @param {string} department_id A unique value identifying this learning resource department. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + departmentsRetrieve: async ( + department_id: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'department_id' is not null or undefined + assertParamExists("departmentsRetrieve", "department_id", department_id) + const localVarPath = `/api/v1/departments/{department_id}/`.replace( + `{${"department_id"}}`, + encodeURIComponent(String(department_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for departmentsRetrieve operation in DepartmentsApi. + * DepartmentsApi - functional programming interface * @export - * @interface DepartmentsApiDepartmentsRetrieveRequest */ -export interface DepartmentsApiDepartmentsRetrieveRequest { +export const DepartmentsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + DepartmentsApiAxiosParamCreator(configuration) + return { + /** + * MIT academic departments + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async departmentsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.departmentsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["DepartmentsApi.departmentsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique value identifying this learning resource department. - * @type {string} - * @memberof DepartmentsApiDepartmentsRetrieve + * MIT academic departments + * @summary Retrieve + * @param {string} department_id A unique value identifying this learning resource department. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly department_id: string + async departmentsRetrieve( + department_id: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.departmentsRetrieve( + department_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["DepartmentsApi.departmentsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * DepartmentsApi - object-oriented interface + * DepartmentsApi - factory interface * @export - * @class DepartmentsApi - * @extends {BaseAPI} */ -export class DepartmentsApi extends BaseAPI { +export const DepartmentsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = DepartmentsApiFp(configuration) + return { /** * MIT academic departments * @summary List * @param {DepartmentsApiDepartmentsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof DepartmentsApi */ - public departmentsList(requestParameters: DepartmentsApiDepartmentsListRequest = {}, options?: RawAxiosRequestConfig) { - return DepartmentsApiFp(this.configuration).departmentsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + departmentsList( + requestParameters: DepartmentsApiDepartmentsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .departmentsList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * MIT academic departments * @summary Retrieve * @param {DepartmentsApiDepartmentsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof DepartmentsApi */ - public departmentsRetrieve(requestParameters: DepartmentsApiDepartmentsRetrieveRequest, options?: RawAxiosRequestConfig) { - return DepartmentsApiFp(this.configuration).departmentsRetrieve(requestParameters.department_id, options).then((request) => request(this.axios, this.basePath)); - } + departmentsRetrieve( + requestParameters: DepartmentsApiDepartmentsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .departmentsRetrieve(requestParameters.department_id, options) + .then((request) => request(axios, basePath)) + }, + } } - - -/** - * FeaturedApi - axios parameter creator - * @export - */ -export const FeaturedApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a paginated list of featured resources - * @summary List - * @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] Number of results to return per page. - * @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 {FeaturedListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - featuredList: async (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?: FeaturedListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/featured/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single featured resource - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - featuredRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('featuredRetrieve', 'id', id) - const localVarPath = `/api/v1/featured/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * FeaturedApi - functional programming interface - * @export - */ -export const FeaturedApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = FeaturedApiAxiosParamCreator(configuration) - return { - /** - * Get a paginated list of featured resources - * @summary List - * @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] Number of results to return per page. - * @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 {FeaturedListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async featuredList(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?: FeaturedListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.featuredList(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['FeaturedApi.featuredList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single featured resource - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async featuredRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.featuredRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['FeaturedApi.featuredRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - /** - * FeaturedApi - factory interface + * Request parameters for departmentsList operation in DepartmentsApi. * @export + * @interface DepartmentsApiDepartmentsListRequest */ -export const FeaturedApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = FeaturedApiFp(configuration) - return { - /** - * Get a paginated list of featured resources - * @summary List - * @param {FeaturedApiFeaturedListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - featuredList(requestParameters: FeaturedApiFeaturedListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.featuredList(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)); - }, - /** - * Retrieve a single featured resource - * @summary Retrieve - * @param {FeaturedApiFeaturedRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - featuredRetrieve(requestParameters: FeaturedApiFeaturedRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.featuredRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface DepartmentsApiDepartmentsListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof DepartmentsApiDepartmentsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof DepartmentsApiDepartmentsList + */ + readonly offset?: number +} /** - * Request parameters for featuredList operation in FeaturedApi. + * Request parameters for departmentsRetrieve operation in DepartmentsApi. * @export - * @interface FeaturedApiFeaturedListRequest + * @interface DepartmentsApiDepartmentsRetrieveRequest */ -export interface FeaturedApiFeaturedListRequest { - /** - * - * @type {boolean} - * @memberof FeaturedApiFeaturedList - */ - 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 FeaturedApiFeaturedList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof FeaturedApiFeaturedList - */ - 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'>} - * @memberof FeaturedApiFeaturedList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof FeaturedApiFeaturedList - */ - 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 FeaturedApiFeaturedList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof FeaturedApiFeaturedList - */ - 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 FeaturedApiFeaturedList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof FeaturedApiFeaturedList - */ - 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 FeaturedApiFeaturedList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof FeaturedApiFeaturedList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof FeaturedApiFeaturedList - */ - readonly readable_id?: Array - - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof FeaturedApiFeaturedList - */ - readonly resource_category?: Array - - /** - * 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 FeaturedApiFeaturedList - */ - 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 FeaturedApiFeaturedList - */ - readonly sortby?: FeaturedListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof FeaturedApiFeaturedList - */ - readonly topic?: Array +export interface DepartmentsApiDepartmentsRetrieveRequest { + /** + * A unique value identifying this learning resource department. + * @type {string} + * @memberof DepartmentsApiDepartmentsRetrieve + */ + readonly department_id: string } /** - * Request parameters for featuredRetrieve operation in FeaturedApi. + * DepartmentsApi - object-oriented interface * @export - * @interface FeaturedApiFeaturedRetrieveRequest + * @class DepartmentsApi + * @extends {BaseAPI} */ -export interface FeaturedApiFeaturedRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof FeaturedApiFeaturedRetrieve - */ - readonly id: number +export class DepartmentsApi extends BaseAPI { + /** + * MIT academic departments + * @summary List + * @param {DepartmentsApiDepartmentsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DepartmentsApi + */ + public departmentsList( + requestParameters: DepartmentsApiDepartmentsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return DepartmentsApiFp(this.configuration) + .departmentsList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * MIT academic departments + * @summary Retrieve + * @param {DepartmentsApiDepartmentsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DepartmentsApi + */ + public departmentsRetrieve( + requestParameters: DepartmentsApiDepartmentsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return DepartmentsApiFp(this.configuration) + .departmentsRetrieve(requestParameters.department_id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** - * FeaturedApi - object-oriented interface + * FeaturedApi - axios parameter creator * @export - * @class FeaturedApi - * @extends {BaseAPI} */ -export class FeaturedApi extends BaseAPI { +export const FeaturedApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** * Get a paginated list of featured resources * @summary List - * @param {FeaturedApiFeaturedListRequest} requestParameters Request parameters. + * @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] Number of results to return per page. + * @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 {FeaturedListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof FeaturedApi */ - public featuredList(requestParameters: FeaturedApiFeaturedListRequest = {}, options?: RawAxiosRequestConfig) { - return FeaturedApiFp(this.configuration).featuredList(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)); - } - + featuredList: async ( + 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?: FeaturedListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/featured/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** * Retrieve a single featured resource * @summary Retrieve - * @param {FeaturedApiFeaturedRetrieveRequest} requestParameters Request parameters. + * @param {number} id A unique integer value identifying this learning resource. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof FeaturedApi */ - public featuredRetrieve(requestParameters: FeaturedApiFeaturedRetrieveRequest, options?: RawAxiosRequestConfig) { - return FeaturedApiFp(this.configuration).featuredRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + featuredRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("featuredRetrieve", "id", id) + const localVarPath = `/api/v1/featured/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** + * FeaturedApi - functional programming interface * @export */ -export const FeaturedListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type FeaturedListCertificationTypeEnum = typeof FeaturedListCertificationTypeEnum[keyof typeof FeaturedListCertificationTypeEnum]; +export const FeaturedApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = FeaturedApiAxiosParamCreator(configuration) + return { + /** + * Get a paginated list of featured resources + * @summary List + * @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] Number of results to return per page. + * @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 {FeaturedListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async featuredList( + 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?: FeaturedListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.featuredList( + 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["FeaturedApi.featuredList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Retrieve a single featured resource + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async featuredRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.featuredRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["FeaturedApi.featuredRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} + /** + * FeaturedApi - factory interface * @export */ -export const FeaturedListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type FeaturedListDeliveryEnum = typeof FeaturedListDeliveryEnum[keyof typeof FeaturedListDeliveryEnum]; +export const FeaturedApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = FeaturedApiFp(configuration) + return { + /** + * Get a paginated list of featured resources + * @summary List + * @param {FeaturedApiFeaturedListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + featuredList( + requestParameters: FeaturedApiFeaturedListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .featuredList( + 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)) + }, + /** + * Retrieve a single featured resource + * @summary Retrieve + * @param {FeaturedApiFeaturedRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + featuredRetrieve( + requestParameters: FeaturedApiFeaturedRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .featuredRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} + /** + * Request parameters for featuredList operation in FeaturedApi. * @export + * @interface FeaturedApiFeaturedListRequest */ -export const FeaturedListDepartmentEnum = { - _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 FeaturedListDepartmentEnum = typeof FeaturedListDepartmentEnum[keyof typeof FeaturedListDepartmentEnum]; +export interface FeaturedApiFeaturedListRequest { + /** + * + * @type {boolean} + * @memberof FeaturedApiFeaturedList + */ + 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 FeaturedApiFeaturedList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof FeaturedApiFeaturedList + */ + 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'>} + * @memberof FeaturedApiFeaturedList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof FeaturedApiFeaturedList + */ + 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 FeaturedApiFeaturedList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof FeaturedApiFeaturedList + */ + 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 FeaturedApiFeaturedList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof FeaturedApiFeaturedList + */ + 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 FeaturedApiFeaturedList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof FeaturedApiFeaturedList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof FeaturedApiFeaturedList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof FeaturedApiFeaturedList + */ + readonly resource_category?: Array + + /** + * 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 FeaturedApiFeaturedList + */ + 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 FeaturedApiFeaturedList + */ + readonly sortby?: FeaturedListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof FeaturedApiFeaturedList + */ + readonly topic?: Array +} + /** + * Request parameters for featuredRetrieve operation in FeaturedApi. * @export + * @interface FeaturedApiFeaturedRetrieveRequest */ -export const FeaturedListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type FeaturedListLevelEnum = typeof FeaturedListLevelEnum[keyof typeof FeaturedListLevelEnum]; +export interface FeaturedApiFeaturedRetrieveRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof FeaturedApiFeaturedRetrieve + */ + readonly id: number +} + /** + * FeaturedApi - object-oriented interface * @export + * @class FeaturedApi + * @extends {BaseAPI} */ -export const FeaturedListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type FeaturedListOfferedByEnum = typeof FeaturedListOfferedByEnum[keyof typeof FeaturedListOfferedByEnum]; +export class FeaturedApi extends BaseAPI { + /** + * Get a paginated list of featured resources + * @summary List + * @param {FeaturedApiFeaturedListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeaturedApi + */ + public featuredList( + requestParameters: FeaturedApiFeaturedListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return FeaturedApiFp(this.configuration) + .featuredList( + 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)) + } + + /** + * Retrieve a single featured resource + * @summary Retrieve + * @param {FeaturedApiFeaturedRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FeaturedApi + */ + public featuredRetrieve( + requestParameters: FeaturedApiFeaturedRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return FeaturedApiFp(this.configuration) + .featuredRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} + /** * @export */ -export const FeaturedListPlatformEnum = { - 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 FeaturedListPlatformEnum = typeof FeaturedListPlatformEnum[keyof typeof FeaturedListPlatformEnum]; +export const FeaturedListCertificationTypeEnum = { + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type FeaturedListCertificationTypeEnum = + (typeof FeaturedListCertificationTypeEnum)[keyof typeof FeaturedListCertificationTypeEnum] /** * @export */ -export const FeaturedListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type FeaturedListResourceCategoryEnum = typeof FeaturedListResourceCategoryEnum[keyof typeof FeaturedListResourceCategoryEnum]; +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 FeaturedListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type FeaturedListResourceTypeEnum = typeof FeaturedListResourceTypeEnum[keyof typeof FeaturedListResourceTypeEnum]; +export const FeaturedListDepartmentEnum = { + _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 FeaturedListDepartmentEnum = + (typeof FeaturedListDepartmentEnum)[keyof typeof FeaturedListDepartmentEnum] /** * @export */ -export const FeaturedListSortbyEnum = { - 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 FeaturedListSortbyEnum = typeof FeaturedListSortbyEnum[keyof typeof FeaturedListSortbyEnum]; - - +export const FeaturedListLevelEnum = { + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type FeaturedListLevelEnum = + (typeof FeaturedListLevelEnum)[keyof typeof FeaturedListLevelEnum] /** - * LearningResourcesApi - axios parameter creator * @export */ -export const LearningResourcesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesContentfilesList: async (learning_resource_id: number, content_feature_type?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, run_id?: Array, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningResourcesContentfilesList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learning_resources/{learning_resource_id}/contentfiles/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (content_feature_type) { - localVarQueryParameter['content_feature_type'] = content_feature_type.join(COLLECTION_FORMATS.csv); - } - - 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 (resource_id) { - localVarQueryParameter['resource_id'] = resource_id.join(COLLECTION_FORMATS.csv); - } - - if (run_id) { - localVarQueryParameter['run_id'] = run_id.join(COLLECTION_FORMATS.csv); - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {number} id A unique integer value identifying this contentfile. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesContentfilesRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningResourcesContentfilesRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningResourcesContentfilesRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learning_resources/{learning_resource_id}/contentfiles/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {number} learning_resource_id id of the parent learning resource - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesItemsList: async (learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningResourcesItemsList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learning_resources/{learning_resource_id}/items/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesItemsRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningResourcesItemsRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningResourcesItemsRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learning_resources/{learning_resource_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Set Learning Path Relationships on a given Learning Resource. - * @summary Set Learning Path Relationships - * @param {number} id id of the learning resource - * @param {Array} [learning_path_id] id of the parent learning path - * @param {PatchedLearningResourceRelationshipRequest} [PatchedLearningResourceRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesLearningPathsPartialUpdate: async (id: number, learning_path_id?: Array, PatchedLearningResourceRelationshipRequest?: PatchedLearningResourceRelationshipRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningResourcesLearningPathsPartialUpdate', 'id', id) - const localVarPath = `/api/v1/learning_resources/{id}/learning_paths/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (learning_path_id) { - localVarQueryParameter['learning_path_id'] = learning_path_id; - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedLearningResourceRelationshipRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a paginated list of learning resources. - * @summary List - * @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] Number of results to return per page. - * @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 {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesList: async (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?: LearningResourcesListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/learning_resources/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single learning resource. - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningResourcesRetrieve', 'id', id) - const localVarPath = `/api/v1/learning_resources/{id}/` - .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; - - - - 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Set User List Relationships on a given Learning Resource. - * @summary Set User List Relationships - * @param {number} id id of the learning resource - * @param {Array} [userlist_id] id of the parent user list - * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserlistsPartialUpdate: async (id: number, userlist_id?: Array, PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningResourcesUserlistsPartialUpdate', 'id', id) - const localVarPath = `/api/v1/learning_resources/{id}/userlists/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (userlist_id) { - localVarQueryParameter['userlist_id'] = userlist_id; - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedUserListRelationshipRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - +export const FeaturedListOfferedByEnum = { + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type FeaturedListOfferedByEnum = + (typeof FeaturedListOfferedByEnum)[keyof typeof FeaturedListOfferedByEnum] /** - * LearningResourcesApi - functional programming interface * @export */ -export const LearningResourcesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LearningResourcesApiAxiosParamCreator(configuration) - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {number} learning_resource_id id of the parent learning resource - * @param {Array} [content_feature_type] Multiple values may be separated by commas. - * @param {number} [limit] Number of results to return per page. - * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {Array} [resource_id] Multiple values may be separated by commas. - * @param {Array} [run_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesContentfilesList(learning_resource_id: number, content_feature_type?: Array, limit?: number, offered_by?: Array, offset?: number, platform?: Array, resource_id?: Array, run_id?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesContentfilesList(learning_resource_id, content_feature_type, limit, offered_by, offset, platform, resource_id, run_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesContentfilesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {number} id A unique integer value identifying this contentfile. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesContentfilesRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesContentfilesRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesContentfilesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {number} learning_resource_id id of the parent learning resource - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesItemsList(learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesItemsList(learning_resource_id, limit, offset, sortby, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesItemsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesItemsRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesItemsRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesItemsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Set Learning Path Relationships on a given Learning Resource. - * @summary Set Learning Path Relationships - * @param {number} id id of the learning resource - * @param {Array} [learning_path_id] id of the parent learning path - * @param {PatchedLearningResourceRelationshipRequest} [PatchedLearningResourceRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesLearningPathsPartialUpdate(id: number, learning_path_id?: Array, PatchedLearningResourceRelationshipRequest?: PatchedLearningResourceRelationshipRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesLearningPathsPartialUpdate(id, learning_path_id, PatchedLearningResourceRelationshipRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesLearningPathsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a paginated list of learning resources. - * @summary List - * @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] Number of results to return per page. - * @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 {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesList(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?: LearningResourcesListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesList(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.learningResourcesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single learning resource. - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - 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 - * @param {number} id id of the learning resource - * @param {Array} [userlist_id] id of the parent user list - * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesUserlistsPartialUpdate(id: number, userlist_id?: Array, PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesUserlistsPartialUpdate(id, userlist_id, PatchedUserListRelationshipRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesApi.learningResourcesUserlistsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - +export const FeaturedListPlatformEnum = { + 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 FeaturedListPlatformEnum = + (typeof FeaturedListPlatformEnum)[keyof typeof FeaturedListPlatformEnum] /** - * LearningResourcesApi - factory interface * @export */ -export const LearningResourcesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LearningResourcesApiFp(configuration) - return { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {LearningResourcesApiLearningResourcesContentfilesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesContentfilesList(requestParameters: LearningResourcesApiLearningResourcesContentfilesListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesContentfilesList(requestParameters.learning_resource_id, requestParameters.content_feature_type, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.resource_id, requestParameters.run_id, options).then((request) => request(axios, basePath)); - }, - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {LearningResourcesApiLearningResourcesContentfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesContentfilesRetrieve(requestParameters: LearningResourcesApiLearningResourcesContentfilesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesContentfilesRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {LearningResourcesApiLearningResourcesItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesItemsList(requestParameters: LearningResourcesApiLearningResourcesItemsListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(axios, basePath)); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {LearningResourcesApiLearningResourcesItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesItemsRetrieve(requestParameters: LearningResourcesApiLearningResourcesItemsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Set Learning Path Relationships on a given Learning Resource. - * @summary Set Learning Path Relationships - * @param {LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesLearningPathsPartialUpdate(requestParameters: LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.learningResourcesLearningPathsPartialUpdate(requestParameters.id, requestParameters.learning_path_id, requestParameters.PatchedLearningResourceRelationshipRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Get a paginated list of learning resources. - * @summary List - * @param {LearningResourcesApiLearningResourcesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesList(requestParameters: LearningResourcesApiLearningResourcesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesList(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)); - }, - /** - * Retrieve a single learning resource. - * @summary Retrieve - * @param {LearningResourcesApiLearningResourcesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - 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 - * @param {LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserlistsPartialUpdate(requestParameters: LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.learningResourcesUserlistsPartialUpdate(requestParameters.id, requestParameters.userlist_id, requestParameters.PatchedUserListRelationshipRequest, options).then((request) => request(axios, basePath)); - }, - }; -}; - +export const FeaturedListResourceCategoryEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type FeaturedListResourceCategoryEnum = + (typeof FeaturedListResourceCategoryEnum)[keyof typeof FeaturedListResourceCategoryEnum] /** - * Request parameters for learningResourcesContentfilesList operation in LearningResourcesApi. * @export - * @interface LearningResourcesApiLearningResourcesContentfilesListRequest */ -export interface LearningResourcesApiLearningResourcesContentfilesListRequest { - /** - * id of the parent learning resource - * @type {number} - * @memberof LearningResourcesApiLearningResourcesContentfilesList - */ - readonly learning_resource_id: number +export const FeaturedListResourceTypeEnum = { + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type FeaturedListResourceTypeEnum = + (typeof FeaturedListResourceTypeEnum)[keyof typeof FeaturedListResourceTypeEnum] +/** + * @export + */ +export const FeaturedListSortbyEnum = { + 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 FeaturedListSortbyEnum = + (typeof FeaturedListSortbyEnum)[keyof typeof FeaturedListSortbyEnum] +/** + * LearningResourcesApi - axios parameter creator + * @export + */ +export const LearningResourcesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesContentfilesList + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly content_feature_type?: Array - + learningResourcesContentfilesList: async ( + learning_resource_id: number, + content_feature_type?: Array, + limit?: number, + offered_by?: Array, + offset?: number, + platform?: Array, + resource_id?: Array, + run_id?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningResourcesContentfilesList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learning_resources/{learning_resource_id}/contentfiles/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (content_feature_type) { + localVarQueryParameter["content_feature_type"] = + content_feature_type.join(COLLECTION_FORMATS.csv) + } + + 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 (resource_id) { + localVarQueryParameter["resource_id"] = resource_id.join( + COLLECTION_FORMATS.csv, + ) + } + + if (run_id) { + localVarQueryParameter["run_id"] = run_id.join(COLLECTION_FORMATS.csv) + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Number of results to return per page. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesContentfilesList + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {number} id A unique integer value identifying this contentfile. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + learningResourcesContentfilesRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningResourcesContentfilesRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningResourcesContentfilesRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learning_resources/{learning_resource_id}/contentfiles/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The organization that offers a learning resource the content file belongs to * `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 LearningResourcesApiLearningResourcesContentfilesList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {number} learning_resource_id id of the parent learning resource + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offered_by?: Array - + learningResourcesItemsList: async ( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningResourcesItemsList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learning_resources/{learning_resource_id}/items/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesContentfilesList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number - + learningResourcesItemsRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningResourcesItemsRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningResourcesItemsRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learning_resources/{learning_resource_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} - * @memberof LearningResourcesApiLearningResourcesContentfilesList + * Set Learning Path Relationships on a given Learning Resource. + * @summary Set Learning Path Relationships + * @param {number} id id of the learning resource + * @param {Array} [learning_path_id] id of the parent learning path + * @param {PatchedLearningResourceRelationshipRequest} [PatchedLearningResourceRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly platform?: Array - + learningResourcesLearningPathsPartialUpdate: async ( + id: number, + learning_path_id?: Array, + PatchedLearningResourceRelationshipRequest?: PatchedLearningResourceRelationshipRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningResourcesLearningPathsPartialUpdate", "id", id) + const localVarPath = + `/api/v1/learning_resources/{id}/learning_paths/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + if (learning_path_id) { + localVarQueryParameter["learning_path_id"] = learning_path_id + } + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedLearningResourceRelationshipRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesContentfilesList + * Get a paginated list of learning resources. + * @summary List + * @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] Number of results to return per page. + * @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 {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_id?: Array - + learningResourcesList: async ( + 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?: LearningResourcesListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/learning_resources/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesContentfilesList + * Retrieve a single learning resource. + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly run_id?: Array -} - -/** - * Request parameters for learningResourcesContentfilesRetrieve operation in LearningResourcesApi. - * @export - * @interface LearningResourcesApiLearningResourcesContentfilesRetrieveRequest - */ -export interface LearningResourcesApiLearningResourcesContentfilesRetrieveRequest { + learningResourcesRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningResourcesRetrieve", "id", id) + const localVarPath = `/api/v1/learning_resources/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this contentfile. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesContentfilesRetrieve + * 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} */ - readonly id: number - + 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * id of the parent learning resource - * @type {number} - * @memberof LearningResourcesApiLearningResourcesContentfilesRetrieve + * Set User List Relationships on a given Learning Resource. + * @summary Set User List Relationships + * @param {number} id id of the learning resource + * @param {Array} [userlist_id] id of the parent user list + * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number + learningResourcesUserlistsPartialUpdate: async ( + id: number, + userlist_id?: Array, + PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningResourcesUserlistsPartialUpdate", "id", id) + const localVarPath = `/api/v1/learning_resources/{id}/userlists/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + if (userlist_id) { + localVarQueryParameter["userlist_id"] = userlist_id + } + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedUserListRelationshipRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for learningResourcesItemsList operation in LearningResourcesApi. + * LearningResourcesApi - functional programming interface * @export - * @interface LearningResourcesApiLearningResourcesItemsListRequest */ -export interface LearningResourcesApiLearningResourcesItemsListRequest { +export const LearningResourcesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + LearningResourcesApiAxiosParamCreator(configuration) + return { /** - * id of the parent learning resource - * @type {number} - * @memberof LearningResourcesApiLearningResourcesItemsList + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {number} learning_resource_id id of the parent learning resource + * @param {Array} [content_feature_type] Multiple values may be separated by commas. + * @param {number} [limit] Number of results to return per page. + * @param {Array} [offered_by] The organization that offers a learning resource the content file belongs to * `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 the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {Array} [resource_id] Multiple values may be separated by commas. + * @param {Array} [run_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number - + async learningResourcesContentfilesList( + learning_resource_id: number, + content_feature_type?: Array, + limit?: number, + offered_by?: Array, + offset?: number, + platform?: Array, + resource_id?: Array, + run_id?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesContentfilesList( + learning_resource_id, + content_feature_type, + limit, + offered_by, + offset, + platform, + resource_id, + run_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesApi.learningResourcesContentfilesList" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Number of results to return per page. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesItemsList + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {number} id A unique integer value identifying this contentfile. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + async learningResourcesContentfilesRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesContentfilesRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesApi.learningResourcesContentfilesRetrieve" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesItemsList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {number} learning_resource_id id of the parent learning resource + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number - + async learningResourcesItemsList( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesItemsList( + learning_resource_id, + limit, + offset, + sortby, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningResourcesApi.learningResourcesItemsList"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Which field to use when ordering the results. - * @type {string} - * @memberof LearningResourcesApiLearningResourcesItemsList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: string -} - -/** - * Request parameters for learningResourcesItemsRetrieve operation in LearningResourcesApi. - * @export - * @interface LearningResourcesApiLearningResourcesItemsRetrieveRequest - */ -export interface LearningResourcesApiLearningResourcesItemsRetrieveRequest { + async learningResourcesItemsRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesItemsRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesApi.learningResourcesItemsRetrieve" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesItemsRetrieve + * Set Learning Path Relationships on a given Learning Resource. + * @summary Set Learning Path Relationships + * @param {number} id id of the learning resource + * @param {Array} [learning_path_id] id of the parent learning path + * @param {PatchedLearningResourceRelationshipRequest} [PatchedLearningResourceRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async learningResourcesLearningPathsPartialUpdate( + id: number, + learning_path_id?: Array, + PatchedLearningResourceRelationshipRequest?: PatchedLearningResourceRelationshipRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesLearningPathsPartialUpdate( + id, + learning_path_id, + PatchedLearningResourceRelationshipRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesApi.learningResourcesLearningPathsPartialUpdate" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * id of the parent learning resource - * @type {number} - * @memberof LearningResourcesApiLearningResourcesItemsRetrieve + * Get a paginated list of learning resources. + * @summary List + * @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] Number of results to return per page. + * @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 {LearningResourcesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number -} - -/** - * Request parameters for learningResourcesLearningPathsPartialUpdate operation in LearningResourcesApi. - * @export - * @interface LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest - */ -export interface LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest { + async learningResourcesList( + 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?: LearningResourcesListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesList( + 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.learningResourcesList"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * id of the learning resource - * @type {number} - * @memberof LearningResourcesApiLearningResourcesLearningPathsPartialUpdate + * Retrieve a single learning resource. + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async learningResourcesRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningResourcesApi.learningResourcesRetrieve"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * id of the parent learning path - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesLearningPathsPartialUpdate + * 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} */ - readonly learning_path_id?: Array - + 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) + }, /** - * - * @type {PatchedLearningResourceRelationshipRequest} - * @memberof LearningResourcesApiLearningResourcesLearningPathsPartialUpdate + * Set User List Relationships on a given Learning Resource. + * @summary Set User List Relationships + * @param {number} id id of the learning resource + * @param {Array} [userlist_id] id of the parent user list + * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedLearningResourceRelationshipRequest?: PatchedLearningResourceRelationshipRequest + async learningResourcesUserlistsPartialUpdate( + id: number, + userlist_id?: Array, + PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesUserlistsPartialUpdate( + id, + userlist_id, + PatchedUserListRelationshipRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesApi.learningResourcesUserlistsPartialUpdate" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * Request parameters for learningResourcesList operation in LearningResourcesApi. + * LearningResourcesApi - factory interface * @export - * @interface LearningResourcesApiLearningResourcesListRequest */ -export interface LearningResourcesApiLearningResourcesListRequest { +export const LearningResourcesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LearningResourcesApiFp(configuration) + return { /** - * - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesList + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {LearningResourcesApiLearningResourcesContentfilesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly certification?: boolean - + learningResourcesContentfilesList( + requestParameters: LearningResourcesApiLearningResourcesContentfilesListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesContentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * 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 LearningResourcesApiLearningResourcesList + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {LearningResourcesApiLearningResourcesContentfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly certification_type?: Array - + learningResourcesContentfilesRetrieve( + requestParameters: LearningResourcesApiLearningResourcesContentfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesContentfilesRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {LearningResourcesApiLearningResourcesItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly course_feature?: Array - + learningResourcesItemsList( + requestParameters: LearningResourcesApiLearningResourcesItemsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * The delivery of course/program resources * `online` - Online * `hybrid` - Hybrid * `in_person` - In person * `offline` - Offline - * @type {Array>} - * @memberof LearningResourcesApiLearningResourcesList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {LearningResourcesApiLearningResourcesItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly delivery?: Array> - + learningResourcesItemsRetrieve( + requestParameters: LearningResourcesApiLearningResourcesItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * 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 LearningResourcesApiLearningResourcesList + * Set Learning Path Relationships on a given Learning Resource. + * @summary Set Learning Path Relationships + * @param {LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly department?: Array - + learningResourcesLearningPathsPartialUpdate( + requestParameters: LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .learningResourcesLearningPathsPartialUpdate( + requestParameters.id, + requestParameters.learning_path_id, + requestParameters.PatchedLearningResourceRelationshipRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * The course/program is offered for free - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesList + * Get a paginated list of learning resources. + * @summary List + * @param {LearningResourcesApiLearningResourcesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly free?: boolean - + learningResourcesList( + requestParameters: LearningResourcesApiLearningResourcesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesList( + 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)) + }, /** - * 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 LearningResourcesApiLearningResourcesList + * Retrieve a single learning resource. + * @summary Retrieve + * @param {LearningResourcesApiLearningResourcesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly level?: Array - + learningResourcesRetrieve( + requestParameters: LearningResourcesApiLearningResourcesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** - * Number of results to return per page. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesList + * 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} */ - readonly limit?: number - + 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)) + }, /** - * 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 LearningResourcesApiLearningResourcesList + * Set User List Relationships on a given Learning Resource. + * @summary Set User List Relationships + * @param {LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offered_by?: Array + learningResourcesUserlistsPartialUpdate( + requestParameters: LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .learningResourcesUserlistsPartialUpdate( + requestParameters.id, + requestParameters.userlist_id, + requestParameters.PatchedUserListRelationshipRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} - /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesList - */ - 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 LearningResourcesApiLearningResourcesList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesApiLearningResourcesList - */ - readonly professional?: boolean +/** + * Request parameters for learningResourcesContentfilesList operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesContentfilesListRequest + */ +export interface LearningResourcesApiLearningResourcesContentfilesListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly learning_resource_id: number + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly content_feature_type?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly limit?: number + + /** + * The organization that offers a learning resource the content file belongs to * `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 LearningResourcesApiLearningResourcesContentfilesList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly offset?: number + + /** + * The platform on which learning resources the content file belongs to is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'bootcamps' | 'csail' | 'ctl' | 'edx' | 'emeritus' | 'globalalumni' | 'mitpe' | 'mitxonline' | 'ocw' | 'oll' | 'podcast' | 'scc' | 'see' | 'simplilearn' | 'susskind' | 'whu' | 'xpro' | 'youtube'>} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly platform?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly resource_id?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesContentfilesList + */ + readonly run_id?: Array +} - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesList - */ - readonly readable_id?: Array +/** + * Request parameters for learningResourcesContentfilesRetrieve operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesContentfilesRetrieveRequest + */ +export interface LearningResourcesApiLearningResourcesContentfilesRetrieveRequest { + /** + * A unique integer value identifying this contentfile. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesContentfilesRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof LearningResourcesApiLearningResourcesContentfilesRetrieve + */ + readonly learning_resource_id: number +} - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningResourcesApiLearningResourcesList - */ - readonly resource_category?: Array +/** + * Request parameters for learningResourcesItemsList operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesItemsListRequest + */ +export interface LearningResourcesApiLearningResourcesItemsListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof LearningResourcesApiLearningResourcesItemsList + */ + readonly learning_resource_id: number + + /** + * Number of results to return per page. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesItemsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesItemsList + */ + readonly offset?: number + + /** + * Which field to use when ordering the results. + * @type {string} + * @memberof LearningResourcesApiLearningResourcesItemsList + */ + readonly sortby?: string +} - /** - * 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 LearningResourcesApiLearningResourcesList - */ - readonly resource_type?: Array +/** + * Request parameters for learningResourcesItemsRetrieve operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesItemsRetrieveRequest + */ +export interface LearningResourcesApiLearningResourcesItemsRetrieveRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesItemsRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof LearningResourcesApiLearningResourcesItemsRetrieve + */ + readonly learning_resource_id: number +} - /** - * 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 LearningResourcesApiLearningResourcesList - */ - readonly sortby?: LearningResourcesListSortbyEnum +/** + * Request parameters for learningResourcesLearningPathsPartialUpdate operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest + */ +export interface LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest { + /** + * id of the learning resource + * @type {number} + * @memberof LearningResourcesApiLearningResourcesLearningPathsPartialUpdate + */ + readonly id: number + + /** + * id of the parent learning path + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesLearningPathsPartialUpdate + */ + readonly learning_path_id?: Array + + /** + * + * @type {PatchedLearningResourceRelationshipRequest} + * @memberof LearningResourcesApiLearningResourcesLearningPathsPartialUpdate + */ + readonly PatchedLearningResourceRelationshipRequest?: PatchedLearningResourceRelationshipRequest +} - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesList - */ - readonly topic?: Array +/** + * Request parameters for learningResourcesList operation in LearningResourcesApi. + * @export + * @interface LearningResourcesApiLearningResourcesListRequest + */ +export interface LearningResourcesApiLearningResourcesListRequest { + /** + * + * @type {boolean} + * @memberof LearningResourcesApiLearningResourcesList + */ + 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 LearningResourcesApiLearningResourcesList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesList + */ + 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'>} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof LearningResourcesApiLearningResourcesList + */ + 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 LearningResourcesApiLearningResourcesList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesList + */ + 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 LearningResourcesApiLearningResourcesList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesList + */ + 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 LearningResourcesApiLearningResourcesList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly resource_category?: Array + + /** + * 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 LearningResourcesApiLearningResourcesList + */ + 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 LearningResourcesApiLearningResourcesList + */ + readonly sortby?: LearningResourcesListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesList + */ + readonly topic?: Array } /** @@ -10788,12 +12580,12 @@ export interface LearningResourcesApiLearningResourcesListRequest { * @interface LearningResourcesApiLearningResourcesRetrieveRequest */ export interface LearningResourcesApiLearningResourcesRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof LearningResourcesApiLearningResourcesRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof LearningResourcesApiLearningResourcesRetrieve + */ + readonly id: number } /** @@ -10802,131 +12594,131 @@ export interface LearningResourcesApiLearningResourcesRetrieveRequest { * @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 + /** + * + * @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 } /** @@ -10935,26 +12727,26 @@ export interface LearningResourcesApiLearningResourcesSimilarListRequest { * @interface LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest */ export interface LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest { - /** - * id of the learning resource - * @type {number} - * @memberof LearningResourcesApiLearningResourcesUserlistsPartialUpdate - */ - readonly id: number - - /** - * id of the parent user list - * @type {Array} - * @memberof LearningResourcesApiLearningResourcesUserlistsPartialUpdate - */ - readonly userlist_id?: Array - - /** - * - * @type {PatchedUserListRelationshipRequest} - * @memberof LearningResourcesApiLearningResourcesUserlistsPartialUpdate - */ - readonly PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest + /** + * id of the learning resource + * @type {number} + * @memberof LearningResourcesApiLearningResourcesUserlistsPartialUpdate + */ + readonly id: number + + /** + * id of the parent user list + * @type {Array} + * @memberof LearningResourcesApiLearningResourcesUserlistsPartialUpdate + */ + readonly userlist_id?: Array + + /** + * + * @type {PatchedUserListRelationshipRequest} + * @memberof LearningResourcesApiLearningResourcesUserlistsPartialUpdate + */ + readonly PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest } /** @@ -10964,703 +12756,994 @@ export interface LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequ * @extends {BaseAPI} */ export class LearningResourcesApi extends BaseAPI { - /** - * Show content files for a learning resource - * @summary Learning Resource Content File List - * @param {LearningResourcesApiLearningResourcesContentfilesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesContentfilesList(requestParameters: LearningResourcesApiLearningResourcesContentfilesListRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesContentfilesList(requestParameters.learning_resource_id, requestParameters.content_feature_type, requestParameters.limit, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.resource_id, requestParameters.run_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Show content files for a learning resource - * @summary Learning Resource Content File Retrieve - * @param {LearningResourcesApiLearningResourcesContentfilesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesContentfilesRetrieve(requestParameters: LearningResourcesApiLearningResourcesContentfilesRetrieveRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesContentfilesRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {LearningResourcesApiLearningResourcesItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesItemsList(requestParameters: LearningResourcesApiLearningResourcesItemsListRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {LearningResourcesApiLearningResourcesItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesItemsRetrieve(requestParameters: LearningResourcesApiLearningResourcesItemsRetrieveRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Set Learning Path Relationships on a given Learning Resource. - * @summary Set Learning Path Relationships - * @param {LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesLearningPathsPartialUpdate(requestParameters: LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesLearningPathsPartialUpdate(requestParameters.id, requestParameters.learning_path_id, requestParameters.PatchedLearningResourceRelationshipRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Get a paginated list of learning resources. - * @summary List - * @param {LearningResourcesApiLearningResourcesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesList(requestParameters: LearningResourcesApiLearningResourcesListRequest = {}, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesList(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)); - } - - /** - * Retrieve a single learning resource. - * @summary Retrieve - * @param {LearningResourcesApiLearningResourcesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesRetrieve(requestParameters: LearningResourcesApiLearningResourcesRetrieveRequest, options?: RawAxiosRequestConfig) { - 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 - * @param {LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesApi - */ - public learningResourcesUserlistsPartialUpdate(requestParameters: LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesApiFp(this.configuration).learningResourcesUserlistsPartialUpdate(requestParameters.id, requestParameters.userlist_id, requestParameters.PatchedUserListRelationshipRequest, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Show content files for a learning resource + * @summary Learning Resource Content File List + * @param {LearningResourcesApiLearningResourcesContentfilesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesContentfilesList( + requestParameters: LearningResourcesApiLearningResourcesContentfilesListRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesContentfilesList( + requestParameters.learning_resource_id, + requestParameters.content_feature_type, + requestParameters.limit, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.resource_id, + requestParameters.run_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Show content files for a learning resource + * @summary Learning Resource Content File Retrieve + * @param {LearningResourcesApiLearningResourcesContentfilesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesContentfilesRetrieve( + requestParameters: LearningResourcesApiLearningResourcesContentfilesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesContentfilesRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {LearningResourcesApiLearningResourcesItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesItemsList( + requestParameters: LearningResourcesApiLearningResourcesItemsListRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {LearningResourcesApiLearningResourcesItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesItemsRetrieve( + requestParameters: LearningResourcesApiLearningResourcesItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Set Learning Path Relationships on a given Learning Resource. + * @summary Set Learning Path Relationships + * @param {LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesLearningPathsPartialUpdate( + requestParameters: LearningResourcesApiLearningResourcesLearningPathsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesLearningPathsPartialUpdate( + requestParameters.id, + requestParameters.learning_path_id, + requestParameters.PatchedLearningResourceRelationshipRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of learning resources. + * @summary List + * @param {LearningResourcesApiLearningResourcesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesList( + requestParameters: LearningResourcesApiLearningResourcesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesList( + 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)) + } + + /** + * Retrieve a single learning resource. + * @summary Retrieve + * @param {LearningResourcesApiLearningResourcesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesRetrieve( + requestParameters: LearningResourcesApiLearningResourcesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + 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 + * @param {LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesApi + */ + public learningResourcesUserlistsPartialUpdate( + requestParameters: LearningResourcesApiLearningResourcesUserlistsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesApiFp(this.configuration) + .learningResourcesUserlistsPartialUpdate( + requestParameters.id, + requestParameters.userlist_id, + requestParameters.PatchedUserListRelationshipRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const LearningResourcesContentfilesListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type LearningResourcesContentfilesListOfferedByEnum = typeof LearningResourcesContentfilesListOfferedByEnum[keyof typeof LearningResourcesContentfilesListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type LearningResourcesContentfilesListOfferedByEnum = + (typeof LearningResourcesContentfilesListOfferedByEnum)[keyof typeof LearningResourcesContentfilesListOfferedByEnum] /** * @export */ export const LearningResourcesContentfilesListPlatformEnum = { - 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 LearningResourcesContentfilesListPlatformEnum = typeof LearningResourcesContentfilesListPlatformEnum[keyof typeof LearningResourcesContentfilesListPlatformEnum]; + 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 LearningResourcesContentfilesListPlatformEnum = + (typeof LearningResourcesContentfilesListPlatformEnum)[keyof typeof LearningResourcesContentfilesListPlatformEnum] /** * @export */ export const LearningResourcesListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type LearningResourcesListCertificationTypeEnum = typeof LearningResourcesListCertificationTypeEnum[keyof typeof LearningResourcesListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type LearningResourcesListCertificationTypeEnum = + (typeof LearningResourcesListCertificationTypeEnum)[keyof typeof LearningResourcesListCertificationTypeEnum] /** * @export */ export const LearningResourcesListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type LearningResourcesListDeliveryEnum = typeof LearningResourcesListDeliveryEnum[keyof typeof 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', - _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 LearningResourcesListDepartmentEnum = typeof LearningResourcesListDepartmentEnum[keyof typeof LearningResourcesListDepartmentEnum]; + _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 LearningResourcesListDepartmentEnum = + (typeof LearningResourcesListDepartmentEnum)[keyof typeof LearningResourcesListDepartmentEnum] /** * @export */ export const LearningResourcesListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type LearningResourcesListLevelEnum = typeof LearningResourcesListLevelEnum[keyof typeof LearningResourcesListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type LearningResourcesListLevelEnum = + (typeof LearningResourcesListLevelEnum)[keyof typeof LearningResourcesListLevelEnum] /** * @export */ export const LearningResourcesListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type LearningResourcesListOfferedByEnum = typeof LearningResourcesListOfferedByEnum[keyof typeof LearningResourcesListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type LearningResourcesListOfferedByEnum = + (typeof LearningResourcesListOfferedByEnum)[keyof typeof LearningResourcesListOfferedByEnum] /** * @export */ export const LearningResourcesListPlatformEnum = { - 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 LearningResourcesListPlatformEnum = typeof LearningResourcesListPlatformEnum[keyof typeof LearningResourcesListPlatformEnum]; + 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 LearningResourcesListPlatformEnum = + (typeof LearningResourcesListPlatformEnum)[keyof typeof LearningResourcesListPlatformEnum] /** * @export */ export const LearningResourcesListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type LearningResourcesListResourceCategoryEnum = typeof LearningResourcesListResourceCategoryEnum[keyof typeof LearningResourcesListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningResourcesListResourceCategoryEnum = + (typeof LearningResourcesListResourceCategoryEnum)[keyof typeof LearningResourcesListResourceCategoryEnum] /** * @export */ export const LearningResourcesListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type LearningResourcesListResourceTypeEnum = typeof LearningResourcesListResourceTypeEnum[keyof typeof LearningResourcesListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type LearningResourcesListResourceTypeEnum = + (typeof LearningResourcesListResourceTypeEnum)[keyof typeof LearningResourcesListResourceTypeEnum] /** * @export */ export const LearningResourcesListSortbyEnum = { - 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 LearningResourcesListSortbyEnum = typeof LearningResourcesListSortbyEnum[keyof typeof LearningResourcesListSortbyEnum]; + 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 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]; + 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]; + 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]; + _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]; + 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]; + 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]; + 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]; + 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]; + 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]; - + 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] /** * LearningResourcesSearchApi - axios parameter creator * @export */ -export const LearningResourcesSearchApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Search for learning resources - * @summary Search - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesSearchRetrieveSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesSearchRetrieve: async (aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesSearchRetrieveSearchModeEnum, slop?: number | null, sortby?: LearningResourcesSearchRetrieveSortbyEnum, topic?: Array, yearly_decay_percent?: number | null, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/learning_resources_search/`; - // 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 (aggregations) { - localVarQueryParameter['aggregations'] = aggregations; - } - - if (certification !== undefined) { - localVarQueryParameter['certification'] = certification; - } - - if (certification_type) { - localVarQueryParameter['certification_type'] = certification_type; - } - - if (content_file_score_weight !== undefined) { - localVarQueryParameter['content_file_score_weight'] = content_file_score_weight; - } - - if (course_feature) { - localVarQueryParameter['course_feature'] = course_feature; - } - - if (delivery) { - localVarQueryParameter['delivery'] = delivery; - } - - if (department) { - localVarQueryParameter['department'] = department; - } - - if (dev_mode !== undefined) { - localVarQueryParameter['dev_mode'] = dev_mode; - } - - if (free !== undefined) { - localVarQueryParameter['free'] = free; - } - - if (id) { - localVarQueryParameter['id'] = id; - } - - if (level) { - localVarQueryParameter['level'] = level; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (max_incompleteness_penalty !== undefined) { - localVarQueryParameter['max_incompleteness_penalty'] = max_incompleteness_penalty; - } - - if (min_score !== undefined) { - localVarQueryParameter['min_score'] = min_score; - } - - if (ocw_topic) { - localVarQueryParameter['ocw_topic'] = ocw_topic; - } - - 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 (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (resource_category) { - localVarQueryParameter['resource_category'] = resource_category; - } - - if (resource_type) { - localVarQueryParameter['resource_type'] = resource_type; - } - - if (search_mode !== undefined) { - localVarQueryParameter['search_mode'] = search_mode; - } - - if (slop !== undefined) { - localVarQueryParameter['slop'] = slop; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - if (topic) { - localVarQueryParameter['topic'] = topic; - } - - if (yearly_decay_percent !== undefined) { - localVarQueryParameter['yearly_decay_percent'] = yearly_decay_percent; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export const LearningResourcesSearchApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Search for learning resources + * @summary Search + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesSearchRetrieveSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + learningResourcesSearchRetrieve: async ( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesSearchRetrieveSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesSearchRetrieveSortbyEnum, + topic?: Array, + yearly_decay_percent?: number | null, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/learning_resources_search/` + // 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 (aggregations) { + localVarQueryParameter["aggregations"] = aggregations + } + + if (certification !== undefined) { + localVarQueryParameter["certification"] = certification + } + + if (certification_type) { + localVarQueryParameter["certification_type"] = certification_type + } + + if (content_file_score_weight !== undefined) { + localVarQueryParameter["content_file_score_weight"] = + content_file_score_weight + } + + if (course_feature) { + localVarQueryParameter["course_feature"] = course_feature + } + + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + + if (department) { + localVarQueryParameter["department"] = department + } + + if (dev_mode !== undefined) { + localVarQueryParameter["dev_mode"] = dev_mode + } + + if (free !== undefined) { + localVarQueryParameter["free"] = free + } + + if (id) { + localVarQueryParameter["id"] = id + } + + if (level) { + localVarQueryParameter["level"] = level + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (max_incompleteness_penalty !== undefined) { + localVarQueryParameter["max_incompleteness_penalty"] = + max_incompleteness_penalty + } + + if (min_score !== undefined) { + localVarQueryParameter["min_score"] = min_score + } + + if (ocw_topic) { + localVarQueryParameter["ocw_topic"] = ocw_topic + } + + 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 (q !== undefined) { + localVarQueryParameter["q"] = q + } + + if (resource_category) { + localVarQueryParameter["resource_category"] = resource_category + } + + if (resource_type) { + localVarQueryParameter["resource_type"] = resource_type + } + + if (search_mode !== undefined) { + localVarQueryParameter["search_mode"] = search_mode + } + + if (slop !== undefined) { + localVarQueryParameter["slop"] = slop + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + if (topic) { + localVarQueryParameter["topic"] = topic + } + + if (yearly_decay_percent !== undefined) { + localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} /** * LearningResourcesSearchApi - functional programming interface * @export */ -export const LearningResourcesSearchApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LearningResourcesSearchApiAxiosParamCreator(configuration) - return { - /** - * Search for learning resources - * @summary Search - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesSearchRetrieveSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesSearchRetrieve(aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesSearchRetrieveSearchModeEnum, slop?: number | null, sortby?: LearningResourcesSearchRetrieveSortbyEnum, topic?: Array, yearly_decay_percent?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesSearchRetrieve(aggregations, certification, certification_type, content_file_score_weight, course_feature, delivery, department, dev_mode, free, id, level, limit, max_incompleteness_penalty, min_score, ocw_topic, offered_by, offset, platform, professional, q, resource_category, resource_type, search_mode, slop, sortby, topic, yearly_decay_percent, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesSearchApi.learningResourcesSearchRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export const LearningResourcesSearchApiFp = function ( + configuration?: Configuration, +) { + const localVarAxiosParamCreator = + LearningResourcesSearchApiAxiosParamCreator(configuration) + return { + /** + * Search for learning resources + * @summary Search + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesSearchRetrieveSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async learningResourcesSearchRetrieve( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesSearchRetrieveSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesSearchRetrieveSortbyEnum, + topic?: Array, + yearly_decay_percent?: number | null, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesSearchRetrieve( + aggregations, + certification, + certification_type, + content_file_score_weight, + course_feature, + delivery, + department, + dev_mode, + free, + id, + level, + limit, + max_incompleteness_penalty, + min_score, + ocw_topic, + offered_by, + offset, + platform, + professional, + q, + resource_category, + resource_type, + search_mode, + slop, + sortby, + topic, + yearly_decay_percent, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesSearchApi.learningResourcesSearchRetrieve" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} /** * LearningResourcesSearchApi - factory interface * @export */ -export const LearningResourcesSearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LearningResourcesSearchApiFp(configuration) - return { - /** - * Search for learning resources - * @summary Search - * @param {LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesSearchRetrieve(requestParameters: LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesSearchRetrieve(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.topic, requestParameters.yearly_decay_percent, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const LearningResourcesSearchApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LearningResourcesSearchApiFp(configuration) + return { + /** + * Search for learning resources + * @summary Search + * @param {LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + learningResourcesSearchRetrieve( + requestParameters: LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesSearchRetrieve( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.topic, + requestParameters.yearly_decay_percent, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} /** * Request parameters for learningResourcesSearchRetrieve operation in LearningResourcesSearchApi. @@ -11668,1753 +13751,2297 @@ export const LearningResourcesSearchApiFactory = function (configuration?: Confi * @interface LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest */ export interface LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest { - /** - * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly aggregations?: Array - - /** - * True if the learning resource offers a certificate - * @type {boolean} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly certification?: boolean | null - - /** - * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate - * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly certification_type?: Array - - /** - * Score weight for content file data. 1 is the default. 0 means content files are ignored - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly content_file_score_weight?: number | null - - /** - * The course feature. Possible options are at api/v1/course_features/ - * @type {Array} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - 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'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly department?: Array - - /** - * If true return raw open search results with score explanations - * @type {boolean} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly dev_mode?: boolean | null + /** + * Show resource counts by category + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly aggregations?: Array + + /** + * True if the learning resource offers a certificate + * @type {boolean} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly certification?: boolean | null + + /** + * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate + * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly certification_type?: Array + + /** + * Score weight for content file data. 1 is the default. 0 means content files are ignored + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly content_file_score_weight?: number | null + + /** + * The course feature. Possible options are at api/v1/course_features/ + * @type {Array} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + 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'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly department?: Array + + /** + * If true return raw open search results with score explanations + * @type {boolean} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly dev_mode?: boolean | null + + /** + * + * @type {boolean} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly free?: boolean | null + + /** + * The id value for the learning resource + * @type {Array} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly id?: Array + + /** + * + * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly level?: Array + + /** + * Number of results to return per page + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly limit?: number + + /** + * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly max_incompleteness_penalty?: number | null + + /** + * Minimum score value a text query result needs to have to be displayed + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly min_score?: number | null + + /** + * The ocw topic name. + * @type {Array} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly ocw_topic?: Array + + /** + * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly offset?: number + + /** + * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly professional?: boolean | null + + /** + * The search text + * @type {string} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly q?: string + + /** + * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly resource_type?: Array + + /** + * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @type {'best_fields' | 'most_fields' | 'phrase'} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly search_mode?: LearningResourcesSearchRetrieveSearchModeEnum + + /** + * Allowed distance for phrase search + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly slop?: number | null + + /** + * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly sortby?: LearningResourcesSearchRetrieveSortbyEnum + + /** + * The topic name. To see a list of options go to api/v1/topics/ + * @type {Array} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly topic?: Array + + /** + * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve + */ + readonly yearly_decay_percent?: number | null +} - /** - * - * @type {boolean} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly free?: boolean | null - - /** - * The id value for the learning resource - * @type {Array} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly id?: Array - - /** - * - * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly level?: Array - - /** - * Number of results to return per page - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly limit?: number - - /** - * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly max_incompleteness_penalty?: number | null - - /** - * Minimum score value a text query result needs to have to be displayed - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly min_score?: number | null - - /** - * The ocw topic name. - * @type {Array} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly ocw_topic?: Array - - /** - * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education - * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly offset?: number - - /** - * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly professional?: boolean | null - - /** - * The search text - * @type {string} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly q?: string - - /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly resource_type?: Array - - /** - * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @type {'best_fields' | 'most_fields' | 'phrase'} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly search_mode?: LearningResourcesSearchRetrieveSearchModeEnum - - /** - * Allowed distance for phrase search - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly slop?: number | null - - /** - * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly sortby?: LearningResourcesSearchRetrieveSortbyEnum - - /** - * The topic name. To see a list of options go to api/v1/topics/ - * @type {Array} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly topic?: Array - - /** - * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly yearly_decay_percent?: number | null -} - -/** - * LearningResourcesSearchApi - object-oriented interface - * @export - * @class LearningResourcesSearchApi - * @extends {BaseAPI} - */ -export class LearningResourcesSearchApi extends BaseAPI { - /** - * Search for learning resources - * @summary Search - * @param {LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesSearchApi - */ - public learningResourcesSearchRetrieve(requestParameters: LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest = {}, options?: RawAxiosRequestConfig) { - return LearningResourcesSearchApiFp(this.configuration).learningResourcesSearchRetrieve(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.topic, requestParameters.yearly_decay_percent, options).then((request) => request(this.axios, this.basePath)); - } -} +/** + * LearningResourcesSearchApi - object-oriented interface + * @export + * @class LearningResourcesSearchApi + * @extends {BaseAPI} + */ +export class LearningResourcesSearchApi extends BaseAPI { + /** + * Search for learning resources + * @summary Search + * @param {LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesSearchApi + */ + public learningResourcesSearchRetrieve( + requestParameters: LearningResourcesSearchApiLearningResourcesSearchRetrieveRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesSearchApiFp(this.configuration) + .learningResourcesSearchRetrieve( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.topic, + requestParameters.yearly_decay_percent, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } +} /** * @export */ export const LearningResourcesSearchRetrieveAggregationsEnum = { - ResourceType: 'resource_type', - Certification: 'certification', - CertificationType: 'certification_type', - OfferedBy: 'offered_by', - Platform: 'platform', - Topic: 'topic', - Department: 'department', - Level: 'level', - CourseFeature: 'course_feature', - Professional: 'professional', - Free: 'free', - Delivery: 'delivery', - ResourceCategory: 'resource_category' -} as const; -export type LearningResourcesSearchRetrieveAggregationsEnum = typeof LearningResourcesSearchRetrieveAggregationsEnum[keyof typeof LearningResourcesSearchRetrieveAggregationsEnum]; + ResourceType: "resource_type", + Certification: "certification", + CertificationType: "certification_type", + OfferedBy: "offered_by", + Platform: "platform", + Topic: "topic", + Department: "department", + Level: "level", + CourseFeature: "course_feature", + Professional: "professional", + Free: "free", + Delivery: "delivery", + ResourceCategory: "resource_category", +} as const +export type LearningResourcesSearchRetrieveAggregationsEnum = + (typeof LearningResourcesSearchRetrieveAggregationsEnum)[keyof typeof LearningResourcesSearchRetrieveAggregationsEnum] /** * @export */ export const LearningResourcesSearchRetrieveCertificationTypeEnum = { - Micromasters: 'micromasters', - Professional: 'professional', - Completion: 'completion', - None: 'none' -} as const; -export type LearningResourcesSearchRetrieveCertificationTypeEnum = typeof LearningResourcesSearchRetrieveCertificationTypeEnum[keyof typeof LearningResourcesSearchRetrieveCertificationTypeEnum]; + Micromasters: "micromasters", + Professional: "professional", + Completion: "completion", + None: "none", +} as const +export type LearningResourcesSearchRetrieveCertificationTypeEnum = + (typeof LearningResourcesSearchRetrieveCertificationTypeEnum)[keyof typeof LearningResourcesSearchRetrieveCertificationTypeEnum] /** * @export */ export const LearningResourcesSearchRetrieveDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type LearningResourcesSearchRetrieveDeliveryEnum = typeof LearningResourcesSearchRetrieveDeliveryEnum[keyof typeof 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', - _3: '3', - _4: '4', - _5: '5', - _6: '6', - _7: '7', - _8: '8', - _9: '9', - _10: '10', - _11: '11', - _12: '12', - _14: '14', - _15: '15', - _16: '16', - _17: '17', - _18: '18', - _20: '20', - _21A: '21A', - _21G: '21G', - _21H: '21H', - _21L: '21L', - _21M: '21M', - _22: '22', - _24: '24', - 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 LearningResourcesSearchRetrieveDepartmentEnum = typeof LearningResourcesSearchRetrieveDepartmentEnum[keyof typeof LearningResourcesSearchRetrieveDepartmentEnum]; + _1: "1", + _2: "2", + _3: "3", + _4: "4", + _5: "5", + _6: "6", + _7: "7", + _8: "8", + _9: "9", + _10: "10", + _11: "11", + _12: "12", + _14: "14", + _15: "15", + _16: "16", + _17: "17", + _18: "18", + _20: "20", + _21A: "21A", + _21G: "21G", + _21H: "21H", + _21L: "21L", + _21M: "21M", + _22: "22", + _24: "24", + 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 LearningResourcesSearchRetrieveDepartmentEnum = + (typeof LearningResourcesSearchRetrieveDepartmentEnum)[keyof typeof LearningResourcesSearchRetrieveDepartmentEnum] /** * @export */ export const LearningResourcesSearchRetrieveLevelEnum = { - Undergraduate: 'undergraduate', - Graduate: 'graduate', - HighSchool: 'high_school', - Noncredit: 'noncredit', - Advanced: 'advanced', - Intermediate: 'intermediate', - Introductory: 'introductory' -} as const; -export type LearningResourcesSearchRetrieveLevelEnum = typeof LearningResourcesSearchRetrieveLevelEnum[keyof typeof LearningResourcesSearchRetrieveLevelEnum]; + Undergraduate: "undergraduate", + Graduate: "graduate", + HighSchool: "high_school", + Noncredit: "noncredit", + Advanced: "advanced", + Intermediate: "intermediate", + Introductory: "introductory", +} as const +export type LearningResourcesSearchRetrieveLevelEnum = + (typeof LearningResourcesSearchRetrieveLevelEnum)[keyof typeof LearningResourcesSearchRetrieveLevelEnum] /** * @export */ export const LearningResourcesSearchRetrieveOfferedByEnum = { - Mitx: 'mitx', - Ocw: 'ocw', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Mitpe: 'mitpe', - See: 'see' -} as const; -export type LearningResourcesSearchRetrieveOfferedByEnum = typeof LearningResourcesSearchRetrieveOfferedByEnum[keyof typeof LearningResourcesSearchRetrieveOfferedByEnum]; + Mitx: "mitx", + Ocw: "ocw", + Bootcamps: "bootcamps", + Xpro: "xpro", + Mitpe: "mitpe", + See: "see", +} as const +export type LearningResourcesSearchRetrieveOfferedByEnum = + (typeof LearningResourcesSearchRetrieveOfferedByEnum)[keyof typeof LearningResourcesSearchRetrieveOfferedByEnum] /** * @export */ export const LearningResourcesSearchRetrievePlatformEnum = { - Edx: 'edx', - Ocw: 'ocw', - Oll: 'oll', - Mitxonline: 'mitxonline', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Csail: 'csail', - Mitpe: 'mitpe', - See: 'see', - Scc: 'scc', - Ctl: 'ctl', - Whu: 'whu', - Susskind: 'susskind', - Globalalumni: 'globalalumni', - Simplilearn: 'simplilearn', - Emeritus: 'emeritus', - Podcast: 'podcast', - Youtube: 'youtube' -} as const; -export type LearningResourcesSearchRetrievePlatformEnum = typeof LearningResourcesSearchRetrievePlatformEnum[keyof typeof LearningResourcesSearchRetrievePlatformEnum]; + Edx: "edx", + Ocw: "ocw", + Oll: "oll", + Mitxonline: "mitxonline", + Bootcamps: "bootcamps", + Xpro: "xpro", + Csail: "csail", + Mitpe: "mitpe", + See: "see", + Scc: "scc", + Ctl: "ctl", + Whu: "whu", + Susskind: "susskind", + Globalalumni: "globalalumni", + Simplilearn: "simplilearn", + Emeritus: "emeritus", + Podcast: "podcast", + Youtube: "youtube", +} as const +export type LearningResourcesSearchRetrievePlatformEnum = + (typeof LearningResourcesSearchRetrievePlatformEnum)[keyof typeof LearningResourcesSearchRetrievePlatformEnum] /** * @export */ export const LearningResourcesSearchRetrieveResourceCategoryEnum = { - Course: 'course', - Program: 'program', - LearningMaterial: 'learning_material' -} as const; -export type LearningResourcesSearchRetrieveResourceCategoryEnum = typeof LearningResourcesSearchRetrieveResourceCategoryEnum[keyof typeof LearningResourcesSearchRetrieveResourceCategoryEnum]; + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type LearningResourcesSearchRetrieveResourceCategoryEnum = + (typeof LearningResourcesSearchRetrieveResourceCategoryEnum)[keyof typeof LearningResourcesSearchRetrieveResourceCategoryEnum] /** * @export */ export const LearningResourcesSearchRetrieveResourceTypeEnum = { - Course: 'course', - Program: 'program', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type LearningResourcesSearchRetrieveResourceTypeEnum = typeof LearningResourcesSearchRetrieveResourceTypeEnum[keyof typeof LearningResourcesSearchRetrieveResourceTypeEnum]; + Course: "course", + Program: "program", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type LearningResourcesSearchRetrieveResourceTypeEnum = + (typeof LearningResourcesSearchRetrieveResourceTypeEnum)[keyof typeof LearningResourcesSearchRetrieveResourceTypeEnum] /** * @export */ export const LearningResourcesSearchRetrieveSearchModeEnum = { - BestFields: 'best_fields', - MostFields: 'most_fields', - Phrase: 'phrase' -} as const; -export type LearningResourcesSearchRetrieveSearchModeEnum = typeof LearningResourcesSearchRetrieveSearchModeEnum[keyof typeof LearningResourcesSearchRetrieveSearchModeEnum]; + BestFields: "best_fields", + MostFields: "most_fields", + Phrase: "phrase", +} as const +export type LearningResourcesSearchRetrieveSearchModeEnum = + (typeof LearningResourcesSearchRetrieveSearchModeEnum)[keyof typeof LearningResourcesSearchRetrieveSearchModeEnum] /** * @export */ export const LearningResourcesSearchRetrieveSortbyEnum = { - Featured: 'featured', - Id: 'id', - Id2: '-id', - ReadableId: 'readable_id', - ReadableId2: '-readable_id', - LastModified: 'last_modified', - LastModified2: '-last_modified', - New: 'new', - StartDate: 'start_date', - StartDate2: '-start_date', - Mitcoursenumber: 'mitcoursenumber', - Mitcoursenumber2: '-mitcoursenumber', - Views: 'views', - Views2: '-views', - Upcoming: 'upcoming' -} as const; -export type LearningResourcesSearchRetrieveSortbyEnum = typeof LearningResourcesSearchRetrieveSortbyEnum[keyof typeof LearningResourcesSearchRetrieveSortbyEnum]; - + Featured: "featured", + Id: "id", + Id2: "-id", + ReadableId: "readable_id", + ReadableId2: "-readable_id", + LastModified: "last_modified", + LastModified2: "-last_modified", + New: "new", + StartDate: "start_date", + StartDate2: "-start_date", + Mitcoursenumber: "mitcoursenumber", + Mitcoursenumber2: "-mitcoursenumber", + Views: "views", + Views2: "-views", + Upcoming: "upcoming", +} as const +export type LearningResourcesSearchRetrieveSortbyEnum = + (typeof LearningResourcesSearchRetrieveSortbyEnum)[keyof typeof LearningResourcesSearchRetrieveSortbyEnum] /** * LearningResourcesUserSubscriptionApi - axios parameter creator * @export */ -export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * View for listing percolate query subscriptions for a user - * @summary Check if a user is subscribed to a specific query - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesUserSubscriptionCheckListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {LearningResourcesUserSubscriptionCheckListSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionCheckList: async (aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum, topic?: Array, yearly_decay_percent?: number | null, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/learning_resources_user_subscription/check/`; - // 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 (aggregations) { - localVarQueryParameter['aggregations'] = aggregations; - } - - if (certification !== undefined) { - localVarQueryParameter['certification'] = certification; - } - - if (certification_type) { - localVarQueryParameter['certification_type'] = certification_type; - } - - if (content_file_score_weight !== undefined) { - localVarQueryParameter['content_file_score_weight'] = content_file_score_weight; - } - - if (course_feature) { - localVarQueryParameter['course_feature'] = course_feature; - } - - if (delivery) { - localVarQueryParameter['delivery'] = delivery; - } - - if (department) { - localVarQueryParameter['department'] = department; - } - - if (dev_mode !== undefined) { - localVarQueryParameter['dev_mode'] = dev_mode; - } - - if (free !== undefined) { - localVarQueryParameter['free'] = free; - } - - if (id) { - localVarQueryParameter['id'] = id; - } - - if (level) { - localVarQueryParameter['level'] = level; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (max_incompleteness_penalty !== undefined) { - localVarQueryParameter['max_incompleteness_penalty'] = max_incompleteness_penalty; - } - - if (min_score !== undefined) { - localVarQueryParameter['min_score'] = min_score; - } - - if (ocw_topic) { - localVarQueryParameter['ocw_topic'] = ocw_topic; - } - - 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 (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (resource_category) { - localVarQueryParameter['resource_category'] = resource_category; - } - - if (resource_type) { - localVarQueryParameter['resource_type'] = resource_type; - } - - if (search_mode !== undefined) { - localVarQueryParameter['search_mode'] = search_mode; - } - - if (slop !== undefined) { - localVarQueryParameter['slop'] = slop; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - if (source_type !== undefined) { - localVarQueryParameter['source_type'] = source_type; - } - - if (topic) { - localVarQueryParameter['topic'] = topic; - } - - if (yearly_decay_percent !== undefined) { - localVarQueryParameter['yearly_decay_percent'] = yearly_decay_percent; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * View for listing percolate query subscriptions for a user - * @summary List subscribed queries - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesUserSubscriptionListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionList: async (aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionListSortbyEnum, topic?: Array, yearly_decay_percent?: number | null, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/learning_resources_user_subscription/`; - // 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 (aggregations) { - localVarQueryParameter['aggregations'] = aggregations; - } - - if (certification !== undefined) { - localVarQueryParameter['certification'] = certification; - } - - if (certification_type) { - localVarQueryParameter['certification_type'] = certification_type; - } - - if (content_file_score_weight !== undefined) { - localVarQueryParameter['content_file_score_weight'] = content_file_score_weight; - } - - if (course_feature) { - localVarQueryParameter['course_feature'] = course_feature; - } - - if (delivery) { - localVarQueryParameter['delivery'] = delivery; - } - - if (department) { - localVarQueryParameter['department'] = department; - } - - if (dev_mode !== undefined) { - localVarQueryParameter['dev_mode'] = dev_mode; - } - - if (free !== undefined) { - localVarQueryParameter['free'] = free; - } - - if (id) { - localVarQueryParameter['id'] = id; - } - - if (level) { - localVarQueryParameter['level'] = level; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (max_incompleteness_penalty !== undefined) { - localVarQueryParameter['max_incompleteness_penalty'] = max_incompleteness_penalty; - } - - if (min_score !== undefined) { - localVarQueryParameter['min_score'] = min_score; - } - - if (ocw_topic) { - localVarQueryParameter['ocw_topic'] = ocw_topic; - } - - 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 (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (resource_category) { - localVarQueryParameter['resource_category'] = resource_category; - } - - if (resource_type) { - localVarQueryParameter['resource_type'] = resource_type; - } - - if (search_mode !== undefined) { - localVarQueryParameter['search_mode'] = search_mode; - } - - if (slop !== undefined) { - localVarQueryParameter['slop'] = slop; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - if (topic) { - localVarQueryParameter['topic'] = topic; - } - - if (yearly_decay_percent !== undefined) { - localVarQueryParameter['yearly_decay_percent'] = yearly_decay_percent; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Subscribe a user to query - * @summary Subscribe user to query - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {PercolateQuerySubscriptionRequestRequest} [PercolateQuerySubscriptionRequestRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionSubscribeCreate: async (aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum, topic?: Array, yearly_decay_percent?: number | null, PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/learning_resources_user_subscription/subscribe/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (aggregations) { - localVarQueryParameter['aggregations'] = aggregations; - } - - if (certification !== undefined) { - localVarQueryParameter['certification'] = certification; - } - - if (certification_type) { - localVarQueryParameter['certification_type'] = certification_type; - } - - if (content_file_score_weight !== undefined) { - localVarQueryParameter['content_file_score_weight'] = content_file_score_weight; - } - - if (course_feature) { - localVarQueryParameter['course_feature'] = course_feature; - } - - if (delivery) { - localVarQueryParameter['delivery'] = delivery; - } - - if (department) { - localVarQueryParameter['department'] = department; - } - - if (dev_mode !== undefined) { - localVarQueryParameter['dev_mode'] = dev_mode; - } - - if (free !== undefined) { - localVarQueryParameter['free'] = free; - } - - if (id) { - localVarQueryParameter['id'] = id; - } - - if (level) { - localVarQueryParameter['level'] = level; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (max_incompleteness_penalty !== undefined) { - localVarQueryParameter['max_incompleteness_penalty'] = max_incompleteness_penalty; - } - - if (min_score !== undefined) { - localVarQueryParameter['min_score'] = min_score; - } - - if (ocw_topic) { - localVarQueryParameter['ocw_topic'] = ocw_topic; - } - - 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 (q !== undefined) { - localVarQueryParameter['q'] = q; - } - - if (resource_category) { - localVarQueryParameter['resource_category'] = resource_category; - } - - if (resource_type) { - localVarQueryParameter['resource_type'] = resource_type; - } - - if (search_mode !== undefined) { - localVarQueryParameter['search_mode'] = search_mode; - } - - if (slop !== undefined) { - localVarQueryParameter['slop'] = slop; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - if (source_type !== undefined) { - localVarQueryParameter['source_type'] = source_type; - } - - if (topic) { - localVarQueryParameter['topic'] = topic; - } - - if (yearly_decay_percent !== undefined) { - localVarQueryParameter['yearly_decay_percent'] = yearly_decay_percent; - } - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PercolateQuerySubscriptionRequestRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query - * @summary Unsubscribe user from query - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionUnsubscribeDestroy: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningResourcesUserSubscriptionUnsubscribeDestroy', 'id', id) - const localVarPath = `/api/v1/learning_resources_user_subscription/{id}/unsubscribe/` - .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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * LearningResourcesUserSubscriptionApi - functional programming interface - * @export - */ -export const LearningResourcesUserSubscriptionApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LearningResourcesUserSubscriptionApiAxiosParamCreator(configuration) - return { - /** - * View for listing percolate query subscriptions for a user - * @summary Check if a user is subscribed to a specific query - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesUserSubscriptionCheckListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {LearningResourcesUserSubscriptionCheckListSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesUserSubscriptionCheckList(aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum, topic?: Array, yearly_decay_percent?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesUserSubscriptionCheckList(aggregations, certification, certification_type, content_file_score_weight, course_feature, delivery, department, dev_mode, free, id, level, limit, max_incompleteness_penalty, min_score, ocw_topic, offered_by, offset, platform, professional, q, resource_category, resource_type, search_mode, slop, sortby, source_type, topic, yearly_decay_percent, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionCheckList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * View for listing percolate query subscriptions for a user - * @summary List subscribed queries - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesUserSubscriptionListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesUserSubscriptionList(aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionListSortbyEnum, topic?: Array, yearly_decay_percent?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesUserSubscriptionList(aggregations, certification, certification_type, content_file_score_weight, course_feature, delivery, department, dev_mode, free, id, level, limit, max_incompleteness_penalty, min_score, ocw_topic, offered_by, offset, platform, professional, q, resource_category, resource_type, search_mode, slop, sortby, topic, yearly_decay_percent, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Subscribe a user to query - * @summary Subscribe user to query - * @param {Array} [aggregations] Show resource counts by category - * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored - * @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] - * @param {Array} [id] The id value for the learning resource - * @param {Array} [level] - * @param {number} [limit] Number of results to return per page - * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed - * @param {Array} [ocw_topic] The ocw topic name. - * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @param {boolean | null} [professional] - * @param {string} [q] The search text - * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist - * @param {LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @param {number | null} [slop] Allowed distance for phrase search - * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type - * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @param {PercolateQuerySubscriptionRequestRequest} [PercolateQuerySubscriptionRequestRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesUserSubscriptionSubscribeCreate(aggregations?: Array, certification?: boolean | null, certification_type?: Array, content_file_score_weight?: number | null, course_feature?: Array, delivery?: Array, department?: Array, dev_mode?: boolean | null, free?: boolean | null, id?: Array, level?: Array, limit?: number, max_incompleteness_penalty?: number | null, min_score?: number | null, ocw_topic?: Array, offered_by?: Array, offset?: number, platform?: Array, professional?: boolean | null, q?: string, resource_category?: Array, resource_type?: Array, search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum, slop?: number | null, sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum, topic?: Array, yearly_decay_percent?: number | null, PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesUserSubscriptionSubscribeCreate(aggregations, certification, certification_type, content_file_score_weight, course_feature, delivery, department, dev_mode, free, id, level, limit, max_incompleteness_penalty, min_score, ocw_topic, offered_by, offset, platform, professional, q, resource_category, resource_type, search_mode, slop, sortby, source_type, topic, yearly_decay_percent, PercolateQuerySubscriptionRequestRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionSubscribeCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query - * @summary Unsubscribe user from query - * @param {number} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningResourcesUserSubscriptionUnsubscribeDestroy(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningResourcesUserSubscriptionUnsubscribeDestroy(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionUnsubscribeDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * LearningResourcesUserSubscriptionApi - factory interface - * @export - */ -export const LearningResourcesUserSubscriptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LearningResourcesUserSubscriptionApiFp(configuration) - return { - /** - * View for listing percolate query subscriptions for a user - * @summary Check if a user is subscribed to a specific query - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionCheckList(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.learningResourcesUserSubscriptionCheckList(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.source_type, requestParameters.topic, requestParameters.yearly_decay_percent, options).then((request) => request(axios, basePath)); - }, - /** - * View for listing percolate query subscriptions for a user - * @summary List subscribed queries - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionList(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.learningResourcesUserSubscriptionList(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.topic, requestParameters.yearly_decay_percent, options).then((request) => request(axios, basePath)); - }, - /** - * Subscribe a user to query - * @summary Subscribe user to query - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionSubscribeCreate(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesUserSubscriptionSubscribeCreate(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.source_type, requestParameters.topic, requestParameters.yearly_decay_percent, requestParameters.PercolateQuerySubscriptionRequestRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query - * @summary Unsubscribe user from query - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningResourcesUserSubscriptionUnsubscribeDestroy(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningResourcesUserSubscriptionUnsubscribeDestroy(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for learningResourcesUserSubscriptionCheckList operation in LearningResourcesUserSubscriptionApi. - * @export - * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest - */ -export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest { - /** - * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly aggregations?: Array - - /** - * True if the learning resource offers a certificate - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly certification?: boolean | null - - /** - * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate - * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly certification_type?: Array - - /** - * Score weight for content file data. 1 is the default. 0 means content files are ignored - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly content_file_score_weight?: number | null - - /** - * The course feature. Possible options are at api/v1/course_features/ - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - 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'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly department?: Array - - /** - * If true return raw open search results with score explanations - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly dev_mode?: boolean | null - - /** - * - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly free?: boolean | null - - /** - * The id value for the learning resource - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly id?: Array - - /** - * - * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly level?: Array - - /** - * Number of results to return per page - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly limit?: number - - /** - * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly max_incompleteness_penalty?: number | null - - /** - * Minimum score value a text query result needs to have to be displayed - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly min_score?: number | null - - /** - * The ocw topic name. - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly ocw_topic?: Array - - /** - * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education - * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly offset?: number - - /** - * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly professional?: boolean | null - - /** - * The search text - * @type {string} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly q?: string - - /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly resource_type?: Array - - /** - * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @type {'best_fields' | 'most_fields' | 'phrase'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum - - /** - * Allowed distance for phrase search - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly slop?: number | null - +export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + * View for listing percolate query subscriptions for a user + * @summary Check if a user is subscribed to a specific query + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesUserSubscriptionCheckListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {LearningResourcesUserSubscriptionCheckListSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum - + learningResourcesUserSubscriptionCheckList: async ( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, + source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum, + topic?: Array, + yearly_decay_percent?: number | null, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/learning_resources_user_subscription/check/` + // 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 (aggregations) { + localVarQueryParameter["aggregations"] = aggregations + } + + if (certification !== undefined) { + localVarQueryParameter["certification"] = certification + } + + if (certification_type) { + localVarQueryParameter["certification_type"] = certification_type + } + + if (content_file_score_weight !== undefined) { + localVarQueryParameter["content_file_score_weight"] = + content_file_score_weight + } + + if (course_feature) { + localVarQueryParameter["course_feature"] = course_feature + } + + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + + if (department) { + localVarQueryParameter["department"] = department + } + + if (dev_mode !== undefined) { + localVarQueryParameter["dev_mode"] = dev_mode + } + + if (free !== undefined) { + localVarQueryParameter["free"] = free + } + + if (id) { + localVarQueryParameter["id"] = id + } + + if (level) { + localVarQueryParameter["level"] = level + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (max_incompleteness_penalty !== undefined) { + localVarQueryParameter["max_incompleteness_penalty"] = + max_incompleteness_penalty + } + + if (min_score !== undefined) { + localVarQueryParameter["min_score"] = min_score + } + + if (ocw_topic) { + localVarQueryParameter["ocw_topic"] = ocw_topic + } + + 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 (q !== undefined) { + localVarQueryParameter["q"] = q + } + + if (resource_category) { + localVarQueryParameter["resource_category"] = resource_category + } + + if (resource_type) { + localVarQueryParameter["resource_type"] = resource_type + } + + if (search_mode !== undefined) { + localVarQueryParameter["search_mode"] = search_mode + } + + if (slop !== undefined) { + localVarQueryParameter["slop"] = slop + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + if (source_type !== undefined) { + localVarQueryParameter["source_type"] = source_type + } + + if (topic) { + localVarQueryParameter["topic"] = topic + } + + if (yearly_decay_percent !== undefined) { + localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type - * @type {'search_subscription_type' | 'channel_subscription_type'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + * View for listing percolate query subscriptions for a user + * @summary List subscribed queries + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesUserSubscriptionListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum - + learningResourcesUserSubscriptionList: async ( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesUserSubscriptionListSortbyEnum, + topic?: Array, + yearly_decay_percent?: number | null, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/learning_resources_user_subscription/` + // 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 (aggregations) { + localVarQueryParameter["aggregations"] = aggregations + } + + if (certification !== undefined) { + localVarQueryParameter["certification"] = certification + } + + if (certification_type) { + localVarQueryParameter["certification_type"] = certification_type + } + + if (content_file_score_weight !== undefined) { + localVarQueryParameter["content_file_score_weight"] = + content_file_score_weight + } + + if (course_feature) { + localVarQueryParameter["course_feature"] = course_feature + } + + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + + if (department) { + localVarQueryParameter["department"] = department + } + + if (dev_mode !== undefined) { + localVarQueryParameter["dev_mode"] = dev_mode + } + + if (free !== undefined) { + localVarQueryParameter["free"] = free + } + + if (id) { + localVarQueryParameter["id"] = id + } + + if (level) { + localVarQueryParameter["level"] = level + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (max_incompleteness_penalty !== undefined) { + localVarQueryParameter["max_incompleteness_penalty"] = + max_incompleteness_penalty + } + + if (min_score !== undefined) { + localVarQueryParameter["min_score"] = min_score + } + + if (ocw_topic) { + localVarQueryParameter["ocw_topic"] = ocw_topic + } + + 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 (q !== undefined) { + localVarQueryParameter["q"] = q + } + + if (resource_category) { + localVarQueryParameter["resource_category"] = resource_category + } + + if (resource_type) { + localVarQueryParameter["resource_type"] = resource_type + } + + if (search_mode !== undefined) { + localVarQueryParameter["search_mode"] = search_mode + } + + if (slop !== undefined) { + localVarQueryParameter["slop"] = slop + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + if (topic) { + localVarQueryParameter["topic"] = topic + } + + if (yearly_decay_percent !== undefined) { + localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The topic name. To see a list of options go to api/v1/topics/ - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + * Subscribe a user to query + * @summary Subscribe user to query + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {PercolateQuerySubscriptionRequestRequest} [PercolateQuerySubscriptionRequestRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly topic?: Array - + learningResourcesUserSubscriptionSubscribeCreate: async ( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, + source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum, + topic?: Array, + yearly_decay_percent?: number | null, + PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/learning_resources_user_subscription/subscribe/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + if (aggregations) { + localVarQueryParameter["aggregations"] = aggregations + } + + if (certification !== undefined) { + localVarQueryParameter["certification"] = certification + } + + if (certification_type) { + localVarQueryParameter["certification_type"] = certification_type + } + + if (content_file_score_weight !== undefined) { + localVarQueryParameter["content_file_score_weight"] = + content_file_score_weight + } + + if (course_feature) { + localVarQueryParameter["course_feature"] = course_feature + } + + if (delivery) { + localVarQueryParameter["delivery"] = delivery + } + + if (department) { + localVarQueryParameter["department"] = department + } + + if (dev_mode !== undefined) { + localVarQueryParameter["dev_mode"] = dev_mode + } + + if (free !== undefined) { + localVarQueryParameter["free"] = free + } + + if (id) { + localVarQueryParameter["id"] = id + } + + if (level) { + localVarQueryParameter["level"] = level + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (max_incompleteness_penalty !== undefined) { + localVarQueryParameter["max_incompleteness_penalty"] = + max_incompleteness_penalty + } + + if (min_score !== undefined) { + localVarQueryParameter["min_score"] = min_score + } + + if (ocw_topic) { + localVarQueryParameter["ocw_topic"] = ocw_topic + } + + 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 (q !== undefined) { + localVarQueryParameter["q"] = q + } + + if (resource_category) { + localVarQueryParameter["resource_category"] = resource_category + } + + if (resource_type) { + localVarQueryParameter["resource_type"] = resource_type + } + + if (search_mode !== undefined) { + localVarQueryParameter["search_mode"] = search_mode + } + + if (slop !== undefined) { + localVarQueryParameter["slop"] = slop + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + if (source_type !== undefined) { + localVarQueryParameter["source_type"] = source_type + } + + if (topic) { + localVarQueryParameter["topic"] = topic + } + + if (yearly_decay_percent !== undefined) { + localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent + } + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PercolateQuerySubscriptionRequestRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query + * @summary Unsubscribe user from query + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly yearly_decay_percent?: number | null + learningResourcesUserSubscriptionUnsubscribeDestroy: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists( + "learningResourcesUserSubscriptionUnsubscribeDestroy", + "id", + id, + ) + const localVarPath = + `/api/v1/learning_resources_user_subscription/{id}/unsubscribe/`.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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for learningResourcesUserSubscriptionList operation in LearningResourcesUserSubscriptionApi. + * LearningResourcesUserSubscriptionApi - functional programming interface * @export - * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest */ -export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest { - /** - * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly aggregations?: Array - - /** - * True if the learning resource offers a certificate - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly certification?: boolean | null - +export const LearningResourcesUserSubscriptionApiFp = function ( + configuration?: Configuration, +) { + const localVarAxiosParamCreator = + LearningResourcesUserSubscriptionApiAxiosParamCreator(configuration) + return { /** - * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate - * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly certification_type?: Array - - /** - * Score weight for content file data. 1 is the default. 0 means content files are ignored - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly content_file_score_weight?: number | null - - /** - * The course feature. Possible options are at api/v1/course_features/ - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - 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'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly department?: Array - - /** - * If true return raw open search results with score explanations - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly dev_mode?: boolean | null - - /** - * - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly free?: boolean | null - - /** - * The id value for the learning resource - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly id?: Array - - /** - * - * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly level?: Array - - /** - * Number of results to return per page - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly limit?: number - - /** - * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly max_incompleteness_penalty?: number | null - - /** - * Minimum score value a text query result needs to have to be displayed - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly min_score?: number | null - - /** - * The ocw topic name. - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly ocw_topic?: Array - - /** - * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education - * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly offset?: number - - /** - * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly professional?: boolean | null - - /** - * The search text - * @type {string} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly q?: string - - /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly resource_type?: Array - - /** - * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @type {'best_fields' | 'most_fields' | 'phrase'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum - - /** - * Allowed distance for phrase search - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + * View for listing percolate query subscriptions for a user + * @summary Check if a user is subscribed to a specific query + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesUserSubscriptionCheckListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {LearningResourcesUserSubscriptionCheckListSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly slop?: number | null - + async learningResourcesUserSubscriptionCheckList( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, + source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum, + topic?: Array, + yearly_decay_percent?: number | null, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesUserSubscriptionCheckList( + aggregations, + certification, + certification_type, + content_file_score_weight, + course_feature, + delivery, + department, + dev_mode, + free, + id, + level, + limit, + max_incompleteness_penalty, + min_score, + ocw_topic, + offered_by, + offset, + platform, + professional, + q, + resource_category, + resource_type, + search_mode, + slop, + sortby, + source_type, + topic, + yearly_decay_percent, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionCheckList" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + * View for listing percolate query subscriptions for a user + * @summary List subscribed queries + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesUserSubscriptionListSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: LearningResourcesUserSubscriptionListSortbyEnum - + async learningResourcesUserSubscriptionList( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesUserSubscriptionListSortbyEnum, + topic?: Array, + yearly_decay_percent?: number | null, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise> + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesUserSubscriptionList( + aggregations, + certification, + certification_type, + content_file_score_weight, + course_feature, + delivery, + department, + dev_mode, + free, + id, + level, + limit, + max_incompleteness_penalty, + min_score, + ocw_topic, + offered_by, + offset, + platform, + professional, + q, + resource_category, + resource_type, + search_mode, + slop, + sortby, + topic, + yearly_decay_percent, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionList" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * The topic name. To see a list of options go to api/v1/topics/ - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + * Subscribe a user to query + * @summary Subscribe user to query + * @param {Array} [aggregations] Show resource counts by category + * @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 {number | null} [content_file_score_weight] Score weight for content file data. 1 is the default. 0 means content files are ignored + * @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] + * @param {Array} [id] The id value for the learning resource + * @param {Array} [level] + * @param {number} [limit] Number of results to return per page + * @param {number | null} [max_incompleteness_penalty] Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @param {number | null} [min_score] Minimum score value a text query result needs to have to be displayed + * @param {Array} [ocw_topic] The ocw topic name. + * @param {Array} [offered_by] The organization that offers the 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 the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @param {boolean | null} [professional] + * @param {string} [q] The search text + * @param {Array} [resource_category] The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @param {Array} [resource_type] The type of learning resource * `course` - course * `program` - program * `learning_path` - learning path * `podcast` - podcast * `podcast_episode` - podcast episode * `video` - video * `video_playlist` - video playlist + * @param {LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum} [search_mode] The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @param {number | null} [slop] Allowed distance for phrase search + * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type + * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ + * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @param {PercolateQuerySubscriptionRequestRequest} [PercolateQuerySubscriptionRequestRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly topic?: Array - + async learningResourcesUserSubscriptionSubscribeCreate( + aggregations?: Array, + certification?: boolean | null, + certification_type?: Array, + content_file_score_weight?: number | null, + course_feature?: Array, + delivery?: Array, + department?: Array, + dev_mode?: boolean | null, + free?: boolean | null, + id?: Array, + level?: Array, + limit?: number, + max_incompleteness_penalty?: number | null, + min_score?: number | null, + ocw_topic?: Array, + offered_by?: Array, + offset?: number, + platform?: Array, + professional?: boolean | null, + q?: string, + resource_category?: Array, + resource_type?: Array, + search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum, + slop?: number | null, + sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, + source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum, + topic?: Array, + yearly_decay_percent?: number | null, + PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesUserSubscriptionSubscribeCreate( + aggregations, + certification, + certification_type, + content_file_score_weight, + course_feature, + delivery, + department, + dev_mode, + free, + id, + level, + limit, + max_incompleteness_penalty, + min_score, + ocw_topic, + offered_by, + offset, + platform, + professional, + q, + resource_category, + resource_type, + search_mode, + slop, + sortby, + source_type, + topic, + yearly_decay_percent, + PercolateQuerySubscriptionRequestRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionSubscribeCreate" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query + * @summary Unsubscribe user from query + * @param {number} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly yearly_decay_percent?: number | null + async learningResourcesUserSubscriptionUnsubscribeDestroy( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningResourcesUserSubscriptionUnsubscribeDestroy( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningResourcesUserSubscriptionApi.learningResourcesUserSubscriptionUnsubscribeDestroy" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * Request parameters for learningResourcesUserSubscriptionSubscribeCreate operation in LearningResourcesUserSubscriptionApi. + * LearningResourcesUserSubscriptionApi - factory interface * @export - * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest */ -export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest { - /** - * Show resource counts by category - * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly aggregations?: Array - - /** - * True if the learning resource offers a certificate - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly certification?: boolean | null - - /** - * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate - * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly certification_type?: Array - - /** - * Score weight for content file data. 1 is the default. 0 means content files are ignored - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly content_file_score_weight?: number | null - +export const LearningResourcesUserSubscriptionApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LearningResourcesUserSubscriptionApiFp(configuration) + return { /** - * The course feature. Possible options are at api/v1/course_features/ - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - 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'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly department?: Array - - /** - * If true return raw open search results with score explanations - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly dev_mode?: boolean | null - - /** - * - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly free?: boolean | null - - /** - * The id value for the learning resource - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly id?: Array - - /** - * - * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly level?: Array - - /** - * Number of results to return per page - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly limit?: number - - /** - * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly max_incompleteness_penalty?: number | null - - /** - * Minimum score value a text query result needs to have to be displayed - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly min_score?: number | null - - /** - * The ocw topic name. - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly ocw_topic?: Array - - /** - * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education - * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly offset?: number - - /** - * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube - * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly professional?: boolean | null - - /** - * The search text - * @type {string} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly q?: string - - /** - * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'program' | 'learning_material'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly resource_type?: Array - - /** - * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase - * @type {'best_fields' | 'most_fields' | 'phrase'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + * View for listing percolate query subscriptions for a user + * @summary Check if a user is subscribed to a specific query + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum - + learningResourcesUserSubscriptionCheckList( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .learningResourcesUserSubscriptionCheckList( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.source_type, + requestParameters.topic, + requestParameters.yearly_decay_percent, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * Allowed distance for phrase search - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + * View for listing percolate query subscriptions for a user + * @summary List subscribed queries + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly slop?: number | null - + learningResourcesUserSubscriptionList( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise> { + return localVarFp + .learningResourcesUserSubscriptionList( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.topic, + requestParameters.yearly_decay_percent, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + * Subscribe a user to query + * @summary Subscribe user to query + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum - + learningResourcesUserSubscriptionSubscribeCreate( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesUserSubscriptionSubscribeCreate( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.source_type, + requestParameters.topic, + requestParameters.yearly_decay_percent, + requestParameters.PercolateQuerySubscriptionRequestRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** - * The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type - * @type {'search_subscription_type' | 'channel_subscription_type'} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query + * @summary Unsubscribe user from query + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum + learningResourcesUserSubscriptionUnsubscribeDestroy( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningResourcesUserSubscriptionUnsubscribeDestroy( + requestParameters.id, + options, + ) + .then((request) => request(axios, basePath)) + }, + } +} - /** - * The topic name. To see a list of options go to api/v1/topics/ - * @type {Array} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly topic?: Array +/** + * Request parameters for learningResourcesUserSubscriptionCheckList operation in LearningResourcesUserSubscriptionApi. + * @export + * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest + */ +export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest { + /** + * Show resource counts by category + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly aggregations?: Array + + /** + * True if the learning resource offers a certificate + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly certification?: boolean | null + + /** + * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate + * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly certification_type?: Array + + /** + * Score weight for content file data. 1 is the default. 0 means content files are ignored + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly content_file_score_weight?: number | null + + /** + * The course feature. Possible options are at api/v1/course_features/ + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + 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'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly department?: Array + + /** + * If true return raw open search results with score explanations + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly dev_mode?: boolean | null + + /** + * + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly free?: boolean | null + + /** + * The id value for the learning resource + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly id?: Array + + /** + * + * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly level?: Array + + /** + * Number of results to return per page + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly limit?: number + + /** + * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly max_incompleteness_penalty?: number | null + + /** + * Minimum score value a text query result needs to have to be displayed + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly min_score?: number | null + + /** + * The ocw topic name. + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly ocw_topic?: Array + + /** + * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly offset?: number + + /** + * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly professional?: boolean | null + + /** + * The search text + * @type {string} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly q?: string + + /** + * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly resource_type?: Array + + /** + * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @type {'best_fields' | 'most_fields' | 'phrase'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly search_mode?: LearningResourcesUserSubscriptionCheckListSearchModeEnum + + /** + * Allowed distance for phrase search + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly slop?: number | null + + /** + * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum + + /** + * The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type + * @type {'search_subscription_type' | 'channel_subscription_type'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum + + /** + * The topic name. To see a list of options go to api/v1/topics/ + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly topic?: Array + + /** + * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList + */ + readonly yearly_decay_percent?: number | null +} - /** - * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly yearly_decay_percent?: number | null +/** + * Request parameters for learningResourcesUserSubscriptionList operation in LearningResourcesUserSubscriptionApi. + * @export + * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest + */ +export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest { + /** + * Show resource counts by category + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly aggregations?: Array + + /** + * True if the learning resource offers a certificate + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly certification?: boolean | null + + /** + * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate + * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly certification_type?: Array + + /** + * Score weight for content file data. 1 is the default. 0 means content files are ignored + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly content_file_score_weight?: number | null + + /** + * The course feature. Possible options are at api/v1/course_features/ + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + 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'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly department?: Array + + /** + * If true return raw open search results with score explanations + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly dev_mode?: boolean | null + + /** + * + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly free?: boolean | null + + /** + * The id value for the learning resource + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly id?: Array + + /** + * + * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly level?: Array + + /** + * Number of results to return per page + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly limit?: number + + /** + * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly max_incompleteness_penalty?: number | null + + /** + * Minimum score value a text query result needs to have to be displayed + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly min_score?: number | null + + /** + * The ocw topic name. + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly ocw_topic?: Array + + /** + * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly offset?: number + + /** + * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly professional?: boolean | null + + /** + * The search text + * @type {string} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly q?: string + + /** + * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly resource_type?: Array + + /** + * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @type {'best_fields' | 'most_fields' | 'phrase'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly search_mode?: LearningResourcesUserSubscriptionListSearchModeEnum + + /** + * Allowed distance for phrase search + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly slop?: number | null + + /** + * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly sortby?: LearningResourcesUserSubscriptionListSortbyEnum + + /** + * The topic name. To see a list of options go to api/v1/topics/ + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly topic?: Array + + /** + * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList + */ + readonly yearly_decay_percent?: number | null +} - /** - * - * @type {PercolateQuerySubscriptionRequestRequest} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest +/** + * Request parameters for learningResourcesUserSubscriptionSubscribeCreate operation in LearningResourcesUserSubscriptionApi. + * @export + * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest + */ +export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest { + /** + * Show resource counts by category + * @type {Array<'resource_type' | 'certification' | 'certification_type' | 'offered_by' | 'platform' | 'topic' | 'department' | 'level' | 'course_feature' | 'professional' | 'free' | 'delivery' | 'resource_category'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly aggregations?: Array + + /** + * True if the learning resource offers a certificate + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly certification?: boolean | null + + /** + * The type of certificate * `micromasters` - Micromasters Credential * `professional` - Professional Certificate * `completion` - Certificate of Completion * `none` - No Certificate + * @type {Array<'micromasters' | 'professional' | 'completion' | 'none'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly certification_type?: Array + + /** + * Score weight for content file data. 1 is the default. 0 means content files are ignored + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly content_file_score_weight?: number | null + + /** + * The course feature. Possible options are at api/v1/course_features/ + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + 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'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly department?: Array + + /** + * If true return raw open search results with score explanations + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly dev_mode?: boolean | null + + /** + * + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly free?: boolean | null + + /** + * The id value for the learning resource + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly id?: Array + + /** + * + * @type {Array<'undergraduate' | 'graduate' | 'high_school' | 'noncredit' | 'advanced' | 'intermediate' | 'introductory'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly level?: Array + + /** + * Number of results to return per page + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly limit?: number + + /** + * Maximum score penalty for incomplete OCW courses in percent. An OCW course with completeness = 0 will have this score penalty. Partially complete courses have a linear penalty proportional to the degree of incompleteness. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly max_incompleteness_penalty?: number | null + + /** + * Minimum score value a text query result needs to have to be displayed + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly min_score?: number | null + + /** + * The ocw topic name. + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly ocw_topic?: Array + + /** + * The organization that offers the learning resource * `mitx` - MITx * `ocw` - MIT OpenCourseWare * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education + * @type {Array<'mitx' | 'ocw' | 'bootcamps' | 'xpro' | 'mitpe' | 'see'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly offset?: number + + /** + * The platform on which the learning resource is offered * `edx` - edX * `ocw` - MIT OpenCourseWare * `oll` - Open Learning Library * `mitxonline` - MITx Online * `bootcamps` - Bootcamps * `xpro` - MIT xPRO * `csail` - CSAIL * `mitpe` - MIT Professional Education * `see` - MIT Sloan Executive Education * `scc` - Schwarzman College of Computing * `ctl` - Center for Transportation & Logistics * `whu` - WHU * `susskind` - Susskind * `globalalumni` - Global Alumni * `simplilearn` - Simplilearn * `emeritus` - Emeritus * `podcast` - Podcast * `youtube` - YouTube + * @type {Array<'edx' | 'ocw' | 'oll' | 'mitxonline' | 'bootcamps' | 'xpro' | 'csail' | 'mitpe' | 'see' | 'scc' | 'ctl' | 'whu' | 'susskind' | 'globalalumni' | 'simplilearn' | 'emeritus' | 'podcast' | 'youtube'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly professional?: boolean | null + + /** + * The search text + * @type {string} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly q?: string + + /** + * The category of learning resource * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'program' | 'learning_material'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + 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' | 'program' | 'learning_path' | 'podcast' | 'podcast_episode' | 'video' | 'video_playlist'>} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly resource_type?: Array + + /** + * The open search search type for text queries * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase * `best_fields` - best_fields * `most_fields` - most_fields * `phrase` - phrase + * @type {'best_fields' | 'most_fields' | 'phrase'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly search_mode?: LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum + + /** + * Allowed distance for phrase search + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly slop?: number | null + + /** + * If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @type {'featured' | 'id' | '-id' | 'readable_id' | '-readable_id' | 'last_modified' | '-last_modified' | 'new' | 'start_date' | '-start_date' | 'mitcoursenumber' | '-mitcoursenumber' | 'views' | '-views' | 'upcoming'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum + + /** + * The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type + * @type {'search_subscription_type' | 'channel_subscription_type'} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum + + /** + * The topic name. To see a list of options go to api/v1/topics/ + * @type {Array} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly topic?: Array + + /** + * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly yearly_decay_percent?: number | null + + /** + * + * @type {PercolateQuerySubscriptionRequestRequest} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate + */ + readonly PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest } /** @@ -13423,12 +16050,12 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr * @interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest */ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest { - /** - * - * @type {number} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroy - */ - readonly id: number + /** + * + * @type {number} + * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroy + */ + readonly id: number } /** @@ -13438,2767 +16065,3890 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr * @extends {BaseAPI} */ export class LearningResourcesUserSubscriptionApi extends BaseAPI { - /** - * View for listing percolate query subscriptions for a user - * @summary Check if a user is subscribed to a specific query - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesUserSubscriptionApi - */ - public learningResourcesUserSubscriptionCheckList(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest = {}, options?: RawAxiosRequestConfig) { - return LearningResourcesUserSubscriptionApiFp(this.configuration).learningResourcesUserSubscriptionCheckList(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.source_type, requestParameters.topic, requestParameters.yearly_decay_percent, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * View for listing percolate query subscriptions for a user - * @summary List subscribed queries - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesUserSubscriptionApi - */ - public learningResourcesUserSubscriptionList(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest = {}, options?: RawAxiosRequestConfig) { - return LearningResourcesUserSubscriptionApiFp(this.configuration).learningResourcesUserSubscriptionList(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.topic, requestParameters.yearly_decay_percent, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Subscribe a user to query - * @summary Subscribe user to query - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesUserSubscriptionApi - */ - public learningResourcesUserSubscriptionSubscribeCreate(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest = {}, options?: RawAxiosRequestConfig) { - return LearningResourcesUserSubscriptionApiFp(this.configuration).learningResourcesUserSubscriptionSubscribeCreate(requestParameters.aggregations, requestParameters.certification, requestParameters.certification_type, requestParameters.content_file_score_weight, requestParameters.course_feature, requestParameters.delivery, requestParameters.department, requestParameters.dev_mode, requestParameters.free, requestParameters.id, requestParameters.level, requestParameters.limit, requestParameters.max_incompleteness_penalty, requestParameters.min_score, requestParameters.ocw_topic, requestParameters.offered_by, requestParameters.offset, requestParameters.platform, requestParameters.professional, requestParameters.q, requestParameters.resource_category, requestParameters.resource_type, requestParameters.search_mode, requestParameters.slop, requestParameters.sortby, requestParameters.source_type, requestParameters.topic, requestParameters.yearly_decay_percent, requestParameters.PercolateQuerySubscriptionRequestRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query - * @summary Unsubscribe user from query - * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof LearningResourcesUserSubscriptionApi - */ - public learningResourcesUserSubscriptionUnsubscribeDestroy(requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest, options?: RawAxiosRequestConfig) { - return LearningResourcesUserSubscriptionApiFp(this.configuration).learningResourcesUserSubscriptionUnsubscribeDestroy(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * View for listing percolate query subscriptions for a user + * @summary Check if a user is subscribed to a specific query + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesUserSubscriptionApi + */ + public learningResourcesUserSubscriptionCheckList( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesUserSubscriptionApiFp(this.configuration) + .learningResourcesUserSubscriptionCheckList( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.source_type, + requestParameters.topic, + requestParameters.yearly_decay_percent, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * View for listing percolate query subscriptions for a user + * @summary List subscribed queries + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesUserSubscriptionApi + */ + public learningResourcesUserSubscriptionList( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesUserSubscriptionApiFp(this.configuration) + .learningResourcesUserSubscriptionList( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.topic, + requestParameters.yearly_decay_percent, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Subscribe a user to query + * @summary Subscribe user to query + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesUserSubscriptionApi + */ + public learningResourcesUserSubscriptionSubscribeCreate( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreateRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesUserSubscriptionApiFp(this.configuration) + .learningResourcesUserSubscriptionSubscribeCreate( + requestParameters.aggregations, + requestParameters.certification, + requestParameters.certification_type, + requestParameters.content_file_score_weight, + requestParameters.course_feature, + requestParameters.delivery, + requestParameters.department, + requestParameters.dev_mode, + requestParameters.free, + requestParameters.id, + requestParameters.level, + requestParameters.limit, + requestParameters.max_incompleteness_penalty, + requestParameters.min_score, + requestParameters.ocw_topic, + requestParameters.offered_by, + requestParameters.offset, + requestParameters.platform, + requestParameters.professional, + requestParameters.q, + requestParameters.resource_category, + requestParameters.resource_type, + requestParameters.search_mode, + requestParameters.slop, + requestParameters.sortby, + requestParameters.source_type, + requestParameters.topic, + requestParameters.yearly_decay_percent, + requestParameters.PercolateQuerySubscriptionRequestRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Unsubscribe a user from a query Args: pk (integer): The id of the query Returns: PercolateQuerySerializer: The percolate query + * @summary Unsubscribe user from query + * @param {LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningResourcesUserSubscriptionApi + */ + public learningResourcesUserSubscriptionUnsubscribeDestroy( + requestParameters: LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionUnsubscribeDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningResourcesUserSubscriptionApiFp(this.configuration) + .learningResourcesUserSubscriptionUnsubscribeDestroy( + requestParameters.id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const LearningResourcesUserSubscriptionCheckListAggregationsEnum = { - ResourceType: 'resource_type', - Certification: 'certification', - CertificationType: 'certification_type', - OfferedBy: 'offered_by', - Platform: 'platform', - Topic: 'topic', - Department: 'department', - Level: 'level', - CourseFeature: 'course_feature', - Professional: 'professional', - Free: 'free', - Delivery: 'delivery', - ResourceCategory: 'resource_category' -} as const; -export type LearningResourcesUserSubscriptionCheckListAggregationsEnum = typeof LearningResourcesUserSubscriptionCheckListAggregationsEnum[keyof typeof LearningResourcesUserSubscriptionCheckListAggregationsEnum]; + ResourceType: "resource_type", + Certification: "certification", + CertificationType: "certification_type", + OfferedBy: "offered_by", + Platform: "platform", + Topic: "topic", + Department: "department", + Level: "level", + CourseFeature: "course_feature", + Professional: "professional", + Free: "free", + Delivery: "delivery", + ResourceCategory: "resource_category", +} as const +export type LearningResourcesUserSubscriptionCheckListAggregationsEnum = + (typeof LearningResourcesUserSubscriptionCheckListAggregationsEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListAggregationsEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListCertificationTypeEnum = { - Micromasters: 'micromasters', - Professional: 'professional', - Completion: 'completion', - None: 'none' -} as const; -export type LearningResourcesUserSubscriptionCheckListCertificationTypeEnum = typeof LearningResourcesUserSubscriptionCheckListCertificationTypeEnum[keyof typeof LearningResourcesUserSubscriptionCheckListCertificationTypeEnum]; + Micromasters: "micromasters", + Professional: "professional", + Completion: "completion", + None: "none", +} as const +export type LearningResourcesUserSubscriptionCheckListCertificationTypeEnum = + (typeof LearningResourcesUserSubscriptionCheckListCertificationTypeEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListCertificationTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type LearningResourcesUserSubscriptionCheckListDeliveryEnum = typeof LearningResourcesUserSubscriptionCheckListDeliveryEnum[keyof typeof 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', - _3: '3', - _4: '4', - _5: '5', - _6: '6', - _7: '7', - _8: '8', - _9: '9', - _10: '10', - _11: '11', - _12: '12', - _14: '14', - _15: '15', - _16: '16', - _17: '17', - _18: '18', - _20: '20', - _21A: '21A', - _21G: '21G', - _21H: '21H', - _21L: '21L', - _21M: '21M', - _22: '22', - _24: '24', - 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 LearningResourcesUserSubscriptionCheckListDepartmentEnum = typeof LearningResourcesUserSubscriptionCheckListDepartmentEnum[keyof typeof LearningResourcesUserSubscriptionCheckListDepartmentEnum]; + _1: "1", + _2: "2", + _3: "3", + _4: "4", + _5: "5", + _6: "6", + _7: "7", + _8: "8", + _9: "9", + _10: "10", + _11: "11", + _12: "12", + _14: "14", + _15: "15", + _16: "16", + _17: "17", + _18: "18", + _20: "20", + _21A: "21A", + _21G: "21G", + _21H: "21H", + _21L: "21L", + _21M: "21M", + _22: "22", + _24: "24", + 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 LearningResourcesUserSubscriptionCheckListDepartmentEnum = + (typeof LearningResourcesUserSubscriptionCheckListDepartmentEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListDepartmentEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListLevelEnum = { - Undergraduate: 'undergraduate', - Graduate: 'graduate', - HighSchool: 'high_school', - Noncredit: 'noncredit', - Advanced: 'advanced', - Intermediate: 'intermediate', - Introductory: 'introductory' -} as const; -export type LearningResourcesUserSubscriptionCheckListLevelEnum = typeof LearningResourcesUserSubscriptionCheckListLevelEnum[keyof typeof LearningResourcesUserSubscriptionCheckListLevelEnum]; + Undergraduate: "undergraduate", + Graduate: "graduate", + HighSchool: "high_school", + Noncredit: "noncredit", + Advanced: "advanced", + Intermediate: "intermediate", + Introductory: "introductory", +} as const +export type LearningResourcesUserSubscriptionCheckListLevelEnum = + (typeof LearningResourcesUserSubscriptionCheckListLevelEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListLevelEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListOfferedByEnum = { - Mitx: 'mitx', - Ocw: 'ocw', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Mitpe: 'mitpe', - See: 'see' -} as const; -export type LearningResourcesUserSubscriptionCheckListOfferedByEnum = typeof LearningResourcesUserSubscriptionCheckListOfferedByEnum[keyof typeof LearningResourcesUserSubscriptionCheckListOfferedByEnum]; + Mitx: "mitx", + Ocw: "ocw", + Bootcamps: "bootcamps", + Xpro: "xpro", + Mitpe: "mitpe", + See: "see", +} as const +export type LearningResourcesUserSubscriptionCheckListOfferedByEnum = + (typeof LearningResourcesUserSubscriptionCheckListOfferedByEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListOfferedByEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListPlatformEnum = { - Edx: 'edx', - Ocw: 'ocw', - Oll: 'oll', - Mitxonline: 'mitxonline', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Csail: 'csail', - Mitpe: 'mitpe', - See: 'see', - Scc: 'scc', - Ctl: 'ctl', - Whu: 'whu', - Susskind: 'susskind', - Globalalumni: 'globalalumni', - Simplilearn: 'simplilearn', - Emeritus: 'emeritus', - Podcast: 'podcast', - Youtube: 'youtube' -} as const; -export type LearningResourcesUserSubscriptionCheckListPlatformEnum = typeof LearningResourcesUserSubscriptionCheckListPlatformEnum[keyof typeof LearningResourcesUserSubscriptionCheckListPlatformEnum]; + Edx: "edx", + Ocw: "ocw", + Oll: "oll", + Mitxonline: "mitxonline", + Bootcamps: "bootcamps", + Xpro: "xpro", + Csail: "csail", + Mitpe: "mitpe", + See: "see", + Scc: "scc", + Ctl: "ctl", + Whu: "whu", + Susskind: "susskind", + Globalalumni: "globalalumni", + Simplilearn: "simplilearn", + Emeritus: "emeritus", + Podcast: "podcast", + Youtube: "youtube", +} as const +export type LearningResourcesUserSubscriptionCheckListPlatformEnum = + (typeof LearningResourcesUserSubscriptionCheckListPlatformEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListPlatformEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListResourceCategoryEnum = { - Course: 'course', - Program: 'program', - LearningMaterial: 'learning_material' -} as const; -export type LearningResourcesUserSubscriptionCheckListResourceCategoryEnum = typeof LearningResourcesUserSubscriptionCheckListResourceCategoryEnum[keyof typeof LearningResourcesUserSubscriptionCheckListResourceCategoryEnum]; + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type LearningResourcesUserSubscriptionCheckListResourceCategoryEnum = + (typeof LearningResourcesUserSubscriptionCheckListResourceCategoryEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListResourceCategoryEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListResourceTypeEnum = { - Course: 'course', - Program: 'program', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type LearningResourcesUserSubscriptionCheckListResourceTypeEnum = typeof LearningResourcesUserSubscriptionCheckListResourceTypeEnum[keyof typeof LearningResourcesUserSubscriptionCheckListResourceTypeEnum]; + Course: "course", + Program: "program", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type LearningResourcesUserSubscriptionCheckListResourceTypeEnum = + (typeof LearningResourcesUserSubscriptionCheckListResourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListResourceTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListSearchModeEnum = { - BestFields: 'best_fields', - MostFields: 'most_fields', - Phrase: 'phrase' -} as const; -export type LearningResourcesUserSubscriptionCheckListSearchModeEnum = typeof LearningResourcesUserSubscriptionCheckListSearchModeEnum[keyof typeof LearningResourcesUserSubscriptionCheckListSearchModeEnum]; + BestFields: "best_fields", + MostFields: "most_fields", + Phrase: "phrase", +} as const +export type LearningResourcesUserSubscriptionCheckListSearchModeEnum = + (typeof LearningResourcesUserSubscriptionCheckListSearchModeEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListSearchModeEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListSortbyEnum = { - Featured: 'featured', - Id: 'id', - Id2: '-id', - ReadableId: 'readable_id', - ReadableId2: '-readable_id', - LastModified: 'last_modified', - LastModified2: '-last_modified', - New: 'new', - StartDate: 'start_date', - StartDate2: '-start_date', - Mitcoursenumber: 'mitcoursenumber', - Mitcoursenumber2: '-mitcoursenumber', - Views: 'views', - Views2: '-views', - Upcoming: 'upcoming' -} as const; -export type LearningResourcesUserSubscriptionCheckListSortbyEnum = typeof LearningResourcesUserSubscriptionCheckListSortbyEnum[keyof typeof LearningResourcesUserSubscriptionCheckListSortbyEnum]; + Featured: "featured", + Id: "id", + Id2: "-id", + ReadableId: "readable_id", + ReadableId2: "-readable_id", + LastModified: "last_modified", + LastModified2: "-last_modified", + New: "new", + StartDate: "start_date", + StartDate2: "-start_date", + Mitcoursenumber: "mitcoursenumber", + Mitcoursenumber2: "-mitcoursenumber", + Views: "views", + Views2: "-views", + Upcoming: "upcoming", +} as const +export type LearningResourcesUserSubscriptionCheckListSortbyEnum = + (typeof LearningResourcesUserSubscriptionCheckListSortbyEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListSortbyEnum] /** * @export */ export const LearningResourcesUserSubscriptionCheckListSourceTypeEnum = { - SearchSubscriptionType: 'search_subscription_type', - ChannelSubscriptionType: 'channel_subscription_type' -} as const; -export type LearningResourcesUserSubscriptionCheckListSourceTypeEnum = typeof LearningResourcesUserSubscriptionCheckListSourceTypeEnum[keyof typeof LearningResourcesUserSubscriptionCheckListSourceTypeEnum]; + SearchSubscriptionType: "search_subscription_type", + ChannelSubscriptionType: "channel_subscription_type", +} as const +export type LearningResourcesUserSubscriptionCheckListSourceTypeEnum = + (typeof LearningResourcesUserSubscriptionCheckListSourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionCheckListSourceTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionListAggregationsEnum = { - ResourceType: 'resource_type', - Certification: 'certification', - CertificationType: 'certification_type', - OfferedBy: 'offered_by', - Platform: 'platform', - Topic: 'topic', - Department: 'department', - Level: 'level', - CourseFeature: 'course_feature', - Professional: 'professional', - Free: 'free', - Delivery: 'delivery', - ResourceCategory: 'resource_category' -} as const; -export type LearningResourcesUserSubscriptionListAggregationsEnum = typeof LearningResourcesUserSubscriptionListAggregationsEnum[keyof typeof LearningResourcesUserSubscriptionListAggregationsEnum]; + ResourceType: "resource_type", + Certification: "certification", + CertificationType: "certification_type", + OfferedBy: "offered_by", + Platform: "platform", + Topic: "topic", + Department: "department", + Level: "level", + CourseFeature: "course_feature", + Professional: "professional", + Free: "free", + Delivery: "delivery", + ResourceCategory: "resource_category", +} as const +export type LearningResourcesUserSubscriptionListAggregationsEnum = + (typeof LearningResourcesUserSubscriptionListAggregationsEnum)[keyof typeof LearningResourcesUserSubscriptionListAggregationsEnum] /** * @export */ export const LearningResourcesUserSubscriptionListCertificationTypeEnum = { - Micromasters: 'micromasters', - Professional: 'professional', - Completion: 'completion', - None: 'none' -} as const; -export type LearningResourcesUserSubscriptionListCertificationTypeEnum = typeof LearningResourcesUserSubscriptionListCertificationTypeEnum[keyof typeof LearningResourcesUserSubscriptionListCertificationTypeEnum]; + Micromasters: "micromasters", + Professional: "professional", + Completion: "completion", + None: "none", +} as const +export type LearningResourcesUserSubscriptionListCertificationTypeEnum = + (typeof LearningResourcesUserSubscriptionListCertificationTypeEnum)[keyof typeof LearningResourcesUserSubscriptionListCertificationTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type LearningResourcesUserSubscriptionListDeliveryEnum = typeof LearningResourcesUserSubscriptionListDeliveryEnum[keyof typeof 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', - _3: '3', - _4: '4', - _5: '5', - _6: '6', - _7: '7', - _8: '8', - _9: '9', - _10: '10', - _11: '11', - _12: '12', - _14: '14', - _15: '15', - _16: '16', - _17: '17', - _18: '18', - _20: '20', - _21A: '21A', - _21G: '21G', - _21H: '21H', - _21L: '21L', - _21M: '21M', - _22: '22', - _24: '24', - 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 LearningResourcesUserSubscriptionListDepartmentEnum = typeof LearningResourcesUserSubscriptionListDepartmentEnum[keyof typeof LearningResourcesUserSubscriptionListDepartmentEnum]; + _1: "1", + _2: "2", + _3: "3", + _4: "4", + _5: "5", + _6: "6", + _7: "7", + _8: "8", + _9: "9", + _10: "10", + _11: "11", + _12: "12", + _14: "14", + _15: "15", + _16: "16", + _17: "17", + _18: "18", + _20: "20", + _21A: "21A", + _21G: "21G", + _21H: "21H", + _21L: "21L", + _21M: "21M", + _22: "22", + _24: "24", + 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 LearningResourcesUserSubscriptionListDepartmentEnum = + (typeof LearningResourcesUserSubscriptionListDepartmentEnum)[keyof typeof LearningResourcesUserSubscriptionListDepartmentEnum] /** * @export */ export const LearningResourcesUserSubscriptionListLevelEnum = { - Undergraduate: 'undergraduate', - Graduate: 'graduate', - HighSchool: 'high_school', - Noncredit: 'noncredit', - Advanced: 'advanced', - Intermediate: 'intermediate', - Introductory: 'introductory' -} as const; -export type LearningResourcesUserSubscriptionListLevelEnum = typeof LearningResourcesUserSubscriptionListLevelEnum[keyof typeof LearningResourcesUserSubscriptionListLevelEnum]; + Undergraduate: "undergraduate", + Graduate: "graduate", + HighSchool: "high_school", + Noncredit: "noncredit", + Advanced: "advanced", + Intermediate: "intermediate", + Introductory: "introductory", +} as const +export type LearningResourcesUserSubscriptionListLevelEnum = + (typeof LearningResourcesUserSubscriptionListLevelEnum)[keyof typeof LearningResourcesUserSubscriptionListLevelEnum] /** * @export */ export const LearningResourcesUserSubscriptionListOfferedByEnum = { - Mitx: 'mitx', - Ocw: 'ocw', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Mitpe: 'mitpe', - See: 'see' -} as const; -export type LearningResourcesUserSubscriptionListOfferedByEnum = typeof LearningResourcesUserSubscriptionListOfferedByEnum[keyof typeof LearningResourcesUserSubscriptionListOfferedByEnum]; + Mitx: "mitx", + Ocw: "ocw", + Bootcamps: "bootcamps", + Xpro: "xpro", + Mitpe: "mitpe", + See: "see", +} as const +export type LearningResourcesUserSubscriptionListOfferedByEnum = + (typeof LearningResourcesUserSubscriptionListOfferedByEnum)[keyof typeof LearningResourcesUserSubscriptionListOfferedByEnum] /** * @export */ export const LearningResourcesUserSubscriptionListPlatformEnum = { - Edx: 'edx', - Ocw: 'ocw', - Oll: 'oll', - Mitxonline: 'mitxonline', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Csail: 'csail', - Mitpe: 'mitpe', - See: 'see', - Scc: 'scc', - Ctl: 'ctl', - Whu: 'whu', - Susskind: 'susskind', - Globalalumni: 'globalalumni', - Simplilearn: 'simplilearn', - Emeritus: 'emeritus', - Podcast: 'podcast', - Youtube: 'youtube' -} as const; -export type LearningResourcesUserSubscriptionListPlatformEnum = typeof LearningResourcesUserSubscriptionListPlatformEnum[keyof typeof LearningResourcesUserSubscriptionListPlatformEnum]; + Edx: "edx", + Ocw: "ocw", + Oll: "oll", + Mitxonline: "mitxonline", + Bootcamps: "bootcamps", + Xpro: "xpro", + Csail: "csail", + Mitpe: "mitpe", + See: "see", + Scc: "scc", + Ctl: "ctl", + Whu: "whu", + Susskind: "susskind", + Globalalumni: "globalalumni", + Simplilearn: "simplilearn", + Emeritus: "emeritus", + Podcast: "podcast", + Youtube: "youtube", +} as const +export type LearningResourcesUserSubscriptionListPlatformEnum = + (typeof LearningResourcesUserSubscriptionListPlatformEnum)[keyof typeof LearningResourcesUserSubscriptionListPlatformEnum] /** * @export */ export const LearningResourcesUserSubscriptionListResourceCategoryEnum = { - Course: 'course', - Program: 'program', - LearningMaterial: 'learning_material' -} as const; -export type LearningResourcesUserSubscriptionListResourceCategoryEnum = typeof LearningResourcesUserSubscriptionListResourceCategoryEnum[keyof typeof LearningResourcesUserSubscriptionListResourceCategoryEnum]; + Course: "course", + Program: "program", + LearningMaterial: "learning_material", +} as const +export type LearningResourcesUserSubscriptionListResourceCategoryEnum = + (typeof LearningResourcesUserSubscriptionListResourceCategoryEnum)[keyof typeof LearningResourcesUserSubscriptionListResourceCategoryEnum] /** * @export */ export const LearningResourcesUserSubscriptionListResourceTypeEnum = { - Course: 'course', - Program: 'program', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type LearningResourcesUserSubscriptionListResourceTypeEnum = typeof LearningResourcesUserSubscriptionListResourceTypeEnum[keyof typeof LearningResourcesUserSubscriptionListResourceTypeEnum]; + Course: "course", + Program: "program", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type LearningResourcesUserSubscriptionListResourceTypeEnum = + (typeof LearningResourcesUserSubscriptionListResourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionListResourceTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionListSearchModeEnum = { - BestFields: 'best_fields', - MostFields: 'most_fields', - Phrase: 'phrase' -} as const; -export type LearningResourcesUserSubscriptionListSearchModeEnum = typeof LearningResourcesUserSubscriptionListSearchModeEnum[keyof typeof LearningResourcesUserSubscriptionListSearchModeEnum]; + BestFields: "best_fields", + MostFields: "most_fields", + Phrase: "phrase", +} as const +export type LearningResourcesUserSubscriptionListSearchModeEnum = + (typeof LearningResourcesUserSubscriptionListSearchModeEnum)[keyof typeof LearningResourcesUserSubscriptionListSearchModeEnum] /** * @export */ export const LearningResourcesUserSubscriptionListSortbyEnum = { - Featured: 'featured', - Id: 'id', - Id2: '-id', - ReadableId: 'readable_id', - ReadableId2: '-readable_id', - LastModified: 'last_modified', - LastModified2: '-last_modified', - New: 'new', - StartDate: 'start_date', - StartDate2: '-start_date', - Mitcoursenumber: 'mitcoursenumber', - Mitcoursenumber2: '-mitcoursenumber', - Views: 'views', - Views2: '-views', - Upcoming: 'upcoming' -} as const; -export type LearningResourcesUserSubscriptionListSortbyEnum = typeof LearningResourcesUserSubscriptionListSortbyEnum[keyof typeof LearningResourcesUserSubscriptionListSortbyEnum]; -/** - * @export - */ -export const LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = { - ResourceType: 'resource_type', - Certification: 'certification', - CertificationType: 'certification_type', - OfferedBy: 'offered_by', - Platform: 'platform', - Topic: 'topic', - Department: 'department', - Level: 'level', - CourseFeature: 'course_feature', - Professional: 'professional', - Free: 'free', - Delivery: 'delivery', - ResourceCategory: 'resource_category' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum]; -/** - * @export - */ -export const LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum = { - Micromasters: 'micromasters', - Professional: 'professional', - Completion: 'completion', - None: 'none' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum]; + Featured: "featured", + Id: "id", + Id2: "-id", + ReadableId: "readable_id", + ReadableId2: "-readable_id", + LastModified: "last_modified", + LastModified2: "-last_modified", + New: "new", + StartDate: "start_date", + StartDate2: "-start_date", + Mitcoursenumber: "mitcoursenumber", + Mitcoursenumber2: "-mitcoursenumber", + Views: "views", + Views2: "-views", + Upcoming: "upcoming", +} as const +export type LearningResourcesUserSubscriptionListSortbyEnum = + (typeof LearningResourcesUserSubscriptionListSortbyEnum)[keyof typeof LearningResourcesUserSubscriptionListSortbyEnum] +/** + * @export + */ +export const LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = + { + ResourceType: "resource_type", + Certification: "certification", + CertificationType: "certification_type", + OfferedBy: "offered_by", + Platform: "platform", + Topic: "topic", + Department: "department", + Level: "level", + CourseFeature: "course_feature", + Professional: "professional", + Free: "free", + Delivery: "delivery", + ResourceCategory: "resource_category", + } as const +export type LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateAggregationsEnum] +/** + * @export + */ +export const LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum = + { + Micromasters: "micromasters", + Professional: "professional", + Completion: "completion", + None: "none", + } as const +export type LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateCertificationTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateDeliveryEnum[keyof typeof 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', - _3: '3', - _4: '4', - _5: '5', - _6: '6', - _7: '7', - _8: '8', - _9: '9', - _10: '10', - _11: '11', - _12: '12', - _14: '14', - _15: '15', - _16: '16', - _17: '17', - _18: '18', - _20: '20', - _21A: '21A', - _21G: '21G', - _21H: '21H', - _21L: '21L', - _21M: '21M', - _22: '22', - _24: '24', - 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 LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum]; + _1: "1", + _2: "2", + _3: "3", + _4: "4", + _5: "5", + _6: "6", + _7: "7", + _8: "8", + _9: "9", + _10: "10", + _11: "11", + _12: "12", + _14: "14", + _15: "15", + _16: "16", + _17: "17", + _18: "18", + _20: "20", + _21A: "21A", + _21G: "21G", + _21H: "21H", + _21L: "21L", + _21M: "21M", + _22: "22", + _24: "24", + 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 LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateDepartmentEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreateLevelEnum = { - Undergraduate: 'undergraduate', - Graduate: 'graduate', - HighSchool: 'high_school', - Noncredit: 'noncredit', - Advanced: 'advanced', - Intermediate: 'intermediate', - Introductory: 'introductory' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateLevelEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateLevelEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateLevelEnum]; + Undergraduate: "undergraduate", + Graduate: "graduate", + HighSchool: "high_school", + Noncredit: "noncredit", + Advanced: "advanced", + Intermediate: "intermediate", + Introductory: "introductory", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreateLevelEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateLevelEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateLevelEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum = { - Mitx: 'mitx', - Ocw: 'ocw', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Mitpe: 'mitpe', - See: 'see' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum]; + Mitx: "mitx", + Ocw: "ocw", + Bootcamps: "bootcamps", + Xpro: "xpro", + Mitpe: "mitpe", + See: "see", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateOfferedByEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum = { - Edx: 'edx', - Ocw: 'ocw', - Oll: 'oll', - Mitxonline: 'mitxonline', - Bootcamps: 'bootcamps', - Xpro: 'xpro', - Csail: 'csail', - Mitpe: 'mitpe', - See: 'see', - Scc: 'scc', - Ctl: 'ctl', - Whu: 'whu', - Susskind: 'susskind', - Globalalumni: 'globalalumni', - Simplilearn: 'simplilearn', - Emeritus: 'emeritus', - Podcast: 'podcast', - Youtube: 'youtube' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum = typeof LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum]; -/** - * @export - */ -export const LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum = { - Course: 'course', - Program: 'program', - LearningMaterial: 'learning_material' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum]; -/** - * @export - */ -export const LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = { - Course: 'course', - Program: 'program', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum]; + Edx: "edx", + Ocw: "ocw", + Oll: "oll", + Mitxonline: "mitxonline", + Bootcamps: "bootcamps", + Xpro: "xpro", + Csail: "csail", + Mitpe: "mitpe", + See: "see", + Scc: "scc", + Ctl: "ctl", + Whu: "whu", + Susskind: "susskind", + Globalalumni: "globalalumni", + Simplilearn: "simplilearn", + Emeritus: "emeritus", + Podcast: "podcast", + Youtube: "youtube", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreatePlatformEnum] +/** + * @export + */ +export const LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum = + { + Course: "course", + Program: "program", + LearningMaterial: "learning_material", + } as const +export type LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceCategoryEnum] +/** + * @export + */ +export const LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = + { + Course: "course", + Program: "program", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Video: "video", + VideoPlaylist: "video_playlist", + } as const +export type LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateResourceTypeEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum = { - BestFields: 'best_fields', - MostFields: 'most_fields', - Phrase: 'phrase' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum]; + BestFields: "best_fields", + MostFields: "most_fields", + Phrase: "phrase", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateSearchModeEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum = { - Featured: 'featured', - Id: 'id', - Id2: '-id', - ReadableId: 'readable_id', - ReadableId2: '-readable_id', - LastModified: 'last_modified', - LastModified2: '-last_modified', - New: 'new', - StartDate: 'start_date', - StartDate2: '-start_date', - Mitcoursenumber: 'mitcoursenumber', - Mitcoursenumber2: '-mitcoursenumber', - Views: 'views', - Views2: '-views', - Upcoming: 'upcoming' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum]; + Featured: "featured", + Id: "id", + Id2: "-id", + ReadableId: "readable_id", + ReadableId2: "-readable_id", + LastModified: "last_modified", + LastModified2: "-last_modified", + New: "new", + StartDate: "start_date", + StartDate2: "-start_date", + Mitcoursenumber: "mitcoursenumber", + Mitcoursenumber2: "-mitcoursenumber", + Views: "views", + Views2: "-views", + Upcoming: "upcoming", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum] /** * @export */ export const LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum = { - SearchSubscriptionType: 'search_subscription_type', - ChannelSubscriptionType: 'channel_subscription_type' -} as const; -export type LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum = typeof LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum]; - + SearchSubscriptionType: "search_subscription_type", + ChannelSubscriptionType: "channel_subscription_type", +} as const +export type LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum = + (typeof LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum)[keyof typeof LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum] /** * LearningpathsApi - axios parameter creator * @export */ -export const LearningpathsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Create a learning path - * @summary Create - * @param {LearningPathResourceRequest} LearningPathResourceRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsCreate: async (LearningPathResourceRequest: LearningPathResourceRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'LearningPathResourceRequest' is not null or undefined - assertParamExists('learningpathsCreate', 'LearningPathResourceRequest', LearningPathResourceRequest) - const localVarPath = `/api/v1/learningpaths/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(LearningPathResourceRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Remove a learning path - * @summary Destroy - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsDestroy: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningpathsDestroy', 'id', id) - const localVarPath = `/api/v1/learningpaths/{id}/` - .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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Add - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {LearningPathRelationshipRequest} LearningPathRelationshipRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsCreate: async (learning_resource_id: number, LearningPathRelationshipRequest: LearningPathRelationshipRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningpathsItemsCreate', 'learning_resource_id', learning_resource_id) - // verify required parameter 'LearningPathRelationshipRequest' is not null or undefined - assertParamExists('learningpathsItemsCreate', 'LearningPathRelationshipRequest', LearningPathRelationshipRequest) - const localVarPath = `/api/v1/learningpaths/{learning_resource_id}/items/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(LearningPathRelationshipRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Remove - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsDestroy: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningpathsItemsDestroy', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningpathsItemsDestroy', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learningpaths/{learning_resource_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for LearningPath related resources - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsList: async (learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningpathsItemsList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learningpaths/{learning_resource_id}/items/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Update - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {PatchedLearningPathRelationshipRequest} [PatchedLearningPathRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsPartialUpdate: async (id: number, learning_resource_id: number, PatchedLearningPathRelationshipRequest?: PatchedLearningPathRelationshipRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningpathsItemsPartialUpdate', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningpathsItemsPartialUpdate', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learningpaths/{learning_resource_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedLearningPathRelationshipRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningpathsItemsRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('learningpathsItemsRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/learningpaths/{learning_resource_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a paginated list of learning paths - * @summary List - * @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] Number of results to return per page. - * @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 {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsList: async (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?: LearningpathsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/learningpaths/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Update individual fields of a learning path - * @summary Update - * @param {number} id A unique integer value identifying this learning resource. - * @param {PatchedLearningPathResourceRequest} [PatchedLearningPathResourceRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsPartialUpdate: async (id: number, PatchedLearningPathResourceRequest?: PatchedLearningPathResourceRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningpathsPartialUpdate', 'id', id) - const localVarPath = `/api/v1/learningpaths/{id}/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedLearningPathResourceRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrive a single learning path - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('learningpathsRetrieve', 'id', id) - const localVarPath = `/api/v1/learningpaths/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * LearningpathsApi - functional programming interface - * @export - */ -export const LearningpathsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = LearningpathsApiAxiosParamCreator(configuration) - return { - /** - * Create a learning path - * @summary Create - * @param {LearningPathResourceRequest} LearningPathResourceRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsCreate(LearningPathResourceRequest: LearningPathResourceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsCreate(LearningPathResourceRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Remove a learning path - * @summary Destroy - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsDestroy(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsDestroy(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Add - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {LearningPathRelationshipRequest} LearningPathRelationshipRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsItemsCreate(learning_resource_id: number, LearningPathRelationshipRequest: LearningPathRelationshipRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsItemsCreate(learning_resource_id, LearningPathRelationshipRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsItemsCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Remove - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsItemsDestroy(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsItemsDestroy(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsItemsDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for LearningPath related resources - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsItemsList(learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsItemsList(learning_resource_id, limit, offset, sortby, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsItemsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Update - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {PatchedLearningPathRelationshipRequest} [PatchedLearningPathRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsItemsPartialUpdate(id: number, learning_resource_id: number, PatchedLearningPathRelationshipRequest?: PatchedLearningPathRelationshipRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsItemsPartialUpdate(id, learning_resource_id, PatchedLearningPathRelationshipRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsItemsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id The learning resource id of the learning path - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsItemsRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsItemsRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsItemsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a paginated list of learning paths - * @summary List - * @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] Number of results to return per page. - * @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 {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsList(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?: LearningpathsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsList(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['LearningpathsApi.learningpathsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Update individual fields of a learning path - * @summary Update - * @param {number} id A unique integer value identifying this learning resource. - * @param {PatchedLearningPathResourceRequest} [PatchedLearningPathResourceRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsPartialUpdate(id: number, PatchedLearningPathResourceRequest?: PatchedLearningPathResourceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsPartialUpdate(id, PatchedLearningPathResourceRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrive a single learning path - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async learningpathsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.learningpathsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['LearningpathsApi.learningpathsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * LearningpathsApi - factory interface - * @export - */ -export const LearningpathsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = LearningpathsApiFp(configuration) - return { - /** - * Create a learning path - * @summary Create - * @param {LearningpathsApiLearningpathsCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsCreate(requestParameters: LearningpathsApiLearningpathsCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsCreate(requestParameters.LearningPathResourceRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Remove a learning path - * @summary Destroy - * @param {LearningpathsApiLearningpathsDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsDestroy(requestParameters: LearningpathsApiLearningpathsDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsDestroy(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Add - * @param {LearningpathsApiLearningpathsItemsCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsCreate(requestParameters: LearningpathsApiLearningpathsItemsCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsItemsCreate(requestParameters.learning_resource_id, requestParameters.LearningPathRelationshipRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Remove - * @param {LearningpathsApiLearningpathsItemsDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsDestroy(requestParameters: LearningpathsApiLearningpathsItemsDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsItemsDestroy(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for LearningPath related resources - * @param {LearningpathsApiLearningpathsItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsList(requestParameters: LearningpathsApiLearningpathsItemsListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for LearningPath related resources - * @summary Learning Path Resource Relationship Update - * @param {LearningpathsApiLearningpathsItemsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsPartialUpdate(requestParameters: LearningpathsApiLearningpathsItemsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsItemsPartialUpdate(requestParameters.id, requestParameters.learning_resource_id, requestParameters.PatchedLearningPathRelationshipRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {LearningpathsApiLearningpathsItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsItemsRetrieve(requestParameters: LearningpathsApiLearningpathsItemsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Get a paginated list of learning paths - * @summary List - * @param {LearningpathsApiLearningpathsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsList(requestParameters: LearningpathsApiLearningpathsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsList(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)); - }, - /** - * Update individual fields of a learning path - * @summary Update - * @param {LearningpathsApiLearningpathsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsPartialUpdate(requestParameters: LearningpathsApiLearningpathsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsPartialUpdate(requestParameters.id, requestParameters.PatchedLearningPathResourceRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Retrive a single learning path - * @summary Retrieve - * @param {LearningpathsApiLearningpathsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - learningpathsRetrieve(requestParameters: LearningpathsApiLearningpathsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.learningpathsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for learningpathsCreate operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsCreateRequest - */ -export interface LearningpathsApiLearningpathsCreateRequest { - /** - * - * @type {LearningPathResourceRequest} - * @memberof LearningpathsApiLearningpathsCreate - */ - readonly LearningPathResourceRequest: LearningPathResourceRequest -} - -/** - * Request parameters for learningpathsDestroy operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsDestroyRequest - */ -export interface LearningpathsApiLearningpathsDestroyRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof LearningpathsApiLearningpathsDestroy - */ - readonly id: number -} - -/** - * Request parameters for learningpathsItemsCreate operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsItemsCreateRequest - */ -export interface LearningpathsApiLearningpathsItemsCreateRequest { - /** - * The learning resource id of the learning path - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsCreate - */ - readonly learning_resource_id: number - - /** - * - * @type {LearningPathRelationshipRequest} - * @memberof LearningpathsApiLearningpathsItemsCreate - */ - readonly LearningPathRelationshipRequest: LearningPathRelationshipRequest -} - -/** - * Request parameters for learningpathsItemsDestroy operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsItemsDestroyRequest - */ -export interface LearningpathsApiLearningpathsItemsDestroyRequest { - /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsDestroy - */ - readonly id: number - +export const LearningpathsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * The learning resource id of the learning path - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsDestroy + * Create a learning path + * @summary Create + * @param {LearningPathResourceRequest} LearningPathResourceRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number -} - -/** - * Request parameters for learningpathsItemsList operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsItemsListRequest - */ -export interface LearningpathsApiLearningpathsItemsListRequest { + learningpathsCreate: async ( + LearningPathResourceRequest: LearningPathResourceRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'LearningPathResourceRequest' is not null or undefined + assertParamExists( + "learningpathsCreate", + "LearningPathResourceRequest", + LearningPathResourceRequest, + ) + const localVarPath = `/api/v1/learningpaths/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + LearningPathResourceRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The learning resource id of the learning path - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsList + * Remove a learning path + * @summary Destroy + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number - + learningpathsDestroy: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningpathsDestroy", "id", id) + const localVarPath = `/api/v1/learningpaths/{id}/`.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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Number of results to return per page. - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsList + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Add + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {LearningPathRelationshipRequest} LearningPathRelationshipRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + learningpathsItemsCreate: async ( + learning_resource_id: number, + LearningPathRelationshipRequest: LearningPathRelationshipRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningpathsItemsCreate", + "learning_resource_id", + learning_resource_id, + ) + // verify required parameter 'LearningPathRelationshipRequest' is not null or undefined + assertParamExists( + "learningpathsItemsCreate", + "LearningPathRelationshipRequest", + LearningPathRelationshipRequest, + ) + const localVarPath = + `/api/v1/learningpaths/{learning_resource_id}/items/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + LearningPathRelationshipRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsList + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Remove + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number - + learningpathsItemsDestroy: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningpathsItemsDestroy", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningpathsItemsDestroy", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learningpaths/{learning_resource_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Which field to use when ordering the results. - * @type {string} - * @memberof LearningpathsApiLearningpathsItemsList + * Viewset for LearningPath related resources + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: string -} - -/** - * Request parameters for learningpathsItemsPartialUpdate operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsItemsPartialUpdateRequest - */ -export interface LearningpathsApiLearningpathsItemsPartialUpdateRequest { + learningpathsItemsList: async ( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningpathsItemsList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learningpaths/{learning_resource_id}/items/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsPartialUpdate + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Update + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {PatchedLearningPathRelationshipRequest} [PatchedLearningPathRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + learningpathsItemsPartialUpdate: async ( + id: number, + learning_resource_id: number, + PatchedLearningPathRelationshipRequest?: PatchedLearningPathRelationshipRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningpathsItemsPartialUpdate", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningpathsItemsPartialUpdate", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learningpaths/{learning_resource_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedLearningPathRelationshipRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The learning resource id of the learning path - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsPartialUpdate + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number - + learningpathsItemsRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningpathsItemsRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "learningpathsItemsRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/learningpaths/{learning_resource_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {PatchedLearningPathRelationshipRequest} - * @memberof LearningpathsApiLearningpathsItemsPartialUpdate + * Get a paginated list of learning paths + * @summary List + * @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] Number of results to return per page. + * @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 {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedLearningPathRelationshipRequest?: PatchedLearningPathRelationshipRequest -} - -/** - * Request parameters for learningpathsItemsRetrieve operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsItemsRetrieveRequest - */ -export interface LearningpathsApiLearningpathsItemsRetrieveRequest { + learningpathsList: async ( + 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?: LearningpathsListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/learningpaths/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsRetrieve + * Update individual fields of a learning path + * @summary Update + * @param {number} id A unique integer value identifying this learning resource. + * @param {PatchedLearningPathResourceRequest} [PatchedLearningPathResourceRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + learningpathsPartialUpdate: async ( + id: number, + PatchedLearningPathResourceRequest?: PatchedLearningPathResourceRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningpathsPartialUpdate", "id", id) + const localVarPath = `/api/v1/learningpaths/{id}/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedLearningPathResourceRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The learning resource id of the learning path - * @type {number} - * @memberof LearningpathsApiLearningpathsItemsRetrieve + * Retrive a single learning path + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number + learningpathsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("learningpathsRetrieve", "id", id) + const localVarPath = `/api/v1/learningpaths/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for learningpathsList operation in LearningpathsApi. + * LearningpathsApi - functional programming interface * @export - * @interface LearningpathsApiLearningpathsListRequest */ -export interface LearningpathsApiLearningpathsListRequest { - /** - * - * @type {boolean} - * @memberof LearningpathsApiLearningpathsList - */ - 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 LearningpathsApiLearningpathsList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningpathsApiLearningpathsList - */ - 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'>} - * @memberof LearningpathsApiLearningpathsList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof LearningpathsApiLearningpathsList - */ - 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 LearningpathsApiLearningpathsList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof LearningpathsApiLearningpathsList - */ - 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 LearningpathsApiLearningpathsList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof LearningpathsApiLearningpathsList - */ - 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 LearningpathsApiLearningpathsList - */ - readonly platform?: Array - +export const LearningpathsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + LearningpathsApiAxiosParamCreator(configuration) + return { /** - * - * @type {boolean} - * @memberof LearningpathsApiLearningpathsList + * Create a learning path + * @summary Create + * @param {LearningPathResourceRequest} LearningPathResourceRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly professional?: boolean - + async learningpathsCreate( + LearningPathResourceRequest: LearningPathResourceRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsCreate( + LearningPathResourceRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningpathsApiLearningpathsList + * Remove a learning path + * @summary Destroy + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly readable_id?: Array - + async learningpathsDestroy( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsDestroy(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsDestroy"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof LearningpathsApiLearningpathsList + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Add + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {LearningPathRelationshipRequest} LearningPathRelationshipRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_category?: Array - + async learningpathsItemsCreate( + learning_resource_id: number, + LearningPathRelationshipRequest: LearningPathRelationshipRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsItemsCreate( + learning_resource_id, + LearningPathRelationshipRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsItemsCreate"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * 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 LearningpathsApiLearningpathsList + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Remove + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_type?: Array - + async learningpathsItemsDestroy( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsItemsDestroy( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsItemsDestroy"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * 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 LearningpathsApiLearningpathsList + * Viewset for LearningPath related resources + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: LearningpathsListSortbyEnum - + async learningpathsItemsList( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsItemsList( + learning_resource_id, + limit, + offset, + sortby, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsItemsList"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof LearningpathsApiLearningpathsList + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Update + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {PatchedLearningPathRelationshipRequest} [PatchedLearningPathRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly topic?: Array -} - -/** - * Request parameters for learningpathsPartialUpdate operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsPartialUpdateRequest - */ -export interface LearningpathsApiLearningpathsPartialUpdateRequest { + async learningpathsItemsPartialUpdate( + id: number, + learning_resource_id: number, + PatchedLearningPathRelationshipRequest?: PatchedLearningPathRelationshipRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsItemsPartialUpdate( + id, + learning_resource_id, + PatchedLearningPathRelationshipRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap[ + "LearningpathsApi.learningpathsItemsPartialUpdate" + ]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof LearningpathsApiLearningpathsPartialUpdate + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id The learning resource id of the learning path + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async learningpathsItemsRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsItemsRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsItemsRetrieve"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {PatchedLearningPathResourceRequest} - * @memberof LearningpathsApiLearningpathsPartialUpdate - */ - readonly PatchedLearningPathResourceRequest?: PatchedLearningPathResourceRequest -} - -/** - * Request parameters for learningpathsRetrieve operation in LearningpathsApi. - * @export - * @interface LearningpathsApiLearningpathsRetrieveRequest - */ -export interface LearningpathsApiLearningpathsRetrieveRequest { + * Get a paginated list of learning paths + * @summary List + * @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] Number of results to return per page. + * @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 {LearningpathsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async learningpathsList( + 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?: LearningpathsListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsList( + 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["LearningpathsApi.learningpathsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Update individual fields of a learning path + * @summary Update + * @param {number} id A unique integer value identifying this learning resource. + * @param {PatchedLearningPathResourceRequest} [PatchedLearningPathResourceRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async learningpathsPartialUpdate( + id: number, + PatchedLearningPathResourceRequest?: PatchedLearningPathResourceRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsPartialUpdate( + id, + PatchedLearningPathResourceRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsPartialUpdate"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof LearningpathsApiLearningpathsRetrieve + * Retrive a single learning path + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async learningpathsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.learningpathsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["LearningpathsApi.learningpathsRetrieve"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * LearningpathsApi - object-oriented interface + * LearningpathsApi - factory interface * @export - * @class LearningpathsApi - * @extends {BaseAPI} */ -export class LearningpathsApi extends BaseAPI { +export const LearningpathsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = LearningpathsApiFp(configuration) + return { /** * Create a learning path * @summary Create * @param {LearningpathsApiLearningpathsCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsCreate(requestParameters: LearningpathsApiLearningpathsCreateRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsCreate(requestParameters.LearningPathResourceRequest, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsCreate( + requestParameters: LearningpathsApiLearningpathsCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsCreate( + requestParameters.LearningPathResourceRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Remove a learning path * @summary Destroy * @param {LearningpathsApiLearningpathsDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsDestroy(requestParameters: LearningpathsApiLearningpathsDestroyRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsDestroy(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsDestroy( + requestParameters: LearningpathsApiLearningpathsDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsDestroy(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** * Viewset for LearningPath related resources * @summary Learning Path Resource Relationship Add * @param {LearningpathsApiLearningpathsItemsCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsItemsCreate(requestParameters: LearningpathsApiLearningpathsItemsCreateRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsItemsCreate(requestParameters.learning_resource_id, requestParameters.LearningPathRelationshipRequest, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsItemsCreate( + requestParameters: LearningpathsApiLearningpathsItemsCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsItemsCreate( + requestParameters.learning_resource_id, + requestParameters.LearningPathRelationshipRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for LearningPath related resources * @summary Learning Path Resource Relationship Remove * @param {LearningpathsApiLearningpathsItemsDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsItemsDestroy(requestParameters: LearningpathsApiLearningpathsItemsDestroyRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsItemsDestroy(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsItemsDestroy( + requestParameters: LearningpathsApiLearningpathsItemsDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsItemsDestroy( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for LearningPath related resources * @param {LearningpathsApiLearningpathsItemsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsItemsList(requestParameters: LearningpathsApiLearningpathsItemsListRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsItemsList( + requestParameters: LearningpathsApiLearningpathsItemsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for LearningPath related resources * @summary Learning Path Resource Relationship Update * @param {LearningpathsApiLearningpathsItemsPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsItemsPartialUpdate(requestParameters: LearningpathsApiLearningpathsItemsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsItemsPartialUpdate(requestParameters.id, requestParameters.learning_resource_id, requestParameters.PatchedLearningPathRelationshipRequest, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsItemsPartialUpdate( + requestParameters: LearningpathsApiLearningpathsItemsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsItemsPartialUpdate( + requestParameters.id, + requestParameters.learning_resource_id, + requestParameters.PatchedLearningPathRelationshipRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Get a singe related learning resource for a learning resource. * @summary Nested Learning Resource Retrieve * @param {LearningpathsApiLearningpathsItemsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsItemsRetrieve(requestParameters: LearningpathsApiLearningpathsItemsRetrieveRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsItemsRetrieve( + requestParameters: LearningpathsApiLearningpathsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Get a paginated list of learning paths * @summary List * @param {LearningpathsApiLearningpathsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsList(requestParameters: LearningpathsApiLearningpathsListRequest = {}, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsList(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)); - } - + learningpathsList( + requestParameters: LearningpathsApiLearningpathsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsList( + 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)) + }, /** * Update individual fields of a learning path * @summary Update * @param {LearningpathsApiLearningpathsPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsPartialUpdate(requestParameters: LearningpathsApiLearningpathsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsPartialUpdate(requestParameters.id, requestParameters.PatchedLearningPathResourceRequest, options).then((request) => request(this.axios, this.basePath)); - } - + learningpathsPartialUpdate( + requestParameters: LearningpathsApiLearningpathsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsPartialUpdate( + requestParameters.id, + requestParameters.PatchedLearningPathResourceRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Retrive a single learning path * @summary Retrieve * @param {LearningpathsApiLearningpathsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof LearningpathsApi */ - public learningpathsRetrieve(requestParameters: LearningpathsApiLearningpathsRetrieveRequest, options?: RawAxiosRequestConfig) { - return LearningpathsApiFp(this.configuration).learningpathsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + learningpathsRetrieve( + requestParameters: LearningpathsApiLearningpathsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .learningpathsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } /** + * Request parameters for learningpathsCreate operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsCreateRequest */ -export const LearningpathsListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type LearningpathsListCertificationTypeEnum = typeof LearningpathsListCertificationTypeEnum[keyof typeof LearningpathsListCertificationTypeEnum]; +export interface LearningpathsApiLearningpathsCreateRequest { + /** + * + * @type {LearningPathResourceRequest} + * @memberof LearningpathsApiLearningpathsCreate + */ + readonly LearningPathResourceRequest: LearningPathResourceRequest +} + /** + * Request parameters for learningpathsDestroy operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsDestroyRequest */ -export const LearningpathsListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type LearningpathsListDeliveryEnum = typeof LearningpathsListDeliveryEnum[keyof typeof LearningpathsListDeliveryEnum]; +export interface LearningpathsApiLearningpathsDestroyRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof LearningpathsApiLearningpathsDestroy + */ + readonly id: number +} + /** + * Request parameters for learningpathsItemsCreate operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsItemsCreateRequest */ -export const LearningpathsListDepartmentEnum = { - _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 LearningpathsListDepartmentEnum = typeof LearningpathsListDepartmentEnum[keyof typeof LearningpathsListDepartmentEnum]; +export interface LearningpathsApiLearningpathsItemsCreateRequest { + /** + * The learning resource id of the learning path + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsCreate + */ + readonly learning_resource_id: number + + /** + * + * @type {LearningPathRelationshipRequest} + * @memberof LearningpathsApiLearningpathsItemsCreate + */ + readonly LearningPathRelationshipRequest: LearningPathRelationshipRequest +} + /** + * Request parameters for learningpathsItemsDestroy operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsItemsDestroyRequest */ -export const LearningpathsListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type LearningpathsListLevelEnum = typeof LearningpathsListLevelEnum[keyof typeof LearningpathsListLevelEnum]; +export interface LearningpathsApiLearningpathsItemsDestroyRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsDestroy + */ + readonly id: number + + /** + * The learning resource id of the learning path + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsDestroy + */ + readonly learning_resource_id: number +} + /** + * Request parameters for learningpathsItemsList operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsItemsListRequest */ -export const LearningpathsListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type LearningpathsListOfferedByEnum = typeof LearningpathsListOfferedByEnum[keyof typeof LearningpathsListOfferedByEnum]; +export interface LearningpathsApiLearningpathsItemsListRequest { + /** + * The learning resource id of the learning path + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsList + */ + readonly learning_resource_id: number + + /** + * Number of results to return per page. + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsList + */ + readonly offset?: number + + /** + * Which field to use when ordering the results. + * @type {string} + * @memberof LearningpathsApiLearningpathsItemsList + */ + readonly sortby?: string +} + /** + * Request parameters for learningpathsItemsPartialUpdate operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsItemsPartialUpdateRequest */ -export const LearningpathsListPlatformEnum = { - 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 LearningpathsListPlatformEnum = typeof LearningpathsListPlatformEnum[keyof typeof LearningpathsListPlatformEnum]; +export interface LearningpathsApiLearningpathsItemsPartialUpdateRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsPartialUpdate + */ + readonly id: number + + /** + * The learning resource id of the learning path + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsPartialUpdate + */ + readonly learning_resource_id: number + + /** + * + * @type {PatchedLearningPathRelationshipRequest} + * @memberof LearningpathsApiLearningpathsItemsPartialUpdate + */ + readonly PatchedLearningPathRelationshipRequest?: PatchedLearningPathRelationshipRequest +} + /** + * Request parameters for learningpathsItemsRetrieve operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsItemsRetrieveRequest */ -export const LearningpathsListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type LearningpathsListResourceCategoryEnum = typeof LearningpathsListResourceCategoryEnum[keyof typeof LearningpathsListResourceCategoryEnum]; +export interface LearningpathsApiLearningpathsItemsRetrieveRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsRetrieve + */ + readonly id: number + + /** + * The learning resource id of the learning path + * @type {number} + * @memberof LearningpathsApiLearningpathsItemsRetrieve + */ + readonly learning_resource_id: number +} + /** + * Request parameters for learningpathsList operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsListRequest */ -export const LearningpathsListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type LearningpathsListResourceTypeEnum = typeof LearningpathsListResourceTypeEnum[keyof typeof LearningpathsListResourceTypeEnum]; +export interface LearningpathsApiLearningpathsListRequest { + /** + * + * @type {boolean} + * @memberof LearningpathsApiLearningpathsList + */ + 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 LearningpathsApiLearningpathsList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningpathsApiLearningpathsList + */ + 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'>} + * @memberof LearningpathsApiLearningpathsList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof LearningpathsApiLearningpathsList + */ + 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 LearningpathsApiLearningpathsList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof LearningpathsApiLearningpathsList + */ + 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 LearningpathsApiLearningpathsList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof LearningpathsApiLearningpathsList + */ + 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 LearningpathsApiLearningpathsList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof LearningpathsApiLearningpathsList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningpathsApiLearningpathsList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof LearningpathsApiLearningpathsList + */ + readonly resource_category?: Array + + /** + * 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 LearningpathsApiLearningpathsList + */ + 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 LearningpathsApiLearningpathsList + */ + readonly sortby?: LearningpathsListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof LearningpathsApiLearningpathsList + */ + readonly topic?: Array +} + /** + * Request parameters for learningpathsPartialUpdate operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsPartialUpdateRequest */ -export const LearningpathsListSortbyEnum = { - 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 LearningpathsListSortbyEnum = typeof LearningpathsListSortbyEnum[keyof typeof LearningpathsListSortbyEnum]; - +export interface LearningpathsApiLearningpathsPartialUpdateRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof LearningpathsApiLearningpathsPartialUpdate + */ + readonly id: number + + /** + * + * @type {PatchedLearningPathResourceRequest} + * @memberof LearningpathsApiLearningpathsPartialUpdate + */ + readonly PatchedLearningPathResourceRequest?: PatchedLearningPathResourceRequest +} /** - * OfferorsApi - axios parameter creator + * Request parameters for learningpathsRetrieve operation in LearningpathsApi. * @export + * @interface LearningpathsApiLearningpathsRetrieveRequest */ -export const OfferorsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * MIT organizations that offer learning resources - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - offerorsList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/offerors/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * MIT organizations that offer learning resources - * @summary Retrieve - * @param {string} code A unique value identifying this learning resource offeror. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - offerorsRetrieve: async (code: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'code' is not null or undefined - assertParamExists('offerorsRetrieve', 'code', code) - const localVarPath = `/api/v1/offerors/{code}/` - .replace(`{${"code"}}`, encodeURIComponent(String(code))); - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface LearningpathsApiLearningpathsRetrieveRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof LearningpathsApiLearningpathsRetrieve + */ + readonly id: number +} /** - * OfferorsApi - functional programming interface + * LearningpathsApi - object-oriented interface * @export + * @class LearningpathsApi + * @extends {BaseAPI} */ -export const OfferorsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = OfferorsApiAxiosParamCreator(configuration) - return { - /** - * MIT organizations that offer learning resources - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async offerorsList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.offerorsList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OfferorsApi.offerorsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * MIT organizations that offer learning resources - * @summary Retrieve - * @param {string} code A unique value identifying this learning resource offeror. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async offerorsRetrieve(code: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.offerorsRetrieve(code, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['OfferorsApi.offerorsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export class LearningpathsApi extends BaseAPI { + /** + * Create a learning path + * @summary Create + * @param {LearningpathsApiLearningpathsCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsCreate( + requestParameters: LearningpathsApiLearningpathsCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsCreate( + requestParameters.LearningPathResourceRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Remove a learning path + * @summary Destroy + * @param {LearningpathsApiLearningpathsDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsDestroy( + requestParameters: LearningpathsApiLearningpathsDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsDestroy(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Add + * @param {LearningpathsApiLearningpathsItemsCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsItemsCreate( + requestParameters: LearningpathsApiLearningpathsItemsCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsItemsCreate( + requestParameters.learning_resource_id, + requestParameters.LearningPathRelationshipRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Remove + * @param {LearningpathsApiLearningpathsItemsDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsItemsDestroy( + requestParameters: LearningpathsApiLearningpathsItemsDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsItemsDestroy( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for LearningPath related resources + * @param {LearningpathsApiLearningpathsItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsItemsList( + requestParameters: LearningpathsApiLearningpathsItemsListRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for LearningPath related resources + * @summary Learning Path Resource Relationship Update + * @param {LearningpathsApiLearningpathsItemsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsItemsPartialUpdate( + requestParameters: LearningpathsApiLearningpathsItemsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsItemsPartialUpdate( + requestParameters.id, + requestParameters.learning_resource_id, + requestParameters.PatchedLearningPathRelationshipRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {LearningpathsApiLearningpathsItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsItemsRetrieve( + requestParameters: LearningpathsApiLearningpathsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of learning paths + * @summary List + * @param {LearningpathsApiLearningpathsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsList( + requestParameters: LearningpathsApiLearningpathsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsList( + 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)) + } + + /** + * Update individual fields of a learning path + * @summary Update + * @param {LearningpathsApiLearningpathsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsPartialUpdate( + requestParameters: LearningpathsApiLearningpathsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsPartialUpdate( + requestParameters.id, + requestParameters.PatchedLearningPathResourceRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Retrive a single learning path + * @summary Retrieve + * @param {LearningpathsApiLearningpathsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LearningpathsApi + */ + public learningpathsRetrieve( + requestParameters: LearningpathsApiLearningpathsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return LearningpathsApiFp(this.configuration) + .learningpathsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * OfferorsApi - factory interface * @export */ -export const OfferorsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = OfferorsApiFp(configuration) - return { - /** - * MIT organizations that offer learning resources - * @summary List - * @param {OfferorsApiOfferorsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - offerorsList(requestParameters: OfferorsApiOfferorsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.offerorsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * MIT organizations that offer learning resources - * @summary Retrieve - * @param {OfferorsApiOfferorsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - offerorsRetrieve(requestParameters: OfferorsApiOfferorsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.offerorsRetrieve(requestParameters.code, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const LearningpathsListCertificationTypeEnum = { + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type LearningpathsListCertificationTypeEnum = + (typeof LearningpathsListCertificationTypeEnum)[keyof typeof 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", + _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 LearningpathsListDepartmentEnum = + (typeof LearningpathsListDepartmentEnum)[keyof typeof LearningpathsListDepartmentEnum] +/** + * @export + */ +export const LearningpathsListLevelEnum = { + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type LearningpathsListLevelEnum = + (typeof LearningpathsListLevelEnum)[keyof typeof LearningpathsListLevelEnum] +/** + * @export + */ +export const LearningpathsListOfferedByEnum = { + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type LearningpathsListOfferedByEnum = + (typeof LearningpathsListOfferedByEnum)[keyof typeof LearningpathsListOfferedByEnum] +/** + * @export + */ +export const LearningpathsListPlatformEnum = { + 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 LearningpathsListPlatformEnum = + (typeof LearningpathsListPlatformEnum)[keyof typeof LearningpathsListPlatformEnum] +/** + * @export + */ +export const LearningpathsListResourceCategoryEnum = { + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type LearningpathsListResourceCategoryEnum = + (typeof LearningpathsListResourceCategoryEnum)[keyof typeof LearningpathsListResourceCategoryEnum] +/** + * @export + */ +export const LearningpathsListResourceTypeEnum = { + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type LearningpathsListResourceTypeEnum = + (typeof LearningpathsListResourceTypeEnum)[keyof typeof LearningpathsListResourceTypeEnum] +/** + * @export + */ +export const LearningpathsListSortbyEnum = { + 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 LearningpathsListSortbyEnum = + (typeof LearningpathsListSortbyEnum)[keyof typeof LearningpathsListSortbyEnum] /** - * Request parameters for offerorsList operation in OfferorsApi. + * OfferorsApi - axios parameter creator * @export - * @interface OfferorsApiOfferorsListRequest */ -export interface OfferorsApiOfferorsListRequest { +export const OfferorsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Number of results to return per page. - * @type {number} - * @memberof OfferorsApiOfferorsList + * MIT organizations that offer learning resources + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + offerorsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/offerors/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof OfferorsApiOfferorsList + * MIT organizations that offer learning resources + * @summary Retrieve + * @param {string} code A unique value identifying this learning resource offeror. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + offerorsRetrieve: async ( + code: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'code' is not null or undefined + assertParamExists("offerorsRetrieve", "code", code) + const localVarPath = `/api/v1/offerors/{code}/`.replace( + `{${"code"}}`, + encodeURIComponent(String(code)), + ) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for offerorsRetrieve operation in OfferorsApi. + * OfferorsApi - functional programming interface * @export - * @interface OfferorsApiOfferorsRetrieveRequest */ -export interface OfferorsApiOfferorsRetrieveRequest { +export const OfferorsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = OfferorsApiAxiosParamCreator(configuration) + return { + /** + * MIT organizations that offer learning resources + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerorsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.offerorsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["OfferorsApi.offerorsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique value identifying this learning resource offeror. - * @type {string} - * @memberof OfferorsApiOfferorsRetrieve + * MIT organizations that offer learning resources + * @summary Retrieve + * @param {string} code A unique value identifying this learning resource offeror. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly code: string + async offerorsRetrieve( + code: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.offerorsRetrieve(code, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["OfferorsApi.offerorsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * OfferorsApi - object-oriented interface + * OfferorsApi - factory interface * @export - * @class OfferorsApi - * @extends {BaseAPI} */ -export class OfferorsApi extends BaseAPI { +export const OfferorsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = OfferorsApiFp(configuration) + return { /** * MIT organizations that offer learning resources * @summary List * @param {OfferorsApiOfferorsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OfferorsApi */ - public offerorsList(requestParameters: OfferorsApiOfferorsListRequest = {}, options?: RawAxiosRequestConfig) { - return OfferorsApiFp(this.configuration).offerorsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + offerorsList( + requestParameters: OfferorsApiOfferorsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .offerorsList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * MIT organizations that offer learning resources * @summary Retrieve * @param {OfferorsApiOfferorsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof OfferorsApi */ - public offerorsRetrieve(requestParameters: OfferorsApiOfferorsRetrieveRequest, options?: RawAxiosRequestConfig) { - return OfferorsApiFp(this.configuration).offerorsRetrieve(requestParameters.code, options).then((request) => request(this.axios, this.basePath)); - } + offerorsRetrieve( + requestParameters: OfferorsApiOfferorsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .offerorsRetrieve(requestParameters.code, options) + .then((request) => request(axios, basePath)) + }, + } } - - /** - * PlatformsApi - axios parameter creator + * Request parameters for offerorsList operation in OfferorsApi. * @export + * @interface OfferorsApiOfferorsListRequest */ -export const PlatformsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Platforms on which learning resources are hosted - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - platformsList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/platforms/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Platforms on which learning resources are hosted - * @summary Retrieve - * @param {string} code A unique value identifying this learning resource platform. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - platformsRetrieve: async (code: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'code' is not null or undefined - assertParamExists('platformsRetrieve', 'code', code) - const localVarPath = `/api/v1/platforms/{code}/` - .replace(`{${"code"}}`, encodeURIComponent(String(code))); - // 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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface OfferorsApiOfferorsListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof OfferorsApiOfferorsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof OfferorsApiOfferorsList + */ + readonly offset?: number +} /** - * PlatformsApi - functional programming interface + * Request parameters for offerorsRetrieve operation in OfferorsApi. * @export + * @interface OfferorsApiOfferorsRetrieveRequest */ -export const PlatformsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = PlatformsApiAxiosParamCreator(configuration) - return { - /** - * Platforms on which learning resources are hosted - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async platformsList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.platformsList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['PlatformsApi.platformsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Platforms on which learning resources are hosted - * @summary Retrieve - * @param {string} code A unique value identifying this learning resource platform. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async platformsRetrieve(code: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.platformsRetrieve(code, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['PlatformsApi.platformsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface OfferorsApiOfferorsRetrieveRequest { + /** + * A unique value identifying this learning resource offeror. + * @type {string} + * @memberof OfferorsApiOfferorsRetrieve + */ + readonly code: string +} /** - * PlatformsApi - factory interface + * OfferorsApi - object-oriented interface * @export + * @class OfferorsApi + * @extends {BaseAPI} */ -export const PlatformsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = PlatformsApiFp(configuration) - return { - /** - * Platforms on which learning resources are hosted - * @summary List - * @param {PlatformsApiPlatformsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - platformsList(requestParameters: PlatformsApiPlatformsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.platformsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * Platforms on which learning resources are hosted - * @summary Retrieve - * @param {PlatformsApiPlatformsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - platformsRetrieve(requestParameters: PlatformsApiPlatformsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.platformsRetrieve(requestParameters.code, options).then((request) => request(axios, basePath)); - }, - }; -}; +export class OfferorsApi extends BaseAPI { + /** + * MIT organizations that offer learning resources + * @summary List + * @param {OfferorsApiOfferorsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferorsApi + */ + public offerorsList( + requestParameters: OfferorsApiOfferorsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return OfferorsApiFp(this.configuration) + .offerorsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * MIT organizations that offer learning resources + * @summary Retrieve + * @param {OfferorsApiOfferorsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferorsApi + */ + public offerorsRetrieve( + requestParameters: OfferorsApiOfferorsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return OfferorsApiFp(this.configuration) + .offerorsRetrieve(requestParameters.code, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for platformsList operation in PlatformsApi. + * PlatformsApi - axios parameter creator * @export - * @interface PlatformsApiPlatformsListRequest */ -export interface PlatformsApiPlatformsListRequest { +export const PlatformsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Number of results to return per page. - * @type {number} - * @memberof PlatformsApiPlatformsList + * Platforms on which learning resources are hosted + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + platformsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/platforms/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof PlatformsApiPlatformsList + * Platforms on which learning resources are hosted + * @summary Retrieve + * @param {string} code A unique value identifying this learning resource platform. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + platformsRetrieve: async ( + code: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'code' is not null or undefined + assertParamExists("platformsRetrieve", "code", code) + const localVarPath = `/api/v1/platforms/{code}/`.replace( + `{${"code"}}`, + encodeURIComponent(String(code)), + ) + // 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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for platformsRetrieve operation in PlatformsApi. + * PlatformsApi - functional programming interface * @export - * @interface PlatformsApiPlatformsRetrieveRequest */ -export interface PlatformsApiPlatformsRetrieveRequest { +export const PlatformsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PlatformsApiAxiosParamCreator(configuration) + return { /** - * A unique value identifying this learning resource platform. - * @type {string} - * @memberof PlatformsApiPlatformsRetrieve + * Platforms on which learning resources are hosted + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async platformsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.platformsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["PlatformsApi.platformsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Platforms on which learning resources are hosted + * @summary Retrieve + * @param {string} code A unique value identifying this learning resource platform. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly code: string + async platformsRetrieve( + code: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.platformsRetrieve(code, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["PlatformsApi.platformsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * PlatformsApi - object-oriented interface + * PlatformsApi - factory interface * @export - * @class PlatformsApi - * @extends {BaseAPI} */ -export class PlatformsApi extends BaseAPI { +export const PlatformsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PlatformsApiFp(configuration) + return { /** * Platforms on which learning resources are hosted * @summary List * @param {PlatformsApiPlatformsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PlatformsApi */ - public platformsList(requestParameters: PlatformsApiPlatformsListRequest = {}, options?: RawAxiosRequestConfig) { - return PlatformsApiFp(this.configuration).platformsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + platformsList( + requestParameters: PlatformsApiPlatformsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .platformsList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Platforms on which learning resources are hosted * @summary Retrieve * @param {PlatformsApiPlatformsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PlatformsApi */ - public platformsRetrieve(requestParameters: PlatformsApiPlatformsRetrieveRequest, options?: RawAxiosRequestConfig) { - return PlatformsApiFp(this.configuration).platformsRetrieve(requestParameters.code, options).then((request) => request(this.axios, this.basePath)); - } + platformsRetrieve( + requestParameters: PlatformsApiPlatformsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .platformsRetrieve(requestParameters.code, options) + .then((request) => request(axios, basePath)) + }, + } } - - -/** - * PodcastEpisodesApi - axios parameter creator - * @export - */ -export const PodcastEpisodesApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a paginated list of podcast episodes - * @summary List - * @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] Number of results to return per page. - * @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 {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastEpisodesList: async (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?: PodcastEpisodesListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/podcast_episodes/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single podcast episode - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastEpisodesRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('podcastEpisodesRetrieve', 'id', id) - const localVarPath = `/api/v1/podcast_episodes/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * PodcastEpisodesApi - functional programming interface - * @export - */ -export const PodcastEpisodesApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = PodcastEpisodesApiAxiosParamCreator(configuration) - return { - /** - * Get a paginated list of podcast episodes - * @summary List - * @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] Number of results to return per page. - * @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 {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async podcastEpisodesList(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?: PodcastEpisodesListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.podcastEpisodesList(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['PodcastEpisodesApi.podcastEpisodesList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single podcast episode - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async podcastEpisodesRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.podcastEpisodesRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['PodcastEpisodesApi.podcastEpisodesRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - /** - * PodcastEpisodesApi - factory interface + * Request parameters for platformsList operation in PlatformsApi. * @export + * @interface PlatformsApiPlatformsListRequest */ -export const PodcastEpisodesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = PodcastEpisodesApiFp(configuration) - return { - /** - * Get a paginated list of podcast episodes - * @summary List - * @param {PodcastEpisodesApiPodcastEpisodesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastEpisodesList(requestParameters: PodcastEpisodesApiPodcastEpisodesListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.podcastEpisodesList(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)); - }, - /** - * Retrieve a single podcast episode - * @summary Retrieve - * @param {PodcastEpisodesApiPodcastEpisodesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastEpisodesRetrieve(requestParameters: PodcastEpisodesApiPodcastEpisodesRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.podcastEpisodesRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface PlatformsApiPlatformsListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof PlatformsApiPlatformsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof PlatformsApiPlatformsList + */ + readonly offset?: number +} /** - * Request parameters for podcastEpisodesList operation in PodcastEpisodesApi. + * Request parameters for platformsRetrieve operation in PlatformsApi. * @export - * @interface PodcastEpisodesApiPodcastEpisodesListRequest + * @interface PlatformsApiPlatformsRetrieveRequest */ -export interface PodcastEpisodesApiPodcastEpisodesListRequest { - /** - * - * @type {boolean} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - 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 PodcastEpisodesApiPodcastEpisodesList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - 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'>} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - 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 PodcastEpisodesApiPodcastEpisodesList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - 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 PodcastEpisodesApiPodcastEpisodesList - */ - readonly offered_by?: Array +export interface PlatformsApiPlatformsRetrieveRequest { + /** + * A unique value identifying this learning resource platform. + * @type {string} + * @memberof PlatformsApiPlatformsRetrieve + */ + readonly code: string +} - /** - * The initial index from which to return the results. - * @type {number} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - readonly offset?: number +/** + * PlatformsApi - object-oriented interface + * @export + * @class PlatformsApi + * @extends {BaseAPI} + */ +export class PlatformsApi extends BaseAPI { + /** + * Platforms on which learning resources are hosted + * @summary List + * @param {PlatformsApiPlatformsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PlatformsApi + */ + public platformsList( + requestParameters: PlatformsApiPlatformsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return PlatformsApiFp(this.configuration) + .platformsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Platforms on which learning resources are hosted + * @summary Retrieve + * @param {PlatformsApiPlatformsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PlatformsApi + */ + public platformsRetrieve( + requestParameters: PlatformsApiPlatformsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return PlatformsApiFp(this.configuration) + .platformsRetrieve(requestParameters.code, options) + .then((request) => request(this.axios, this.basePath)) + } +} +/** + * PodcastEpisodesApi - axios parameter creator + * @export + */ +export const PodcastEpisodesApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * 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 PodcastEpisodesApiPodcastEpisodesList + * Get a paginated list of podcast episodes + * @summary List + * @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] Number of results to return per page. + * @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 {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly platform?: Array - + podcastEpisodesList: async ( + 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?: PodcastEpisodesListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/podcast_episodes/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {boolean} - * @memberof PodcastEpisodesApiPodcastEpisodesList + * Retrieve a single podcast episode + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly professional?: boolean + podcastEpisodesRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("podcastEpisodesRetrieve", "id", id) + const localVarPath = `/api/v1/podcast_episodes/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} +/** + * PodcastEpisodesApi - functional programming interface + * @export + */ +export const PodcastEpisodesApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + PodcastEpisodesApiAxiosParamCreator(configuration) + return { /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof PodcastEpisodesApiPodcastEpisodesList + * Get a paginated list of podcast episodes + * @summary List + * @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] Number of results to return per page. + * @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 {PodcastEpisodesListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly readable_id?: Array - + async podcastEpisodesList( + 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?: PodcastEpisodesListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.podcastEpisodesList( + 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["PodcastEpisodesApi.podcastEpisodesList"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof PodcastEpisodesApiPodcastEpisodesList + * Retrieve a single podcast episode + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_category?: Array + async podcastEpisodesRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.podcastEpisodesRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["PodcastEpisodesApi.podcastEpisodesRetrieve"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} +/** + * PodcastEpisodesApi - factory interface + * @export + */ +export const PodcastEpisodesApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PodcastEpisodesApiFp(configuration) + return { /** - * 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 PodcastEpisodesApiPodcastEpisodesList + * Get a paginated list of podcast episodes + * @summary List + * @param {PodcastEpisodesApiPodcastEpisodesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_type?: Array - + podcastEpisodesList( + requestParameters: PodcastEpisodesApiPodcastEpisodesListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .podcastEpisodesList( + 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)) + }, /** - * 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 PodcastEpisodesApiPodcastEpisodesList + * Retrieve a single podcast episode + * @summary Retrieve + * @param {PodcastEpisodesApiPodcastEpisodesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: PodcastEpisodesListSortbyEnum + podcastEpisodesRetrieve( + requestParameters: PodcastEpisodesApiPodcastEpisodesRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .podcastEpisodesRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof PodcastEpisodesApiPodcastEpisodesList - */ - readonly topic?: Array +/** + * Request parameters for podcastEpisodesList operation in PodcastEpisodesApi. + * @export + * @interface PodcastEpisodesApiPodcastEpisodesListRequest + */ +export interface PodcastEpisodesApiPodcastEpisodesListRequest { + /** + * + * @type {boolean} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + 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 PodcastEpisodesApiPodcastEpisodesList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + 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'>} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + 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 PodcastEpisodesApiPodcastEpisodesList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + 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 PodcastEpisodesApiPodcastEpisodesList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + 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 PodcastEpisodesApiPodcastEpisodesList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly resource_category?: Array + + /** + * 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 PodcastEpisodesApiPodcastEpisodesList + */ + 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 PodcastEpisodesApiPodcastEpisodesList + */ + readonly sortby?: PodcastEpisodesListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof PodcastEpisodesApiPodcastEpisodesList + */ + readonly topic?: Array } /** @@ -16207,12 +19957,12 @@ export interface PodcastEpisodesApiPodcastEpisodesListRequest { * @interface PodcastEpisodesApiPodcastEpisodesRetrieveRequest */ export interface PodcastEpisodesApiPodcastEpisodesRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof PodcastEpisodesApiPodcastEpisodesRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof PodcastEpisodesApiPodcastEpisodesRetrieve + */ + readonly id: number } /** @@ -16222,1054 +19972,1433 @@ export interface PodcastEpisodesApiPodcastEpisodesRetrieveRequest { * @extends {BaseAPI} */ export class PodcastEpisodesApi extends BaseAPI { - /** - * Get a paginated list of podcast episodes - * @summary List - * @param {PodcastEpisodesApiPodcastEpisodesListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PodcastEpisodesApi - */ - public podcastEpisodesList(requestParameters: PodcastEpisodesApiPodcastEpisodesListRequest = {}, options?: RawAxiosRequestConfig) { - return PodcastEpisodesApiFp(this.configuration).podcastEpisodesList(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)); - } - - /** - * Retrieve a single podcast episode - * @summary Retrieve - * @param {PodcastEpisodesApiPodcastEpisodesRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PodcastEpisodesApi - */ - public podcastEpisodesRetrieve(requestParameters: PodcastEpisodesApiPodcastEpisodesRetrieveRequest, options?: RawAxiosRequestConfig) { - return PodcastEpisodesApiFp(this.configuration).podcastEpisodesRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Get a paginated list of podcast episodes + * @summary List + * @param {PodcastEpisodesApiPodcastEpisodesListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PodcastEpisodesApi + */ + public podcastEpisodesList( + requestParameters: PodcastEpisodesApiPodcastEpisodesListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return PodcastEpisodesApiFp(this.configuration) + .podcastEpisodesList( + 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)) + } + + /** + * Retrieve a single podcast episode + * @summary Retrieve + * @param {PodcastEpisodesApiPodcastEpisodesRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PodcastEpisodesApi + */ + public podcastEpisodesRetrieve( + requestParameters: PodcastEpisodesApiPodcastEpisodesRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return PodcastEpisodesApiFp(this.configuration) + .podcastEpisodesRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const PodcastEpisodesListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type PodcastEpisodesListCertificationTypeEnum = typeof PodcastEpisodesListCertificationTypeEnum[keyof typeof PodcastEpisodesListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type PodcastEpisodesListCertificationTypeEnum = + (typeof PodcastEpisodesListCertificationTypeEnum)[keyof typeof PodcastEpisodesListCertificationTypeEnum] /** * @export */ export const PodcastEpisodesListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type PodcastEpisodesListDeliveryEnum = typeof PodcastEpisodesListDeliveryEnum[keyof typeof 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', - _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 PodcastEpisodesListDepartmentEnum = typeof PodcastEpisodesListDepartmentEnum[keyof typeof PodcastEpisodesListDepartmentEnum]; + _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 PodcastEpisodesListDepartmentEnum = + (typeof PodcastEpisodesListDepartmentEnum)[keyof typeof PodcastEpisodesListDepartmentEnum] /** * @export */ export const PodcastEpisodesListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type PodcastEpisodesListLevelEnum = typeof PodcastEpisodesListLevelEnum[keyof typeof PodcastEpisodesListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type PodcastEpisodesListLevelEnum = + (typeof PodcastEpisodesListLevelEnum)[keyof typeof PodcastEpisodesListLevelEnum] /** * @export */ export const PodcastEpisodesListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type PodcastEpisodesListOfferedByEnum = typeof PodcastEpisodesListOfferedByEnum[keyof typeof PodcastEpisodesListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type PodcastEpisodesListOfferedByEnum = + (typeof PodcastEpisodesListOfferedByEnum)[keyof typeof PodcastEpisodesListOfferedByEnum] /** * @export */ export const PodcastEpisodesListPlatformEnum = { - 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 PodcastEpisodesListPlatformEnum = typeof PodcastEpisodesListPlatformEnum[keyof typeof PodcastEpisodesListPlatformEnum]; + 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 PodcastEpisodesListPlatformEnum = + (typeof PodcastEpisodesListPlatformEnum)[keyof typeof PodcastEpisodesListPlatformEnum] /** * @export */ export const PodcastEpisodesListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type PodcastEpisodesListResourceCategoryEnum = typeof PodcastEpisodesListResourceCategoryEnum[keyof typeof PodcastEpisodesListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type PodcastEpisodesListResourceCategoryEnum = + (typeof PodcastEpisodesListResourceCategoryEnum)[keyof typeof PodcastEpisodesListResourceCategoryEnum] /** * @export */ export const PodcastEpisodesListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type PodcastEpisodesListResourceTypeEnum = typeof PodcastEpisodesListResourceTypeEnum[keyof typeof PodcastEpisodesListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type PodcastEpisodesListResourceTypeEnum = + (typeof PodcastEpisodesListResourceTypeEnum)[keyof typeof PodcastEpisodesListResourceTypeEnum] /** * @export */ export const PodcastEpisodesListSortbyEnum = { - 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 PodcastEpisodesListSortbyEnum = typeof PodcastEpisodesListSortbyEnum[keyof typeof PodcastEpisodesListSortbyEnum]; - + 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 PodcastEpisodesListSortbyEnum = + (typeof PodcastEpisodesListSortbyEnum)[keyof typeof PodcastEpisodesListSortbyEnum] /** * PodcastsApi - axios parameter creator * @export */ -export const PodcastsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {number} learning_resource_id id of the parent learning resource - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsItemsList: async (learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('podcastsItemsList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/podcasts/{learning_resource_id}/items/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsItemsRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('podcastsItemsRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('podcastsItemsRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/podcasts/{learning_resource_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a paginated list of podcasts - * @summary List - * @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] Number of results to return per page. - * @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 {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsList: async (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?: PodcastsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/podcasts/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single podcast - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('podcastsRetrieve', 'id', id) - const localVarPath = `/api/v1/podcasts/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * PodcastsApi - functional programming interface - * @export - */ -export const PodcastsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = PodcastsApiAxiosParamCreator(configuration) - return { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {number} learning_resource_id id of the parent learning resource - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async podcastsItemsList(learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.podcastsItemsList(learning_resource_id, limit, offset, sortby, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['PodcastsApi.podcastsItemsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async podcastsItemsRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.podcastsItemsRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['PodcastsApi.podcastsItemsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a paginated list of podcasts - * @summary List - * @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] Number of results to return per page. - * @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 {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async podcastsList(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?: PodcastsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.podcastsList(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['PodcastsApi.podcastsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single podcast - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async podcastsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.podcastsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['PodcastsApi.podcastsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * PodcastsApi - factory interface - * @export - */ -export const PodcastsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = PodcastsApiFp(configuration) - return { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {PodcastsApiPodcastsItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsItemsList(requestParameters: PodcastsApiPodcastsItemsListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.podcastsItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(axios, basePath)); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {PodcastsApiPodcastsItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsItemsRetrieve(requestParameters: PodcastsApiPodcastsItemsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.podcastsItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Get a paginated list of podcasts - * @summary List - * @param {PodcastsApiPodcastsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsList(requestParameters: PodcastsApiPodcastsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.podcastsList(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)); - }, - /** - * Retrieve a single podcast - * @summary Retrieve - * @param {PodcastsApiPodcastsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - podcastsRetrieve(requestParameters: PodcastsApiPodcastsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.podcastsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for podcastsItemsList operation in PodcastsApi. - * @export - * @interface PodcastsApiPodcastsItemsListRequest - */ -export interface PodcastsApiPodcastsItemsListRequest { - /** - * id of the parent learning resource - * @type {number} - * @memberof PodcastsApiPodcastsItemsList - */ - readonly learning_resource_id: number - - /** - * Number of results to return per page. - * @type {number} - * @memberof PodcastsApiPodcastsItemsList - */ - readonly limit?: number - +export const PodcastsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * The initial index from which to return the results. - * @type {number} - * @memberof PodcastsApiPodcastsItemsList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {number} learning_resource_id id of the parent learning resource + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number - + podcastsItemsList: async ( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "podcastsItemsList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/podcasts/{learning_resource_id}/items/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Which field to use when ordering the results. - * @type {string} - * @memberof PodcastsApiPodcastsItemsList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: string -} - -/** - * Request parameters for podcastsItemsRetrieve operation in PodcastsApi. - * @export - * @interface PodcastsApiPodcastsItemsRetrieveRequest - */ -export interface PodcastsApiPodcastsItemsRetrieveRequest { + podcastsItemsRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("podcastsItemsRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "podcastsItemsRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = `/api/v1/podcasts/{learning_resource_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof PodcastsApiPodcastsItemsRetrieve + * Get a paginated list of podcasts + * @summary List + * @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] Number of results to return per page. + * @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 {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + podcastsList: async ( + 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?: PodcastsListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/podcasts/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * id of the parent learning resource - * @type {number} - * @memberof PodcastsApiPodcastsItemsRetrieve + * Retrieve a single podcast + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly learning_resource_id: number + podcastsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("podcastsRetrieve", "id", id) + const localVarPath = `/api/v1/podcasts/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for podcastsList operation in PodcastsApi. + * PodcastsApi - functional programming interface * @export - * @interface PodcastsApiPodcastsListRequest */ -export interface PodcastsApiPodcastsListRequest { - /** - * - * @type {boolean} - * @memberof PodcastsApiPodcastsList - */ - 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 PodcastsApiPodcastsList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof PodcastsApiPodcastsList - */ - 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'>} - * @memberof PodcastsApiPodcastsList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof PodcastsApiPodcastsList - */ - 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 PodcastsApiPodcastsList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof PodcastsApiPodcastsList - */ - 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 PodcastsApiPodcastsList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof PodcastsApiPodcastsList - */ - 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 PodcastsApiPodcastsList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof PodcastsApiPodcastsList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof PodcastsApiPodcastsList - */ - readonly readable_id?: Array - - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof PodcastsApiPodcastsList - */ - readonly resource_category?: Array - +export const PodcastsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = PodcastsApiAxiosParamCreator(configuration) + return { /** - * 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 PodcastsApiPodcastsList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {number} learning_resource_id id of the parent learning resource + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_type?: Array - + async podcastsItemsList( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.podcastsItemsList( + learning_resource_id, + limit, + offset, + sortby, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["PodcastsApi.podcastsItemsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * 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 PodcastsApiPodcastsList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: PodcastsListSortbyEnum - + async podcastsItemsRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.podcastsItemsRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["PodcastsApi.podcastsItemsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof PodcastsApiPodcastsList + * Get a paginated list of podcasts + * @summary List + * @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] Number of results to return per page. + * @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 {PodcastsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly topic?: Array -} - -/** - * Request parameters for podcastsRetrieve operation in PodcastsApi. - * @export - * @interface PodcastsApiPodcastsRetrieveRequest - */ -export interface PodcastsApiPodcastsRetrieveRequest { + async podcastsList( + 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?: PodcastsListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.podcastsList( + 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["PodcastsApi.podcastsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof PodcastsApiPodcastsRetrieve + * Retrieve a single podcast + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async podcastsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.podcastsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["PodcastsApi.podcastsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * PodcastsApi - object-oriented interface + * PodcastsApi - factory interface * @export - * @class PodcastsApi - * @extends {BaseAPI} */ -export class PodcastsApi extends BaseAPI { +export const PodcastsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = PodcastsApiFp(configuration) + return { /** * Get a list of related learning resources for a learning resource. * @summary Nested Learning Resource List * @param {PodcastsApiPodcastsItemsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PodcastsApi */ - public podcastsItemsList(requestParameters: PodcastsApiPodcastsItemsListRequest, options?: RawAxiosRequestConfig) { - return PodcastsApiFp(this.configuration).podcastsItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(this.axios, this.basePath)); - } - + podcastsItemsList( + requestParameters: PodcastsApiPodcastsItemsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .podcastsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Get a singe related learning resource for a learning resource. * @summary Nested Learning Resource Retrieve * @param {PodcastsApiPodcastsItemsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PodcastsApi */ - public podcastsItemsRetrieve(requestParameters: PodcastsApiPodcastsItemsRetrieveRequest, options?: RawAxiosRequestConfig) { - return PodcastsApiFp(this.configuration).podcastsItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - + podcastsItemsRetrieve( + requestParameters: PodcastsApiPodcastsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .podcastsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Get a paginated list of podcasts * @summary List * @param {PodcastsApiPodcastsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PodcastsApi */ - public podcastsList(requestParameters: PodcastsApiPodcastsListRequest = {}, options?: RawAxiosRequestConfig) { - return PodcastsApiFp(this.configuration).podcastsList(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)); - } - + podcastsList( + requestParameters: PodcastsApiPodcastsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .podcastsList( + 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)) + }, /** * Retrieve a single podcast * @summary Retrieve * @param {PodcastsApiPodcastsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PodcastsApi */ - public podcastsRetrieve(requestParameters: PodcastsApiPodcastsRetrieveRequest, options?: RawAxiosRequestConfig) { - return PodcastsApiFp(this.configuration).podcastsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + podcastsRetrieve( + requestParameters: PodcastsApiPodcastsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .podcastsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for podcastsItemsList operation in PodcastsApi. + * @export + * @interface PodcastsApiPodcastsItemsListRequest + */ +export interface PodcastsApiPodcastsItemsListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof PodcastsApiPodcastsItemsList + */ + readonly learning_resource_id: number + + /** + * Number of results to return per page. + * @type {number} + * @memberof PodcastsApiPodcastsItemsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof PodcastsApiPodcastsItemsList + */ + readonly offset?: number + + /** + * Which field to use when ordering the results. + * @type {string} + * @memberof PodcastsApiPodcastsItemsList + */ + readonly sortby?: string +} + +/** + * Request parameters for podcastsItemsRetrieve operation in PodcastsApi. + * @export + * @interface PodcastsApiPodcastsItemsRetrieveRequest + */ +export interface PodcastsApiPodcastsItemsRetrieveRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof PodcastsApiPodcastsItemsRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof PodcastsApiPodcastsItemsRetrieve + */ + readonly learning_resource_id: number +} + +/** + * Request parameters for podcastsList operation in PodcastsApi. + * @export + * @interface PodcastsApiPodcastsListRequest + */ +export interface PodcastsApiPodcastsListRequest { + /** + * + * @type {boolean} + * @memberof PodcastsApiPodcastsList + */ + 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 PodcastsApiPodcastsList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof PodcastsApiPodcastsList + */ + 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'>} + * @memberof PodcastsApiPodcastsList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof PodcastsApiPodcastsList + */ + 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 PodcastsApiPodcastsList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof PodcastsApiPodcastsList + */ + 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 PodcastsApiPodcastsList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof PodcastsApiPodcastsList + */ + 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 PodcastsApiPodcastsList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof PodcastsApiPodcastsList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof PodcastsApiPodcastsList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof PodcastsApiPodcastsList + */ + readonly resource_category?: Array + + /** + * 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 PodcastsApiPodcastsList + */ + 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 PodcastsApiPodcastsList + */ + readonly sortby?: PodcastsListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof PodcastsApiPodcastsList + */ + readonly topic?: Array +} + +/** + * Request parameters for podcastsRetrieve operation in PodcastsApi. + * @export + * @interface PodcastsApiPodcastsRetrieveRequest + */ +export interface PodcastsApiPodcastsRetrieveRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof PodcastsApiPodcastsRetrieve + */ + readonly id: number +} + +/** + * PodcastsApi - object-oriented interface + * @export + * @class PodcastsApi + * @extends {BaseAPI} + */ +export class PodcastsApi extends BaseAPI { + /** + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {PodcastsApiPodcastsItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PodcastsApi + */ + public podcastsItemsList( + requestParameters: PodcastsApiPodcastsItemsListRequest, + options?: RawAxiosRequestConfig, + ) { + return PodcastsApiFp(this.configuration) + .podcastsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {PodcastsApiPodcastsItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PodcastsApi + */ + public podcastsItemsRetrieve( + requestParameters: PodcastsApiPodcastsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return PodcastsApiFp(this.configuration) + .podcastsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of podcasts + * @summary List + * @param {PodcastsApiPodcastsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PodcastsApi + */ + public podcastsList( + requestParameters: PodcastsApiPodcastsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return PodcastsApiFp(this.configuration) + .podcastsList( + 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)) + } + + /** + * Retrieve a single podcast + * @summary Retrieve + * @param {PodcastsApiPodcastsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PodcastsApi + */ + public podcastsRetrieve( + requestParameters: PodcastsApiPodcastsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return PodcastsApiFp(this.configuration) + .podcastsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const PodcastsListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type PodcastsListCertificationTypeEnum = typeof PodcastsListCertificationTypeEnum[keyof typeof PodcastsListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type PodcastsListCertificationTypeEnum = + (typeof PodcastsListCertificationTypeEnum)[keyof typeof PodcastsListCertificationTypeEnum] /** * @export */ export const PodcastsListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type PodcastsListDeliveryEnum = typeof PodcastsListDeliveryEnum[keyof typeof 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', - _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 PodcastsListDepartmentEnum = typeof PodcastsListDepartmentEnum[keyof typeof PodcastsListDepartmentEnum]; + _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 PodcastsListDepartmentEnum = + (typeof PodcastsListDepartmentEnum)[keyof typeof PodcastsListDepartmentEnum] /** * @export */ export const PodcastsListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type PodcastsListLevelEnum = typeof PodcastsListLevelEnum[keyof typeof PodcastsListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type PodcastsListLevelEnum = + (typeof PodcastsListLevelEnum)[keyof typeof PodcastsListLevelEnum] /** * @export */ export const PodcastsListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type PodcastsListOfferedByEnum = typeof PodcastsListOfferedByEnum[keyof typeof PodcastsListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type PodcastsListOfferedByEnum = + (typeof PodcastsListOfferedByEnum)[keyof typeof PodcastsListOfferedByEnum] /** * @export */ export const PodcastsListPlatformEnum = { - 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 PodcastsListPlatformEnum = typeof PodcastsListPlatformEnum[keyof typeof PodcastsListPlatformEnum]; + 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 PodcastsListPlatformEnum = + (typeof PodcastsListPlatformEnum)[keyof typeof PodcastsListPlatformEnum] /** * @export */ export const PodcastsListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type PodcastsListResourceCategoryEnum = typeof PodcastsListResourceCategoryEnum[keyof typeof PodcastsListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type PodcastsListResourceCategoryEnum = + (typeof PodcastsListResourceCategoryEnum)[keyof typeof PodcastsListResourceCategoryEnum] /** * @export */ export const PodcastsListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type PodcastsListResourceTypeEnum = typeof PodcastsListResourceTypeEnum[keyof typeof PodcastsListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type PodcastsListResourceTypeEnum = + (typeof PodcastsListResourceTypeEnum)[keyof typeof PodcastsListResourceTypeEnum] /** * @export */ export const PodcastsListSortbyEnum = { - 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 PodcastsListSortbyEnum = typeof PodcastsListSortbyEnum[keyof typeof PodcastsListSortbyEnum]; - + 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 PodcastsListSortbyEnum = + (typeof PodcastsListSortbyEnum)[keyof typeof PodcastsListSortbyEnum] /** * ProgramLettersApi - axios parameter creator * @export */ -export const ProgramLettersApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Detail only View for program letters - * @param {string} id A UUID string identifying this program letter. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programLettersRetrieve: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('programLettersRetrieve', 'id', id) - const localVarPath = `/api/v1/program_letters/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export const ProgramLettersApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Detail only View for program letters + * @param {string} id A UUID string identifying this program letter. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + programLettersRetrieve: async ( + id: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("programLettersRetrieve", "id", id) + const localVarPath = `/api/v1/program_letters/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} /** * ProgramLettersApi - functional programming interface * @export */ -export const ProgramLettersApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ProgramLettersApiAxiosParamCreator(configuration) - return { - /** - * Detail only View for program letters - * @param {string} id A UUID string identifying this program letter. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programLettersRetrieve(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.programLettersRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ProgramLettersApi.programLettersRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export const ProgramLettersApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + ProgramLettersApiAxiosParamCreator(configuration) + return { + /** + * Detail only View for program letters + * @param {string} id A UUID string identifying this program letter. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async programLettersRetrieve( + id: string, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.programLettersRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ProgramLettersApi.programLettersRetrieve"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} /** * ProgramLettersApi - factory interface * @export */ -export const ProgramLettersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ProgramLettersApiFp(configuration) - return { - /** - * Detail only View for program letters - * @param {ProgramLettersApiProgramLettersRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programLettersRetrieve(requestParameters: ProgramLettersApiProgramLettersRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.programLettersRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const ProgramLettersApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ProgramLettersApiFp(configuration) + return { + /** + * Detail only View for program letters + * @param {ProgramLettersApiProgramLettersRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + programLettersRetrieve( + requestParameters: ProgramLettersApiProgramLettersRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .programLettersRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} /** * Request parameters for programLettersRetrieve operation in ProgramLettersApi. @@ -17277,12 +21406,12 @@ export const ProgramLettersApiFactory = function (configuration?: Configuration, * @interface ProgramLettersApiProgramLettersRetrieveRequest */ export interface ProgramLettersApiProgramLettersRetrieveRequest { - /** - * A UUID string identifying this program letter. - * @type {string} - * @memberof ProgramLettersApiProgramLettersRetrieve - */ - readonly id: string + /** + * A UUID string identifying this program letter. + * @type {string} + * @memberof ProgramLettersApiProgramLettersRetrieve + */ + readonly id: string } /** @@ -17292,259 +21421,405 @@ export interface ProgramLettersApiProgramLettersRetrieveRequest { * @extends {BaseAPI} */ export class ProgramLettersApi extends BaseAPI { - /** - * Detail only View for program letters - * @param {ProgramLettersApiProgramLettersRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProgramLettersApi - */ - public programLettersRetrieve(requestParameters: ProgramLettersApiProgramLettersRetrieveRequest, options?: RawAxiosRequestConfig) { - return ProgramLettersApiFp(this.configuration).programLettersRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Detail only View for program letters + * @param {ProgramLettersApiProgramLettersRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProgramLettersApi + */ + public programLettersRetrieve( + requestParameters: ProgramLettersApiProgramLettersRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ProgramLettersApiFp(this.configuration) + .programLettersRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } - - /** * ProgramsApi - axios parameter creator * @export */ -export const ProgramsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a paginated list of programs - * @summary List - * @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] Number of results to return per page. - * @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 {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsList: async (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?: ProgramsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/programs/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single program - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('programsRetrieve', 'id', id) - const localVarPath = `/api/v1/programs/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export const ProgramsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Get a paginated list of programs + * @summary List + * @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] Number of results to return per page. + * @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 {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + programsList: async ( + 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?: ProgramsListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/programs/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Retrieve a single program + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + programsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("programsRetrieve", "id", id) + const localVarPath = `/api/v1/programs/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} /** * ProgramsApi - functional programming interface * @export */ -export const ProgramsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ProgramsApiAxiosParamCreator(configuration) - return { - /** - * Get a paginated list of programs - * @summary List - * @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] Number of results to return per page. - * @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 {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programsList(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?: ProgramsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.programsList(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['ProgramsApi.programsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single program - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async programsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.programsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['ProgramsApi.programsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export const ProgramsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = ProgramsApiAxiosParamCreator(configuration) + return { + /** + * Get a paginated list of programs + * @summary List + * @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] Number of results to return per page. + * @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 {ProgramsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async programsList( + 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?: ProgramsListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.programsList( + 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["ProgramsApi.programsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Retrieve a single program + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async programsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.programsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["ProgramsApi.programsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} /** * ProgramsApi - factory interface * @export */ -export const ProgramsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ProgramsApiFp(configuration) - return { - /** - * Get a paginated list of programs - * @summary List - * @param {ProgramsApiProgramsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsList(requestParameters: ProgramsApiProgramsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.programsList(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)); - }, - /** - * Retrieve a single program - * @summary Retrieve - * @param {ProgramsApiProgramsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - programsRetrieve(requestParameters: ProgramsApiProgramsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.programsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const ProgramsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = ProgramsApiFp(configuration) + return { + /** + * Get a paginated list of programs + * @summary List + * @param {ProgramsApiProgramsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + programsList( + requestParameters: ProgramsApiProgramsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .programsList( + 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)) + }, + /** + * Retrieve a single program + * @summary Retrieve + * @param {ProgramsApiProgramsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + programsRetrieve( + requestParameters: ProgramsApiProgramsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .programsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} /** * Request parameters for programsList operation in ProgramsApi. @@ -17552,124 +21827,124 @@ export const ProgramsApiFactory = function (configuration?: Configuration, baseP * @interface ProgramsApiProgramsListRequest */ export interface ProgramsApiProgramsListRequest { - /** - * - * @type {boolean} - * @memberof ProgramsApiProgramsList - */ - 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 ProgramsApiProgramsList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsList - */ - 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'>} - * @memberof ProgramsApiProgramsList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof ProgramsApiProgramsList - */ - 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 ProgramsApiProgramsList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof ProgramsApiProgramsList - */ - 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 ProgramsApiProgramsList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof ProgramsApiProgramsList - */ - 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 ProgramsApiProgramsList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof ProgramsApiProgramsList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsList - */ - readonly readable_id?: Array - - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof ProgramsApiProgramsList - */ - readonly resource_category?: Array - - /** - * 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 ProgramsApiProgramsList - */ - 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 ProgramsApiProgramsList - */ - readonly sortby?: ProgramsListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof ProgramsApiProgramsList - */ - readonly topic?: Array + /** + * + * @type {boolean} + * @memberof ProgramsApiProgramsList + */ + 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 ProgramsApiProgramsList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof ProgramsApiProgramsList + */ + 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'>} + * @memberof ProgramsApiProgramsList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof ProgramsApiProgramsList + */ + 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 ProgramsApiProgramsList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof ProgramsApiProgramsList + */ + 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 ProgramsApiProgramsList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof ProgramsApiProgramsList + */ + 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 ProgramsApiProgramsList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof ProgramsApiProgramsList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof ProgramsApiProgramsList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof ProgramsApiProgramsList + */ + readonly resource_category?: Array + + /** + * 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 ProgramsApiProgramsList + */ + 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 ProgramsApiProgramsList + */ + readonly sortby?: ProgramsListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof ProgramsApiProgramsList + */ + readonly topic?: Array } /** @@ -17678,12 +21953,12 @@ export interface ProgramsApiProgramsListRequest { * @interface ProgramsApiProgramsRetrieveRequest */ export interface ProgramsApiProgramsRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof ProgramsApiProgramsRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof ProgramsApiProgramsRetrieve + */ + readonly id: number } /** @@ -17693,2673 +21968,3847 @@ export interface ProgramsApiProgramsRetrieveRequest { * @extends {BaseAPI} */ export class ProgramsApi extends BaseAPI { - /** - * Get a paginated list of programs - * @summary List - * @param {ProgramsApiProgramsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProgramsApi - */ - public programsList(requestParameters: ProgramsApiProgramsListRequest = {}, options?: RawAxiosRequestConfig) { - return ProgramsApiFp(this.configuration).programsList(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)); - } - - /** - * Retrieve a single program - * @summary Retrieve - * @param {ProgramsApiProgramsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof ProgramsApi - */ - public programsRetrieve(requestParameters: ProgramsApiProgramsRetrieveRequest, options?: RawAxiosRequestConfig) { - return ProgramsApiFp(this.configuration).programsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Get a paginated list of programs + * @summary List + * @param {ProgramsApiProgramsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProgramsApi + */ + public programsList( + requestParameters: ProgramsApiProgramsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return ProgramsApiFp(this.configuration) + .programsList( + 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)) + } + + /** + * Retrieve a single program + * @summary Retrieve + * @param {ProgramsApiProgramsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProgramsApi + */ + public programsRetrieve( + requestParameters: ProgramsApiProgramsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return ProgramsApiFp(this.configuration) + .programsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const ProgramsListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type ProgramsListCertificationTypeEnum = typeof ProgramsListCertificationTypeEnum[keyof typeof ProgramsListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type ProgramsListCertificationTypeEnum = + (typeof ProgramsListCertificationTypeEnum)[keyof typeof ProgramsListCertificationTypeEnum] /** * @export */ export const ProgramsListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type ProgramsListDeliveryEnum = typeof ProgramsListDeliveryEnum[keyof typeof 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', - _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 ProgramsListDepartmentEnum = typeof ProgramsListDepartmentEnum[keyof typeof ProgramsListDepartmentEnum]; + _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 ProgramsListDepartmentEnum = + (typeof ProgramsListDepartmentEnum)[keyof typeof ProgramsListDepartmentEnum] /** * @export */ export const ProgramsListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type ProgramsListLevelEnum = typeof ProgramsListLevelEnum[keyof typeof ProgramsListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type ProgramsListLevelEnum = + (typeof ProgramsListLevelEnum)[keyof typeof ProgramsListLevelEnum] /** * @export */ export const ProgramsListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type ProgramsListOfferedByEnum = typeof ProgramsListOfferedByEnum[keyof typeof ProgramsListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type ProgramsListOfferedByEnum = + (typeof ProgramsListOfferedByEnum)[keyof typeof ProgramsListOfferedByEnum] /** * @export */ export const ProgramsListPlatformEnum = { - 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 ProgramsListPlatformEnum = typeof ProgramsListPlatformEnum[keyof typeof ProgramsListPlatformEnum]; + 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 ProgramsListPlatformEnum = + (typeof ProgramsListPlatformEnum)[keyof typeof ProgramsListPlatformEnum] /** * @export */ export const ProgramsListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type ProgramsListResourceCategoryEnum = typeof ProgramsListResourceCategoryEnum[keyof typeof ProgramsListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type ProgramsListResourceCategoryEnum = + (typeof ProgramsListResourceCategoryEnum)[keyof typeof ProgramsListResourceCategoryEnum] /** * @export */ export const ProgramsListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type ProgramsListResourceTypeEnum = typeof ProgramsListResourceTypeEnum[keyof typeof ProgramsListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type ProgramsListResourceTypeEnum = + (typeof ProgramsListResourceTypeEnum)[keyof typeof ProgramsListResourceTypeEnum] /** * @export */ export const ProgramsListSortbyEnum = { - 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 ProgramsListSortbyEnum = typeof ProgramsListSortbyEnum[keyof typeof ProgramsListSortbyEnum]; - + 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 ProgramsListSortbyEnum = + (typeof ProgramsListSortbyEnum)[keyof typeof ProgramsListSortbyEnum] /** * SchoolsApi - axios parameter creator * @export */ -export const SchoolsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * MIT schools - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - schoolsList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/schools/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * MIT schools - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource school. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - schoolsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('schoolsRetrieve', 'id', id) - const localVarPath = `/api/v1/schools/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - -/** - * SchoolsApi - functional programming interface - * @export - */ -export const SchoolsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = SchoolsApiAxiosParamCreator(configuration) - return { - /** - * MIT schools - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async schoolsList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['SchoolsApi.schoolsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * MIT schools - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource school. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async schoolsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['SchoolsApi.schoolsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * SchoolsApi - factory interface - * @export - */ -export const SchoolsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = SchoolsApiFp(configuration) - return { - /** - * MIT schools - * @summary List - * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - schoolsList(requestParameters: SchoolsApiSchoolsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.schoolsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * MIT schools - * @summary Retrieve - * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - schoolsRetrieve(requestParameters: SchoolsApiSchoolsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.schoolsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; - -/** - * Request parameters for schoolsList operation in SchoolsApi. - * @export - * @interface SchoolsApiSchoolsListRequest - */ -export interface SchoolsApiSchoolsListRequest { +export const SchoolsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * Number of results to return per page. - * @type {number} - * @memberof SchoolsApiSchoolsList + * MIT schools + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + schoolsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/schools/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof SchoolsApiSchoolsList + * MIT schools + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource school. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number + schoolsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("schoolsRetrieve", "id", id) + const localVarPath = `/api/v1/schools/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for schoolsRetrieve operation in SchoolsApi. + * SchoolsApi - functional programming interface * @export - * @interface SchoolsApiSchoolsRetrieveRequest */ -export interface SchoolsApiSchoolsRetrieveRequest { +export const SchoolsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = SchoolsApiAxiosParamCreator(configuration) + return { + /** + * MIT schools + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async schoolsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["SchoolsApi.schoolsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource school. - * @type {number} - * @memberof SchoolsApiSchoolsRetrieve + * MIT schools + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource school. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async schoolsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.schoolsRetrieve( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["SchoolsApi.schoolsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * SchoolsApi - object-oriented interface + * SchoolsApi - factory interface * @export - * @class SchoolsApi - * @extends {BaseAPI} */ -export class SchoolsApi extends BaseAPI { +export const SchoolsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = SchoolsApiFp(configuration) + return { /** * MIT schools * @summary List * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof SchoolsApi */ - public schoolsList(requestParameters: SchoolsApiSchoolsListRequest = {}, options?: RawAxiosRequestConfig) { - return SchoolsApiFp(this.configuration).schoolsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + schoolsList( + requestParameters: SchoolsApiSchoolsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .schoolsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(axios, basePath)) + }, /** * MIT schools * @summary Retrieve * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof SchoolsApi */ - public schoolsRetrieve(requestParameters: SchoolsApiSchoolsRetrieveRequest, options?: RawAxiosRequestConfig) { - return SchoolsApiFp(this.configuration).schoolsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + schoolsRetrieve( + requestParameters: SchoolsApiSchoolsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .schoolsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } - - /** - * TopicsApi - axios parameter creator + * Request parameters for schoolsList operation in SchoolsApi. * @export + * @interface SchoolsApiSchoolsListRequest */ -export const TopicsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Topics covered by learning resources - * @summary List - * @param {boolean} [is_toplevel] Filter top-level topics - * @param {number} [limit] Number of results to return per page. - * @param {Array} [name] Multiple values may be separated by commas. - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [parent_topic_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - topicsList: async (is_toplevel?: boolean, limit?: number, name?: Array, offset?: number, parent_topic_id?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/topics/`; - // 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 (is_toplevel !== undefined) { - localVarQueryParameter['is_toplevel'] = is_toplevel; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (name) { - localVarQueryParameter['name'] = name.join(COLLECTION_FORMATS.csv); - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (parent_topic_id) { - localVarQueryParameter['parent_topic_id'] = parent_topic_id.join(COLLECTION_FORMATS.csv); - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Topics covered by learning resources - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource topic. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - topicsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('topicsRetrieve', 'id', id) - const localVarPath = `/api/v1/topics/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface SchoolsApiSchoolsListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof SchoolsApiSchoolsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof SchoolsApiSchoolsList + */ + readonly offset?: number +} /** - * TopicsApi - functional programming interface + * Request parameters for schoolsRetrieve operation in SchoolsApi. * @export + * @interface SchoolsApiSchoolsRetrieveRequest */ -export const TopicsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = TopicsApiAxiosParamCreator(configuration) - return { - /** - * Topics covered by learning resources - * @summary List - * @param {boolean} [is_toplevel] Filter top-level topics - * @param {number} [limit] Number of results to return per page. - * @param {Array} [name] Multiple values may be separated by commas. - * @param {number} [offset] The initial index from which to return the results. - * @param {Array} [parent_topic_id] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async topicsList(is_toplevel?: boolean, limit?: number, name?: Array, offset?: number, parent_topic_id?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.topicsList(is_toplevel, limit, name, offset, parent_topic_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['TopicsApi.topicsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Topics covered by learning resources - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource topic. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async topicsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.topicsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['TopicsApi.topicsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface SchoolsApiSchoolsRetrieveRequest { + /** + * A unique integer value identifying this learning resource school. + * @type {number} + * @memberof SchoolsApiSchoolsRetrieve + */ + readonly id: number +} /** - * TopicsApi - factory interface + * SchoolsApi - object-oriented interface * @export + * @class SchoolsApi + * @extends {BaseAPI} */ -export const TopicsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = TopicsApiFp(configuration) - return { - /** - * Topics covered by learning resources - * @summary List - * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - topicsList(requestParameters: TopicsApiTopicsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.topicsList(requestParameters.is_toplevel, requestParameters.limit, requestParameters.name, requestParameters.offset, requestParameters.parent_topic_id, options).then((request) => request(axios, basePath)); - }, - /** - * Topics covered by learning resources - * @summary Retrieve - * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - topicsRetrieve(requestParameters: TopicsApiTopicsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.topicsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export class SchoolsApi extends BaseAPI { + /** + * MIT schools + * @summary List + * @param {SchoolsApiSchoolsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchoolsApi + */ + public schoolsList( + requestParameters: SchoolsApiSchoolsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return SchoolsApiFp(this.configuration) + .schoolsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * MIT schools + * @summary Retrieve + * @param {SchoolsApiSchoolsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchoolsApi + */ + public schoolsRetrieve( + requestParameters: SchoolsApiSchoolsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return SchoolsApiFp(this.configuration) + .schoolsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } +} /** - * Request parameters for topicsList operation in TopicsApi. + * TopicsApi - axios parameter creator * @export - * @interface TopicsApiTopicsListRequest */ -export interface TopicsApiTopicsListRequest { - /** - * Filter top-level topics - * @type {boolean} - * @memberof TopicsApiTopicsList - */ - readonly is_toplevel?: boolean - - /** - * Number of results to return per page. - * @type {number} - * @memberof TopicsApiTopicsList - */ - readonly limit?: number - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof TopicsApiTopicsList - */ - readonly name?: Array - +export const TopicsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * The initial index from which to return the results. - * @type {number} - * @memberof TopicsApiTopicsList + * Topics covered by learning resources + * @summary List + * @param {boolean} [is_toplevel] Filter top-level topics + * @param {number} [limit] Number of results to return per page. + * @param {Array} [name] Multiple values may be separated by commas. + * @param {number} [offset] The initial index from which to return the results. + * @param {Array} [parent_topic_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number - + topicsList: async ( + is_toplevel?: boolean, + limit?: number, + name?: Array, + offset?: number, + parent_topic_id?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/topics/` + // 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 (is_toplevel !== undefined) { + localVarQueryParameter["is_toplevel"] = is_toplevel + } + + if (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (name) { + localVarQueryParameter["name"] = name.join(COLLECTION_FORMATS.csv) + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (parent_topic_id) { + localVarQueryParameter["parent_topic_id"] = parent_topic_id.join( + COLLECTION_FORMATS.csv, + ) + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof TopicsApiTopicsList + * Topics covered by learning resources + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource topic. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly parent_topic_id?: Array + topicsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("topicsRetrieve", "id", id) + const localVarPath = `/api/v1/topics/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for topicsRetrieve operation in TopicsApi. + * TopicsApi - functional programming interface * @export - * @interface TopicsApiTopicsRetrieveRequest */ -export interface TopicsApiTopicsRetrieveRequest { +export const TopicsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = TopicsApiAxiosParamCreator(configuration) + return { + /** + * Topics covered by learning resources + * @summary List + * @param {boolean} [is_toplevel] Filter top-level topics + * @param {number} [limit] Number of results to return per page. + * @param {Array} [name] Multiple values may be separated by commas. + * @param {number} [offset] The initial index from which to return the results. + * @param {Array} [parent_topic_id] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topicsList( + is_toplevel?: boolean, + limit?: number, + name?: Array, + offset?: number, + parent_topic_id?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.topicsList( + is_toplevel, + limit, + name, + offset, + parent_topic_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["TopicsApi.topicsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource topic. - * @type {number} - * @memberof TopicsApiTopicsRetrieve + * Topics covered by learning resources + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource topic. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async topicsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.topicsRetrieve( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["TopicsApi.topicsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * TopicsApi - object-oriented interface + * TopicsApi - factory interface * @export - * @class TopicsApi - * @extends {BaseAPI} */ -export class TopicsApi extends BaseAPI { +export const TopicsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = TopicsApiFp(configuration) + return { /** * Topics covered by learning resources * @summary List * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TopicsApi */ - public topicsList(requestParameters: TopicsApiTopicsListRequest = {}, options?: RawAxiosRequestConfig) { - return TopicsApiFp(this.configuration).topicsList(requestParameters.is_toplevel, requestParameters.limit, requestParameters.name, requestParameters.offset, requestParameters.parent_topic_id, options).then((request) => request(this.axios, this.basePath)); - } - + topicsList( + requestParameters: TopicsApiTopicsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .topicsList( + requestParameters.is_toplevel, + requestParameters.limit, + requestParameters.name, + requestParameters.offset, + requestParameters.parent_topic_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Topics covered by learning resources * @summary Retrieve * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof TopicsApi */ - public topicsRetrieve(requestParameters: TopicsApiTopicsRetrieveRequest, options?: RawAxiosRequestConfig) { - return TopicsApiFp(this.configuration).topicsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + topicsRetrieve( + requestParameters: TopicsApiTopicsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .topicsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } } - - -/** - * UserlistsApi - axios parameter creator - * @export - */ -export const UserlistsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Viewset for UserLists - * @summary Create - * @param {UserListRequest} UserListRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsCreate: async (UserListRequest: UserListRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'UserListRequest' is not null or undefined - assertParamExists('userlistsCreate', 'UserListRequest', UserListRequest) - const localVarPath = `/api/v1/userlists/`; - // 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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(UserListRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserLists - * @summary Destroy - * @param {number} id A unique integer value identifying this user list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsDestroy: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('userlistsDestroy', 'id', id) - const localVarPath = `/api/v1/userlists/{id}/` - .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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Add - * @param {number} userlist_id id of the parent user list - * @param {UserListRelationshipRequest} UserListRelationshipRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsCreate: async (userlist_id: number, UserListRelationshipRequest: UserListRelationshipRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists('userlistsItemsCreate', 'userlist_id', userlist_id) - // verify required parameter 'UserListRelationshipRequest' is not null or undefined - assertParamExists('userlistsItemsCreate', 'UserListRelationshipRequest', UserListRelationshipRequest) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/` - .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(UserListRelationshipRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Remove - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsDestroy: async (id: number, userlist_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('userlistsItemsDestroy', 'id', id) - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists('userlistsItemsDestroy', 'userlist_id', userlist_id) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources List - * @param {number} userlist_id id of the parent user list - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsList: async (userlist_id: number, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists('userlistsItemsList', 'userlist_id', userlist_id) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/` - .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Update - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsPartialUpdate: async (id: number, userlist_id: number, PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('userlistsItemsPartialUpdate', 'id', id) - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists('userlistsItemsPartialUpdate', 'userlist_id', userlist_id) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedUserListRelationshipRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources Retrieve - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsRetrieve: async (id: number, userlist_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('userlistsItemsRetrieve', 'id', id) - // verify required parameter 'userlist_id' is not null or undefined - assertParamExists('userlistsItemsRetrieve', 'userlist_id', userlist_id) - const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserLists - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsList: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/userlists/`; - // 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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserLists - * @summary Update - * @param {number} id A unique integer value identifying this user list. - * @param {PatchedUserListRequest} [PatchedUserListRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsPartialUpdate: async (id: number, PatchedUserListRequest?: PatchedUserListRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('userlistsPartialUpdate', 'id', id) - const localVarPath = `/api/v1/userlists/{id}/` - .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: 'PATCH', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(PatchedUserListRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Viewset for UserLists - * @summary Retrieve - * @param {number} id A unique integer value identifying this user list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('userlistsRetrieve', 'id', id) - const localVarPath = `/api/v1/userlists/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; - /** - * UserlistsApi - functional programming interface - * @export - */ -export const UserlistsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = UserlistsApiAxiosParamCreator(configuration) - return { - /** - * Viewset for UserLists - * @summary Create - * @param {UserListRequest} UserListRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsCreate(UserListRequest: UserListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsCreate(UserListRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserLists - * @summary Destroy - * @param {number} id A unique integer value identifying this user list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsDestroy(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsDestroy(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Add - * @param {number} userlist_id id of the parent user list - * @param {UserListRelationshipRequest} UserListRelationshipRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsItemsCreate(userlist_id: number, UserListRelationshipRequest: UserListRelationshipRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsItemsCreate(userlist_id, UserListRelationshipRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsItemsCreate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Remove - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsItemsDestroy(id: number, userlist_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsItemsDestroy(id, userlist_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsItemsDestroy']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources List - * @param {number} userlist_id id of the parent user list - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsItemsList(userlist_id: number, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsItemsList(userlist_id, limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsItemsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Update - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsItemsPartialUpdate(id: number, userlist_id: number, PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsItemsPartialUpdate(id, userlist_id, PatchedUserListRelationshipRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsItemsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources Retrieve - * @param {number} id A unique integer value identifying this user list relationship. - * @param {number} userlist_id id of the parent user list - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsItemsRetrieve(id: number, userlist_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsItemsRetrieve(id, userlist_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsItemsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserLists - * @summary List - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsList(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsList(limit, offset, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserLists - * @summary Update - * @param {number} id A unique integer value identifying this user list. - * @param {PatchedUserListRequest} [PatchedUserListRequest] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsPartialUpdate(id: number, PatchedUserListRequest?: PatchedUserListRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsPartialUpdate(id, PatchedUserListRequest, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsPartialUpdate']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Viewset for UserLists - * @summary Retrieve - * @param {number} id A unique integer value identifying this user list. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async userlistsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['UserlistsApi.userlistsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; - -/** - * UserlistsApi - factory interface + * Request parameters for topicsList operation in TopicsApi. * @export + * @interface TopicsApiTopicsListRequest */ -export const UserlistsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = UserlistsApiFp(configuration) - return { - /** - * Viewset for UserLists - * @summary Create - * @param {UserlistsApiUserlistsCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsCreate(requestParameters: UserlistsApiUserlistsCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsCreate(requestParameters.UserListRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserLists - * @summary Destroy - * @param {UserlistsApiUserlistsDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsDestroy(requestParameters: UserlistsApiUserlistsDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsDestroy(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Add - * @param {UserlistsApiUserlistsItemsCreateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsCreate(requestParameters: UserlistsApiUserlistsItemsCreateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsItemsCreate(requestParameters.userlist_id, requestParameters.UserListRelationshipRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Remove - * @param {UserlistsApiUserlistsItemsDestroyRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsDestroy(requestParameters: UserlistsApiUserlistsItemsDestroyRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsItemsDestroy(requestParameters.id, requestParameters.userlist_id, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources List - * @param {UserlistsApiUserlistsItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsList(requestParameters: UserlistsApiUserlistsItemsListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsItemsList(requestParameters.userlist_id, requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resource Relationship Update - * @param {UserlistsApiUserlistsItemsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsPartialUpdate(requestParameters: UserlistsApiUserlistsItemsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsItemsPartialUpdate(requestParameters.id, requestParameters.userlist_id, requestParameters.PatchedUserListRelationshipRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserListRelationships - * @summary User List Resources Retrieve - * @param {UserlistsApiUserlistsItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsItemsRetrieve(requestParameters: UserlistsApiUserlistsItemsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsItemsRetrieve(requestParameters.id, requestParameters.userlist_id, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserLists - * @summary List - * @param {UserlistsApiUserlistsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsList(requestParameters: UserlistsApiUserlistsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserLists - * @summary Update - * @param {UserlistsApiUserlistsPartialUpdateRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsPartialUpdate(requestParameters: UserlistsApiUserlistsPartialUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsPartialUpdate(requestParameters.id, requestParameters.PatchedUserListRequest, options).then((request) => request(axios, basePath)); - }, - /** - * Viewset for UserLists - * @summary Retrieve - * @param {UserlistsApiUserlistsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - userlistsRetrieve(requestParameters: UserlistsApiUserlistsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.userlistsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface TopicsApiTopicsListRequest { + /** + * Filter top-level topics + * @type {boolean} + * @memberof TopicsApiTopicsList + */ + readonly is_toplevel?: boolean + + /** + * Number of results to return per page. + * @type {number} + * @memberof TopicsApiTopicsList + */ + readonly limit?: number + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof TopicsApiTopicsList + */ + readonly name?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof TopicsApiTopicsList + */ + readonly offset?: number + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof TopicsApiTopicsList + */ + readonly parent_topic_id?: Array +} /** - * Request parameters for userlistsCreate operation in UserlistsApi. + * Request parameters for topicsRetrieve operation in TopicsApi. * @export - * @interface UserlistsApiUserlistsCreateRequest + * @interface TopicsApiTopicsRetrieveRequest */ -export interface UserlistsApiUserlistsCreateRequest { - /** - * - * @type {UserListRequest} - * @memberof UserlistsApiUserlistsCreate - */ - readonly UserListRequest: UserListRequest +export interface TopicsApiTopicsRetrieveRequest { + /** + * A unique integer value identifying this learning resource topic. + * @type {number} + * @memberof TopicsApiTopicsRetrieve + */ + readonly id: number } /** - * Request parameters for userlistsDestroy operation in UserlistsApi. + * TopicsApi - object-oriented interface * @export - * @interface UserlistsApiUserlistsDestroyRequest + * @class TopicsApi + * @extends {BaseAPI} */ -export interface UserlistsApiUserlistsDestroyRequest { - /** - * A unique integer value identifying this user list. - * @type {number} - * @memberof UserlistsApiUserlistsDestroy - */ - readonly id: number +export class TopicsApi extends BaseAPI { + /** + * Topics covered by learning resources + * @summary List + * @param {TopicsApiTopicsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TopicsApi + */ + public topicsList( + requestParameters: TopicsApiTopicsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return TopicsApiFp(this.configuration) + .topicsList( + requestParameters.is_toplevel, + requestParameters.limit, + requestParameters.name, + requestParameters.offset, + requestParameters.parent_topic_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Topics covered by learning resources + * @summary Retrieve + * @param {TopicsApiTopicsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TopicsApi + */ + public topicsRetrieve( + requestParameters: TopicsApiTopicsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return TopicsApiFp(this.configuration) + .topicsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** - * Request parameters for userlistsItemsCreate operation in UserlistsApi. + * UserlistsApi - axios parameter creator * @export - * @interface UserlistsApiUserlistsItemsCreateRequest */ -export interface UserlistsApiUserlistsItemsCreateRequest { +export const UserlistsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * id of the parent user list - * @type {number} - * @memberof UserlistsApiUserlistsItemsCreate + * Viewset for UserLists + * @summary Create + * @param {UserListRequest} UserListRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly userlist_id: number - + userlistsCreate: async ( + UserListRequest: UserListRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'UserListRequest' is not null or undefined + assertParamExists("userlistsCreate", "UserListRequest", UserListRequest) + const localVarPath = `/api/v1/userlists/` + // 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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + UserListRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {UserListRelationshipRequest} - * @memberof UserlistsApiUserlistsItemsCreate + * Viewset for UserLists + * @summary Destroy + * @param {number} id A unique integer value identifying this user list. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly UserListRelationshipRequest: UserListRelationshipRequest -} - -/** - * Request parameters for userlistsItemsDestroy operation in UserlistsApi. - * @export - * @interface UserlistsApiUserlistsItemsDestroyRequest - */ -export interface UserlistsApiUserlistsItemsDestroyRequest { + userlistsDestroy: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("userlistsDestroy", "id", id) + const localVarPath = `/api/v1/userlists/{id}/`.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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this user list relationship. - * @type {number} - * @memberof UserlistsApiUserlistsItemsDestroy + * Viewset for UserListRelationships + * @summary User List Resource Relationship Add + * @param {number} userlist_id id of the parent user list + * @param {UserListRelationshipRequest} UserListRelationshipRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + userlistsItemsCreate: async ( + userlist_id: number, + UserListRelationshipRequest: UserListRelationshipRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsCreate", "userlist_id", userlist_id) + // verify required parameter 'UserListRelationshipRequest' is not null or undefined + assertParamExists( + "userlistsItemsCreate", + "UserListRelationshipRequest", + UserListRelationshipRequest, + ) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/`.replace( + `{${"userlist_id"}}`, + encodeURIComponent(String(userlist_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: "POST", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + UserListRelationshipRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * id of the parent user list - * @type {number} - * @memberof UserlistsApiUserlistsItemsDestroy + * Viewset for UserListRelationships + * @summary User List Resource Relationship Remove + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly userlist_id: number -} - -/** - * Request parameters for userlistsItemsList operation in UserlistsApi. - * @export - * @interface UserlistsApiUserlistsItemsListRequest - */ -export interface UserlistsApiUserlistsItemsListRequest { + userlistsItemsDestroy: async ( + id: number, + userlist_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("userlistsItemsDestroy", "id", id) + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsDestroy", "userlist_id", userlist_id) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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: "DELETE", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * id of the parent user list - * @type {number} - * @memberof UserlistsApiUserlistsItemsList + * Viewset for UserListRelationships + * @summary User List Resources List + * @param {number} userlist_id id of the parent user list + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly userlist_id: number - + userlistsItemsList: async ( + userlist_id: number, + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsList", "userlist_id", userlist_id) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/`.replace( + `{${"userlist_id"}}`, + encodeURIComponent(String(userlist_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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Number of results to return per page. - * @type {number} - * @memberof UserlistsApiUserlistsItemsList + * Viewset for UserListRelationships + * @summary User List Resource Relationship Update + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + userlistsItemsPartialUpdate: async ( + id: number, + userlist_id: number, + PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("userlistsItemsPartialUpdate", "id", id) + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists( + "userlistsItemsPartialUpdate", + "userlist_id", + userlist_id, + ) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedUserListRelationshipRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof UserlistsApiUserlistsItemsList + * Viewset for UserListRelationships + * @summary User List Resources Retrieve + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number -} - -/** - * Request parameters for userlistsItemsPartialUpdate operation in UserlistsApi. - * @export - * @interface UserlistsApiUserlistsItemsPartialUpdateRequest - */ -export interface UserlistsApiUserlistsItemsPartialUpdateRequest { + userlistsItemsRetrieve: async ( + id: number, + userlist_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("userlistsItemsRetrieve", "id", id) + // verify required parameter 'userlist_id' is not null or undefined + assertParamExists("userlistsItemsRetrieve", "userlist_id", userlist_id) + const localVarPath = `/api/v1/userlists/{userlist_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"userlist_id"}}`, encodeURIComponent(String(userlist_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * A unique integer value identifying this user list relationship. - * @type {number} - * @memberof UserlistsApiUserlistsItemsPartialUpdate + * Viewset for UserLists + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + userlistsList: async ( + limit?: number, + offset?: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/userlists/` + // 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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * id of the parent user list - * @type {number} - * @memberof UserlistsApiUserlistsItemsPartialUpdate + * Viewset for UserLists + * @summary Update + * @param {number} id A unique integer value identifying this user list. + * @param {PatchedUserListRequest} [PatchedUserListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly userlist_id: number - + userlistsPartialUpdate: async ( + id: number, + PatchedUserListRequest?: PatchedUserListRequest, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("userlistsPartialUpdate", "id", id) + const localVarPath = `/api/v1/userlists/{id}/`.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: "PATCH", + ...baseOptions, + ...options, + } + const localVarHeaderParameter = {} as any + const localVarQueryParameter = {} as any + + localVarHeaderParameter["Content-Type"] = "application/json" + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + localVarRequestOptions.data = serializeDataIfNeeded( + PatchedUserListRequest, + localVarRequestOptions, + configuration, + ) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {PatchedUserListRelationshipRequest} - * @memberof UserlistsApiUserlistsItemsPartialUpdate + * Viewset for UserLists + * @summary Retrieve + * @param {number} id A unique integer value identifying this user list. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest + userlistsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("userlistsRetrieve", "id", id) + const localVarPath = `/api/v1/userlists/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } } /** - * Request parameters for userlistsItemsRetrieve operation in UserlistsApi. + * UserlistsApi - functional programming interface * @export - * @interface UserlistsApiUserlistsItemsRetrieveRequest */ -export interface UserlistsApiUserlistsItemsRetrieveRequest { +export const UserlistsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = UserlistsApiAxiosParamCreator(configuration) + return { /** - * A unique integer value identifying this user list relationship. - * @type {number} - * @memberof UserlistsApiUserlistsItemsRetrieve + * Viewset for UserLists + * @summary Create + * @param {UserListRequest} UserListRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async userlistsCreate( + UserListRequest: UserListRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsCreate( + UserListRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * id of the parent user list - * @type {number} - * @memberof UserlistsApiUserlistsItemsRetrieve + * Viewset for UserLists + * @summary Destroy + * @param {number} id A unique integer value identifying this user list. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly userlist_id: number -} - -/** - * Request parameters for userlistsList operation in UserlistsApi. - * @export - * @interface UserlistsApiUserlistsListRequest - */ -export interface UserlistsApiUserlistsListRequest { + async userlistsDestroy( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsDestroy(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsDestroy"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Number of results to return per page. - * @type {number} - * @memberof UserlistsApiUserlistsList + * Viewset for UserListRelationships + * @summary User List Resource Relationship Add + * @param {number} userlist_id id of the parent user list + * @param {UserListRelationshipRequest} UserListRelationshipRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly limit?: number - + async userlistsItemsCreate( + userlist_id: number, + UserListRelationshipRequest: UserListRelationshipRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsItemsCreate( + userlist_id, + UserListRelationshipRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsItemsCreate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * The initial index from which to return the results. - * @type {number} - * @memberof UserlistsApiUserlistsList + * Viewset for UserListRelationships + * @summary User List Resource Relationship Remove + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly offset?: number -} - -/** - * Request parameters for userlistsPartialUpdate operation in UserlistsApi. - * @export - * @interface UserlistsApiUserlistsPartialUpdateRequest - */ -export interface UserlistsApiUserlistsPartialUpdateRequest { + async userlistsItemsDestroy( + id: number, + userlist_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsItemsDestroy( + id, + userlist_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsItemsDestroy"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this user list. - * @type {number} - * @memberof UserlistsApiUserlistsPartialUpdate + * Viewset for UserListRelationships + * @summary User List Resources List + * @param {number} userlist_id id of the parent user list + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number - + async userlistsItemsList( + userlist_id: number, + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsItemsList( + userlist_id, + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsItemsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * - * @type {PatchedUserListRequest} - * @memberof UserlistsApiUserlistsPartialUpdate + * Viewset for UserListRelationships + * @summary User List Resource Relationship Update + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {PatchedUserListRelationshipRequest} [PatchedUserListRelationshipRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly PatchedUserListRequest?: PatchedUserListRequest -} - -/** - * Request parameters for userlistsRetrieve operation in UserlistsApi. - * @export - * @interface UserlistsApiUserlistsRetrieveRequest - */ -export interface UserlistsApiUserlistsRetrieveRequest { + async userlistsItemsPartialUpdate( + id: number, + userlist_id: number, + PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsItemsPartialUpdate( + id, + userlist_id, + PatchedUserListRelationshipRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsItemsPartialUpdate"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Viewset for UserListRelationships + * @summary User List Resources Retrieve + * @param {number} id A unique integer value identifying this user list relationship. + * @param {number} userlist_id id of the parent user list + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userlistsItemsRetrieve( + id: number, + userlist_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsItemsRetrieve( + id, + userlist_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsItemsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Viewset for UserLists + * @summary List + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userlistsList( + limit?: number, + offset?: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.userlistsList( + limit, + offset, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this user list. - * @type {number} - * @memberof UserlistsApiUserlistsRetrieve + * Viewset for UserLists + * @summary Update + * @param {number} id A unique integer value identifying this user list. + * @param {PatchedUserListRequest} [PatchedUserListRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userlistsPartialUpdate( + id: number, + PatchedUserListRequest?: PatchedUserListRequest, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsPartialUpdate( + id, + PatchedUserListRequest, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsPartialUpdate"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Viewset for UserLists + * @summary Retrieve + * @param {number} id A unique integer value identifying this user list. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async userlistsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.userlistsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["UserlistsApi.userlistsRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * UserlistsApi - object-oriented interface + * UserlistsApi - factory interface * @export - * @class UserlistsApi - * @extends {BaseAPI} */ -export class UserlistsApi extends BaseAPI { +export const UserlistsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = UserlistsApiFp(configuration) + return { /** * Viewset for UserLists * @summary Create * @param {UserlistsApiUserlistsCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsCreate(requestParameters: UserlistsApiUserlistsCreateRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsCreate(requestParameters.UserListRequest, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsCreate( + requestParameters: UserlistsApiUserlistsCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsCreate(requestParameters.UserListRequest, options) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserLists * @summary Destroy * @param {UserlistsApiUserlistsDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsDestroy(requestParameters: UserlistsApiUserlistsDestroyRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsDestroy(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsDestroy( + requestParameters: UserlistsApiUserlistsDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsDestroy(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserListRelationships * @summary User List Resource Relationship Add * @param {UserlistsApiUserlistsItemsCreateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsItemsCreate(requestParameters: UserlistsApiUserlistsItemsCreateRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsItemsCreate(requestParameters.userlist_id, requestParameters.UserListRelationshipRequest, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsItemsCreate( + requestParameters: UserlistsApiUserlistsItemsCreateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsItemsCreate( + requestParameters.userlist_id, + requestParameters.UserListRelationshipRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserListRelationships * @summary User List Resource Relationship Remove * @param {UserlistsApiUserlistsItemsDestroyRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsItemsDestroy(requestParameters: UserlistsApiUserlistsItemsDestroyRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsItemsDestroy(requestParameters.id, requestParameters.userlist_id, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsItemsDestroy( + requestParameters: UserlistsApiUserlistsItemsDestroyRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsItemsDestroy( + requestParameters.id, + requestParameters.userlist_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserListRelationships * @summary User List Resources List * @param {UserlistsApiUserlistsItemsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsItemsList(requestParameters: UserlistsApiUserlistsItemsListRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsItemsList(requestParameters.userlist_id, requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsItemsList( + requestParameters: UserlistsApiUserlistsItemsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsItemsList( + requestParameters.userlist_id, + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserListRelationships * @summary User List Resource Relationship Update * @param {UserlistsApiUserlistsItemsPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsItemsPartialUpdate(requestParameters: UserlistsApiUserlistsItemsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsItemsPartialUpdate(requestParameters.id, requestParameters.userlist_id, requestParameters.PatchedUserListRelationshipRequest, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsItemsPartialUpdate( + requestParameters: UserlistsApiUserlistsItemsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsItemsPartialUpdate( + requestParameters.id, + requestParameters.userlist_id, + requestParameters.PatchedUserListRelationshipRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserListRelationships * @summary User List Resources Retrieve * @param {UserlistsApiUserlistsItemsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsItemsRetrieve(requestParameters: UserlistsApiUserlistsItemsRetrieveRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsItemsRetrieve(requestParameters.id, requestParameters.userlist_id, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsItemsRetrieve( + requestParameters: UserlistsApiUserlistsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsItemsRetrieve( + requestParameters.id, + requestParameters.userlist_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserLists * @summary List * @param {UserlistsApiUserlistsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsList(requestParameters: UserlistsApiUserlistsListRequest = {}, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsList(requestParameters.limit, requestParameters.offset, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsList( + requestParameters: UserlistsApiUserlistsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsList( + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserLists * @summary Update * @param {UserlistsApiUserlistsPartialUpdateRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsPartialUpdate(requestParameters: UserlistsApiUserlistsPartialUpdateRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsPartialUpdate(requestParameters.id, requestParameters.PatchedUserListRequest, options).then((request) => request(this.axios, this.basePath)); - } - + userlistsPartialUpdate( + requestParameters: UserlistsApiUserlistsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsPartialUpdate( + requestParameters.id, + requestParameters.PatchedUserListRequest, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Viewset for UserLists * @summary Retrieve * @param {UserlistsApiUserlistsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof UserlistsApi */ - public userlistsRetrieve(requestParameters: UserlistsApiUserlistsRetrieveRequest, options?: RawAxiosRequestConfig) { - return UserlistsApiFp(this.configuration).userlistsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + userlistsRetrieve( + requestParameters: UserlistsApiUserlistsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .userlistsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for userlistsCreate operation in UserlistsApi. + * @export + * @interface UserlistsApiUserlistsCreateRequest + */ +export interface UserlistsApiUserlistsCreateRequest { + /** + * + * @type {UserListRequest} + * @memberof UserlistsApiUserlistsCreate + */ + readonly UserListRequest: UserListRequest } +/** + * Request parameters for userlistsDestroy operation in UserlistsApi. + * @export + * @interface UserlistsApiUserlistsDestroyRequest + */ +export interface UserlistsApiUserlistsDestroyRequest { + /** + * A unique integer value identifying this user list. + * @type {number} + * @memberof UserlistsApiUserlistsDestroy + */ + readonly id: number +} +/** + * Request parameters for userlistsItemsCreate operation in UserlistsApi. + * @export + * @interface UserlistsApiUserlistsItemsCreateRequest + */ +export interface UserlistsApiUserlistsItemsCreateRequest { + /** + * id of the parent user list + * @type {number} + * @memberof UserlistsApiUserlistsItemsCreate + */ + readonly userlist_id: number + + /** + * + * @type {UserListRelationshipRequest} + * @memberof UserlistsApiUserlistsItemsCreate + */ + readonly UserListRelationshipRequest: UserListRelationshipRequest +} /** - * VideoPlaylistsApi - axios parameter creator + * Request parameters for userlistsItemsDestroy operation in UserlistsApi. * @export + * @interface UserlistsApiUserlistsItemsDestroyRequest */ -export const VideoPlaylistsApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {number} learning_resource_id id of the parent learning resource - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsItemsList: async (learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('videoPlaylistsItemsList', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/video_playlists/{learning_resource_id}/items/` - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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 (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } - - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } - - if (sortby !== undefined) { - localVarQueryParameter['sortby'] = sortby; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsItemsRetrieve: async (id: number, learning_resource_id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('videoPlaylistsItemsRetrieve', 'id', id) - // verify required parameter 'learning_resource_id' is not null or undefined - assertParamExists('videoPlaylistsItemsRetrieve', 'learning_resource_id', learning_resource_id) - const localVarPath = `/api/v1/video_playlists/{learning_resource_id}/items/{id}/` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"learning_resource_id"}}`, encodeURIComponent(String(learning_resource_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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Get a paginated list of video playlists - * @summary List - * @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] Number of results to return per page. - * @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 {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsList: async (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?: VideoPlaylistsListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/video_playlists/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('videoPlaylistsRetrieve', 'id', id) - const localVarPath = `/api/v1/video_playlists/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export interface UserlistsApiUserlistsItemsDestroyRequest { + /** + * A unique integer value identifying this user list relationship. + * @type {number} + * @memberof UserlistsApiUserlistsItemsDestroy + */ + readonly id: number + + /** + * id of the parent user list + * @type {number} + * @memberof UserlistsApiUserlistsItemsDestroy + */ + readonly userlist_id: number +} /** - * VideoPlaylistsApi - functional programming interface + * Request parameters for userlistsItemsList operation in UserlistsApi. * @export + * @interface UserlistsApiUserlistsItemsListRequest */ -export const VideoPlaylistsApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = VideoPlaylistsApiAxiosParamCreator(configuration) - return { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {number} learning_resource_id id of the parent learning resource - * @param {number} [limit] Number of results to return per page. - * @param {number} [offset] The initial index from which to return the results. - * @param {string} [sortby] Which field to use when ordering the results. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videoPlaylistsItemsList(learning_resource_id: number, limit?: number, offset?: number, sortby?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.videoPlaylistsItemsList(learning_resource_id, limit, offset, sortby, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['VideoPlaylistsApi.videoPlaylistsItemsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {number} id A unique integer value identifying this learning resource relationship. - * @param {number} learning_resource_id id of the parent learning resource - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videoPlaylistsItemsRetrieve(id: number, learning_resource_id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.videoPlaylistsItemsRetrieve(id, learning_resource_id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['VideoPlaylistsApi.videoPlaylistsItemsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Get a paginated list of video playlists - * @summary List - * @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] Number of results to return per page. - * @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 {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videoPlaylistsList(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?: VideoPlaylistsListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.videoPlaylistsList(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['VideoPlaylistsApi.videoPlaylistsList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videoPlaylistsRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.videoPlaylistsRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['VideoPlaylistsApi.videoPlaylistsRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export interface UserlistsApiUserlistsItemsListRequest { + /** + * id of the parent user list + * @type {number} + * @memberof UserlistsApiUserlistsItemsList + */ + readonly userlist_id: number + + /** + * Number of results to return per page. + * @type {number} + * @memberof UserlistsApiUserlistsItemsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof UserlistsApiUserlistsItemsList + */ + readonly offset?: number +} /** - * VideoPlaylistsApi - factory interface + * Request parameters for userlistsItemsPartialUpdate operation in UserlistsApi. * @export + * @interface UserlistsApiUserlistsItemsPartialUpdateRequest */ -export const VideoPlaylistsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = VideoPlaylistsApiFp(configuration) - return { - /** - * Get a list of related learning resources for a learning resource. - * @summary Nested Learning Resource List - * @param {VideoPlaylistsApiVideoPlaylistsItemsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsItemsList(requestParameters: VideoPlaylistsApiVideoPlaylistsItemsListRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.videoPlaylistsItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(axios, basePath)); - }, - /** - * Get a singe related learning resource for a learning resource. - * @summary Nested Learning Resource Retrieve - * @param {VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsItemsRetrieve(requestParameters: VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.videoPlaylistsItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(axios, basePath)); - }, - /** - * Get a paginated list of video playlists - * @summary List - * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsList(requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.videoPlaylistsList(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)); - }, - /** - * Retrieve a single video playlist - * @summary Retrieve - * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videoPlaylistsRetrieve(requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.videoPlaylistsRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export interface UserlistsApiUserlistsItemsPartialUpdateRequest { + /** + * A unique integer value identifying this user list relationship. + * @type {number} + * @memberof UserlistsApiUserlistsItemsPartialUpdate + */ + readonly id: number + + /** + * id of the parent user list + * @type {number} + * @memberof UserlistsApiUserlistsItemsPartialUpdate + */ + readonly userlist_id: number + + /** + * + * @type {PatchedUserListRelationshipRequest} + * @memberof UserlistsApiUserlistsItemsPartialUpdate + */ + readonly PatchedUserListRelationshipRequest?: PatchedUserListRelationshipRequest +} /** - * Request parameters for videoPlaylistsItemsList operation in VideoPlaylistsApi. + * Request parameters for userlistsItemsRetrieve operation in UserlistsApi. * @export - * @interface VideoPlaylistsApiVideoPlaylistsItemsListRequest + * @interface UserlistsApiUserlistsItemsRetrieveRequest */ -export interface VideoPlaylistsApiVideoPlaylistsItemsListRequest { - /** - * id of the parent learning resource - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly learning_resource_id: number +export interface UserlistsApiUserlistsItemsRetrieveRequest { + /** + * A unique integer value identifying this user list relationship. + * @type {number} + * @memberof UserlistsApiUserlistsItemsRetrieve + */ + readonly id: number + + /** + * id of the parent user list + * @type {number} + * @memberof UserlistsApiUserlistsItemsRetrieve + */ + readonly userlist_id: number +} - /** - * Number of results to return per page. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly limit?: number +/** + * Request parameters for userlistsList operation in UserlistsApi. + * @export + * @interface UserlistsApiUserlistsListRequest + */ +export interface UserlistsApiUserlistsListRequest { + /** + * Number of results to return per page. + * @type {number} + * @memberof UserlistsApiUserlistsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof UserlistsApiUserlistsList + */ + readonly offset?: number +} - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly offset?: number +/** + * Request parameters for userlistsPartialUpdate operation in UserlistsApi. + * @export + * @interface UserlistsApiUserlistsPartialUpdateRequest + */ +export interface UserlistsApiUserlistsPartialUpdateRequest { + /** + * A unique integer value identifying this user list. + * @type {number} + * @memberof UserlistsApiUserlistsPartialUpdate + */ + readonly id: number + + /** + * + * @type {PatchedUserListRequest} + * @memberof UserlistsApiUserlistsPartialUpdate + */ + readonly PatchedUserListRequest?: PatchedUserListRequest +} - /** - * Which field to use when ordering the results. - * @type {string} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsList - */ - readonly sortby?: string +/** + * Request parameters for userlistsRetrieve operation in UserlistsApi. + * @export + * @interface UserlistsApiUserlistsRetrieveRequest + */ +export interface UserlistsApiUserlistsRetrieveRequest { + /** + * A unique integer value identifying this user list. + * @type {number} + * @memberof UserlistsApiUserlistsRetrieve + */ + readonly id: number } /** - * Request parameters for videoPlaylistsItemsRetrieve operation in VideoPlaylistsApi. + * UserlistsApi - object-oriented interface * @export - * @interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest + * @class UserlistsApi + * @extends {BaseAPI} */ -export interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest { - /** - * A unique integer value identifying this learning resource relationship. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve - */ - readonly id: number - - /** - * id of the parent learning resource - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve - */ - readonly learning_resource_id: number +export class UserlistsApi extends BaseAPI { + /** + * Viewset for UserLists + * @summary Create + * @param {UserlistsApiUserlistsCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsCreate( + requestParameters: UserlistsApiUserlistsCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsCreate(requestParameters.UserListRequest, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserLists + * @summary Destroy + * @param {UserlistsApiUserlistsDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsDestroy( + requestParameters: UserlistsApiUserlistsDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsDestroy(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserListRelationships + * @summary User List Resource Relationship Add + * @param {UserlistsApiUserlistsItemsCreateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsItemsCreate( + requestParameters: UserlistsApiUserlistsItemsCreateRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsItemsCreate( + requestParameters.userlist_id, + requestParameters.UserListRelationshipRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserListRelationships + * @summary User List Resource Relationship Remove + * @param {UserlistsApiUserlistsItemsDestroyRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsItemsDestroy( + requestParameters: UserlistsApiUserlistsItemsDestroyRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsItemsDestroy( + requestParameters.id, + requestParameters.userlist_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserListRelationships + * @summary User List Resources List + * @param {UserlistsApiUserlistsItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsItemsList( + requestParameters: UserlistsApiUserlistsItemsListRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsItemsList( + requestParameters.userlist_id, + requestParameters.limit, + requestParameters.offset, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserListRelationships + * @summary User List Resource Relationship Update + * @param {UserlistsApiUserlistsItemsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsItemsPartialUpdate( + requestParameters: UserlistsApiUserlistsItemsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsItemsPartialUpdate( + requestParameters.id, + requestParameters.userlist_id, + requestParameters.PatchedUserListRelationshipRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserListRelationships + * @summary User List Resources Retrieve + * @param {UserlistsApiUserlistsItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsItemsRetrieve( + requestParameters: UserlistsApiUserlistsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsItemsRetrieve( + requestParameters.id, + requestParameters.userlist_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserLists + * @summary List + * @param {UserlistsApiUserlistsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsList( + requestParameters: UserlistsApiUserlistsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsList(requestParameters.limit, requestParameters.offset, options) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserLists + * @summary Update + * @param {UserlistsApiUserlistsPartialUpdateRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsPartialUpdate( + requestParameters: UserlistsApiUserlistsPartialUpdateRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsPartialUpdate( + requestParameters.id, + requestParameters.PatchedUserListRequest, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Viewset for UserLists + * @summary Retrieve + * @param {UserlistsApiUserlistsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UserlistsApi + */ + public userlistsRetrieve( + requestParameters: UserlistsApiUserlistsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return UserlistsApiFp(this.configuration) + .userlistsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** - * Request parameters for videoPlaylistsList operation in VideoPlaylistsApi. + * VideoPlaylistsApi - axios parameter creator * @export - * @interface VideoPlaylistsApiVideoPlaylistsListRequest */ -export interface VideoPlaylistsApiVideoPlaylistsListRequest { - /** - * - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - 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 VideoPlaylistsApiVideoPlaylistsList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - 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'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - 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 VideoPlaylistsApiVideoPlaylistsList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - readonly limit?: number - +export const VideoPlaylistsApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { /** - * 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 VideoPlaylistsApiVideoPlaylistsList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsList - */ - 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 VideoPlaylistsApiVideoPlaylistsList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {number} learning_resource_id id of the parent learning resource + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly platform?: Array - + videoPlaylistsItemsList: async ( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "videoPlaylistsItemsList", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/video_playlists/{learning_resource_id}/items/`.replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 (limit !== undefined) { + localVarQueryParameter["limit"] = limit + } + + if (offset !== undefined) { + localVarQueryParameter["offset"] = offset + } + + if (sortby !== undefined) { + localVarQueryParameter["sortby"] = sortby + } + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * - * @type {boolean} - * @memberof VideoPlaylistsApiVideoPlaylistsList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly professional?: boolean - + videoPlaylistsItemsRetrieve: async ( + id: number, + learning_resource_id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("videoPlaylistsItemsRetrieve", "id", id) + // verify required parameter 'learning_resource_id' is not null or undefined + assertParamExists( + "videoPlaylistsItemsRetrieve", + "learning_resource_id", + learning_resource_id, + ) + const localVarPath = + `/api/v1/video_playlists/{learning_resource_id}/items/{id}/` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace( + `{${"learning_resource_id"}}`, + encodeURIComponent(String(learning_resource_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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsList + * Get a paginated list of video playlists + * @summary List + * @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] Number of results to return per page. + * @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 {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly readable_id?: Array - + videoPlaylistsList: async ( + 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?: VideoPlaylistsListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/video_playlists/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof VideoPlaylistsApiVideoPlaylistsList + * Retrieve a single video playlist + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_category?: Array + videoPlaylistsRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("videoPlaylistsRetrieve", "id", id) + const localVarPath = `/api/v1/video_playlists/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} +/** + * VideoPlaylistsApi - functional programming interface + * @export + */ +export const VideoPlaylistsApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = + VideoPlaylistsApiAxiosParamCreator(configuration) + return { /** - * 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 VideoPlaylistsApiVideoPlaylistsList + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {number} learning_resource_id id of the parent learning resource + * @param {number} [limit] Number of results to return per page. + * @param {number} [offset] The initial index from which to return the results. + * @param {string} [sortby] Which field to use when ordering the results. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly resource_type?: Array - + async videoPlaylistsItemsList( + learning_resource_id: number, + limit?: number, + offset?: number, + sortby?: string, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.videoPlaylistsItemsList( + learning_resource_id, + limit, + offset, + sortby, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["VideoPlaylistsApi.videoPlaylistsItemsList"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * 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 VideoPlaylistsApiVideoPlaylistsList + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {number} id A unique integer value identifying this learning resource relationship. + * @param {number} learning_resource_id id of the parent learning resource + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly sortby?: VideoPlaylistsListSortbyEnum - + async videoPlaylistsItemsRetrieve( + id: number, + learning_resource_id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.videoPlaylistsItemsRetrieve( + id, + learning_resource_id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["VideoPlaylistsApi.videoPlaylistsItemsRetrieve"]?.[ + index + ]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideoPlaylistsApiVideoPlaylistsList + * Get a paginated list of video playlists + * @summary List + * @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] Number of results to return per page. + * @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 {VideoPlaylistsListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly topic?: Array -} - -/** - * Request parameters for videoPlaylistsRetrieve operation in VideoPlaylistsApi. - * @export - * @interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest - */ -export interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest { + async videoPlaylistsList( + 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?: VideoPlaylistsListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.videoPlaylistsList( + 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["VideoPlaylistsApi.videoPlaylistsList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof VideoPlaylistsApiVideoPlaylistsRetrieve + * Retrieve a single video playlist + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} */ - readonly id: number + async videoPlaylistsRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.videoPlaylistsRetrieve(id, options) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["VideoPlaylistsApi.videoPlaylistsRetrieve"]?.[index] + ?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } } /** - * VideoPlaylistsApi - object-oriented interface + * VideoPlaylistsApi - factory interface * @export - * @class VideoPlaylistsApi - * @extends {BaseAPI} */ -export class VideoPlaylistsApi extends BaseAPI { +export const VideoPlaylistsApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = VideoPlaylistsApiFp(configuration) + return { /** * Get a list of related learning resources for a learning resource. * @summary Nested Learning Resource List * @param {VideoPlaylistsApiVideoPlaylistsItemsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof VideoPlaylistsApi */ - public videoPlaylistsItemsList(requestParameters: VideoPlaylistsApiVideoPlaylistsItemsListRequest, options?: RawAxiosRequestConfig) { - return VideoPlaylistsApiFp(this.configuration).videoPlaylistsItemsList(requestParameters.learning_resource_id, requestParameters.limit, requestParameters.offset, requestParameters.sortby, options).then((request) => request(this.axios, this.basePath)); - } - + videoPlaylistsItemsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsItemsListRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videoPlaylistsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Get a singe related learning resource for a learning resource. * @summary Nested Learning Resource Retrieve * @param {VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof VideoPlaylistsApi */ - public videoPlaylistsItemsRetrieve(requestParameters: VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest, options?: RawAxiosRequestConfig) { - return VideoPlaylistsApiFp(this.configuration).videoPlaylistsItemsRetrieve(requestParameters.id, requestParameters.learning_resource_id, options).then((request) => request(this.axios, this.basePath)); - } - + videoPlaylistsItemsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videoPlaylistsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(axios, basePath)) + }, /** * Get a paginated list of video playlists * @summary List * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof VideoPlaylistsApi */ - public videoPlaylistsList(requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, options?: RawAxiosRequestConfig) { - return VideoPlaylistsApiFp(this.configuration).videoPlaylistsList(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)); - } - + videoPlaylistsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videoPlaylistsList( + 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)) + }, /** * Retrieve a single video playlist * @summary Retrieve * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof VideoPlaylistsApi */ - public videoPlaylistsRetrieve(requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, options?: RawAxiosRequestConfig) { - return VideoPlaylistsApiFp(this.configuration).videoPlaylistsRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + videoPlaylistsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videoPlaylistsRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} + +/** + * Request parameters for videoPlaylistsItemsList operation in VideoPlaylistsApi. + * @export + * @interface VideoPlaylistsApiVideoPlaylistsItemsListRequest + */ +export interface VideoPlaylistsApiVideoPlaylistsItemsListRequest { + /** + * id of the parent learning resource + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly learning_resource_id: number + + /** + * Number of results to return per page. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly limit?: number + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly offset?: number + + /** + * Which field to use when ordering the results. + * @type {string} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsList + */ + readonly sortby?: string +} + +/** + * Request parameters for videoPlaylistsItemsRetrieve operation in VideoPlaylistsApi. + * @export + * @interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest + */ +export interface VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest { + /** + * A unique integer value identifying this learning resource relationship. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve + */ + readonly id: number + + /** + * id of the parent learning resource + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsItemsRetrieve + */ + readonly learning_resource_id: number +} + +/** + * Request parameters for videoPlaylistsList operation in VideoPlaylistsApi. + * @export + * @interface VideoPlaylistsApiVideoPlaylistsListRequest + */ +export interface VideoPlaylistsApiVideoPlaylistsListRequest { + /** + * + * @type {boolean} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + 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 VideoPlaylistsApiVideoPlaylistsList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + 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'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + 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 VideoPlaylistsApiVideoPlaylistsList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + 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 VideoPlaylistsApiVideoPlaylistsList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + 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 VideoPlaylistsApiVideoPlaylistsList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly resource_category?: Array + + /** + * 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 VideoPlaylistsApiVideoPlaylistsList + */ + 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 VideoPlaylistsApiVideoPlaylistsList + */ + readonly sortby?: VideoPlaylistsListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideoPlaylistsApiVideoPlaylistsList + */ + readonly topic?: Array +} + +/** + * Request parameters for videoPlaylistsRetrieve operation in VideoPlaylistsApi. + * @export + * @interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest + */ +export interface VideoPlaylistsApiVideoPlaylistsRetrieveRequest { + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof VideoPlaylistsApiVideoPlaylistsRetrieve + */ + readonly id: number +} + +/** + * VideoPlaylistsApi - object-oriented interface + * @export + * @class VideoPlaylistsApi + * @extends {BaseAPI} + */ +export class VideoPlaylistsApi extends BaseAPI { + /** + * Get a list of related learning resources for a learning resource. + * @summary Nested Learning Resource List + * @param {VideoPlaylistsApiVideoPlaylistsItemsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsItemsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsItemsListRequest, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsItemsList( + requestParameters.learning_resource_id, + requestParameters.limit, + requestParameters.offset, + requestParameters.sortby, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a singe related learning resource for a learning resource. + * @summary Nested Learning Resource Retrieve + * @param {VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsItemsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsItemsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsItemsRetrieve( + requestParameters.id, + requestParameters.learning_resource_id, + options, + ) + .then((request) => request(this.axios, this.basePath)) + } + + /** + * Get a paginated list of video playlists + * @summary List + * @param {VideoPlaylistsApiVideoPlaylistsListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsList( + requestParameters: VideoPlaylistsApiVideoPlaylistsListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsList( + 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)) + } + + /** + * Retrieve a single video playlist + * @summary Retrieve + * @param {VideoPlaylistsApiVideoPlaylistsRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideoPlaylistsApi + */ + public videoPlaylistsRetrieve( + requestParameters: VideoPlaylistsApiVideoPlaylistsRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return VideoPlaylistsApiFp(this.configuration) + .videoPlaylistsRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const VideoPlaylistsListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type VideoPlaylistsListCertificationTypeEnum = typeof VideoPlaylistsListCertificationTypeEnum[keyof typeof VideoPlaylistsListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type VideoPlaylistsListCertificationTypeEnum = + (typeof VideoPlaylistsListCertificationTypeEnum)[keyof typeof VideoPlaylistsListCertificationTypeEnum] /** * @export */ export const VideoPlaylistsListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type VideoPlaylistsListDeliveryEnum = typeof VideoPlaylistsListDeliveryEnum[keyof typeof 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', - _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 VideoPlaylistsListDepartmentEnum = typeof VideoPlaylistsListDepartmentEnum[keyof typeof VideoPlaylistsListDepartmentEnum]; + _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 VideoPlaylistsListDepartmentEnum = + (typeof VideoPlaylistsListDepartmentEnum)[keyof typeof VideoPlaylistsListDepartmentEnum] /** * @export */ export const VideoPlaylistsListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type VideoPlaylistsListLevelEnum = typeof VideoPlaylistsListLevelEnum[keyof typeof VideoPlaylistsListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type VideoPlaylistsListLevelEnum = + (typeof VideoPlaylistsListLevelEnum)[keyof typeof VideoPlaylistsListLevelEnum] /** * @export */ export const VideoPlaylistsListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type VideoPlaylistsListOfferedByEnum = typeof VideoPlaylistsListOfferedByEnum[keyof typeof VideoPlaylistsListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type VideoPlaylistsListOfferedByEnum = + (typeof VideoPlaylistsListOfferedByEnum)[keyof typeof VideoPlaylistsListOfferedByEnum] /** * @export */ export const VideoPlaylistsListPlatformEnum = { - 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 VideoPlaylistsListPlatformEnum = typeof VideoPlaylistsListPlatformEnum[keyof typeof VideoPlaylistsListPlatformEnum]; + 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 VideoPlaylistsListPlatformEnum = + (typeof VideoPlaylistsListPlatformEnum)[keyof typeof VideoPlaylistsListPlatformEnum] /** * @export */ export const VideoPlaylistsListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type VideoPlaylistsListResourceCategoryEnum = typeof VideoPlaylistsListResourceCategoryEnum[keyof typeof VideoPlaylistsListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type VideoPlaylistsListResourceCategoryEnum = + (typeof VideoPlaylistsListResourceCategoryEnum)[keyof typeof VideoPlaylistsListResourceCategoryEnum] /** * @export */ export const VideoPlaylistsListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type VideoPlaylistsListResourceTypeEnum = typeof VideoPlaylistsListResourceTypeEnum[keyof typeof VideoPlaylistsListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type VideoPlaylistsListResourceTypeEnum = + (typeof VideoPlaylistsListResourceTypeEnum)[keyof typeof VideoPlaylistsListResourceTypeEnum] /** * @export */ export const VideoPlaylistsListSortbyEnum = { - 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 VideoPlaylistsListSortbyEnum = typeof VideoPlaylistsListSortbyEnum[keyof typeof VideoPlaylistsListSortbyEnum]; - + 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 VideoPlaylistsListSortbyEnum = + (typeof VideoPlaylistsListSortbyEnum)[keyof typeof VideoPlaylistsListSortbyEnum] /** * VideosApi - axios parameter creator * @export */ -export const VideosApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * Get a paginated list of videos - * @summary List - * @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] Number of results to return per page. - * @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 {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosList: async (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?: VideosListSortbyEnum, topic?: Array, options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/videos/`; - // 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}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * Retrieve a single video - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosRetrieve: async (id: number, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('videosRetrieve', 'id', id) - const localVarPath = `/api/v1/videos/{id}/` - .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; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - } -}; +export const VideosApiAxiosParamCreator = function ( + configuration?: Configuration, +) { + return { + /** + * Get a paginated list of videos + * @summary List + * @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] Number of results to return per page. + * @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 {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + videosList: async ( + 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?: VideosListSortbyEnum, + topic?: Array, + options: RawAxiosRequestConfig = {}, + ): Promise => { + const localVarPath = `/api/v1/videos/` + // 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, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + /** + * Retrieve a single video + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + videosRetrieve: async ( + id: number, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists("videosRetrieve", "id", id) + const localVarPath = `/api/v1/videos/{id}/`.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 + + setSearchParams(localVarUrlObj, localVarQueryParameter) + let headersFromBaseOptions = + baseOptions && baseOptions.headers ? baseOptions.headers : {} + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + } + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + } + }, + } +} /** * VideosApi - functional programming interface * @export */ -export const VideosApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = VideosApiAxiosParamCreator(configuration) - return { - /** - * Get a paginated list of videos - * @summary List - * @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] Number of results to return per page. - * @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 {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending - * @param {Array} [topic] Multiple values may be separated by commas. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videosList(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?: VideosListSortbyEnum, topic?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.videosList(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['VideosApi.videosList']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - /** - * Retrieve a single video - * @summary Retrieve - * @param {number} id A unique integer value identifying this learning resource. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async videosRetrieve(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.videosRetrieve(id, options); - const index = configuration?.serverIndex ?? 0; - const operationBasePath = operationServerMap['VideosApi.videosRetrieve']?.[index]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); - }, - } -}; +export const VideosApiFp = function (configuration?: Configuration) { + const localVarAxiosParamCreator = VideosApiAxiosParamCreator(configuration) + return { + /** + * Get a paginated list of videos + * @summary List + * @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] Number of results to return per page. + * @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 {VideosListSortbyEnum} [sortby] Sort By * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending + * @param {Array} [topic] Multiple values may be separated by commas. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async videosList( + 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?: VideosListSortbyEnum, + topic?: Array, + options?: RawAxiosRequestConfig, + ): Promise< + ( + axios?: AxiosInstance, + basePath?: string, + ) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.videosList( + 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["VideosApi.videosList"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + /** + * Retrieve a single video + * @summary Retrieve + * @param {number} id A unique integer value identifying this learning resource. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async videosRetrieve( + id: number, + options?: RawAxiosRequestConfig, + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.videosRetrieve( + id, + options, + ) + const index = configuration?.serverIndex ?? 0 + const operationBasePath = + operationServerMap["VideosApi.videosRetrieve"]?.[index]?.url + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, operationBasePath || basePath) + }, + } +} /** * VideosApi - factory interface * @export */ -export const VideosApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = VideosApiFp(configuration) - return { - /** - * Get a paginated list of videos - * @summary List - * @param {VideosApiVideosListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosList(requestParameters: VideosApiVideosListRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.videosList(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)); - }, - /** - * Retrieve a single video - * @summary Retrieve - * @param {VideosApiVideosRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - videosRetrieve(requestParameters: VideosApiVideosRetrieveRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.videosRetrieve(requestParameters.id, options).then((request) => request(axios, basePath)); - }, - }; -}; +export const VideosApiFactory = function ( + configuration?: Configuration, + basePath?: string, + axios?: AxiosInstance, +) { + const localVarFp = VideosApiFp(configuration) + return { + /** + * Get a paginated list of videos + * @summary List + * @param {VideosApiVideosListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + videosList( + requestParameters: VideosApiVideosListRequest = {}, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videosList( + 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)) + }, + /** + * Retrieve a single video + * @summary Retrieve + * @param {VideosApiVideosRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + videosRetrieve( + requestParameters: VideosApiVideosRetrieveRequest, + options?: RawAxiosRequestConfig, + ): AxiosPromise { + return localVarFp + .videosRetrieve(requestParameters.id, options) + .then((request) => request(axios, basePath)) + }, + } +} /** * Request parameters for videosList operation in VideosApi. @@ -20367,124 +25816,124 @@ export const VideosApiFactory = function (configuration?: Configuration, basePat * @interface VideosApiVideosListRequest */ export interface VideosApiVideosListRequest { - /** - * - * @type {boolean} - * @memberof VideosApiVideosList - */ - 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 VideosApiVideosList - */ - readonly certification_type?: Array - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosList - */ - 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'>} - * @memberof VideosApiVideosList - */ - readonly department?: Array - - /** - * The course/program is offered for free - * @type {boolean} - * @memberof VideosApiVideosList - */ - 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 VideosApiVideosList - */ - readonly level?: Array - - /** - * Number of results to return per page. - * @type {number} - * @memberof VideosApiVideosList - */ - 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 VideosApiVideosList - */ - readonly offered_by?: Array - - /** - * The initial index from which to return the results. - * @type {number} - * @memberof VideosApiVideosList - */ - 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 VideosApiVideosList - */ - readonly platform?: Array - - /** - * - * @type {boolean} - * @memberof VideosApiVideosList - */ - readonly professional?: boolean - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosList - */ - readonly readable_id?: Array - - /** - * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material - * @type {Array<'course' | 'learning_material' | 'program'>} - * @memberof VideosApiVideosList - */ - readonly resource_category?: Array - - /** - * 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 VideosApiVideosList - */ - 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 VideosApiVideosList - */ - readonly sortby?: VideosListSortbyEnum - - /** - * Multiple values may be separated by commas. - * @type {Array} - * @memberof VideosApiVideosList - */ - readonly topic?: Array + /** + * + * @type {boolean} + * @memberof VideosApiVideosList + */ + 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 VideosApiVideosList + */ + readonly certification_type?: Array + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideosApiVideosList + */ + 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'>} + * @memberof VideosApiVideosList + */ + readonly department?: Array + + /** + * The course/program is offered for free + * @type {boolean} + * @memberof VideosApiVideosList + */ + 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 VideosApiVideosList + */ + readonly level?: Array + + /** + * Number of results to return per page. + * @type {number} + * @memberof VideosApiVideosList + */ + 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 VideosApiVideosList + */ + readonly offered_by?: Array + + /** + * The initial index from which to return the results. + * @type {number} + * @memberof VideosApiVideosList + */ + 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 VideosApiVideosList + */ + readonly platform?: Array + + /** + * + * @type {boolean} + * @memberof VideosApiVideosList + */ + readonly professional?: boolean + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideosApiVideosList + */ + readonly readable_id?: Array + + /** + * The resource category of the learning resources * `course` - Course * `program` - Program * `learning_material` - Learning Material + * @type {Array<'course' | 'learning_material' | 'program'>} + * @memberof VideosApiVideosList + */ + readonly resource_category?: Array + + /** + * 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 VideosApiVideosList + */ + 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 VideosApiVideosList + */ + readonly sortby?: VideosListSortbyEnum + + /** + * Multiple values may be separated by commas. + * @type {Array} + * @memberof VideosApiVideosList + */ + readonly topic?: Array } /** @@ -20493,12 +25942,12 @@ export interface VideosApiVideosListRequest { * @interface VideosApiVideosRetrieveRequest */ export interface VideosApiVideosRetrieveRequest { - /** - * A unique integer value identifying this learning resource. - * @type {number} - * @memberof VideosApiVideosRetrieve - */ - readonly id: number + /** + * A unique integer value identifying this learning resource. + * @type {number} + * @memberof VideosApiVideosRetrieve + */ + readonly id: number } /** @@ -20508,184 +25957,220 @@ export interface VideosApiVideosRetrieveRequest { * @extends {BaseAPI} */ export class VideosApi extends BaseAPI { - /** - * Get a paginated list of videos - * @summary List - * @param {VideosApiVideosListRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideosApi - */ - public videosList(requestParameters: VideosApiVideosListRequest = {}, options?: RawAxiosRequestConfig) { - return VideosApiFp(this.configuration).videosList(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)); - } - - /** - * Retrieve a single video - * @summary Retrieve - * @param {VideosApiVideosRetrieveRequest} requestParameters Request parameters. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof VideosApi - */ - public videosRetrieve(requestParameters: VideosApiVideosRetrieveRequest, options?: RawAxiosRequestConfig) { - return VideosApiFp(this.configuration).videosRetrieve(requestParameters.id, options).then((request) => request(this.axios, this.basePath)); - } + /** + * Get a paginated list of videos + * @summary List + * @param {VideosApiVideosListRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideosApi + */ + public videosList( + requestParameters: VideosApiVideosListRequest = {}, + options?: RawAxiosRequestConfig, + ) { + return VideosApiFp(this.configuration) + .videosList( + 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)) + } + + /** + * Retrieve a single video + * @summary Retrieve + * @param {VideosApiVideosRetrieveRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof VideosApi + */ + public videosRetrieve( + requestParameters: VideosApiVideosRetrieveRequest, + options?: RawAxiosRequestConfig, + ) { + return VideosApiFp(this.configuration) + .videosRetrieve(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)) + } } /** * @export */ export const VideosListCertificationTypeEnum = { - Completion: 'completion', - Micromasters: 'micromasters', - None: 'none', - Professional: 'professional' -} as const; -export type VideosListCertificationTypeEnum = typeof VideosListCertificationTypeEnum[keyof typeof VideosListCertificationTypeEnum]; + Completion: "completion", + Micromasters: "micromasters", + None: "none", + Professional: "professional", +} as const +export type VideosListCertificationTypeEnum = + (typeof VideosListCertificationTypeEnum)[keyof typeof VideosListCertificationTypeEnum] /** * @export */ export const VideosListDeliveryEnum = { - Online: 'online', - Hybrid: 'hybrid', - InPerson: 'in_person', - Offline: 'offline' -} as const; -export type VideosListDeliveryEnum = typeof VideosListDeliveryEnum[keyof typeof 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', - _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 VideosListDepartmentEnum = typeof VideosListDepartmentEnum[keyof typeof VideosListDepartmentEnum]; + _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 VideosListDepartmentEnum = + (typeof VideosListDepartmentEnum)[keyof typeof VideosListDepartmentEnum] /** * @export */ export const VideosListLevelEnum = { - Advanced: 'advanced', - Graduate: 'graduate', - HighSchool: 'high_school', - Intermediate: 'intermediate', - Introductory: 'introductory', - Noncredit: 'noncredit', - Undergraduate: 'undergraduate' -} as const; -export type VideosListLevelEnum = typeof VideosListLevelEnum[keyof typeof VideosListLevelEnum]; + Advanced: "advanced", + Graduate: "graduate", + HighSchool: "high_school", + Intermediate: "intermediate", + Introductory: "introductory", + Noncredit: "noncredit", + Undergraduate: "undergraduate", +} as const +export type VideosListLevelEnum = + (typeof VideosListLevelEnum)[keyof typeof VideosListLevelEnum] /** * @export */ export const VideosListOfferedByEnum = { - Bootcamps: 'bootcamps', - Mitpe: 'mitpe', - Mitx: 'mitx', - Ocw: 'ocw', - See: 'see', - Xpro: 'xpro' -} as const; -export type VideosListOfferedByEnum = typeof VideosListOfferedByEnum[keyof typeof VideosListOfferedByEnum]; + Bootcamps: "bootcamps", + Mitpe: "mitpe", + Mitx: "mitx", + Ocw: "ocw", + See: "see", + Xpro: "xpro", +} as const +export type VideosListOfferedByEnum = + (typeof VideosListOfferedByEnum)[keyof typeof VideosListOfferedByEnum] /** * @export */ export const VideosListPlatformEnum = { - 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 VideosListPlatformEnum = typeof VideosListPlatformEnum[keyof typeof VideosListPlatformEnum]; + 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 VideosListPlatformEnum = + (typeof VideosListPlatformEnum)[keyof typeof VideosListPlatformEnum] /** * @export */ export const VideosListResourceCategoryEnum = { - Course: 'course', - LearningMaterial: 'learning_material', - Program: 'program' -} as const; -export type VideosListResourceCategoryEnum = typeof VideosListResourceCategoryEnum[keyof typeof VideosListResourceCategoryEnum]; + Course: "course", + LearningMaterial: "learning_material", + Program: "program", +} as const +export type VideosListResourceCategoryEnum = + (typeof VideosListResourceCategoryEnum)[keyof typeof VideosListResourceCategoryEnum] /** * @export */ export const VideosListResourceTypeEnum = { - Course: 'course', - LearningPath: 'learning_path', - Podcast: 'podcast', - PodcastEpisode: 'podcast_episode', - Program: 'program', - Video: 'video', - VideoPlaylist: 'video_playlist' -} as const; -export type VideosListResourceTypeEnum = typeof VideosListResourceTypeEnum[keyof typeof VideosListResourceTypeEnum]; + Course: "course", + LearningPath: "learning_path", + Podcast: "podcast", + PodcastEpisode: "podcast_episode", + Program: "program", + Video: "video", + VideoPlaylist: "video_playlist", +} as const +export type VideosListResourceTypeEnum = + (typeof VideosListResourceTypeEnum)[keyof typeof VideosListResourceTypeEnum] /** * @export */ export const VideosListSortbyEnum = { - 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 VideosListSortbyEnum = typeof VideosListSortbyEnum[keyof typeof VideosListSortbyEnum]; - - + 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 VideosListSortbyEnum = + (typeof VideosListSortbyEnum)[keyof typeof VideosListSortbyEnum] diff --git a/src/typescript/mit-open-api-axios/src/v1/base.ts b/src/typescript/mit-open-api-axios/src/v1/base.ts index 98d73c2..fe62361 100644 --- a/src/typescript/mit-open-api-axios/src/v1/base.ts +++ b/src/typescript/mit-open-api-axios/src/v1/base.ts @@ -5,32 +5,31 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v1) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from './configuration'; +import type { Configuration } from "./configuration" // Some imports not used depending on template conditions // @ts-ignore -import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; -import globalAxios from 'axios'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios" +import globalAxios from "axios" -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); +export const BASE_PATH = "http://localhost".replace(/\/+$/, "") /** * * @export */ export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +} /** * @@ -38,8 +37,8 @@ export const COLLECTION_FORMATS = { * @interface RequestArgs */ export interface RequestArgs { - url: string; - options: RawAxiosRequestConfig; + url: string + options: RawAxiosRequestConfig } /** @@ -48,15 +47,19 @@ export interface RequestArgs { * @class BaseAPI */ export class BaseAPI { - protected configuration: Configuration | undefined; + protected configuration: Configuration | undefined - constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { - if (configuration) { - this.configuration = configuration; - this.basePath = configuration.basePath ?? basePath; - } + constructor( + configuration?: Configuration, + protected basePath: string = BASE_PATH, + protected axios: AxiosInstance = globalAxios, + ) { + if (configuration) { + this.configuration = configuration + this.basePath = configuration.basePath ?? basePath } -}; + } +} /** * @@ -65,22 +68,24 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - constructor(public field: string, msg?: string) { - super(msg); - this.name = "RequiredError" - } + constructor( + public field: string, + msg?: string, + ) { + super(msg) + this.name = "RequiredError" + } } interface ServerMap { - [key: string]: { - url: string, - description: string, - }[]; + [key: string]: { + url: string + description: string + }[] } /** * * @export */ -export const operationServerMap: ServerMap = { -} +export const operationServerMap: ServerMap = {} diff --git a/src/typescript/mit-open-api-axios/src/v1/common.ts b/src/typescript/mit-open-api-axios/src/v1/common.ts index a2f0f6f..2e98b41 100644 --- a/src/typescript/mit-open-api-axios/src/v1/common.ts +++ b/src/typescript/mit-open-api-axios/src/v1/common.ts @@ -5,105 +5,139 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v1) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -import type { Configuration } from "./configuration"; -import type { RequestArgs } from "./base"; -import type { AxiosInstance, AxiosResponse } from 'axios'; -import { RequiredError } from "./base"; +import type { Configuration } from "./configuration" +import type { RequestArgs } from "./base" +import type { AxiosInstance, AxiosResponse } from "axios" +import { RequiredError } from "./base" /** * * @export */ -export const DUMMY_BASE_URL = 'https://example.com' +export const DUMMY_BASE_URL = "https://example.com" /** * * @throws {RequiredError} * @export */ -export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { - if (paramValue === null || paramValue === undefined) { - throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); - } +export const assertParamExists = function ( + functionName: string, + paramName: string, + paramValue: unknown, +) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError( + paramName, + `Required parameter ${paramName} was null or undefined when calling ${functionName}.`, + ) + } } /** * * @export */ -export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { - if (configuration && configuration.apiKey) { - const localVarApiKeyValue = typeof configuration.apiKey === 'function' - ? await configuration.apiKey(keyParamName) - : await configuration.apiKey; - object[keyParamName] = localVarApiKeyValue; - } +export const setApiKeyToObject = async function ( + object: any, + keyParamName: string, + configuration?: Configuration, +) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = + typeof configuration.apiKey === "function" + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey + object[keyParamName] = localVarApiKeyValue + } } /** * * @export */ -export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { - if (configuration && (configuration.username || configuration.password)) { - object["auth"] = { username: configuration.username, password: configuration.password }; +export const setBasicAuthToObject = function ( + object: any, + configuration?: Configuration, +) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { + username: configuration.username, + password: configuration.password, } + } } /** * * @export */ -export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - object["Authorization"] = "Bearer " + accessToken; - } +export const setBearerAuthToObject = async function ( + object: any, + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const accessToken = + typeof configuration.accessToken === "function" + ? await configuration.accessToken() + : await configuration.accessToken + object["Authorization"] = "Bearer " + accessToken + } } /** * * @export */ -export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { - if (configuration && configuration.accessToken) { - const localVarAccessTokenValue = typeof configuration.accessToken === 'function' - ? await configuration.accessToken(name, scopes) - : await configuration.accessToken; - object["Authorization"] = "Bearer " + localVarAccessTokenValue; - } +export const setOAuthToObject = async function ( + object: any, + name: string, + scopes: string[], + configuration?: Configuration, +) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = + typeof configuration.accessToken === "function" + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken + object["Authorization"] = "Bearer " + localVarAccessTokenValue + } } -function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { - if (parameter == null) return; - if (typeof parameter === "object") { - if (Array.isArray(parameter)) { - (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); - } - else { - Object.keys(parameter).forEach(currentKey => - setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) - ); - } - } - else { - if (urlSearchParams.has(key)) { - urlSearchParams.append(key, parameter); - } - else { - urlSearchParams.set(key, parameter); - } +function setFlattenedQueryParams( + urlSearchParams: URLSearchParams, + parameter: any, + key: string = "", +): void { + if (parameter == null) return + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + ;(parameter as any[]).forEach((item) => + setFlattenedQueryParams(urlSearchParams, item, key), + ) + } else { + Object.keys(parameter).forEach((currentKey) => + setFlattenedQueryParams( + urlSearchParams, + parameter[currentKey], + `${key}${key !== "" ? "." : ""}${currentKey}`, + ), + ) } + } else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter) + } else { + urlSearchParams.set(key, parameter) + } + } } /** @@ -111,23 +145,28 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an * @export */ export const setSearchParams = function (url: URL, ...objects: any[]) { - const searchParams = new URLSearchParams(url.search); - setFlattenedQueryParams(searchParams, objects); - url.search = searchParams.toString(); + const searchParams = new URLSearchParams(url.search) + setFlattenedQueryParams(searchParams, objects) + url.search = searchParams.toString() } /** * * @export */ -export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { - const nonString = typeof value !== 'string'; - const needsSerialization = nonString && configuration && configuration.isJsonMime - ? configuration.isJsonMime(requestOptions.headers['Content-Type']) - : nonString; - return needsSerialization - ? JSON.stringify(value !== undefined ? value : {}) - : (value || ""); +export const serializeDataIfNeeded = function ( + value: any, + requestOptions: any, + configuration?: Configuration, +) { + const nonString = typeof value !== "string" + const needsSerialization = + nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) + : nonString + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : value || "" } /** @@ -135,16 +174,29 @@ export const serializeDataIfNeeded = function (value: any, requestOptions: any, * @export */ export const toPathString = function (url: URL) { - return url.pathname + url.search + url.hash + return url.pathname + url.search + url.hash } /** * * @export */ -export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { - return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; - return axios.request(axiosRequestArgs); - }; +export const createRequestFunction = function ( + axiosArgs: RequestArgs, + globalAxios: AxiosInstance, + BASE_PATH: string, + configuration?: Configuration, +) { + return >( + axios: AxiosInstance = globalAxios, + basePath: string = BASE_PATH, + ) => { + const axiosRequestArgs = { + ...axiosArgs.options, + url: + (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + + axiosArgs.url, + } + return axios.request(axiosRequestArgs) + } } diff --git a/src/typescript/mit-open-api-axios/src/v1/configuration.ts b/src/typescript/mit-open-api-axios/src/v1/configuration.ts index 902459a..4b9af1f 100644 --- a/src/typescript/mit-open-api-axios/src/v1/configuration.ts +++ b/src/typescript/mit-open-api-axios/src/v1/configuration.ts @@ -5,106 +5,128 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v1) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export interface ConfigurationParameters { - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - username?: string; - password?: string; - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - basePath?: string; - serverIndex?: number; - baseOptions?: any; - formDataCtor?: new () => any; + apiKey?: + | string + | Promise + | ((name: string) => string) + | ((name: string) => Promise) + username?: string + password?: string + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + basePath?: string + serverIndex?: number + baseOptions?: any + formDataCtor?: new () => any } export class Configuration { - /** - * parameter for apiKey security - * @param name security name - * @memberof Configuration - */ - apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - username?: string; - /** - * parameter for basic security - * - * @type {string} - * @memberof Configuration - */ - password?: string; - /** - * parameter for oauth2 security - * @param name security name - * @param scopes oauth2 scope - * @memberof Configuration - */ - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); - /** - * override base path - * - * @type {string} - * @memberof Configuration - */ - basePath?: string; - /** - * override server index - * - * @type {number} - * @memberof Configuration - */ - serverIndex?: number; - /** - * base options for axios calls - * - * @type {any} - * @memberof Configuration - */ - baseOptions?: any; - /** - * The FormData constructor that will be used to create multipart form data - * requests. You can inject this here so that execution environments that - * do not support the FormData class can still run the generated client. - * - * @type {new () => FormData} - */ - formDataCtor?: new () => any; + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: + | string + | Promise + | ((name: string) => string) + | ((name: string) => Promise) + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: + | string + | Promise + | ((name?: string, scopes?: string[]) => string) + | ((name?: string, scopes?: string[]) => Promise) + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any - constructor(param: ConfigurationParameters = {}) { - this.apiKey = param.apiKey; - this.username = param.username; - this.password = param.password; - this.accessToken = param.accessToken; - this.basePath = param.basePath; - this.serverIndex = param.serverIndex; - this.baseOptions = param.baseOptions; - this.formDataCtor = param.formDataCtor; - } + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey + this.username = param.username + this.password = param.password + this.accessToken = param.accessToken + this.basePath = param.basePath + this.serverIndex = param.serverIndex + this.baseOptions = param.baseOptions + this.formDataCtor = param.formDataCtor + } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp( + "^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$", + "i", + ) + return ( + mime !== null && + (jsonMime.test(mime) || + mime.toLowerCase() === "application/json-patch+json") + ) + } } diff --git a/src/typescript/mit-open-api-axios/src/v1/index.ts b/src/typescript/mit-open-api-axios/src/v1/index.ts index d7f2a87..d04b034 100644 --- a/src/typescript/mit-open-api-axios/src/v1/index.ts +++ b/src/typescript/mit-open-api-axios/src/v1/index.ts @@ -5,14 +5,12 @@ * MIT public API * * The version of the OpenAPI document: 0.0.1 (v1) - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export * from "./api"; -export * from "./configuration"; - +export * from "./api" +export * from "./configuration" diff --git a/src/typescript/mit-open-api-axios/yarn.lock b/src/typescript/mit-open-api-axios/yarn.lock index fe1a6da..70ffb50 100644 --- a/src/typescript/mit-open-api-axios/yarn.lock +++ b/src/typescript/mit-open-api-axios/yarn.lock @@ -42,7 +42,7 @@ __metadata: version: 0.0.0-use.local resolution: "@mitodl/open-api-axios@workspace:." dependencies: - "@types/node": "npm:^20.11.19" + "@types/node": "npm:^22.0.0" axios: "npm:^1.6.5" ts-node: "npm:10.9.2" typescript: "npm:5.4.5" @@ -77,12 +77,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.11.19": - version: 20.16.1 - resolution: "@types/node@npm:20.16.1" +"@types/node@npm:^22.0.0": + version: 22.8.6 + resolution: "@types/node@npm:22.8.6" dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/cac13c0f42467df3254805a671ca9e74a6eb7c41568de972e26b10dcc448a45743aaf00e9e5fce4a9214da5bc8444fe902918e105dac5a224e24e83fd9989a97 + undici-types: "npm:~6.19.8" + checksum: 10c0/d3a11f2549234a91a4c5d0ff35ab4bdcb7ba34db4d3f1d189be39b8bd41c19aac98d117150a95a9c5a9d45b1014135477ea240b2b8317c86ae3d3cf1c3b3f8f4 languageName: node linkType: hard @@ -268,7 +268,7 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.19.2": +"undici-types@npm:~6.19.8": version: 6.19.8 resolution: "undici-types@npm:6.19.8" checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344