oak-pay-business 2.8.0-beta.1 → 3.0.0
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/order/pay/web.mobile.module.less +35 -35
- package/es/components/order/pay/web.pc.module.less +35 -35
- package/es/components/ship/system/web.pc.js +18 -18
- package/es/components/ship/system/web.pc.module.less +15 -15
- package/es/components/ship/wechatMpShip/upsert/web.pc.js +10 -10
- package/es/components/ship/wechatMpShip/web.pc.js +20 -20
- package/es/components/ship/wechatMpShip/web.pc.module.less +7 -7
- package/es/endpoints/wechatPay.js +2 -0
- package/es/entities/Settlement.d.ts +3 -1
- package/es/entities/Settlement.js +2 -0
- package/es/oak-app-domain/AccountOper/Storage.js +1 -1
- package/es/oak-app-domain/AccountOper/_baseSchema.d.ts +2 -2
- package/es/oak-app-domain/EntityDict.d.ts +17 -0
- package/es/oak-app-domain/Settlement/Action.d.ts +1 -1
- package/es/oak-app-domain/Settlement/Action.js +1 -1
- package/es/oak-app-domain/Settlement/locales/zh_CN.json +3 -1
- package/es/triggers/order.js +42 -63
- package/lib/endpoints/wechatPay.js +2 -0
- package/lib/entities/Settlement.d.ts +3 -1
- package/lib/entities/Settlement.js +2 -0
- package/lib/oak-app-domain/AccountOper/Storage.js +1 -1
- package/lib/oak-app-domain/AccountOper/_baseSchema.d.ts +2 -2
- package/lib/oak-app-domain/EntityDict.d.ts +17 -0
- package/lib/oak-app-domain/Settlement/Action.d.ts +1 -1
- package/lib/oak-app-domain/Settlement/Action.js +1 -1
- package/lib/oak-app-domain/Settlement/locales/zh_CN.json +3 -1
- package/lib/triggers/order.js +42 -63
- package/package.json +4 -4
- package/src/entities/AbstactPayProduct.ts +38 -38
- package/src/entities/AbstractShipAccount.ts +39 -39
- package/src/entities/Settlement.ts +5 -1
- package/src/entities/ShipService.ts +26 -26
- package/src/entities/WechatMpShip.ts +32 -32
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
background-color: var(--oak-bg-color-page);
|
|
8
|
-
// min-height: 500px;
|
|
9
|
-
|
|
10
|
-
.ctrl {
|
|
11
|
-
margin: 8px;
|
|
12
|
-
margin-top: 10px;
|
|
13
|
-
flex: 1;
|
|
14
|
-
|
|
15
|
-
.pc1 {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
margin-top: 4px;
|
|
21
|
-
|
|
22
|
-
.content {
|
|
23
|
-
background-color: var(--oak-bg-color-container);
|
|
24
|
-
padding: 4px;
|
|
25
|
-
border-radius: 2px;
|
|
26
|
-
padding: 16px;
|
|
27
|
-
|
|
28
|
-
.tips {
|
|
29
|
-
color: var(--oak-color-info);
|
|
30
|
-
font-size: small;
|
|
31
|
-
margin-top: 3px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: stretch;
|
|
7
|
+
background-color: var(--oak-bg-color-page);
|
|
8
|
+
// min-height: 500px;
|
|
9
|
+
|
|
10
|
+
.ctrl {
|
|
11
|
+
margin: 8px;
|
|
12
|
+
margin-top: 10px;
|
|
13
|
+
flex: 1;
|
|
14
|
+
|
|
15
|
+
.pc1 {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
margin-top: 4px;
|
|
21
|
+
|
|
22
|
+
.content {
|
|
23
|
+
background-color: var(--oak-bg-color-container);
|
|
24
|
+
padding: 4px;
|
|
25
|
+
border-radius: 2px;
|
|
26
|
+
padding: 16px;
|
|
27
|
+
|
|
28
|
+
.tips {
|
|
29
|
+
color: var(--oak-color-info);
|
|
30
|
+
font-size: small;
|
|
31
|
+
margin-top: 3px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
36
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
background-color: var(--oak-bg-color-page);
|
|
8
|
-
// min-height: 500px;
|
|
9
|
-
|
|
10
|
-
.ctrl {
|
|
11
|
-
margin: 8px;
|
|
12
|
-
margin-top: 10px;
|
|
13
|
-
flex: 1;
|
|
14
|
-
|
|
15
|
-
.pc1 {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
margin-top: 4px;
|
|
21
|
-
|
|
22
|
-
.content {
|
|
23
|
-
background-color: var(--oak-bg-color-container);
|
|
24
|
-
padding: 4px;
|
|
25
|
-
border-radius: 2px;
|
|
26
|
-
padding: 16px;
|
|
27
|
-
|
|
28
|
-
.tips {
|
|
29
|
-
color: var(--oak-color-info);
|
|
30
|
-
font-size: small;
|
|
31
|
-
font-weight: bold;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: stretch;
|
|
7
|
+
background-color: var(--oak-bg-color-page);
|
|
8
|
+
// min-height: 500px;
|
|
9
|
+
|
|
10
|
+
.ctrl {
|
|
11
|
+
margin: 8px;
|
|
12
|
+
margin-top: 10px;
|
|
13
|
+
flex: 1;
|
|
14
|
+
|
|
15
|
+
.pc1 {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
margin-top: 4px;
|
|
21
|
+
|
|
22
|
+
.content {
|
|
23
|
+
background-color: var(--oak-bg-color-container);
|
|
24
|
+
padding: 4px;
|
|
25
|
+
border-radius: 2px;
|
|
26
|
+
padding: 16px;
|
|
27
|
+
|
|
28
|
+
.tips {
|
|
29
|
+
color: var(--oak-color-info);
|
|
30
|
+
font-size: small;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
36
|
}
|
|
@@ -16,12 +16,12 @@ function RenderShipEntity(props) {
|
|
|
16
16
|
return (<Tabs className={Styles.container} tabPosition="left" items={entities.map((entity) => {
|
|
17
17
|
const Comp = ShipSettingComponentDict[entity];
|
|
18
18
|
return {
|
|
19
|
-
label: (<div className={Styles.systemLabel}>
|
|
20
|
-
{t(`${entity}:name`)}
|
|
19
|
+
label: (<div className={Styles.systemLabel}>
|
|
20
|
+
{t(`${entity}:name`)}
|
|
21
21
|
</div>),
|
|
22
22
|
key: entity,
|
|
23
|
-
children: (<Flex vertical>
|
|
24
|
-
<Comp systemId={oakId} oakPath={`${oakFullpath}.${entity}$system`}/>
|
|
23
|
+
children: (<Flex vertical>
|
|
24
|
+
<Comp systemId={oakId} oakPath={`${oakFullpath}.${entity}$system`}/>
|
|
25
25
|
{/* <Flex
|
|
26
26
|
gap="middle"
|
|
27
27
|
justify='end'
|
|
@@ -39,24 +39,24 @@ function RenderShipEntity(props) {
|
|
|
39
39
|
>
|
|
40
40
|
{t('common::reset')}
|
|
41
41
|
</Button>
|
|
42
|
-
</Flex> */}
|
|
42
|
+
</Flex> */}
|
|
43
43
|
</Flex>)
|
|
44
44
|
};
|
|
45
45
|
})}/>);
|
|
46
46
|
}
|
|
47
|
-
return (<Flex className={Styles.tips} vertical align="stretch">
|
|
48
|
-
<Alert type="info" message={t("tips.header")} description={t('tips.desc')}/>
|
|
49
|
-
<div className={Styles.code}>
|
|
50
|
-
<Markdown>{`
|
|
51
|
-
\`\`\`
|
|
52
|
-
import { registerShipSettingComponent } from 'oak-pay-business/es/registry';
|
|
53
|
-
import WechatMpShipSetting from 'oak-pay-business/es/components/ship/wechatMpShip';
|
|
54
|
-
registerShipSettingComponent('wechatMpShip', WechatMpShipSetting);
|
|
55
|
-
\`\`\`
|
|
56
|
-
|
|
57
|
-
`}
|
|
58
|
-
</Markdown>
|
|
59
|
-
</div>
|
|
47
|
+
return (<Flex className={Styles.tips} vertical align="stretch">
|
|
48
|
+
<Alert type="info" message={t("tips.header")} description={t('tips.desc')}/>
|
|
49
|
+
<div className={Styles.code}>
|
|
50
|
+
<Markdown>{`
|
|
51
|
+
\`\`\`
|
|
52
|
+
import { registerShipSettingComponent } from 'oak-pay-business/es/registry';
|
|
53
|
+
import WechatMpShipSetting from 'oak-pay-business/es/components/ship/wechatMpShip';
|
|
54
|
+
registerShipSettingComponent('wechatMpShip', WechatMpShipSetting);
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
`}
|
|
58
|
+
</Markdown>
|
|
59
|
+
</div>
|
|
60
60
|
</Flex>);
|
|
61
61
|
}
|
|
62
62
|
export default function render(props) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.tips {
|
|
7
|
-
width: 100%;
|
|
8
|
-
height: 100%;
|
|
9
|
-
|
|
10
|
-
.code {
|
|
11
|
-
width: 80%;
|
|
12
|
-
margin-top: 40px;
|
|
13
|
-
background-color: aquamarine;
|
|
14
|
-
align-self: center;
|
|
15
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tips {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
|
|
10
|
+
.code {
|
|
11
|
+
width: 80%;
|
|
12
|
+
margin-top: 40px;
|
|
13
|
+
background-color: aquamarine;
|
|
14
|
+
align-self: center;
|
|
15
|
+
}
|
|
16
16
|
}
|
|
@@ -4,24 +4,24 @@ export default function render(props) {
|
|
|
4
4
|
const { wechatMpShip, applicationChangable, applications } = props.data;
|
|
5
5
|
const { t, update } = props.methods;
|
|
6
6
|
if (wechatMpShip) {
|
|
7
|
-
return (<Form labelCol={{ span: 4 }} wrapperCol={{ span: 14 }} layout="horizontal" style={{ width: '100%', margin: 28 }}>
|
|
8
|
-
<Form.Item label={t('wpProduct:name')}>
|
|
7
|
+
return (<Form labelCol={{ span: 4 }} wrapperCol={{ span: 14 }} layout="horizontal" style={{ width: '100%', margin: 28 }}>
|
|
8
|
+
<Form.Item label={t('wpProduct:name')}>
|
|
9
9
|
{applicationChangable ? <Select options={applications} value={wechatMpShip.applicationId} onChange={(value) => {
|
|
10
10
|
update({
|
|
11
11
|
applicationId: value,
|
|
12
12
|
});
|
|
13
|
-
}}/> : <Input disabled={true} value={wechatMpShip.application?.name}/>}
|
|
14
|
-
</Form.Item>
|
|
15
|
-
<Form.Item label={t('wechatMpShip:attr.disabled')} help={t('help.disabled')}>
|
|
13
|
+
}}/> : <Input disabled={true} value={wechatMpShip.application?.name}/>}
|
|
14
|
+
</Form.Item>
|
|
15
|
+
<Form.Item label={t('wechatMpShip:attr.disabled')} help={t('help.disabled')}>
|
|
16
16
|
<Switch value={!!wechatMpShip.disabled} onChange={(v) => {
|
|
17
17
|
update({
|
|
18
18
|
disabled: v,
|
|
19
19
|
});
|
|
20
|
-
}}/>
|
|
21
|
-
</Form.Item>
|
|
22
|
-
<Form.Item label={t('wechatMpShip:attr.sort')} help={t('help.sort')}>
|
|
23
|
-
<Input disabled={true} value={wechatMpShip.sort}/>
|
|
24
|
-
</Form.Item>
|
|
20
|
+
}}/>
|
|
21
|
+
</Form.Item>
|
|
22
|
+
<Form.Item label={t('wechatMpShip:attr.sort')} help={t('help.sort')}>
|
|
23
|
+
<Input disabled={true} value={wechatMpShip.sort}/>
|
|
24
|
+
</Form.Item>
|
|
25
25
|
</Form>);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -17,57 +17,57 @@ export default function render(props) {
|
|
|
17
17
|
}} onOk={async () => {
|
|
18
18
|
await execute();
|
|
19
19
|
setUpsertId('');
|
|
20
|
-
}} width={720} okText={t('common::confirm')} cancelText={t('common::action.cancel')}>
|
|
21
|
-
<Upsert oakPath={`${oakFullpath}.${upsertId}`} oakId={upsertId}/>
|
|
20
|
+
}} width={720} okText={t('common::confirm')} cancelText={t('common::action.cancel')}>
|
|
21
|
+
<Upsert oakPath={`${oakFullpath}.${upsertId}`} oakId={upsertId}/>
|
|
22
22
|
</Modal>);
|
|
23
23
|
if (ships?.length) {
|
|
24
|
-
return (<div>
|
|
25
|
-
<Alert message={t('help.intro')}/>
|
|
24
|
+
return (<div>
|
|
25
|
+
<Alert message={t('help.intro')}/>
|
|
26
26
|
<Space style={{
|
|
27
27
|
marginTop: 22
|
|
28
|
-
}}>
|
|
28
|
+
}}>
|
|
29
29
|
{ships.map((ele, idx) => (<Card title={ele.application.name} extra={<Button size="small" icon={<EditOutlined />} type="text" onClick={() => {
|
|
30
30
|
setUpsertId(ele.id);
|
|
31
|
-
}}/>}>
|
|
31
|
+
}}/>}>
|
|
32
32
|
<Detail key={idx} column={1} bordered entity="wechatMpShip" attributes={[
|
|
33
33
|
"disabled",
|
|
34
34
|
"sort",
|
|
35
|
-
]} data={ele}/>
|
|
36
|
-
</Card>))}
|
|
35
|
+
]} data={ele}/>
|
|
36
|
+
</Card>))}
|
|
37
37
|
{applications.length > ships.length && <Card style={{
|
|
38
38
|
width: 245.67,
|
|
39
39
|
height: 269.41,
|
|
40
40
|
display: 'flex',
|
|
41
41
|
alignItems: 'center',
|
|
42
42
|
justifyContent: 'center'
|
|
43
|
-
}}>
|
|
43
|
+
}}>
|
|
44
44
|
<Button icon={<PlusOutlined style={{ fontSize: 32, color: 'var(--oak-color-primary)' }}/>} type="text" style={{ width: 80, height: 80 }} onClick={async () => {
|
|
45
45
|
const id = await generateNewIdAsync();
|
|
46
46
|
addItem({
|
|
47
47
|
id,
|
|
48
48
|
});
|
|
49
49
|
setUpsertId(id);
|
|
50
|
-
}}/>
|
|
51
|
-
</Card>}
|
|
52
|
-
</Space>
|
|
53
|
-
{U}
|
|
50
|
+
}}/>
|
|
51
|
+
</Card>}
|
|
52
|
+
</Space>
|
|
53
|
+
{U}
|
|
54
54
|
</div>);
|
|
55
55
|
}
|
|
56
56
|
if (applications?.length) {
|
|
57
|
-
return (<>
|
|
58
|
-
<div className={Styles.container}>
|
|
57
|
+
return (<>
|
|
58
|
+
<div className={Styles.container}>
|
|
59
59
|
<Button icon={<PlusOutlined style={{ fontSize: 72, color: 'var(--oak-color-primary)' }}/>} type="text" style={{ width: 80, height: 80 }} onClick={async () => {
|
|
60
60
|
const id = await generateNewIdAsync();
|
|
61
61
|
addItem({
|
|
62
62
|
id,
|
|
63
63
|
});
|
|
64
64
|
setUpsertId(id);
|
|
65
|
-
}}/>
|
|
66
|
-
</div>
|
|
67
|
-
{U}
|
|
65
|
+
}}/>
|
|
66
|
+
</div>
|
|
67
|
+
{U}
|
|
68
68
|
</>);
|
|
69
69
|
}
|
|
70
|
-
return (<div className={Styles.container}>
|
|
71
|
-
<Alert type="info" message={t('warning.noApplication')}/>
|
|
70
|
+
return (<div className={Styles.container}>
|
|
71
|
+
<Alert type="info" message={t('warning.noApplication')}/>
|
|
72
72
|
</div>);
|
|
73
73
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
min-height: 30vh;
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
min-height: 30vh;
|
|
8
8
|
}
|
|
@@ -3,6 +3,7 @@ export const payNotify = {
|
|
|
3
3
|
name: '微信支付回调',
|
|
4
4
|
method: 'post',
|
|
5
5
|
params: ['payId'],
|
|
6
|
+
type: 'simple',
|
|
6
7
|
fn: async (context, params, headers, req, body) => {
|
|
7
8
|
const { payId } = params;
|
|
8
9
|
return payNotifyFn(context, body, payId, headers);
|
|
@@ -12,6 +13,7 @@ export const refundNotify = {
|
|
|
12
13
|
name: '微信退款回调',
|
|
13
14
|
method: 'post',
|
|
14
15
|
params: ['refundId'],
|
|
16
|
+
type: 'simple',
|
|
15
17
|
fn: async (context, params, headers, req, body) => {
|
|
16
18
|
const { refundId } = params;
|
|
17
19
|
return refundNotifyFn(context, body, refundId, headers);
|
|
@@ -3,15 +3,17 @@ import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|
|
3
3
|
import { EntityDesc, ActionDef } from 'oak-domain/lib/types';
|
|
4
4
|
import { Schema as Account } from './Account';
|
|
5
5
|
import { Schema as Order } from './Order';
|
|
6
|
+
import { Schema as AccountOper } from './AccountOper';
|
|
6
7
|
export interface Schema extends EntityShape {
|
|
7
8
|
account: Account;
|
|
8
9
|
price: Price;
|
|
9
10
|
order: Order;
|
|
11
|
+
opers?: AccountOper[];
|
|
10
12
|
}
|
|
11
13
|
type IState = 'unsettled' | 'settled';
|
|
12
14
|
type IAction = 'settle';
|
|
13
15
|
export declare const IActionDef: ActionDef<IAction, IState>;
|
|
14
|
-
type Action = IAction | 'refund' | 'refundFailure';
|
|
16
|
+
type Action = IAction | 'preSettle' | 'refund' | 'refundFailure';
|
|
15
17
|
export declare const entityDesc: EntityDesc<Schema, Action, '', {
|
|
16
18
|
iState: IState;
|
|
17
19
|
}>;
|
|
@@ -40,7 +40,7 @@ export const desc = {
|
|
|
40
40
|
params: {
|
|
41
41
|
length: 32
|
|
42
42
|
},
|
|
43
|
-
ref: ["deposit", "order", "pay", "refund", "withdraw", "withdrawTransfer"]
|
|
43
|
+
ref: ["deposit", "order", "pay", "refund", "settlement", "withdraw", "withdrawTransfer"]
|
|
44
44
|
},
|
|
45
45
|
entityId: {
|
|
46
46
|
notNull: true,
|
|
@@ -13,7 +13,7 @@ export type OpSchema = EntityShape & {
|
|
|
13
13
|
total: Price;
|
|
14
14
|
avail: Price;
|
|
15
15
|
refundable: Price;
|
|
16
|
-
entity: "deposit" | "order" | "pay" | "refund" | "withdraw" | "withdrawTransfer" | string;
|
|
16
|
+
entity: "deposit" | "order" | "pay" | "refund" | "settlement" | "withdraw" | "withdrawTransfer" | string;
|
|
17
17
|
entityId: String<64>;
|
|
18
18
|
} & {
|
|
19
19
|
[A in ExpressionKey]?: any;
|
|
@@ -32,7 +32,7 @@ export type OpFilter = {
|
|
|
32
32
|
total: Q_NumberValue;
|
|
33
33
|
avail: Q_NumberValue;
|
|
34
34
|
refundable: Q_NumberValue;
|
|
35
|
-
entity: Q_EnumValue<"deposit" | "order" | "pay" | "refund" | "withdraw" | "withdrawTransfer" | string>;
|
|
35
|
+
entity: Q_EnumValue<"deposit" | "order" | "pay" | "refund" | "settlement" | "withdraw" | "withdrawTransfer" | string>;
|
|
36
36
|
entityId: Q_StringValue;
|
|
37
37
|
} & ExprOp<OpAttr | string>;
|
|
38
38
|
export type OpProjection = {
|
|
@@ -3978,6 +3978,7 @@ export type AccountOper = {
|
|
|
3978
3978
|
order?: Order["Schema"];
|
|
3979
3979
|
pay?: Pay["Schema"];
|
|
3980
3980
|
refund?: Refund["Schema"];
|
|
3981
|
+
settlement?: Settlement["Schema"];
|
|
3981
3982
|
withdraw?: Withdraw["Schema"];
|
|
3982
3983
|
withdrawTransfer?: WithdrawTransfer["Schema"];
|
|
3983
3984
|
};
|
|
@@ -3987,6 +3988,7 @@ export type AccountOper = {
|
|
|
3987
3988
|
order?: Order["Projection"];
|
|
3988
3989
|
pay?: Pay["Projection"];
|
|
3989
3990
|
refund?: Refund["Projection"];
|
|
3991
|
+
settlement?: Settlement["Projection"];
|
|
3990
3992
|
withdraw?: Withdraw["Projection"];
|
|
3991
3993
|
withdrawTransfer?: WithdrawTransfer["Projection"];
|
|
3992
3994
|
};
|
|
@@ -3996,6 +3998,7 @@ export type AccountOper = {
|
|
|
3996
3998
|
order: MakeFilter<Order["FilterUnit"]>;
|
|
3997
3999
|
pay: MakeFilter<Pay["FilterUnit"]>;
|
|
3998
4000
|
refund: MakeFilter<Refund["FilterUnit"]>;
|
|
4001
|
+
settlement: MakeFilter<Settlement["FilterUnit"]>;
|
|
3999
4002
|
withdraw: MakeFilter<Withdraw["FilterUnit"]>;
|
|
4000
4003
|
withdrawTransfer: MakeFilter<WithdrawTransfer["FilterUnit"]>;
|
|
4001
4004
|
};
|
|
@@ -4006,6 +4009,7 @@ export type AccountOper = {
|
|
|
4006
4009
|
order: Order["SortAttr"];
|
|
4007
4010
|
pay: Pay["SortAttr"];
|
|
4008
4011
|
refund: Refund["SortAttr"];
|
|
4012
|
+
settlement: Settlement["SortAttr"];
|
|
4009
4013
|
withdraw: Withdraw["SortAttr"];
|
|
4010
4014
|
withdrawTransfer: WithdrawTransfer["SortAttr"];
|
|
4011
4015
|
}>;
|
|
@@ -4022,6 +4026,7 @@ export type AccountOper = {
|
|
|
4022
4026
|
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]>;
|
|
4023
4027
|
pay?: OakOperation<"create", Pay["CreateOperationData"]> | OakOperation<BasePay.OpUpdateAction, Pay["UpdateOperationData"], Pay["Filter"]>;
|
|
4024
4028
|
refund?: OakOperation<"create", Refund["CreateOperationData"]> | OakOperation<BaseRefund.OpUpdateAction, Refund["UpdateOperationData"], Refund["Filter"]>;
|
|
4029
|
+
settlement?: OakOperation<"create", Settlement["CreateOperationData"]> | OakOperation<BaseSettlement.OpUpdateAction, Settlement["UpdateOperationData"], Settlement["Filter"]>;
|
|
4025
4030
|
withdraw?: OakOperation<"create", Withdraw["CreateOperationData"]> | OakOperation<BaseWithdraw.OpUpdateAction, Withdraw["UpdateOperationData"], Withdraw["Filter"]>;
|
|
4026
4031
|
withdrawTransfer?: OakOperation<"create", WithdrawTransfer["CreateOperationData"]> | OakOperation<BaseWithdrawTransfer.OpUpdateAction, WithdrawTransfer["UpdateOperationData"], WithdrawTransfer["Filter"]>;
|
|
4027
4032
|
}>;
|
|
@@ -4034,6 +4039,7 @@ export type AccountOper = {
|
|
|
4034
4039
|
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>;
|
|
4035
4040
|
pay?: OakOperation<"create", Pay["CreateOperationData"]> | OakOperation<BasePay.OpUpdateAction, Pay["UpdateOperationData"], Pay["Filter"]> | OakOperation<"remove", Pay["RemoveOperationData"], Pay["Filter"]>;
|
|
4036
4041
|
refund?: OakOperation<"create", Refund["CreateOperationData"]> | OakOperation<BaseRefund.OpUpdateAction, Refund["UpdateOperationData"], Refund["Filter"]> | OakOperation<"remove", Refund["RemoveOperationData"], Refund["Filter"]>;
|
|
4042
|
+
settlement?: OakOperation<"create", Settlement["CreateOperationData"]> | OakOperation<BaseSettlement.OpUpdateAction, Settlement["UpdateOperationData"], Settlement["Filter"]> | OakOperation<"remove", Settlement["RemoveOperationData"], Settlement["Filter"]>;
|
|
4037
4043
|
withdraw?: OakOperation<"create", Withdraw["CreateOperationData"]> | OakOperation<BaseWithdraw.OpUpdateAction, Withdraw["UpdateOperationData"], Withdraw["Filter"]> | OakOperation<"remove", Withdraw["RemoveOperationData"], Withdraw["Filter"]>;
|
|
4038
4044
|
withdrawTransfer?: OakOperation<"create", WithdrawTransfer["CreateOperationData"]> | OakOperation<BaseWithdrawTransfer.OpUpdateAction, WithdrawTransfer["UpdateOperationData"], WithdrawTransfer["Filter"]> | OakOperation<"remove", WithdrawTransfer["RemoveOperationData"], WithdrawTransfer["Filter"]>;
|
|
4039
4045
|
}>;
|
|
@@ -4459,14 +4465,23 @@ export type Settlement = {
|
|
|
4459
4465
|
Schema: BaseSettlement.OpSchema & {
|
|
4460
4466
|
account: Account["Schema"];
|
|
4461
4467
|
order: Order["Schema"];
|
|
4468
|
+
accountOper$entity?: Array<Omit<AccountOper["Schema"], "entity">>;
|
|
4469
|
+
accountOper$entity$$aggr?: AggregationResult<Omit<AccountOper["Schema"], "entity">>;
|
|
4462
4470
|
};
|
|
4463
4471
|
Projection: BaseSettlement.OpProjection & {
|
|
4464
4472
|
account?: Account["Projection"];
|
|
4465
4473
|
order?: Order["Projection"];
|
|
4474
|
+
accountOper$entity?: OakSelection<"select", Omit<AccountOper["Projection"], "settlement">, Omit<AccountOper["Filter"], "settlement">, AccountOper["Sorter"]> & {
|
|
4475
|
+
$entity: "accountOper";
|
|
4476
|
+
};
|
|
4477
|
+
accountOper$entity$$aggr?: DeduceAggregation<Omit<AccountOper["Projection"], "settlement">, Omit<AccountOper["Filter"], "settlement">, AccountOper["Sorter"]> & {
|
|
4478
|
+
$entity: "accountOper";
|
|
4479
|
+
};
|
|
4466
4480
|
};
|
|
4467
4481
|
FilterUnit: BaseSettlement.OpFilter & {
|
|
4468
4482
|
account: MakeFilter<Account["FilterUnit"]>;
|
|
4469
4483
|
order: MakeFilter<Order["FilterUnit"]>;
|
|
4484
|
+
accountOper$entity: MakeFilter<Omit<AccountOper["FilterUnit"], "entity">> & SubQueryPredicateMetadata;
|
|
4470
4485
|
};
|
|
4471
4486
|
Filter: MakeFilter<Settlement["FilterUnit"]>;
|
|
4472
4487
|
SortAttr: Partial<BaseSettlement.OpSortAttr | {
|
|
@@ -4483,6 +4498,7 @@ export type Settlement = {
|
|
|
4483
4498
|
CreateOperationData: FormCreateData<BaseSettlement.OpSchema & {
|
|
4484
4499
|
account?: OakOperation<"create", Account["CreateOperationData"]> | OakOperation<BaseAccount.OpUpdateAction, Account["UpdateOperationData"], Account["Filter"]>;
|
|
4485
4500
|
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]>;
|
|
4501
|
+
accountOper$entity?: OakOperation<"create", Omit<AccountOper["CreateOperationData"], "settlement"> | Omit<AccountOper["CreateOperationData"], "settlement">[]>[];
|
|
4486
4502
|
}>;
|
|
4487
4503
|
CreateSingle: OakOperation<"create", Settlement["CreateOperationData"]>;
|
|
4488
4504
|
CreateMulti: OakOperation<"create", Array<Settlement["CreateOperationData"]>>;
|
|
@@ -4490,6 +4506,7 @@ export type Settlement = {
|
|
|
4490
4506
|
UpdateOperationData: FormUpdateData<BaseSettlement.OpSchema & {
|
|
4491
4507
|
account?: OakOperation<"create", Account["CreateOperationData"]> | OakOperation<BaseAccount.OpUpdateAction, Account["UpdateOperationData"], Account["Filter"]> | OakOperation<"remove", Account["RemoveOperationData"], Account["Filter"]>;
|
|
4492
4508
|
order?: OakOperation<"create", Order["CreateOperationData"]> | OakOperation<BaseOrder.OpUpdateAction, Order["UpdateOperationData"], Order["Filter"]> | OakOperation<"remove", Order["RemoveOperationData"], Order["Filter"]>;
|
|
4509
|
+
accountOper$entity?: OakOperation<"create", Omit<AccountOper["CreateOperationData"], "settlement"> | Omit<AccountOper["CreateOperationData"], "settlement">[]>[];
|
|
4493
4510
|
}>;
|
|
4494
4511
|
Update: OakOperation<BaseSettlement.OpUpdateAction, Settlement["UpdateOperationData"], Settlement["Filter"], Settlement["Sorter"]>;
|
|
4495
4512
|
RemoveOperationData: {};
|
|
@@ -3,7 +3,7 @@ import { GenericAction } from "oak-domain/lib/actions/action";
|
|
|
3
3
|
export type IState = 'unsettled' | 'settled' | string;
|
|
4
4
|
export type IAction = 'settle' | string;
|
|
5
5
|
export declare const IActionDef: ActionDef<IAction, IState>;
|
|
6
|
-
export type ParticularAction = IAction | 'refund' | 'refundFailure';
|
|
6
|
+
export type ParticularAction = IAction | 'preSettle' | 'refund' | 'refundFailure';
|
|
7
7
|
export declare const actions: string[];
|
|
8
8
|
export type Action = GenericAction | ParticularAction | string;
|
|
9
9
|
export declare const actionDefDict: {
|
|
@@ -4,7 +4,7 @@ export const IActionDef = {
|
|
|
4
4
|
},
|
|
5
5
|
is: 'unsettled',
|
|
6
6
|
};
|
|
7
|
-
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "settle", "refund", "refundFailure"];
|
|
7
|
+
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "settle", "preSettle", "refund", "refundFailure"];
|
|
8
8
|
export const actionDefDict = {
|
|
9
9
|
iState: IActionDef
|
|
10
10
|
};
|