vona-module-test-vona 5.0.49 → 5.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.metadata/index.d.ts +7 -0
- package/dist/controller/order.d.ts +5 -1
- package/dist/controller/post.d.ts +3 -2
- package/dist/dto/orderCreate.d.ts +1 -1
- package/dist/dto/orderQuery.d.ts +9 -0
- package/dist/dto/orderUpdate.d.ts +1 -1
- package/dist/dto/postCreate.d.ts +1 -1
- package/dist/dto/signin.d.ts +2 -0
- package/dist/dto/userCreate.d.ts +1 -1
- package/dist/dto/userUpdate.d.ts +1 -1
- package/dist/index.js +380 -325
- package/dist/service/post.d.ts +2 -2
- package/package.json +1 -1
- package/src/.metadata/index.ts +8 -0
- package/src/config/locale/en-us.ts +1 -1
- package/src/config/locale/zh-cn.ts +1 -1
- package/src/controller/captcha.ts +2 -2
- package/src/controller/onion.ts +1 -1
- package/src/controller/order.ts +25 -3
- package/src/controller/post.ts +5 -4
- package/src/controller/upload.ts +4 -5
- package/src/dto/orderQuery.ts +28 -0
- package/src/dto/postQuery.ts +7 -8
- package/src/dto/signin.ts +4 -0
- package/test/authSimple.test.ts +1 -0
- package/test/captcha.test.ts +49 -2
- package/test/database/dtoAggregate.test.ts +14 -11
- package/test/database/dtoGet.test.ts +10 -9
- package/test/database/dtoGroup.test.ts +15 -12
- package/test/database/dtoLazy.test.ts +1 -1
- package/test/database/dtoMutate.test.ts +10 -9
- package/test/database/dtoQuery.test.ts +3 -2
- package/test/database/modelWhere.test.ts +1 -0
- package/test/mail.test.ts +14 -0
|
@@ -1115,6 +1115,7 @@ export interface IModuleSummerCache {
|
|
|
1115
1115
|
/** dto: begin */
|
|
1116
1116
|
export * from '../dto/categoryTree.ts';
|
|
1117
1117
|
export * from '../dto/orderCreate.ts';
|
|
1118
|
+
export * from '../dto/orderQuery.ts';
|
|
1118
1119
|
export * from '../dto/orderResult.ts';
|
|
1119
1120
|
export * from '../dto/orderUpdate.ts';
|
|
1120
1121
|
export * from '../dto/postCreate.ts';
|
|
@@ -1129,6 +1130,7 @@ export * from '../dto/userLazy.ts';
|
|
|
1129
1130
|
export * from '../dto/userUpdate.ts';
|
|
1130
1131
|
import type { IDtoOptionsCategoryTree } from '../dto/categoryTree.ts';
|
|
1131
1132
|
import type { IDtoOptionsOrderCreate } from '../dto/orderCreate.ts';
|
|
1133
|
+
import type { IDtoOptionsOrderQuery } from '../dto/orderQuery.ts';
|
|
1132
1134
|
import type { IDtoOptionsOrderResult } from '../dto/orderResult.ts';
|
|
1133
1135
|
import type { IDtoOptionsOrderUpdate } from '../dto/orderUpdate.ts';
|
|
1134
1136
|
import type { IDtoOptionsPostCreate } from '../dto/postCreate.ts';
|
|
@@ -1146,6 +1148,7 @@ declare module 'vona-module-a-web' {
|
|
|
1146
1148
|
interface IDtoRecord {
|
|
1147
1149
|
'test-vona:categoryTree': IDtoOptionsCategoryTree;
|
|
1148
1150
|
'test-vona:orderCreate': IDtoOptionsOrderCreate;
|
|
1151
|
+
'test-vona:orderQuery': IDtoOptionsOrderQuery;
|
|
1149
1152
|
'test-vona:orderResult': IDtoOptionsOrderResult;
|
|
1150
1153
|
'test-vona:orderUpdate': IDtoOptionsOrderUpdate;
|
|
1151
1154
|
'test-vona:postCreate': IDtoOptionsPostCreate;
|
|
@@ -1166,6 +1169,7 @@ declare module 'vona-module-test-vona' {
|
|
|
1166
1169
|
/** dto: begin */
|
|
1167
1170
|
import type { DtoCategoryTree } from '../dto/categoryTree.ts';
|
|
1168
1171
|
import type { DtoOrderCreate } from '../dto/orderCreate.ts';
|
|
1172
|
+
import type { DtoOrderQuery } from '../dto/orderQuery.ts';
|
|
1169
1173
|
import type { DtoOrderResult } from '../dto/orderResult.ts';
|
|
1170
1174
|
import type { DtoOrderUpdate } from '../dto/orderUpdate.ts';
|
|
1171
1175
|
import type { DtoPostCreate } from '../dto/postCreate.ts';
|
|
@@ -1185,6 +1189,9 @@ declare module 'vona-module-test-vona' {
|
|
|
1185
1189
|
interface IDtoOptionsOrderCreate {
|
|
1186
1190
|
fields?: TypeEntityOptionsFields<DtoOrderCreate, IDtoOptionsOrderCreate[TypeSymbolKeyFieldsMore]>;
|
|
1187
1191
|
}
|
|
1192
|
+
interface IDtoOptionsOrderQuery {
|
|
1193
|
+
fields?: TypeEntityOptionsFields<DtoOrderQuery, IDtoOptionsOrderQuery[TypeSymbolKeyFieldsMore]>;
|
|
1194
|
+
}
|
|
1188
1195
|
interface IDtoOptionsOrderResult {
|
|
1189
1196
|
fields?: TypeEntityOptionsFields<DtoOrderResult, IDtoOptionsOrderResult[TypeSymbolKeyFieldsMore]>;
|
|
1190
1197
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { IQueryParams } from 'vona-module-a-orm';
|
|
1
2
|
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
3
|
+
import type { ModelOrder } from '../model/order.ts';
|
|
2
4
|
import { BeanBase } from 'vona';
|
|
5
|
+
import { DtoOrderCreate } from '../dto/orderCreate.ts';
|
|
3
6
|
import { DtoOrderResult } from '../dto/orderResult.ts';
|
|
4
7
|
export interface IControllerOptionsOrder extends IDecoratorControllerOptions {
|
|
5
8
|
}
|
|
6
9
|
export declare class ControllerOrder extends BeanBase {
|
|
7
|
-
|
|
10
|
+
create(data: DtoOrderCreate): Promise<import("vona-module-a-orm").TypeModelMutateRelationData<import("vona-module-test-vona").EntityOrder, ModelOrder, import("vona-module-a-orm").IModelInsertOptions<import("vona-module-test-vona").EntityOrder, ModelOrder>, true>>;
|
|
11
|
+
findAll(params: IQueryParams<ModelOrder>): Promise<DtoOrderResult[]>;
|
|
8
12
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { IQueryParams } from 'vona-module-a-orm';
|
|
2
|
-
import type { IDecoratorControllerOptions } from 'vona-module-a-web';
|
|
2
|
+
import type { IDecoratorControllerOptions, IPipeOptionsQueryTransformInfo } from 'vona-module-a-web';
|
|
3
3
|
import type { ModelPost } from '../model/post.ts';
|
|
4
4
|
import { BeanBase } from 'vona';
|
|
5
5
|
export interface IControllerOptionsPost extends IDecoratorControllerOptions {
|
|
6
6
|
}
|
|
7
7
|
export declare class ControllerPost extends BeanBase {
|
|
8
8
|
findManyEcho(params: IQueryParams<ModelPost>): IQueryParams<ModelPost>;
|
|
9
|
+
findManyQueryTransform(_info: IPipeOptionsQueryTransformInfo): boolean | undefined;
|
|
9
10
|
findMany(params: IQueryParams<ModelPost>): Promise<import("vona-module-a-orm").TypeModelSelectAndCount<import("vona-module-test-vona").EntityPost, ModelPost, {
|
|
10
11
|
include: {
|
|
11
12
|
postContent: true;
|
|
12
13
|
};
|
|
13
14
|
with?: Record<string, unknown>;
|
|
14
15
|
distinct?: boolean | keyof import("vona-module-test-vona").EntityPost | (keyof import("vona-module-test-vona").EntityPost)[] | undefined;
|
|
15
|
-
columns?: "
|
|
16
|
+
columns?: "title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars" | ("title" | "id" | "iid" | "createdAt" | "updatedAt" | "deleted" | "*" | "userId" | "stars")[] | undefined;
|
|
16
17
|
where?: import("vona-module-a-orm").TypeModelWhereInner<{
|
|
17
18
|
"testVonaPostContent.content": string;
|
|
18
19
|
"testVonaPostContent.postId": import("table-identity").TableIdentity;
|
|
@@ -4,7 +4,7 @@ export interface IDtoOptionsOrderCreate extends IDecoratorDtoOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare const DtoOrderCreate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelOrder, {
|
|
6
6
|
columns: ("orderNo" | "remark")[];
|
|
7
|
-
}, "create", "
|
|
7
|
+
}, "create", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
8
8
|
export declare class DtoOrderCreate extends DtoOrderCreate_base {
|
|
9
9
|
}
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
|
+
import { EntityOrder } from '../entity/order.ts';
|
|
3
|
+
export interface IDtoOptionsOrderQuery extends IDecoratorDtoOptions {
|
|
4
|
+
}
|
|
5
|
+
declare const DtoOrderQuery_base: new (...args: any[]) => import("vona-module-a-orm").DtoQueryBase & Partial<Pick<EntityOrder, "orderNo" | "remark">>;
|
|
6
|
+
export declare class DtoOrderQuery extends DtoOrderQuery_base {
|
|
7
|
+
userName?: string;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export interface IDtoOptionsOrderUpdate extends IDecoratorDtoOptions {
|
|
|
4
4
|
}
|
|
5
5
|
declare const DtoOrderUpdate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelOrder, {
|
|
6
6
|
columns: ("orderNo" | "remark")[];
|
|
7
|
-
}, "update", "
|
|
7
|
+
}, "update", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
8
8
|
export declare class DtoOrderUpdate extends DtoOrderUpdate_base {
|
|
9
9
|
}
|
|
10
10
|
export {};
|
package/dist/dto/postCreate.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
|
2
2
|
import { ModelPost } from '../model/post.ts';
|
|
3
3
|
export interface IDtoOptionsPostCreate extends IDecoratorDtoOptions {
|
|
4
4
|
}
|
|
5
|
-
declare const DtoPostCreate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelPost, undefined, "create", "
|
|
5
|
+
declare const DtoPostCreate_base: import("vona-core").Constructable<import("vona-module-a-orm").TypeDtoMutateResult<ModelPost, undefined, "create", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
6
6
|
export declare class DtoPostCreate extends DtoPostCreate_base {
|
|
7
7
|
}
|
|
8
8
|
export {};
|
package/dist/dto/signin.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { DtoCaptchaVerify } from 'vona-module-a-captcha';
|
|
1
2
|
import type { IDecoratorDtoOptions } from 'vona-module-a-web';
|
|
2
3
|
export interface IDtoOptionsSignin extends IDecoratorDtoOptions {
|
|
3
4
|
}
|
|
4
5
|
export declare class DtoSignin {
|
|
5
6
|
username: string;
|
|
6
7
|
password: string;
|
|
8
|
+
captcha: DtoCaptchaVerify;
|
|
7
9
|
}
|
package/dist/dto/userCreate.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const DtoUserCreate_base: import("vona-core").Constructable<import("vona
|
|
|
6
6
|
roles: true;
|
|
7
7
|
posts: true;
|
|
8
8
|
};
|
|
9
|
-
}, "create", "
|
|
9
|
+
}, "create", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
10
10
|
export declare class DtoUserCreate extends DtoUserCreate_base {
|
|
11
11
|
}
|
|
12
12
|
export {};
|
package/dist/dto/userUpdate.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const DtoUserUpdate_base: import("vona-core").Constructable<import("vona
|
|
|
5
5
|
include: {
|
|
6
6
|
posts: true;
|
|
7
7
|
};
|
|
8
|
-
}, "update", "
|
|
8
|
+
}, "update", "id" | "iid" | "createdAt" | "updatedAt" | "deleted", true>>;
|
|
9
9
|
export declare class DtoUserUpdate extends DtoUserUpdate_base {
|
|
10
10
|
}
|
|
11
11
|
export {};
|