Skip to content

Commit

Permalink
Generated clients from rev: 6439d2bb6037511db0508540502d162b80260d32
Browse files Browse the repository at this point in the history
  • Loading branch information
odlbot committed Sep 12, 2024
1 parent d4764bd commit cd96db4
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 28 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024.8.30
2024.9.12
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "open-api-clients"
version = "2024.8.30"
version = "2024.9.12"
description = ""
authors = []
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion src/typescript/mit-open-api-axios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mitodl/open-api-axios",
"version": "2024.8.30",
"version": "2024.9.12",
"description": "Library for requesting data from mit-open APIs",
"main": "dist/cjs/index.js",
"scripts": {
Expand Down
165 changes: 165 additions & 0 deletions src/typescript/mit-open-api-axios/src/v0/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,69 @@ export type CertificateDesiredEnum = typeof CertificateDesiredEnum[keyof typeof
*/
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
* @export
* @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;
}


/**
* Write serializer for Channel. Uses primary keys for referenced objects during requests, and delegates to ChannelSerializer for responses.
* @export
Expand Down Expand Up @@ -394,6 +457,25 @@ export interface ChannelUnitDetail {
*/
'unit': LearningResourceOfferorDetail;
}
/**
*
* @export
* @interface Counts
*/
export interface Counts {
/**
*
* @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
* @export
Expand Down Expand Up @@ -2777,6 +2859,40 @@ export type WidgetTypeEnum = typeof WidgetTypeEnum[keyof typeof WidgetTypeEnum];
*/
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<RequestArgs> => {
// 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
Expand Down Expand Up @@ -3122,6 +3238,19 @@ export const ChannelsApiAxiosParamCreator = function (configuration?: Configurat
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<Array<ChannelCounts>>> {
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
Expand Down Expand Up @@ -3255,6 +3384,16 @@ export const ChannelsApiFp = function(configuration?: Configuration) {
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<Array<ChannelCounts>> {
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
Expand Down Expand Up @@ -3348,6 +3487,20 @@ export const ChannelsApiFactory = function (configuration?: Configuration, baseP
};
};

/**
* Request parameters for channelsCountsList operation in ChannelsApi.
* @export
* @interface ChannelsApiChannelsCountsListRequest
*/
export interface ChannelsApiChannelsCountsListRequest {
/**
*
* @type {string}
* @memberof ChannelsApiChannelsCountsList
*/
readonly channel_type: string
}

/**
* Request parameters for channelsCreate operation in ChannelsApi.
* @export
Expand Down Expand Up @@ -3523,6 +3676,18 @@ export interface ChannelsApiChannelsTypeRetrieveRequest {
* @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
Expand Down
Loading

0 comments on commit cd96db4

Please sign in to comment.