This commit is contained in:
@@ -46,8 +46,10 @@ export class AdminOperationsController {
|
||||
@Query('hasDrainage') hasDrainage?: string,
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
@Query('monitorSnapshotId') monitorSnapshotId?: string,
|
||||
) {
|
||||
return this.operations.listMessagesPage({
|
||||
monitorSnapshotId,
|
||||
tenantId,
|
||||
applicationId,
|
||||
channelId,
|
||||
@@ -80,8 +82,10 @@ export class AdminOperationsController {
|
||||
@Query('status') status: string | undefined,
|
||||
@Query('hasDrainage') hasDrainage: string | undefined,
|
||||
@Res() response: DownloadResponse,
|
||||
@Query('monitorSnapshotId') monitorSnapshotId?: string,
|
||||
) {
|
||||
const exported = await this.operations.exportMessages({
|
||||
monitorSnapshotId,
|
||||
tenantId,
|
||||
applicationId,
|
||||
channelId,
|
||||
@@ -105,25 +109,37 @@ export class AdminOperationsController {
|
||||
}
|
||||
|
||||
@Get('message-segment-audits')
|
||||
messageSegmentAudits(
|
||||
@Query('messageId') messageId?: string,
|
||||
@Query('messageRecordId') messageRecordId?: string,
|
||||
) {
|
||||
messageSegmentAudits(@Query('messageId') messageId?: string, @Query('messageRecordId') messageRecordId?: string) {
|
||||
return this.operations.listMessageSegmentAudits({ messageId, messageRecordId });
|
||||
}
|
||||
|
||||
@Get('uplink-messages')
|
||||
listUplinkMessages(@Query('tenantId') tenantId?: string, @Query('channelId') channelId?: string, @Query('phoneNumber') phoneNumber?: string, @Query('keyword') keyword?: string, @Query('startTime') startTime?: string, @Query('endTime') endTime?: string, @Query('page') page?: string, @Query('pageSize') pageSize?: string) {
|
||||
listUplinkMessages(
|
||||
@Query('tenantId') tenantId?: string,
|
||||
@Query('channelId') channelId?: string,
|
||||
@Query('phoneNumber') phoneNumber?: string,
|
||||
@Query('keyword') keyword?: string,
|
||||
@Query('startTime') startTime?: string,
|
||||
@Query('endTime') endTime?: string,
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return page || pageSize
|
||||
? this.operations.listUplinkMessagesPage({ tenantId, channelId, phoneNumber, keyword, startTime, endTime, page: Number(page), pageSize: Number(pageSize) })
|
||||
? this.operations.listUplinkMessagesPage({
|
||||
tenantId,
|
||||
channelId,
|
||||
phoneNumber,
|
||||
keyword,
|
||||
startTime,
|
||||
endTime,
|
||||
page: Number(page),
|
||||
pageSize: Number(pageSize),
|
||||
})
|
||||
: this.operations.listUplinkMessages({ tenantId, channelId, phoneNumber, keyword, startTime, endTime });
|
||||
}
|
||||
|
||||
@Post('uplink-messages/:id/claim')
|
||||
claimUplinkMatchCandidate(
|
||||
@Param('id') id: string,
|
||||
@Body() body: { candidateId?: string; operatorId?: string },
|
||||
) {
|
||||
claimUplinkMatchCandidate(@Param('id') id: string, @Body() body: { candidateId?: string; operatorId?: string }) {
|
||||
return this.sendChain.claimUplinkMatchCandidate(id, String(body.candidateId ?? ''), body.operatorId);
|
||||
}
|
||||
|
||||
@@ -231,10 +247,7 @@ export class AdminOperationsController {
|
||||
}
|
||||
|
||||
@Post('gateway-submit-dead-letters/:id/resolve')
|
||||
resolveGatewaySubmitDeadLetter(
|
||||
@Param('id') id: string,
|
||||
@CurrentSessionUserId() operatorId?: string,
|
||||
) {
|
||||
resolveGatewaySubmitDeadLetter(@Param('id') id: string, @CurrentSessionUserId() operatorId?: string) {
|
||||
return this.sendChain.resolveGatewaySubmitDeadLetter(id, operatorId);
|
||||
}
|
||||
|
||||
@@ -381,16 +394,23 @@ export class AdminOperationsController {
|
||||
@Body() body: { previewToken?: string; reason?: string; ratePerSecond?: number; consecutiveFailureLimit?: number },
|
||||
@CurrentSessionUserId() operatorId?: string,
|
||||
) {
|
||||
return this.sendChain.createDownstreamRequeueTask({
|
||||
previewToken: body.previewToken ?? '',
|
||||
reason: body.reason ?? '',
|
||||
ratePerSecond: body.ratePerSecond,
|
||||
consecutiveFailureLimit: body.consecutiveFailureLimit,
|
||||
}, operatorId);
|
||||
return this.sendChain.createDownstreamRequeueTask(
|
||||
{
|
||||
previewToken: body.previewToken ?? '',
|
||||
reason: body.reason ?? '',
|
||||
ratePerSecond: body.ratePerSecond,
|
||||
consecutiveFailureLimit: body.consecutiveFailureLimit,
|
||||
},
|
||||
operatorId,
|
||||
);
|
||||
}
|
||||
|
||||
@Get('downstream-requeue-tasks')
|
||||
listDownstreamRequeueTasks(@Query('status') status?: string, @Query('page') page?: string, @Query('pageSize') pageSize?: string) {
|
||||
listDownstreamRequeueTasks(
|
||||
@Query('status') status?: string,
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return this.sendChain.listDownstreamRequeueTasks({ status, page: Number(page), pageSize: Number(pageSize) });
|
||||
}
|
||||
|
||||
@@ -407,7 +427,12 @@ export class AdminOperationsController {
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return this.sendChain.listDownstreamRequeueTaskItems(id, { status, keyword, page: Number(page), pageSize: Number(pageSize) });
|
||||
return this.sendChain.listDownstreamRequeueTaskItems(id, {
|
||||
status,
|
||||
keyword,
|
||||
page: Number(page),
|
||||
pageSize: Number(pageSize),
|
||||
});
|
||||
}
|
||||
|
||||
@Post('downstream-requeue-tasks/:id/:action')
|
||||
@@ -441,7 +466,18 @@ export class AdminSystemLogsController {
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return this.protocolLogs.list({ protocol, direction, eventType, status, keyword, range, createdAtFrom, createdAtTo, page: Number(page), pageSize: Number(pageSize) });
|
||||
return this.protocolLogs.list({
|
||||
protocol,
|
||||
direction,
|
||||
eventType,
|
||||
status,
|
||||
keyword,
|
||||
range,
|
||||
createdAtFrom,
|
||||
createdAtTo,
|
||||
page: Number(page),
|
||||
pageSize: Number(pageSize),
|
||||
});
|
||||
}
|
||||
|
||||
@Get()
|
||||
@@ -457,11 +493,34 @@ export class AdminSystemLogsController {
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return this.operations.systemLogs({ tenantId, userId, keyword, level, module, range, createdAtFrom, createdAtTo, page: Number(page), pageSize: Number(pageSize) });
|
||||
return this.operations.systemLogs({
|
||||
tenantId,
|
||||
userId,
|
||||
keyword,
|
||||
level,
|
||||
module,
|
||||
range,
|
||||
createdAtFrom,
|
||||
createdAtTo,
|
||||
page: Number(page),
|
||||
pageSize: Number(pageSize),
|
||||
});
|
||||
}
|
||||
|
||||
@Post('exports')
|
||||
export(@Body() body: { tenantId?: string; userId?: string; keyword?: string; level?: string; module?: string; range?: string; createdAtFrom?: string; createdAtTo?: string }) {
|
||||
export(
|
||||
@Body()
|
||||
body: {
|
||||
tenantId?: string;
|
||||
userId?: string;
|
||||
keyword?: string;
|
||||
level?: string;
|
||||
module?: string;
|
||||
range?: string;
|
||||
createdAtFrom?: string;
|
||||
createdAtTo?: string;
|
||||
},
|
||||
) {
|
||||
return this.operations.exportSystemLogs(body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user