✨ feat(marketing): Add marketing management features and localization updates
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
// @ts-ignore
|
||||
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** Create subscribe application POST /v1/admin/application/ */
|
||||
export async function createSubscribeApplication(
|
||||
body: API.CreateSubscribeApplicationRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.SubscribeApplication }>('/v1/admin/application/', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Update subscribe application PUT /v1/admin/application/subscribe_application */
|
||||
export async function updateSubscribeApplication(
|
||||
body: API.UpdateSubscribeApplicationRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.SubscribeApplication }>(
|
||||
'/v1/admin/application/subscribe_application',
|
||||
{
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Delete subscribe application DELETE /v1/admin/application/subscribe_application */
|
||||
export async function deleteSubscribeApplication(
|
||||
body: API.DeleteSubscribeApplicationRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/application/subscribe_application', {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get subscribe application list GET /v1/admin/application/subscribe_application_list */
|
||||
export async function getSubscribeApplicationList(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetSubscribeApplicationListParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetSubscribeApplicationListResponse }>(
|
||||
'/v1/admin/application/subscribe_application_list',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,16 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as ads from './ads';
|
||||
import * as announcement from './announcement';
|
||||
import * as application from './application';
|
||||
import * as authMethod from './authMethod';
|
||||
import * as console from './console';
|
||||
import * as coupon from './coupon';
|
||||
import * as document from './document';
|
||||
import * as log from './log';
|
||||
import * as marketing from './marketing';
|
||||
import * as order from './order';
|
||||
import * as payment from './payment';
|
||||
import * as server from './server';
|
||||
@@ -20,11 +22,13 @@ import * as user from './user';
|
||||
export default {
|
||||
ads,
|
||||
announcement,
|
||||
application,
|
||||
authMethod,
|
||||
console,
|
||||
coupon,
|
||||
document,
|
||||
log,
|
||||
marketing,
|
||||
order,
|
||||
payment,
|
||||
server,
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
// @ts-ignore
|
||||
/* eslint-disable */
|
||||
import request from '@/utils/request';
|
||||
|
||||
/** Get batch send email task list GET /v1/admin/marketing/email/batch/list */
|
||||
export async function getBatchSendEmailTaskList(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: API.GetBatchSendEmailTaskListParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetBatchSendEmailTaskListResponse }>(
|
||||
'/v1/admin/marketing/email/batch/list',
|
||||
{
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params,
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Get pre-send email count POST /v1/admin/marketing/email/batch/pre-send-count */
|
||||
export async function getPreSendEmailCount(
|
||||
body: API.GetPreSendEmailCountRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetPreSendEmailCountResponse }>(
|
||||
'/v1/admin/marketing/email/batch/pre-send-count',
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Create a batch send email task POST /v1/admin/marketing/email/batch/send */
|
||||
export async function createBatchSendEmailTask(
|
||||
body: API.CreateBatchSendEmailTaskRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/marketing/email/batch/send', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** Get batch send email task status POST /v1/admin/marketing/email/batch/status */
|
||||
export async function getBatchSendEmailTaskStatus(
|
||||
body: API.GetBatchSendEmailTaskStatusRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: API.GetBatchSendEmailTaskStatusResponse }>(
|
||||
'/v1/admin/marketing/email/batch/status',
|
||||
{
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** Stop a batch send email task POST /v1/admin/marketing/email/batch/stop */
|
||||
export async function stopBatchSendEmailTask(
|
||||
body: API.StopBatchSendEmailTaskRequest,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<API.Response & { data?: any }>('/v1/admin/marketing/email/batch/stop', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
+135
@@ -155,6 +155,26 @@ declare namespace API {
|
||||
ids: number[];
|
||||
};
|
||||
|
||||
type BatchSendEmailTask = {
|
||||
id: number;
|
||||
subject: string;
|
||||
content: string;
|
||||
recipients: string;
|
||||
scope: string;
|
||||
register_start_time: number;
|
||||
register_end_time: number;
|
||||
additional: string;
|
||||
scheduled: number;
|
||||
interval: number;
|
||||
limit: number;
|
||||
status: number;
|
||||
errors: string;
|
||||
total: number;
|
||||
current: number;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type CheckoutOrderRequest = {
|
||||
orderNo: string;
|
||||
returnUrl?: string;
|
||||
@@ -220,6 +240,18 @@ declare namespace API {
|
||||
application_id: number;
|
||||
};
|
||||
|
||||
type CreateBatchSendEmailTaskRequest = {
|
||||
subject: string;
|
||||
content: string;
|
||||
scope: string;
|
||||
register_start_time?: number;
|
||||
register_end_time?: number;
|
||||
additional?: string;
|
||||
scheduled?: number;
|
||||
interval?: number;
|
||||
limit?: number;
|
||||
};
|
||||
|
||||
type CreateCouponRequest = {
|
||||
name: string;
|
||||
code?: string;
|
||||
@@ -303,6 +335,18 @@ declare namespace API {
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type CreateSubscribeApplicationRequest = {
|
||||
name: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
user_agent: string;
|
||||
is_default: boolean;
|
||||
proxy_template: string;
|
||||
template: string;
|
||||
output_format: string;
|
||||
download_link?: string;
|
||||
};
|
||||
|
||||
type CreateSubscribeGroupRequest = {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -412,6 +456,10 @@ declare namespace API {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type DeleteSubscribeApplicationRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type DeleteSubscribeGroupRequest = {
|
||||
id: number;
|
||||
};
|
||||
@@ -550,6 +598,36 @@ declare namespace API {
|
||||
list: PaymentMethod[];
|
||||
};
|
||||
|
||||
type GetBatchSendEmailTaskListParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
scope?: string;
|
||||
status?: number;
|
||||
};
|
||||
|
||||
type GetBatchSendEmailTaskListRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
scope?: string;
|
||||
status?: number;
|
||||
};
|
||||
|
||||
type GetBatchSendEmailTaskListResponse = {
|
||||
total: number;
|
||||
list: BatchSendEmailTask[];
|
||||
};
|
||||
|
||||
type GetBatchSendEmailTaskStatusRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type GetBatchSendEmailTaskStatusResponse = {
|
||||
status: number;
|
||||
current: number;
|
||||
total: number;
|
||||
errors: string;
|
||||
};
|
||||
|
||||
type GetCouponListParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
@@ -709,11 +787,36 @@ declare namespace API {
|
||||
list: PaymentMethodDetail[];
|
||||
};
|
||||
|
||||
type GetPreSendEmailCountRequest = {
|
||||
scope: string;
|
||||
register_start_time?: number;
|
||||
register_end_time?: number;
|
||||
};
|
||||
|
||||
type GetPreSendEmailCountResponse = {
|
||||
count: number;
|
||||
};
|
||||
|
||||
type GetRuleGroupResponse = {
|
||||
total: number;
|
||||
list: ServerRuleGroup[];
|
||||
};
|
||||
|
||||
type GetSubscribeApplicationListParams = {
|
||||
page: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
type GetSubscribeApplicationListRequest = {
|
||||
page: number;
|
||||
size: number;
|
||||
};
|
||||
|
||||
type GetSubscribeApplicationListResponse = {
|
||||
total: number;
|
||||
list: SubscribeApplication[];
|
||||
};
|
||||
|
||||
type GetSubscribeDetailsParams = {
|
||||
id: number;
|
||||
};
|
||||
@@ -1347,6 +1450,10 @@ declare namespace API {
|
||||
sort: number;
|
||||
};
|
||||
|
||||
type StopBatchSendEmailTaskRequest = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
type StripePayment = {
|
||||
method: string;
|
||||
client_secret: string;
|
||||
@@ -1380,6 +1487,21 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type SubscribeApplication = {
|
||||
id: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
user_agent: string;
|
||||
is_default: boolean;
|
||||
proxy_template: string;
|
||||
template: string;
|
||||
output_format: string;
|
||||
download_link?: string;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type SubscribeConfig = {
|
||||
single_model: boolean;
|
||||
subscribe_path: string;
|
||||
@@ -1641,6 +1763,19 @@ declare namespace API {
|
||||
enable: boolean;
|
||||
};
|
||||
|
||||
type UpdateSubscribeApplicationRequest = {
|
||||
id: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
user_agent: string;
|
||||
is_default: boolean;
|
||||
proxy_template: string;
|
||||
template: string;
|
||||
output_format: string;
|
||||
download_link?: string;
|
||||
};
|
||||
|
||||
type UpdateSubscribeGroupRequest = {
|
||||
id: number;
|
||||
name: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as auth from './auth';
|
||||
|
||||
Reference in New Issue
Block a user