fix: decouple channel test sms records
This commit is contained in:
+32
-4
@@ -93,8 +93,7 @@ export type ChannelConnectionLogResponse = {
|
||||
export type ChannelTestResponse = {
|
||||
channelId: string;
|
||||
status: string;
|
||||
batchTaskId: string;
|
||||
taskNo: string;
|
||||
testNo: string;
|
||||
submitted: number;
|
||||
messages: Array<{
|
||||
phoneNumber: string;
|
||||
@@ -344,6 +343,7 @@ export type SmsMessageRecord = {
|
||||
amountCents: number;
|
||||
status: string;
|
||||
errorMessage?: string | null;
|
||||
errorCode?: string | null;
|
||||
queuedAt: string;
|
||||
submittedAt?: string | null;
|
||||
deliveredAt?: string | null;
|
||||
@@ -352,8 +352,36 @@ export type SmsMessageRecord = {
|
||||
channel?: AdminChannel | null;
|
||||
tenant?: TenantOption | null;
|
||||
application?: { id: string; name: string };
|
||||
submitRecords?: Array<Record<string, unknown>>;
|
||||
receiptRecords?: Array<Record<string, unknown>>;
|
||||
submitRecords?: SmsSubmitRecord[];
|
||||
receiptRecords?: SmsReceiptRecord[];
|
||||
};
|
||||
|
||||
export type SmsSubmitRecord = {
|
||||
id: string;
|
||||
channelId: string;
|
||||
submitId: string;
|
||||
sequenceId?: number | null;
|
||||
gatewayMessageId?: string | null;
|
||||
submitStatus: string;
|
||||
errorCode?: string | null;
|
||||
errorMessage?: string | null;
|
||||
submittedAt?: string | null;
|
||||
createdAt: string;
|
||||
channel?: AdminChannel | null;
|
||||
};
|
||||
|
||||
export type SmsReceiptRecord = {
|
||||
id: string;
|
||||
channelId?: string | null;
|
||||
messageId: string;
|
||||
gatewayMessageId: string;
|
||||
sequenceId?: number | null;
|
||||
receiptStatus: string;
|
||||
rawStatus: string;
|
||||
errorCode?: string | null;
|
||||
deliveredAt: string;
|
||||
createdAt: string;
|
||||
channel?: AdminChannel | null;
|
||||
};
|
||||
|
||||
export type SmsMessageSegmentAudit = {
|
||||
|
||||
@@ -335,7 +335,7 @@ function SmsTestModal({
|
||||
content,
|
||||
accessNo: accessNo.trim() || undefined,
|
||||
});
|
||||
setResult(`已提交 ${response.submitted} 条测试短信,任务号 ${response.taskNo}`);
|
||||
setResult(`已提交 ${response.submitted} 条测试短信,测试流水号 ${response.testNo}`);
|
||||
} catch (failure) {
|
||||
setError(failure instanceof Error ? failure.message : '测试短信发送失败');
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user