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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { actions } from "./Action";
|
|
2
|
+
export const desc = {
|
|
3
|
+
attributes: {
|
|
4
|
+
name: {
|
|
5
|
+
notNull: true,
|
|
6
|
+
type: "varchar",
|
|
7
|
+
params: {
|
|
8
|
+
length: 32
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
userId: {
|
|
12
|
+
notNull: true,
|
|
13
|
+
type: "ref",
|
|
14
|
+
ref: "user"
|
|
15
|
+
},
|
|
16
|
+
ableState: {
|
|
17
|
+
type: "enum",
|
|
18
|
+
enumeration: ["enabled", "disabled"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
actionType: "crud",
|
|
22
|
+
actions,
|
|
23
|
+
indexes: [
|
|
24
|
+
{
|
|
25
|
+
name: 'index_name_ableState',
|
|
26
|
+
attributes: [
|
|
27
|
+
{
|
|
28
|
+
name: 'name',
|
|
29
|
+
direction: 'ASC',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'ableState',
|
|
33
|
+
direction: 'ASC',
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|
|
@@ -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 & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "通知", "attr": { "channel": "消息渠道", "data": "消息数据", "messageSystem": "消息系统连接", "data1": "数据1", "data2": "数据2", "iState": "状态", "application": "关联应用", "templateId": "模板id" }, "action": { "succeed": "成功", "fail": "失败" }, "v": { "iState": { "sending": "发送中", "success": "发送成功", "failure": "发送失败" }, "channel": { "wechatPublic": "公众号", "jPush": "极光推送", "jim": "极光消息", "wechatMp": "小程序", "sms": "短信" } } }
|
|
1
|
+
{ "name": "通知", "attr": { "channel": "消息渠道", "data": "消息数据", "messageSystem": "消息系统连接", "data1": "数据1", "data2": "数据2", "iState": "状态", "application": "关联应用", "templateId": "模板id" }, "action": { "succeed": "成功", "fail": "失败" }, "v": { "iState": { "sending": "发送中", "success": "发送成功", "failure": "发送失败" }, "channel": { "wechatPublic": "公众号", "jPush": "极光推送", "jim": "极光消息", "wechatMp": "小程序", "sms": "短信", "email": "邮箱" } } }
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
|
|
2
|
+
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, JsonFilter, 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 { GenericAction } from "oak-domain/lib/actions/action";
|
|
6
|
+
import { Boolean } from "oak-domain/lib/types/DataType";
|
|
7
|
+
import * as System from "../System/Schema";
|
|
8
|
+
import * as ApplicationPassport from "../ApplicationPassport/Schema";
|
|
9
|
+
export type Type = "password" | "sms" | "email" | "wechatWeb" | "wechatMp" | "wechatPublic" | "wechatPublicForWeb" | "wechatMpForWeb";
|
|
10
|
+
export type SmsConfig = {
|
|
11
|
+
mockSend?: boolean;
|
|
12
|
+
defaultOrigin?: "ali" | "tencent" | "ctyun";
|
|
13
|
+
templateName?: string;
|
|
14
|
+
codeDuration?: number;
|
|
15
|
+
digit?: number;
|
|
16
|
+
};
|
|
17
|
+
export type EmailConfig = {
|
|
18
|
+
account: string;
|
|
19
|
+
subject: string;
|
|
20
|
+
text?: string;
|
|
21
|
+
html?: string;
|
|
22
|
+
codeDuration?: number;
|
|
23
|
+
digit?: number;
|
|
24
|
+
};
|
|
25
|
+
export type PfwConfig = {
|
|
26
|
+
appId: string;
|
|
27
|
+
};
|
|
28
|
+
export type MfwConfig = {
|
|
29
|
+
appId: string;
|
|
30
|
+
};
|
|
31
|
+
export type OpSchema = EntityShape & {
|
|
32
|
+
systemId: ForeignKey<"system">;
|
|
33
|
+
type: Type;
|
|
34
|
+
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig) | null;
|
|
35
|
+
enabled: Boolean;
|
|
36
|
+
};
|
|
37
|
+
export type OpAttr = keyof OpSchema;
|
|
38
|
+
export type Schema = EntityShape & {
|
|
39
|
+
systemId: ForeignKey<"system">;
|
|
40
|
+
type: Type;
|
|
41
|
+
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig) | null;
|
|
42
|
+
enabled: Boolean;
|
|
43
|
+
system: System.Schema;
|
|
44
|
+
applicationPassport$passport?: Array<ApplicationPassport.Schema>;
|
|
45
|
+
applicationPassport$passport$$aggr?: AggregationResult<ApplicationPassport.Schema>;
|
|
46
|
+
} & {
|
|
47
|
+
[A in ExpressionKey]?: any;
|
|
48
|
+
};
|
|
49
|
+
type AttrFilter = {
|
|
50
|
+
id: Q_StringValue;
|
|
51
|
+
$$createAt$$: Q_DateValue;
|
|
52
|
+
$$seq$$: Q_NumberValue;
|
|
53
|
+
$$updateAt$$: Q_DateValue;
|
|
54
|
+
systemId: Q_StringValue;
|
|
55
|
+
system: System.Filter;
|
|
56
|
+
type: Q_EnumValue<Type>;
|
|
57
|
+
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig>;
|
|
58
|
+
enabled: Q_BooleanValue;
|
|
59
|
+
applicationPassport$passport: ApplicationPassport.Filter & SubQueryPredicateMetadata;
|
|
60
|
+
};
|
|
61
|
+
export type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
|
62
|
+
export type Projection = {
|
|
63
|
+
"#id"?: NodeId;
|
|
64
|
+
[k: string]: any;
|
|
65
|
+
id?: number;
|
|
66
|
+
$$createAt$$?: number;
|
|
67
|
+
$$updateAt$$?: number;
|
|
68
|
+
$$seq$$?: number;
|
|
69
|
+
systemId?: number;
|
|
70
|
+
system?: System.Projection;
|
|
71
|
+
type?: number;
|
|
72
|
+
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig>;
|
|
73
|
+
enabled?: number;
|
|
74
|
+
applicationPassport$passport?: ApplicationPassport.Selection & {
|
|
75
|
+
$entity: "applicationPassport";
|
|
76
|
+
};
|
|
77
|
+
applicationPassport$passport$$aggr?: ApplicationPassport.Aggregation & {
|
|
78
|
+
$entity: "applicationPassport";
|
|
79
|
+
};
|
|
80
|
+
} & Partial<ExprOp<OpAttr | string>>;
|
|
81
|
+
type PassportIdProjection = OneOf<{
|
|
82
|
+
id: number;
|
|
83
|
+
}>;
|
|
84
|
+
type SystemIdProjection = OneOf<{
|
|
85
|
+
systemId: number;
|
|
86
|
+
}>;
|
|
87
|
+
export type SortAttr = {
|
|
88
|
+
id: number;
|
|
89
|
+
} | {
|
|
90
|
+
$$createAt$$: number;
|
|
91
|
+
} | {
|
|
92
|
+
$$seq$$: number;
|
|
93
|
+
} | {
|
|
94
|
+
$$updateAt$$: number;
|
|
95
|
+
} | {
|
|
96
|
+
systemId: number;
|
|
97
|
+
} | {
|
|
98
|
+
system: System.SortAttr;
|
|
99
|
+
} | {
|
|
100
|
+
type: number;
|
|
101
|
+
} | {
|
|
102
|
+
enabled: number;
|
|
103
|
+
} | {
|
|
104
|
+
[k: string]: any;
|
|
105
|
+
} | OneOf<ExprOp<OpAttr | string>>;
|
|
106
|
+
export type SortNode = {
|
|
107
|
+
$attr: SortAttr;
|
|
108
|
+
$direction?: "asc" | "desc";
|
|
109
|
+
};
|
|
110
|
+
export type Sorter = SortNode[];
|
|
111
|
+
export type SelectOperation<P extends Object = Projection> = OakSelection<"select", P, Filter, Sorter>;
|
|
112
|
+
export type Selection<P extends Object = Projection> = SelectOperation<P>;
|
|
113
|
+
export type Aggregation = DeduceAggregation<Projection, Filter, Sorter>;
|
|
114
|
+
export type CreateOperationData = FormCreateData<Omit<OpSchema, "systemId">> & (({
|
|
115
|
+
systemId?: never;
|
|
116
|
+
system: System.CreateSingleOperation;
|
|
117
|
+
} | {
|
|
118
|
+
systemId: ForeignKey<"system">;
|
|
119
|
+
system?: System.UpdateOperation;
|
|
120
|
+
} | {
|
|
121
|
+
system?: never;
|
|
122
|
+
systemId: ForeignKey<"system">;
|
|
123
|
+
})) & {
|
|
124
|
+
applicationPassport$passport?: OakOperation<ApplicationPassport.UpdateOperation["action"], Omit<ApplicationPassport.UpdateOperationData, "passport" | "passportId">, Omit<ApplicationPassport.Filter, "passport" | "passportId">> | OakOperation<"create", Omit<ApplicationPassport.CreateOperationData, "passport" | "passportId">[]> | Array<OakOperation<"create", Omit<ApplicationPassport.CreateOperationData, "passport" | "passportId">> | OakOperation<ApplicationPassport.UpdateOperation["action"], Omit<ApplicationPassport.UpdateOperationData, "passport" | "passportId">, Omit<ApplicationPassport.Filter, "passport" | "passportId">>>;
|
|
125
|
+
};
|
|
126
|
+
export type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
|
127
|
+
export type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
|
128
|
+
export type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
|
129
|
+
export type UpdateOperationData = FormUpdateData<Omit<OpSchema, "systemId">> & (({
|
|
130
|
+
system?: System.CreateSingleOperation;
|
|
131
|
+
systemId?: never;
|
|
132
|
+
} | {
|
|
133
|
+
system?: System.UpdateOperation;
|
|
134
|
+
systemId?: never;
|
|
135
|
+
} | {
|
|
136
|
+
system?: System.RemoveOperation;
|
|
137
|
+
systemId?: never;
|
|
138
|
+
} | {
|
|
139
|
+
system?: never;
|
|
140
|
+
systemId?: ForeignKey<"system">;
|
|
141
|
+
})) & {
|
|
142
|
+
[k: string]: any;
|
|
143
|
+
applicationPassport$passport?: OakOperation<ApplicationPassport.UpdateOperation["action"], Omit<ApplicationPassport.UpdateOperationData, "passport" | "passportId">, Omit<ApplicationPassport.Filter, "passport" | "passportId">> | OakOperation<ApplicationPassport.RemoveOperation["action"], Omit<ApplicationPassport.RemoveOperationData, "passport" | "passportId">, Omit<ApplicationPassport.Filter, "passport" | "passportId">> | OakOperation<"create", Omit<ApplicationPassport.CreateOperationData, "passport" | "passportId">[]> | Array<OakOperation<"create", Omit<ApplicationPassport.CreateOperationData, "passport" | "passportId">> | OakOperation<ApplicationPassport.UpdateOperation["action"], Omit<ApplicationPassport.UpdateOperationData, "passport" | "passportId">, Omit<ApplicationPassport.Filter, "passport" | "passportId">> | OakOperation<ApplicationPassport.RemoveOperation["action"], Omit<ApplicationPassport.RemoveOperationData, "passport" | "passportId">, Omit<ApplicationPassport.Filter, "passport" | "passportId">>>;
|
|
144
|
+
};
|
|
145
|
+
export type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
|
146
|
+
export type RemoveOperationData = {} & (({
|
|
147
|
+
system?: System.UpdateOperation | System.RemoveOperation;
|
|
148
|
+
}));
|
|
149
|
+
export type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
|
150
|
+
export type Operation = CreateOperation | UpdateOperation | RemoveOperation;
|
|
151
|
+
export type SystemIdSubQuery = Selection<SystemIdProjection>;
|
|
152
|
+
export type PassportIdSubQuery = Selection<PassportIdProjection>;
|
|
153
|
+
export type EntityDef = {
|
|
154
|
+
Schema: Schema;
|
|
155
|
+
OpSchema: OpSchema;
|
|
156
|
+
Action: OakMakeAction<GenericAction> | string;
|
|
157
|
+
Selection: Selection;
|
|
158
|
+
Aggregation: Aggregation;
|
|
159
|
+
Operation: Operation;
|
|
160
|
+
Create: CreateOperation;
|
|
161
|
+
Update: UpdateOperation;
|
|
162
|
+
Remove: RemoveOperation;
|
|
163
|
+
CreateSingle: CreateSingleOperation;
|
|
164
|
+
CreateMulti: CreateMultipleOperation;
|
|
165
|
+
};
|
|
166
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { genericActions as actions } from "oak-domain/lib/actions/action";
|
|
2
|
+
export const desc = {
|
|
3
|
+
attributes: {
|
|
4
|
+
systemId: {
|
|
5
|
+
notNull: true,
|
|
6
|
+
type: "ref",
|
|
7
|
+
ref: "system"
|
|
8
|
+
},
|
|
9
|
+
type: {
|
|
10
|
+
notNull: true,
|
|
11
|
+
type: "enum",
|
|
12
|
+
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb"]
|
|
13
|
+
},
|
|
14
|
+
config: {
|
|
15
|
+
type: "object"
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
notNull: true,
|
|
19
|
+
type: "boolean"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
actionType: "crud",
|
|
23
|
+
actions
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const style = {
|
|
2
|
+
color: {
|
|
3
|
+
type: {
|
|
4
|
+
password: '#7DC9E7',
|
|
5
|
+
sms: '#D3DDE6',
|
|
6
|
+
email: '#F95A37',
|
|
7
|
+
wechatWeb: '#F298A6',
|
|
8
|
+
wechatPublic: '#D3ADF7',
|
|
9
|
+
wechatMp: '#ADDCCA',
|
|
10
|
+
wechatMpForWeb: '#FDC454',
|
|
11
|
+
wechatPublicForWeb: '#C0A27C',
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "name": "登录方式", "attr": { "system": "系统", "type": "登录方式", "config": "登录方式配置", "enabled": "是否启用" }, "v": { "type": { "email": "邮箱", "sms": "短信", "password": "密码", "wechatMp": "小程序", "wechatPublic": "公众号", "wechatWeb": "微信网站", "wechatMpForWeb": "小程序授权网页", "wechatPublicForWeb": "公众号授权网页" } } }
|
|
@@ -13,6 +13,7 @@ import { desc as userEntityGrantDesc } from "./UserEntityGrant/Storage";
|
|
|
13
13
|
import { desc as userRelationDesc } from "./UserRelation/Storage";
|
|
14
14
|
import { desc as addressDesc } from "./Address/Storage";
|
|
15
15
|
import { desc as applicationDesc } from "./Application/Storage";
|
|
16
|
+
import { desc as applicationPassportDesc } from "./ApplicationPassport/Storage";
|
|
16
17
|
import { desc as areaDesc } from "./Area/Storage";
|
|
17
18
|
import { desc as articleDesc } from "./Article/Storage";
|
|
18
19
|
import { desc as articleMenuDesc } from "./ArticleMenu/Storage";
|
|
@@ -22,6 +23,7 @@ import { desc as domainDesc } from "./Domain/Storage";
|
|
|
22
23
|
import { desc as emailDesc } from "./Email/Storage";
|
|
23
24
|
import { desc as extraFileDesc } from "./ExtraFile/Storage";
|
|
24
25
|
import { desc as livestreamDesc } from "./Livestream/Storage";
|
|
26
|
+
import { desc as loginNameDesc } from "./LoginName/Storage";
|
|
25
27
|
import { desc as messageDesc } from "./Message/Storage";
|
|
26
28
|
import { desc as messageSystemDesc } from "./MessageSystem/Storage";
|
|
27
29
|
import { desc as messageTypeDesc } from "./MessageType/Storage";
|
|
@@ -30,6 +32,7 @@ import { desc as messageTypeTemplateDesc } from "./MessageTypeTemplate/Storage";
|
|
|
30
32
|
import { desc as mobileDesc } from "./Mobile/Storage";
|
|
31
33
|
import { desc as notificationDesc } from "./Notification/Storage";
|
|
32
34
|
import { desc as parasiteDesc } from "./Parasite/Storage";
|
|
35
|
+
import { desc as passportDesc } from "./Passport/Storage";
|
|
33
36
|
import { desc as platformDesc } from "./Platform/Storage";
|
|
34
37
|
import { desc as readRemarkDesc } from "./ReadRemark/Storage";
|
|
35
38
|
import { desc as sessionDesc } from "./Session/Storage";
|
|
@@ -85,6 +88,7 @@ export const storageSchema = {
|
|
|
85
88
|
userRelation: userRelationDesc,
|
|
86
89
|
address: addressDesc,
|
|
87
90
|
application: applicationDesc,
|
|
91
|
+
applicationPassport: applicationPassportDesc,
|
|
88
92
|
area: areaDesc,
|
|
89
93
|
article: articleDesc,
|
|
90
94
|
articleMenu: articleMenuDesc,
|
|
@@ -94,6 +98,7 @@ export const storageSchema = {
|
|
|
94
98
|
email: emailDesc,
|
|
95
99
|
extraFile: extraFileDesc,
|
|
96
100
|
livestream: livestreamDesc,
|
|
101
|
+
loginName: loginNameDesc,
|
|
97
102
|
message: messageDesc,
|
|
98
103
|
messageSystem: messageSystemDesc,
|
|
99
104
|
messageType: messageTypeDesc,
|
|
@@ -102,6 +107,7 @@ export const storageSchema = {
|
|
|
102
107
|
mobile: mobileDesc,
|
|
103
108
|
notification: notificationDesc,
|
|
104
109
|
parasite: parasiteDesc,
|
|
110
|
+
passport: passportDesc,
|
|
105
111
|
platform: platformDesc,
|
|
106
112
|
readRemark: readRemarkDesc,
|
|
107
113
|
session: sessionDesc,
|
|
@@ -7,10 +7,12 @@ import { style as domain } from "./Domain/Style";
|
|
|
7
7
|
import { style as email } from "./Email/Style";
|
|
8
8
|
import { style as extraFile } from "./ExtraFile/Style";
|
|
9
9
|
import { style as livestream } from "./Livestream/Style";
|
|
10
|
+
import { style as loginName } from "./LoginName/Style";
|
|
10
11
|
import { style as message } from "./Message/Style";
|
|
11
12
|
import { style as mobile } from "./Mobile/Style";
|
|
12
13
|
import { style as notification } from "./Notification/Style";
|
|
13
14
|
import { style as parasite } from "./Parasite/Style";
|
|
15
|
+
import { style as passport } from "./Passport/Style";
|
|
14
16
|
import { style as smsTemplate } from "./SmsTemplate/Style";
|
|
15
17
|
import { style as toDo } from "./ToDo/Style";
|
|
16
18
|
import { style as token } from "./Token/Style";
|
|
@@ -47,10 +49,12 @@ export const styleDict = {
|
|
|
47
49
|
email,
|
|
48
50
|
extraFile,
|
|
49
51
|
livestream,
|
|
52
|
+
loginName,
|
|
50
53
|
message,
|
|
51
54
|
mobile,
|
|
52
55
|
notification,
|
|
53
56
|
parasite,
|
|
57
|
+
passport,
|
|
54
58
|
smsTemplate,
|
|
55
59
|
toDo,
|
|
56
60
|
token,
|