build: 1.5.3-beta1

This commit is contained in:
手瓜一十雪
2024-06-09 17:46:32 +08:00
parent 86375ea6bb
commit b317b520f2
46 changed files with 155 additions and 44 deletions

View File

@@ -0,0 +1,26 @@
import { NTQQCollectionApi } from '@/core/apis/collection';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { NTQQUserApi } from '@/core/apis';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import { selfInfo } from '@/core/data';
const SchemaData = {
type: 'object',
properties: {
category: { type: 'number' },
count: { type: 'number' }
},
required: ['category', 'count'],
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
export class GetCollectionList extends BaseAction<Payload, any> {
actionName = ActionName.GetCollectionList;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload) {
return await NTQQCollectionApi.getAllCollection(payload.category, payload.count);
}
}

View File

@@ -91,5 +91,6 @@ export enum ActionName {
OCRImage = 'ocr_image',
IOCRImage = '.ocr_image',
SetSelfProfile = "set_self_profile",
CreateCollection = "create_collection"
CreateCollection = "create_collection",
GetCollectionList = "get_collection_list"
}