fix: close admin channel test sms loop
This commit is contained in:
@@ -69,6 +69,7 @@ export type AdminChannel = {
|
||||
enterpriseCode?: string | null;
|
||||
account: string;
|
||||
srcId: string;
|
||||
cmppVersion?: '2.0' | '3.0' | string | null;
|
||||
rateLimitPerSecond: number;
|
||||
unitPrice: number;
|
||||
status: string;
|
||||
@@ -89,6 +90,21 @@ export type ChannelConnectionLogResponse = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type ChannelTestResponse = {
|
||||
channelId: string;
|
||||
status: string;
|
||||
batchTaskId: string;
|
||||
taskNo: string;
|
||||
submitted: number;
|
||||
messages: Array<{
|
||||
phoneNumber: string;
|
||||
messageRecordId: string;
|
||||
submitId: string;
|
||||
streamMessageId?: string;
|
||||
}>;
|
||||
queuedAt: string;
|
||||
};
|
||||
|
||||
export type EnterpriseCertification = {
|
||||
id: string;
|
||||
tenantId: string;
|
||||
@@ -784,6 +800,8 @@ export const adminApi = {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
testChannel: (id: string, body: { phoneNumber?: string; phones?: string[] | string; content: string; accessNo?: string }) =>
|
||||
request<ChannelTestResponse>(`/admin/channels/${id}/test`, { method: 'POST', body: JSON.stringify(body) }),
|
||||
changeChannelStatus: (id: string, status: string, reason?: string) => request<AdminChannel>(`/admin/channels/${id}/status`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ status, reason }),
|
||||
|
||||
Reference in New Issue
Block a user