✨ feat(protocol): Add template preview functionality with localization support
This commit is contained in:
@@ -17,6 +17,24 @@ export async function createSubscribeApplication(
|
||||
});
|
||||
}
|
||||
|
||||
/** Preview Template GET /v1/admin/application/preview */
|
||||
export async function previewSubscribeTemplate(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.PreviewSubscribeTemplateParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.PreviewSubscribeTemplateResponse }>(
|
||||
'/v1/admin/application/preview',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Update subscribe application PUT /v1/admin/application/subscribe_application */
|
||||
export async function updateSubscribeApplication(
|
||||
body: API.UpdateSubscribeApplicationRequest,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as ads from './ads';
|
||||
|
||||
+13
-2
@@ -342,7 +342,6 @@ declare namespace API {
|
||||
scheme?: string;
|
||||
user_agent: string;
|
||||
is_default: boolean;
|
||||
proxy_template: string;
|
||||
template: string;
|
||||
output_format: string;
|
||||
download_link: DownloadLink;
|
||||
@@ -1213,6 +1212,19 @@ declare namespace API {
|
||||
orderNo: string;
|
||||
};
|
||||
|
||||
type PreviewSubscribeTemplateParams = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type PreviewSubscribeTemplateRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type PreviewSubscribeTemplateResponse = {
|
||||
/** 预览的模板内容 */
|
||||
template: string;
|
||||
};
|
||||
|
||||
type PrivacyPolicyConfig = {
|
||||
privacy_policy: string;
|
||||
};
|
||||
@@ -1505,7 +1517,6 @@ declare namespace API {
|
||||
scheme?: string;
|
||||
user_agent: string;
|
||||
is_default: boolean;
|
||||
proxy_template: string;
|
||||
template: string;
|
||||
output_format: string;
|
||||
download_link?: DownloadLink;
|
||||
|
||||
Reference in New Issue
Block a user