This commit is contained in:
手瓜一十雪
2025-04-17 09:52:03 +08:00
parent 3f6249f39c
commit 54e6d5c3f2
88 changed files with 87 additions and 88 deletions

View File

@@ -1,7 +1,7 @@
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
folder_name: actionType.string(),

View File

@@ -4,7 +4,7 @@ import { ActionName } from '@/onebot/action/router';
import { FileNapCatOneBotUUID } from '@/common/file-uuid';
import { z } from 'zod';
import { NTQQGroupApi } from '@/core/apis';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
file_id: actionType.string(),

View File

@@ -2,7 +2,7 @@ import { ActionName } from '@/onebot/action/router';
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { z } from 'zod';
import { NTQQGroupApi } from '@/core/apis';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
folder_id: actionType.string().optional(),

View File

@@ -5,7 +5,7 @@ import { join as joinPath } from 'node:path';
import { calculateFileMD5, uriToLocalFile } from '@/common/file';
import { randomUUID } from 'crypto';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
interface FileResponse {
file: string;
}

View File

@@ -5,7 +5,7 @@ import { MessageUnique } from '@/common/message-unique';
import { ChatType, ElementType, MsgSourceType, NTMsgType, RawMessage } from '@/core';
import { z } from 'zod';
import { isNumeric } from '@/common/helper';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
message_id: actionType.string().optional(),
id: actionType.string().optional(),

View File

@@ -5,7 +5,7 @@ import { ChatType } from '@/core/types';
import { MessageUnique } from '@/common/message-unique';
import { z } from 'zod';
import { NetworkAdapterConfig } from '@/onebot/config/config';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
interface Response {
messages: OB11Message[];

View File

@@ -1,7 +1,7 @@
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string()
});

View File

@@ -1,7 +1,7 @@
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string()
});

View File

@@ -3,7 +3,7 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { OB11Construct } from '@/onebot/helper/data';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
folder_id: actionType.string().optional(),

View File

@@ -2,7 +2,7 @@ import { WebHonorType } from '@/core';
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
type: z.nativeEnum(WebHonorType).optional()

View File

@@ -5,7 +5,7 @@ import { ChatType, Peer } from '@/core/types';
import { MessageUnique } from '@/common/message-unique';
import { z } from 'zod';
import { NetworkAdapterConfig } from '@/onebot/config/config';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
interface Response {
messages: OB11Message[];

View File

@@ -4,7 +4,7 @@ import { ActionName } from '@/onebot/action/router';
import { OB11GroupFile, OB11GroupFileFolder } from '@/onebot';
import { OB11Construct } from '@/onebot/helper/data';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
file_count: actionType.number().default(50),

View File

@@ -4,7 +4,7 @@ import { OB11Construct } from '@/onebot/helper/data';
import { ActionName } from '@/onebot/action/router';
import { calcQQLevel } from '@/common/helper';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
user_id: actionType.string(),

View File

@@ -1,7 +1,7 @@
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
url: actionType.string(),
});

View File

@@ -1,7 +1,7 @@
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
friend_id: actionType.string().optional(),

View File

@@ -1,7 +1,7 @@
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
model: actionType.string(),
});

View File

@@ -3,7 +3,7 @@ import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { unlink } from 'node:fs/promises';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
content: actionType.string(),

View File

@@ -4,7 +4,7 @@ import { checkFileExistV2, uriToLocalFile } from '@/common/file';
import { z } from 'zod';
import fs from 'node:fs/promises';
import { GeneralCallResult } from '@/core';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
file: actionType.string(),
group_id: actionType.string()

View File

@@ -2,7 +2,7 @@ import { NTQQUserApi } from '@/core/apis';
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
nickname: actionType.string(),
personal_note: actionType.string().optional(),

View File

@@ -5,7 +5,7 @@ import fs from 'fs';
import { uriToLocalFile } from '@/common/file';
import { SendMessageContext } from '@/onebot/api';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
group_id: actionType.string(),
file: actionType.string(),

View File

@@ -6,7 +6,7 @@ import { uriToLocalFile } from '@/common/file';
import { SendMessageContext } from '@/onebot/api';
import { ContextMode, createContext } from '@/onebot/action/msg/SendMsg';
import { z } from 'zod';
import { actionType } from '../type';
import { actionType } from '@/common/coerce';
const SchemaData = z.object({
user_id: actionType.string(),
file: actionType.string(),