Add new API client modules for various endpoints including authentication, orders, events, and configuration management. Update existing modules to use the standardized request utility. Add post-generation script to restore request.ts after openapi-ts generation to prevent file deletion issues. The API client generation now includes comprehensive TypeScript types and proper request handling for all endpoints. The request utility has been enhanced to handle query parameters and response parsing consistently across all API calls.
72 lines
1.5 KiB
TypeScript
72 lines
1.5 KiB
TypeScript
/* eslint-disable */
|
|
// @ts-ignore
|
|
import request from './request';
|
|
|
|
import * as API from './types';
|
|
|
|
/**
|
|
* 绑定渠道账号 绑定渠道账号
|
|
* 绑定渠道账号
|
|
* POST /hotelStaff/configChannel/binding
|
|
*/
|
|
export function hotelStaffConfigChannelBindingUsingPost({
|
|
body,
|
|
options,
|
|
}: {
|
|
body: API.PcConfigChannel;
|
|
options?: { [key: string]: unknown };
|
|
}) {
|
|
return request<API.RBoolean>('/hotelStaff/configChannel/binding', {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 创建账号渠道 创建账号渠道
|
|
* 创建账号渠道
|
|
* POST /hotelStaff/configChannel/createPcConfigChannel
|
|
*/
|
|
export function hotelStaffConfigChannelCreatePcConfigChannelUsingPost({
|
|
body,
|
|
options,
|
|
}: {
|
|
body: API.PcConfig;
|
|
options?: { [key: string]: unknown };
|
|
}) {
|
|
return request<API.RBoolean>(
|
|
'/hotelStaff/configChannel/createPcConfigChannel',
|
|
{
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
},
|
|
data: body,
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* 查询配置与渠道关系列表 查询配置与渠道关系列表
|
|
* 查询配置与渠道关系列表
|
|
* POST /hotelStaff/configChannel/pageList
|
|
*/
|
|
export function hotelStaffConfigChannelPageListUsingPost({
|
|
options,
|
|
}: {
|
|
options?: { [key: string]: unknown };
|
|
}) {
|
|
return request<API.RListPcConfigChannel>(
|
|
'/hotelStaff/configChannel/pageList',
|
|
{
|
|
method: 'POST',
|
|
...(options || {}),
|
|
}
|
|
);
|
|
}
|