Apply formatting and minor style fixes across repo
Normalize code style across multiple packages: whitespace cleanup, consistent commas and trailing commas in arrays/enums/objects, fix table markdown lines in CI comment template, ensure newline at EOF, normalize header/object property quoting and spacing, remove stray blank lines and minor non-functional comment tweaks. These are formatting-only changes and small type/annotation spacing adjustments; no functional behavior changes intended.
This commit is contained in:
1 parent
d2d0b258bc
commit
974528fe7e
186 files changed
+1367
-1233
No files matched your search
@@ -10,8 +10,9 @@ export class CleanStreamTempFile extends OneBotAction<void, void> {
|
||||
override actionTags = ['流式传输扩展'];
|
||||
override payloadExample = {};
|
||||
override returnExample = {
|
||||
message: 'success'
|
||||
message: 'success',
|
||||
};
|
||||
|
||||
override payloadSchema = Type.Object({});
|
||||
override returnSchema = Type.Null();
|
||||
|
||||
|
||||
@@ -20,11 +20,13 @@ export class DownloadFileImageStream extends BaseDownloadStream<DownloadFileImag
|
||||
override actionSummary = '下载图片文件流';
|
||||
override actionTags = ['流式传输扩展'];
|
||||
override payloadExample = {
|
||||
file: 'image_file_id'
|
||||
file: 'image_file_id',
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
file: 'temp_image_path'
|
||||
file: 'temp_image_path',
|
||||
};
|
||||
|
||||
override payloadSchema = DownloadFileImageStreamPayloadSchema;
|
||||
override returnSchema = Type.Any({ description: '下载结果 (流式)' });
|
||||
override useStream = true;
|
||||
|
||||
@@ -23,11 +23,13 @@ export class DownloadFileRecordStream extends BaseDownloadStream<DownloadFileRec
|
||||
override actionSummary = '下载语音文件流';
|
||||
override actionTags = ['流式传输扩展'];
|
||||
override payloadExample = {
|
||||
file: 'record_file_id'
|
||||
file: 'record_file_id',
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
file: 'temp_record_path'
|
||||
file: 'temp_record_path',
|
||||
};
|
||||
|
||||
override payloadSchema = DownloadFileRecordStreamPayloadSchema;
|
||||
override returnSchema = Type.Any({ description: '下载结果 (流式)' });
|
||||
override useStream = true;
|
||||
|
||||
@@ -21,14 +21,16 @@ export class DownloadFileStream extends BaseDownloadStream<DownloadFileStreamPay
|
||||
override actionDescription = '以流式方式从网络或本地下载文件';
|
||||
override actionTags = ['流式接口'];
|
||||
override payloadExample = {
|
||||
file: 'http://example.com/file.png'
|
||||
file: 'http://example.com/file.png',
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
type: 'stream',
|
||||
data_type: 'file_info',
|
||||
file_name: 'file.png',
|
||||
file_size: 1024
|
||||
file_size: 1024,
|
||||
};
|
||||
|
||||
override useStream = true;
|
||||
|
||||
async _handle (payload: DownloadFileStreamPayload, _adaptername: string, _config: NetworkAdapterConfig, req: OneBotRequestToolkit): Promise<StreamPacket<DownloadResult>> {
|
||||
|
||||
@@ -15,11 +15,13 @@ export class TestDownloadStream extends OneBotAction<TestDownloadStreamPayload,
|
||||
override actionSummary = '测试下载流';
|
||||
override actionTags = ['流式传输扩展'];
|
||||
override payloadExample = {
|
||||
url: 'http://example.com/file'
|
||||
url: 'http://example.com/file',
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
success: true
|
||||
success: true,
|
||||
};
|
||||
|
||||
override payloadSchema = TestDownloadStreamPayloadSchema;
|
||||
override returnSchema = Type.Any({ description: '测试流数据' });
|
||||
override useStream = true;
|
||||
|
||||
@@ -78,15 +78,17 @@ export class UploadFileStream extends OneBotAction<UploadFileStreamPayload, Stre
|
||||
chunk_data: 'SGVsbG8gV29ybGQ=',
|
||||
chunk_index: 0,
|
||||
total_chunks: 1,
|
||||
file_size: 11
|
||||
file_size: 11,
|
||||
};
|
||||
|
||||
override returnExample = {
|
||||
type: 'stream',
|
||||
stream_id: 'uuid-1234-5678',
|
||||
status: 'chunk_received',
|
||||
received_chunks: 1,
|
||||
total_chunks: 1
|
||||
total_chunks: 1,
|
||||
};
|
||||
|
||||
override useStream = true;
|
||||
|
||||
private static streams = new Map<string, StreamState>();
|
||||
|
||||
Reference in new issue
Block a user