oak-pay-business 2.3.2 → 2.3.4
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/es/components/AbstractComponents.d.ts +2 -2
- package/es/context/BackendRuntimeContext.d.ts +38 -0
- package/es/oak-app-domain/ActionDefDict.d.ts +3 -0
- package/es/oak-app-domain/ActionDefDict.js +2 -0
- package/es/oak-app-domain/Application/Schema.d.ts +12 -0
- package/es/oak-app-domain/ApplicationPassport/Schema.d.ts +160 -0
- package/es/oak-app-domain/ApplicationPassport/Schema.js +1 -0
- package/es/oak-app-domain/ApplicationPassport/Storage.d.ts +3 -0
- package/es/oak-app-domain/ApplicationPassport/Storage.js +21 -0
- package/es/oak-app-domain/ApplicationPassport/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/Captcha/Schema.d.ts +13 -7
- package/es/oak-app-domain/Captcha/Storage.js +9 -4
- package/es/oak-app-domain/Captcha/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Email/Schema.d.ts +2 -2
- package/es/oak-app-domain/Email/Storage.js +1 -1
- package/es/oak-app-domain/EntityDict.d.ts +6 -0
- package/es/oak-app-domain/LoginName/Action.d.ts +10 -0
- package/es/oak-app-domain/LoginName/Action.js +6 -0
- package/es/oak-app-domain/LoginName/Schema.d.ts +142 -0
- package/es/oak-app-domain/LoginName/Schema.js +1 -0
- package/es/oak-app-domain/LoginName/Storage.d.ts +3 -0
- package/es/oak-app-domain/LoginName/Storage.js +38 -0
- package/es/oak-app-domain/LoginName/Style.d.ts +3 -0
- package/es/oak-app-domain/LoginName/Style.js +12 -0
- package/es/oak-app-domain/LoginName/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/Message/Schema.d.ts +5 -5
- package/es/oak-app-domain/Notification/Storage.js +1 -1
- package/es/oak-app-domain/Notification/Style.js +1 -0
- package/es/oak-app-domain/Notification/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Passport/Schema.d.ts +166 -0
- package/es/oak-app-domain/Passport/Schema.js +1 -0
- package/es/oak-app-domain/Passport/Storage.d.ts +3 -0
- package/es/oak-app-domain/Passport/Storage.js +24 -0
- package/es/oak-app-domain/Passport/Style.d.ts +3 -0
- package/es/oak-app-domain/Passport/Style.js +14 -0
- package/es/oak-app-domain/Passport/locales/zh_CN.json +1 -0
- package/es/oak-app-domain/Storage.js +6 -0
- package/es/oak-app-domain/StyleDict.js +4 -0
- package/es/oak-app-domain/System/Schema.d.ts +12 -0
- package/es/oak-app-domain/Token/Schema.d.ts +63 -5
- package/es/oak-app-domain/Token/Storage.js +1 -1
- package/es/oak-app-domain/User/Schema.d.ts +12 -0
- package/es/oak-app-domain/WechatLogin/Schema.d.ts +53 -2
- package/es/oak-app-domain/WechatLogin/Storage.js +4 -0
- package/es/oak-app-domain/WechatLogin/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/WechatUser/Schema.d.ts +12 -0
- package/es/oak-app-domain/_SubQuery.d.ts +34 -2
- package/es/utils/application.d.ts +38 -0
- package/lib/aspects/withdraw.d.ts +12 -12
- package/lib/context/BackendRuntimeContext.d.ts +38 -0
- package/lib/oak-app-domain/ActionDefDict.d.ts +3 -0
- package/lib/oak-app-domain/ActionDefDict.js +50 -48
- package/lib/oak-app-domain/Application/Schema.d.ts +12 -0
- package/lib/oak-app-domain/ApplicationPassport/Schema.d.ts +160 -0
- package/lib/oak-app-domain/ApplicationPassport/Schema.js +2 -0
- package/lib/oak-app-domain/ApplicationPassport/Storage.d.ts +3 -0
- package/lib/oak-app-domain/ApplicationPassport/Storage.js +24 -0
- package/lib/oak-app-domain/ApplicationPassport/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/Captcha/Schema.d.ts +13 -7
- package/lib/oak-app-domain/Captcha/Storage.js +9 -4
- package/lib/oak-app-domain/Captcha/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Email/Schema.d.ts +2 -2
- package/lib/oak-app-domain/Email/Storage.js +1 -1
- package/lib/oak-app-domain/EntityDict.d.ts +6 -0
- package/lib/oak-app-domain/LoginName/Action.d.ts +10 -0
- package/lib/oak-app-domain/LoginName/Action.js +9 -0
- package/lib/oak-app-domain/LoginName/Schema.d.ts +142 -0
- package/lib/oak-app-domain/LoginName/Schema.js +2 -0
- package/lib/oak-app-domain/LoginName/Storage.d.ts +3 -0
- package/lib/oak-app-domain/LoginName/Storage.js +41 -0
- package/lib/oak-app-domain/LoginName/Style.d.ts +3 -0
- package/lib/oak-app-domain/LoginName/Style.js +15 -0
- package/lib/oak-app-domain/LoginName/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/Message/Schema.d.ts +5 -5
- package/lib/oak-app-domain/Notification/Storage.js +1 -1
- package/lib/oak-app-domain/Notification/Style.js +1 -0
- package/lib/oak-app-domain/Notification/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Passport/Schema.d.ts +166 -0
- package/lib/oak-app-domain/Passport/Schema.js +2 -0
- package/lib/oak-app-domain/Passport/Storage.d.ts +3 -0
- package/lib/oak-app-domain/Passport/Storage.js +27 -0
- package/lib/oak-app-domain/Passport/Style.d.ts +3 -0
- package/lib/oak-app-domain/Passport/Style.js +17 -0
- package/lib/oak-app-domain/Passport/locales/zh_CN.json +1 -0
- package/lib/oak-app-domain/Storage.js +118 -112
- package/lib/oak-app-domain/StyleDict.js +64 -60
- package/lib/oak-app-domain/System/Schema.d.ts +12 -0
- package/lib/oak-app-domain/Token/Schema.d.ts +63 -5
- package/lib/oak-app-domain/Token/Storage.js +1 -1
- package/lib/oak-app-domain/User/Schema.d.ts +12 -0
- package/lib/oak-app-domain/WechatLogin/Schema.d.ts +53 -2
- package/lib/oak-app-domain/WechatLogin/Storage.js +4 -0
- package/lib/oak-app-domain/WechatLogin/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/WechatUser/Schema.d.ts +12 -0
- package/lib/oak-app-domain/_SubQuery.d.ts +34 -2
- package/lib/utils/application.d.ts +38 -0
- package/package.json +4 -4
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
|
3
|
+
import { OneOf } from "oak-domain/lib/types/Polyfill";
|
|
4
|
+
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
|
5
|
+
import { GenericAction } from "oak-domain/lib/actions/action";
|
|
6
|
+
import { Boolean } from "oak-domain/lib/types/DataType";
|
|
7
|
+
import * as Application from "../Application/Schema";
|
|
8
|
+
import * as Passport from "../Passport/Schema";
|
|
9
|
+
export type OpSchema = EntityShape & {
|
|
10
|
+
applicationId: ForeignKey<"application">;
|
|
11
|
+
passportId: ForeignKey<"passport">;
|
|
12
|
+
isDefault: Boolean;
|
|
13
|
+
};
|
|
14
|
+
export type OpAttr = keyof OpSchema;
|
|
15
|
+
export type Schema = EntityShape & {
|
|
16
|
+
applicationId: ForeignKey<"application">;
|
|
17
|
+
passportId: ForeignKey<"passport">;
|
|
18
|
+
isDefault: Boolean;
|
|
19
|
+
application: Application.Schema;
|
|
20
|
+
passport: Passport.Schema;
|
|
21
|
+
} & {
|
|
22
|
+
[A in ExpressionKey]?: any;
|
|
23
|
+
};
|
|
24
|
+
type AttrFilter = {
|
|
25
|
+
id: Q_StringValue;
|
|
26
|
+
$$createAt$$: Q_DateValue;
|
|
27
|
+
$$seq$$: Q_NumberValue;
|
|
28
|
+
$$updateAt$$: Q_DateValue;
|
|
29
|
+
applicationId: Q_StringValue;
|
|
30
|
+
application: Application.Filter;
|
|
31
|
+
passportId: Q_StringValue;
|
|
32
|
+
passport: Passport.Filter;
|
|
33
|
+
isDefault: Q_BooleanValue;
|
|
34
|
+
};
|
|
35
|
+
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
36
|
+
export type Projection = {
|
|
37
|
+
"#id"?: NodeId;
|
|
38
|
+
[k: string]: any;
|
|
39
|
+
id?: number;
|
|
40
|
+
$$createAt$$?: number;
|
|
41
|
+
$$updateAt$$?: number;
|
|
42
|
+
$$seq$$?: number;
|
|
43
|
+
applicationId?: number;
|
|
44
|
+
application?: Application.Projection;
|
|
45
|
+
passportId?: number;
|
|
46
|
+
passport?: Passport.Projection;
|
|
47
|
+
isDefault?: number;
|
|
48
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
49
|
+
type ApplicationPassportIdProjection = OneOf<{
|
|
50
|
+
id: number;
|
|
51
|
+
}>;
|
|
52
|
+
type ApplicationIdProjection = OneOf<{
|
|
53
|
+
applicationId: number;
|
|
54
|
+
}>;
|
|
55
|
+
type PassportIdProjection = OneOf<{
|
|
56
|
+
passportId: number;
|
|
57
|
+
}>;
|
|
58
|
+
export type SortAttr = {
|
|
59
|
+
id: number;
|
|
60
|
+
} | {
|
|
61
|
+
$$createAt$$: number;
|
|
62
|
+
} | {
|
|
63
|
+
$$seq$$: number;
|
|
64
|
+
} | {
|
|
65
|
+
$$updateAt$$: number;
|
|
66
|
+
} | {
|
|
67
|
+
applicationId: number;
|
|
68
|
+
} | {
|
|
69
|
+
application: Application.SortAttr;
|
|
70
|
+
} | {
|
|
71
|
+
passportId: number;
|
|
72
|
+
} | {
|
|
73
|
+
passport: Passport.SortAttr;
|
|
74
|
+
} | {
|
|
75
|
+
isDefault: number;
|
|
76
|
+
} | {
|
|
77
|
+
[k: string]: any;
|
|
78
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
79
|
+
export type SortNode = {
|
|
80
|
+
$attr: SortAttr;
|
|
81
|
+
$direction?: "asc" | "desc";
|
|
82
|
+
};
|
|
83
|
+
export type Sorter = SortNode[];
|
|
84
|
+
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
85
|
+
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
86
|
+
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
87
|
+
export type CreateOperationData = FormCreateData<Omit<OpSchema, "applicationId" | "passportId">> & (({
|
|
88
|
+
applicationId?: never;
|
|
89
|
+
application: Application.CreateSingleOperation;
|
|
90
|
+
} | {
|
|
91
|
+
applicationId: ForeignKey<"application">;
|
|
92
|
+
application?: Application.UpdateOperation;
|
|
93
|
+
} | {
|
|
94
|
+
application?: never;
|
|
95
|
+
applicationId: ForeignKey<"application">;
|
|
96
|
+
}) & ({
|
|
97
|
+
passportId?: never;
|
|
98
|
+
passport: Passport.CreateSingleOperation;
|
|
99
|
+
} | {
|
|
100
|
+
passportId: ForeignKey<"passport">;
|
|
101
|
+
passport?: Passport.UpdateOperation;
|
|
102
|
+
} | {
|
|
103
|
+
passport?: never;
|
|
104
|
+
passportId: ForeignKey<"passport">;
|
|
105
|
+
}));
|
|
106
|
+
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
107
|
+
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
108
|
+
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
109
|
+
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "applicationId" | "passportId">> & (({
|
|
110
|
+
application?: Application.CreateSingleOperation;
|
|
111
|
+
applicationId?: never;
|
|
112
|
+
} | {
|
|
113
|
+
application?: Application.UpdateOperation;
|
|
114
|
+
applicationId?: never;
|
|
115
|
+
} | {
|
|
116
|
+
application?: Application.RemoveOperation;
|
|
117
|
+
applicationId?: never;
|
|
118
|
+
} | {
|
|
119
|
+
application?: never;
|
|
120
|
+
applicationId?: ForeignKey<"application">;
|
|
121
|
+
}) & ({
|
|
122
|
+
passport?: Passport.CreateSingleOperation;
|
|
123
|
+
passportId?: never;
|
|
124
|
+
} | {
|
|
125
|
+
passport?: Passport.UpdateOperation;
|
|
126
|
+
passportId?: never;
|
|
127
|
+
} | {
|
|
128
|
+
passport?: Passport.RemoveOperation;
|
|
129
|
+
passportId?: never;
|
|
130
|
+
} | {
|
|
131
|
+
passport?: never;
|
|
132
|
+
passportId?: ForeignKey<"passport">;
|
|
133
|
+
})) & {
|
|
134
|
+
[k: string]: any;
|
|
135
|
+
};
|
|
136
|
+
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
137
|
+
export type RemoveOperationData = {} & (({
|
|
138
|
+
application?: Application.UpdateOperation | Application.RemoveOperation;
|
|
139
|
+
}) & ({
|
|
140
|
+
passport?: Passport.UpdateOperation | Passport.RemoveOperation;
|
|
141
|
+
}));
|
|
142
|
+
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
143
|
+
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
144
|
+
export type ApplicationIdSubQuery = Selection<ApplicationIdProjection>;
|
|
145
|
+
export type PassportIdSubQuery = Selection<PassportIdProjection>;
|
|
146
|
+
export type ApplicationPassportIdSubQuery = Selection<ApplicationPassportIdProjection>;
|
|
147
|
+
export type EntityDef = {
|
|
148
|
+
Schema: Schema;
|
|
149
|
+
OpSchema: OpSchema;
|
|
150
|
+
Action: OakMakeAction<GenericAction> | string;
|
|
151
|
+
Selection: Selection;
|
|
152
|
+
Aggregation: Aggregation;
|
|
153
|
+
Operation: Operation;
|
|
154
|
+
Create: CreateOperation;
|
|
155
|
+
Update: UpdateOperation;
|
|
156
|
+
Remove: RemoveOperation;
|
|
157
|
+
CreateSingle: CreateSingleOperation;
|
|
158
|
+
CreateMulti: CreateMultipleOperation;
|
|
159
|
+
};
|
|
160
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.desc = void 0;
|
|
4
|
+
const action_1 = require("oak-domain/lib/actions/action");
|
|
5
|
+
exports.desc = {
|
|
6
|
+
attributes: {
|
|
7
|
+
applicationId: {
|
|
8
|
+
notNull: true,
|
|
9
|
+
type: "ref",
|
|
10
|
+
ref: "application"
|
|
11
|
+
},
|
|
12
|
+
passportId: {
|
|
13
|
+
notNull: true,
|
|
14
|
+
type: "ref",
|
|
15
|
+
ref: "passport"
|
|
16
|
+
},
|
|
17
|
+
isDefault: {
|
|
18
|
+
notNull: true,
|
|
19
|
+
type: "boolean"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
actionType: "crud",
|
|
23
|
+
actions: action_1.genericActions
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "name": "应用登录方式", "attr": { "application": "应用", "passport": "登录方式", "isDefault": "是否默认" } }
|
|
@@ -4,8 +4,9 @@ import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOper
|
|
|
4
4
|
import { Action, ParticularAction, IState } from "./Action";
|
|
5
5
|
import { String, Text, Boolean, Datetime } from "oak-domain/lib/types/DataType";
|
|
6
6
|
export type OpSchema = EntityShape & {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
origin: "mobile" | "email";
|
|
8
|
+
content: String<32>;
|
|
9
|
+
code: String<8>;
|
|
9
10
|
visitorId: Text;
|
|
10
11
|
reason?: Text | null;
|
|
11
12
|
env: Object;
|
|
@@ -16,8 +17,9 @@ export type OpSchema = EntityShape & {
|
|
|
16
17
|
};
|
|
17
18
|
export type OpAttr = keyof OpSchema;
|
|
18
19
|
export type Schema = EntityShape & {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
origin: "mobile" | "email";
|
|
21
|
+
content: String<32>;
|
|
22
|
+
code: String<8>;
|
|
21
23
|
visitorId: Text;
|
|
22
24
|
reason?: Text | null;
|
|
23
25
|
env: Object;
|
|
@@ -33,7 +35,8 @@ type AttrFilter = {
|
|
|
33
35
|
$$createAt$$: Q_DateValue;
|
|
34
36
|
$$seq$$: Q_NumberValue;
|
|
35
37
|
$$updateAt$$: Q_DateValue;
|
|
36
|
-
|
|
38
|
+
origin: Q_EnumValue<"mobile" | "email">;
|
|
39
|
+
content: Q_StringValue;
|
|
37
40
|
code: Q_StringValue;
|
|
38
41
|
visitorId: Q_StringValue;
|
|
39
42
|
reason: Q_StringValue;
|
|
@@ -51,7 +54,8 @@ export type Projection = {
|
|
|
51
54
|
$$createAt$$?: number;
|
|
52
55
|
$$updateAt$$?: number;
|
|
53
56
|
$$seq$$?: number;
|
|
54
|
-
|
|
57
|
+
origin?: number;
|
|
58
|
+
content?: number;
|
|
55
59
|
code?: number;
|
|
56
60
|
visitorId?: number;
|
|
57
61
|
reason?: number;
|
|
@@ -73,7 +77,9 @@ export type SortAttr = {
|
|
|
73
77
|
} | {
|
|
74
78
|
$$updateAt$$: number;
|
|
75
79
|
} | {
|
|
76
|
-
|
|
80
|
+
origin: number;
|
|
81
|
+
} | {
|
|
82
|
+
content: number;
|
|
77
83
|
} | {
|
|
78
84
|
code: number;
|
|
79
85
|
} | {
|
|
@@ -4,18 +4,23 @@ exports.desc = void 0;
|
|
|
4
4
|
const Action_1 = require("./Action");
|
|
5
5
|
exports.desc = {
|
|
6
6
|
attributes: {
|
|
7
|
-
|
|
7
|
+
origin: {
|
|
8
|
+
notNull: true,
|
|
9
|
+
type: "enum",
|
|
10
|
+
enumeration: ["mobile", "email"]
|
|
11
|
+
},
|
|
12
|
+
content: {
|
|
8
13
|
notNull: true,
|
|
9
14
|
type: "varchar",
|
|
10
15
|
params: {
|
|
11
|
-
length:
|
|
16
|
+
length: 32
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
19
|
code: {
|
|
15
20
|
notNull: true,
|
|
16
21
|
type: "varchar",
|
|
17
22
|
params: {
|
|
18
|
-
length:
|
|
23
|
+
length: 8
|
|
19
24
|
}
|
|
20
25
|
},
|
|
21
26
|
visitorId: {
|
|
@@ -54,7 +59,7 @@ exports.desc = {
|
|
|
54
59
|
name: 'index_mobile_code',
|
|
55
60
|
attributes: [
|
|
56
61
|
{
|
|
57
|
-
name: '
|
|
62
|
+
name: 'content',
|
|
58
63
|
direction: 'ASC',
|
|
59
64
|
},
|
|
60
65
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "验证码", "attr": { "
|
|
1
|
+
{ "name": "验证码", "attr": { "origin": "源", "content": "内容", "code": "验证码", "visitorId": "用户标识", "reason": "失败原因", "env": "用户环境", "expired": "是否过期", "expiresAt": "过期时间", "iState": "状态", "type": "类型" }, "action": { "send": "发送", "fail": "失败", "success": "成功" }, "v": { "iState": { "unsent": "未发送", "sending": "发送中", "sent": "已发送", "failure": "已失败" }, "type": { "login": "登录", "changePassword": "修改密码", "confirm": "校验" } } }
|
|
@@ -8,13 +8,13 @@ import { String } from "oak-domain/lib/types/DataType";
|
|
|
8
8
|
import * as User from "../User/Schema";
|
|
9
9
|
import * as Token from "../Token/Schema";
|
|
10
10
|
export type OpSchema = EntityShape & {
|
|
11
|
-
email: String<
|
|
11
|
+
email: String<32>;
|
|
12
12
|
userId: ForeignKey<"user">;
|
|
13
13
|
ableState?: AbleState | null;
|
|
14
14
|
};
|
|
15
15
|
export type OpAttr = keyof OpSchema;
|
|
16
16
|
export type Schema = EntityShape & {
|
|
17
|
-
email: String<
|
|
17
|
+
email: String<32>;
|
|
18
18
|
userId: ForeignKey<"user">;
|
|
19
19
|
ableState?: AbleState | null;
|
|
20
20
|
user: User.Schema;
|
|
@@ -13,6 +13,7 @@ import { EntityDef as UserEntityGrant } from "./UserEntityGrant/Schema";
|
|
|
13
13
|
import { EntityDef as UserRelation } from "./UserRelation/Schema";
|
|
14
14
|
import { EntityDef as Address } from "./Address/Schema";
|
|
15
15
|
import { EntityDef as Application } from "./Application/Schema";
|
|
16
|
+
import { EntityDef as ApplicationPassport } from "./ApplicationPassport/Schema";
|
|
16
17
|
import { EntityDef as Area } from "./Area/Schema";
|
|
17
18
|
import { EntityDef as Article } from "./Article/Schema";
|
|
18
19
|
import { EntityDef as ArticleMenu } from "./ArticleMenu/Schema";
|
|
@@ -22,6 +23,7 @@ import { EntityDef as Domain } from "./Domain/Schema";
|
|
|
22
23
|
import { EntityDef as Email } from "./Email/Schema";
|
|
23
24
|
import { EntityDef as ExtraFile } from "./ExtraFile/Schema";
|
|
24
25
|
import { EntityDef as Livestream } from "./Livestream/Schema";
|
|
26
|
+
import { EntityDef as LoginName } from "./LoginName/Schema";
|
|
25
27
|
import { EntityDef as Message } from "./Message/Schema";
|
|
26
28
|
import { EntityDef as MessageSystem } from "./MessageSystem/Schema";
|
|
27
29
|
import { EntityDef as MessageType } from "./MessageType/Schema";
|
|
@@ -30,6 +32,7 @@ import { EntityDef as MessageTypeTemplate } from "./MessageTypeTemplate/Schema";
|
|
|
30
32
|
import { EntityDef as Mobile } from "./Mobile/Schema";
|
|
31
33
|
import { EntityDef as Notification } from "./Notification/Schema";
|
|
32
34
|
import { EntityDef as Parasite } from "./Parasite/Schema";
|
|
35
|
+
import { EntityDef as Passport } from "./Passport/Schema";
|
|
33
36
|
import { EntityDef as Platform } from "./Platform/Schema";
|
|
34
37
|
import { EntityDef as ReadRemark } from "./ReadRemark/Schema";
|
|
35
38
|
import { EntityDef as Session } from "./Session/Schema";
|
|
@@ -85,6 +88,7 @@ export type EntityDict = {
|
|
|
85
88
|
userRelation: UserRelation;
|
|
86
89
|
address: Address;
|
|
87
90
|
application: Application;
|
|
91
|
+
applicationPassport: ApplicationPassport;
|
|
88
92
|
area: Area;
|
|
89
93
|
article: Article;
|
|
90
94
|
articleMenu: ArticleMenu;
|
|
@@ -94,6 +98,7 @@ export type EntityDict = {
|
|
|
94
98
|
email: Email;
|
|
95
99
|
extraFile: ExtraFile;
|
|
96
100
|
livestream: Livestream;
|
|
101
|
+
loginName: LoginName;
|
|
97
102
|
message: Message;
|
|
98
103
|
messageSystem: MessageSystem;
|
|
99
104
|
messageType: MessageType;
|
|
@@ -102,6 +107,7 @@ export type EntityDict = {
|
|
|
102
107
|
mobile: Mobile;
|
|
103
108
|
notification: Notification;
|
|
104
109
|
parasite: Parasite;
|
|
110
|
+
passport: Passport;
|
|
105
111
|
platform: Platform;
|
|
106
112
|
readRemark: ReadRemark;
|
|
107
113
|
session: Session;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AbleState, AbleAction } from "oak-domain/lib/actions/action";
|
|
2
|
+
import { ActionDef } from "oak-domain/lib/types/Action";
|
|
3
|
+
import { GenericAction } from "oak-domain/lib/actions/action";
|
|
4
|
+
export type ParticularAction = AbleAction;
|
|
5
|
+
export declare const actions: string[];
|
|
6
|
+
export declare const AbleActionDef: ActionDef<AbleAction, AbleState>;
|
|
7
|
+
export type Action = GenericAction | ParticularAction | string;
|
|
8
|
+
export declare const actionDefDict: {
|
|
9
|
+
ableState: ActionDef<AbleAction, AbleState>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.actionDefDict = exports.AbleActionDef = exports.actions = void 0;
|
|
4
|
+
const action_1 = require("oak-domain/lib/actions/action");
|
|
5
|
+
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable"];
|
|
6
|
+
exports.AbleActionDef = (0, action_1.makeAbleActionDef)('enabled');
|
|
7
|
+
exports.actionDefDict = {
|
|
8
|
+
ableState: exports.AbleActionDef
|
|
9
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand";
|
|
3
|
+
import { OneOf } from "oak-domain/lib/types/Polyfill";
|
|
4
|
+
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity";
|
|
5
|
+
import { Action, ParticularAction } from "./Action";
|
|
6
|
+
import { AbleState } from "oak-domain/lib/actions/action";
|
|
7
|
+
import { String } from "oak-domain/lib/types/DataType";
|
|
8
|
+
import * as User from "../User/Schema";
|
|
9
|
+
import * as Token from "../Token/Schema";
|
|
10
|
+
export type OpSchema = EntityShape & {
|
|
11
|
+
name: String<32>;
|
|
12
|
+
userId: ForeignKey<"user">;
|
|
13
|
+
ableState?: AbleState | null;
|
|
14
|
+
};
|
|
15
|
+
export type OpAttr = keyof OpSchema;
|
|
16
|
+
export type Schema = EntityShape & {
|
|
17
|
+
name: String<32>;
|
|
18
|
+
userId: ForeignKey<"user">;
|
|
19
|
+
ableState?: AbleState | null;
|
|
20
|
+
user: User.Schema;
|
|
21
|
+
token$entity?: Array<Token.Schema>;
|
|
22
|
+
token$entity$$aggr?: AggregationResult<Token.Schema>;
|
|
23
|
+
} & {
|
|
24
|
+
[A in ExpressionKey]?: any;
|
|
25
|
+
};
|
|
26
|
+
type AttrFilter = {
|
|
27
|
+
id: Q_StringValue;
|
|
28
|
+
$$createAt$$: Q_DateValue;
|
|
29
|
+
$$seq$$: Q_NumberValue;
|
|
30
|
+
$$updateAt$$: Q_DateValue;
|
|
31
|
+
name: Q_StringValue;
|
|
32
|
+
userId: Q_StringValue;
|
|
33
|
+
user: User.Filter;
|
|
34
|
+
ableState: Q_EnumValue<AbleState>;
|
|
35
|
+
token$entity: Token.Filter & SubQueryPredicateMetadata;
|
|
36
|
+
};
|
|
37
|
+
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
38
|
+
export type Projection = {
|
|
39
|
+
"#id"?: NodeId;
|
|
40
|
+
[k: string]: any;
|
|
41
|
+
id?: number;
|
|
42
|
+
$$createAt$$?: number;
|
|
43
|
+
$$updateAt$$?: number;
|
|
44
|
+
$$seq$$?: number;
|
|
45
|
+
name?: number;
|
|
46
|
+
userId?: number;
|
|
47
|
+
user?: User.Projection;
|
|
48
|
+
ableState?: number;
|
|
49
|
+
token$entity?: Token.Selection & {
|
|
50
|
+
$entity: "token";
|
|
51
|
+
};
|
|
52
|
+
token$entity$$aggr?: Token.Aggregation & {
|
|
53
|
+
$entity: "token";
|
|
54
|
+
};
|
|
55
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
56
|
+
type LoginNameIdProjection = OneOf<{
|
|
57
|
+
id: number;
|
|
58
|
+
}>;
|
|
59
|
+
type UserIdProjection = OneOf<{
|
|
60
|
+
userId: number;
|
|
61
|
+
}>;
|
|
62
|
+
export type SortAttr = {
|
|
63
|
+
id: number;
|
|
64
|
+
} | {
|
|
65
|
+
$$createAt$$: number;
|
|
66
|
+
} | {
|
|
67
|
+
$$seq$$: number;
|
|
68
|
+
} | {
|
|
69
|
+
$$updateAt$$: number;
|
|
70
|
+
} | {
|
|
71
|
+
name: number;
|
|
72
|
+
} | {
|
|
73
|
+
userId: number;
|
|
74
|
+
} | {
|
|
75
|
+
user: User.SortAttr;
|
|
76
|
+
} | {
|
|
77
|
+
ableState: number;
|
|
78
|
+
} | {
|
|
79
|
+
[k: string]: any;
|
|
80
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
81
|
+
export type SortNode = {
|
|
82
|
+
$attr: SortAttr;
|
|
83
|
+
$direction?: "asc" | "desc";
|
|
84
|
+
};
|
|
85
|
+
export type Sorter = SortNode[];
|
|
86
|
+
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
87
|
+
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
88
|
+
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
89
|
+
export type CreateOperationData = FormCreateData<Omit<OpSchema, "userId">> & (({
|
|
90
|
+
userId?: never;
|
|
91
|
+
user: User.CreateSingleOperation;
|
|
92
|
+
} | {
|
|
93
|
+
userId: ForeignKey<"user">;
|
|
94
|
+
user?: User.UpdateOperation;
|
|
95
|
+
} | {
|
|
96
|
+
user?: never;
|
|
97
|
+
userId: ForeignKey<"user">;
|
|
98
|
+
})) & {
|
|
99
|
+
token$entity?: OakOperation<Token.UpdateOperation["action"], Omit<Token.UpdateOperationData, "entity" | "entityId">, Omit<Token.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Token.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Token.CreateOperationData, "entity" | "entityId">> | OakOperation<Token.UpdateOperation["action"], Omit<Token.UpdateOperationData, "entity" | "entityId">, Omit<Token.Filter, "entity" | "entityId">>>;
|
|
100
|
+
};
|
|
101
|
+
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
102
|
+
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
103
|
+
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
104
|
+
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "userId">> & (({
|
|
105
|
+
user?: User.CreateSingleOperation;
|
|
106
|
+
userId?: never;
|
|
107
|
+
} | {
|
|
108
|
+
user?: User.UpdateOperation;
|
|
109
|
+
userId?: never;
|
|
110
|
+
} | {
|
|
111
|
+
user?: User.RemoveOperation;
|
|
112
|
+
userId?: never;
|
|
113
|
+
} | {
|
|
114
|
+
user?: never;
|
|
115
|
+
userId?: ForeignKey<"user">;
|
|
116
|
+
})) & {
|
|
117
|
+
[k: string]: any;
|
|
118
|
+
token$entity?: OakOperation<Token.UpdateOperation["action"], Omit<Token.UpdateOperationData, "entity" | "entityId">, Omit<Token.Filter, "entity" | "entityId">> | OakOperation<Token.RemoveOperation["action"], Omit<Token.RemoveOperationData, "entity" | "entityId">, Omit<Token.Filter, "entity" | "entityId">> | OakOperation<"create", Omit<Token.CreateOperationData, "entity" | "entityId">[]> | Array<OakOperation<"create", Omit<Token.CreateOperationData, "entity" | "entityId">> | OakOperation<Token.UpdateOperation["action"], Omit<Token.UpdateOperationData, "entity" | "entityId">, Omit<Token.Filter, "entity" | "entityId">> | OakOperation<Token.RemoveOperation["action"], Omit<Token.RemoveOperationData, "entity" | "entityId">, Omit<Token.Filter, "entity" | "entityId">>>;
|
|
119
|
+
};
|
|
120
|
+
export type UpdateOperation = OakOperation<"update" | ParticularAction | string, UpdateOperationData, Filter, Sorter>;
|
|
121
|
+
export type RemoveOperationData = {} & (({
|
|
122
|
+
user?: User.UpdateOperation | User.RemoveOperation;
|
|
123
|
+
}));
|
|
124
|
+
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
125
|
+
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
126
|
+
export type UserIdSubQuery = Selection<UserIdProjection>;
|
|
127
|
+
export type LoginNameIdSubQuery = Selection<LoginNameIdProjection>;
|
|
128
|
+
export type EntityDef = {
|
|
129
|
+
Schema: Schema;
|
|
130
|
+
OpSchema: OpSchema;
|
|
131
|
+
Action: OakMakeAction<Action> | string;
|
|
132
|
+
Selection: Selection;
|
|
133
|
+
Aggregation: Aggregation;
|
|
134
|
+
Operation: Operation;
|
|
135
|
+
Create: CreateOperation;
|
|
136
|
+
Update: UpdateOperation;
|
|
137
|
+
Remove: RemoveOperation;
|
|
138
|
+
CreateSingle: CreateSingleOperation;
|
|
139
|
+
CreateMulti: CreateMultipleOperation;
|
|
140
|
+
ParticularAction: ParticularAction;
|
|
141
|
+
};
|
|
142
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.desc = void 0;
|
|
4
|
+
const Action_1 = require("./Action");
|
|
5
|
+
exports.desc = {
|
|
6
|
+
attributes: {
|
|
7
|
+
name: {
|
|
8
|
+
notNull: true,
|
|
9
|
+
type: "varchar",
|
|
10
|
+
params: {
|
|
11
|
+
length: 32
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
userId: {
|
|
15
|
+
notNull: true,
|
|
16
|
+
type: "ref",
|
|
17
|
+
ref: "user"
|
|
18
|
+
},
|
|
19
|
+
ableState: {
|
|
20
|
+
type: "enum",
|
|
21
|
+
enumeration: ["enabled", "disabled"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
actionType: "crud",
|
|
25
|
+
actions: Action_1.actions,
|
|
26
|
+
indexes: [
|
|
27
|
+
{
|
|
28
|
+
name: 'index_name_ableState',
|
|
29
|
+
attributes: [
|
|
30
|
+
{
|
|
31
|
+
name: 'name',
|
|
32
|
+
direction: 'ASC',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'ableState',
|
|
36
|
+
direction: 'ASC',
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.style = void 0;
|
|
4
|
+
exports.style = {
|
|
5
|
+
icon: {
|
|
6
|
+
enable: '',
|
|
7
|
+
disable: '',
|
|
8
|
+
},
|
|
9
|
+
color: {
|
|
10
|
+
ableState: {
|
|
11
|
+
enabled: '#008000',
|
|
12
|
+
disabled: '#A9A9A9',
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "name": "账号", "attr": { "name": "账号", "user": "关联用户", "tokens": "相关令牌", "ableState": "是否可用" }, "action": { "enable": "启用", "disable": "禁用" }, "v": { "ableState": { "enabled": "可用的", "disabled": "禁用的" } } }
|
|
@@ -19,7 +19,7 @@ type MessageRestriction = {
|
|
|
19
19
|
systemIds?: string[];
|
|
20
20
|
channels?: Array<Channel>;
|
|
21
21
|
};
|
|
22
|
-
type
|
|
22
|
+
type Channels = Channel[];
|
|
23
23
|
export type OpSchema = EntityShape & {
|
|
24
24
|
entity: String<32>;
|
|
25
25
|
entityId: String<64>;
|
|
@@ -32,7 +32,7 @@ export type OpSchema = EntityShape & {
|
|
|
32
32
|
data?: Object | null;
|
|
33
33
|
router?: Router | null;
|
|
34
34
|
platformId?: ForeignKey<"platform"> | null;
|
|
35
|
-
channels?:
|
|
35
|
+
channels?: Channels | null;
|
|
36
36
|
iState?: IState | null;
|
|
37
37
|
visitState?: VisitState | null;
|
|
38
38
|
};
|
|
@@ -49,7 +49,7 @@ export type Schema = EntityShape & {
|
|
|
49
49
|
data?: Object | null;
|
|
50
50
|
router?: Router | null;
|
|
51
51
|
platformId?: ForeignKey<"platform"> | null;
|
|
52
|
-
channels?:
|
|
52
|
+
channels?: Channels | null;
|
|
53
53
|
iState?: IState | null;
|
|
54
54
|
visitState?: VisitState | null;
|
|
55
55
|
user: User.Schema;
|
|
@@ -79,7 +79,7 @@ type AttrFilter = {
|
|
|
79
79
|
router: JsonFilter<Router>;
|
|
80
80
|
platformId: Q_StringValue;
|
|
81
81
|
platform: Platform.Filter;
|
|
82
|
-
channels: JsonFilter<
|
|
82
|
+
channels: JsonFilter<Channels>;
|
|
83
83
|
iState: Q_EnumValue<IState>;
|
|
84
84
|
visitState: Q_EnumValue<VisitState>;
|
|
85
85
|
messageSystem$message: MessageSystem.Filter & SubQueryPredicateMetadata;
|
|
@@ -106,7 +106,7 @@ export type Projection = {
|
|
|
106
106
|
router?: number | JsonProjection<Router>;
|
|
107
107
|
platformId?: number;
|
|
108
108
|
platform?: Platform.Projection;
|
|
109
|
-
channels?: number | JsonProjection<
|
|
109
|
+
channels?: number | JsonProjection<Channels>;
|
|
110
110
|
iState?: number;
|
|
111
111
|
visitState?: number;
|
|
112
112
|
messageSystem$message?: MessageSystem.Selection & {
|