feat: 使用编译脚本,并适配了新的编译器改动
This commit is contained in:
parent
ad91ff2832
commit
0f2e6171bd
|
|
@ -6,7 +6,7 @@ import { BRC } from '../types/RuntimeCxt';
|
|||
*/
|
||||
export declare function getMpShipState(params: {
|
||||
shipId: string;
|
||||
}, context: BRC): Promise<string | null | undefined>;
|
||||
}, context: BRC): Promise<string | undefined>;
|
||||
/**
|
||||
* 获取打印面单
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,76 +4,15 @@
|
|||
*/
|
||||
import React from 'react';
|
||||
import { EntityDict } from '../oak-app-domain';
|
||||
import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, ListButtonProps, OakAbsAttrUpsertDef } from 'oak-frontend-base';
|
||||
declare const FilterPanel: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
||||
entity: T;
|
||||
columns: ColumnProps<EntityDict, T>[];
|
||||
}>) => React.ReactElement;
|
||||
declare const List: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
||||
entity: T;
|
||||
extraActions: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]);
|
||||
onAction: onActionFnDef;
|
||||
disabledOp: boolean;
|
||||
attributes: OakAbsAttrDef[];
|
||||
data: RowWithActions<EntityDict, T>[];
|
||||
loading: boolean;
|
||||
tablePagination?: React.ReactNode;
|
||||
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<EntityDict, T>> | undefined;
|
||||
hideHeader?: boolean | undefined;
|
||||
disableSerialNumber?: boolean | undefined;
|
||||
size?: "small" | "large" | "middle" | undefined;
|
||||
scroll?: ({
|
||||
x?: string | number | true | undefined;
|
||||
y?: string | number | undefined;
|
||||
} & {
|
||||
scrollToFirstRowOnChange?: boolean | undefined;
|
||||
}) | undefined;
|
||||
empty?: React.ReactNode;
|
||||
opWidth?: number | undefined;
|
||||
ellipsis?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
declare const ListPro: <T extends keyof EntityDict>(props: {
|
||||
title?: any;
|
||||
extraContent?: any;
|
||||
hideDefaultButtons?: boolean | undefined;
|
||||
buttonGroup?: ListButtonProps[] | undefined;
|
||||
onReload?: (() => void) | undefined;
|
||||
entity: T;
|
||||
extraActions?: OakExtraActionProps[] | ((row: RowWithActions<EntityDict, T>) => OakExtraActionProps[]) | undefined;
|
||||
onAction?: onActionFnDef | undefined;
|
||||
disabledOp?: boolean | undefined;
|
||||
attributes: OakAbsAttrDef[];
|
||||
data: RowWithActions<EntityDict, T>[];
|
||||
loading?: boolean | undefined;
|
||||
tablePagination?: any;
|
||||
rowSelection?: import("antd/es/table/interface").TableRowSelection<RowWithActions<EntityDict, T>> | undefined;
|
||||
disableSerialNumber?: boolean | undefined;
|
||||
size?: "small" | "large" | "middle" | undefined;
|
||||
scroll?: ({
|
||||
x?: string | number | true | undefined;
|
||||
y?: string | number | undefined;
|
||||
} & {
|
||||
scrollToFirstRowOnChange?: boolean | undefined;
|
||||
}) | undefined;
|
||||
empty?: any;
|
||||
opWidth?: number | undefined;
|
||||
oakPath?: string | undefined;
|
||||
}) => React.ReactElement;
|
||||
declare const Detail: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
||||
column?: number | Record<import("antd").Breakpoint, number> | undefined;
|
||||
entity: T;
|
||||
attributes: OakAbsAttrDef[];
|
||||
data: Partial<EntityDict[T]["Schema"]>;
|
||||
title?: string | undefined;
|
||||
bordered?: boolean | undefined;
|
||||
layout?: "horizontal" | "vertical" | undefined;
|
||||
}>) => React.ReactElement;
|
||||
declare const Upsert: <T extends keyof EntityDict>(props: ReactComponentProps<EntityDict, T, false, {
|
||||
helps: Record<string, string>;
|
||||
entity: T;
|
||||
attributes: OakAbsAttrUpsertDef<EntityDict, T, string | number>[];
|
||||
data: EntityDict[T]["Schema"];
|
||||
layout: "horizontal" | "vertical";
|
||||
mode: "default" | "card";
|
||||
}>) => React.ReactElement;
|
||||
import { ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef } from 'oak-frontend-base';
|
||||
import AbsFilterPanel from 'oak-frontend-base/es/components/filterPanel';
|
||||
import AbsList from 'oak-frontend-base/es/components/list';
|
||||
import AbsListPro from 'oak-frontend-base/es/components/listPro';
|
||||
import AbsDetail from 'oak-frontend-base/es/components/detail';
|
||||
import AbsUpsert from 'oak-frontend-base/es/components/upsert';
|
||||
declare const FilterPanel: <T extends keyof EntityDict>(...props: Parameters<typeof AbsFilterPanel<EntityDict, T>>) => React.ReactElement;
|
||||
declare const List: <T extends keyof EntityDict>(...props: Parameters<typeof AbsList<EntityDict, T>>) => React.ReactElement;
|
||||
declare const ListPro: <T extends keyof EntityDict>(...props: Parameters<typeof AbsListPro<EntityDict, T>>) => React.ReactElement;
|
||||
declare const Detail: <T extends keyof EntityDict>(...props: Parameters<typeof AbsDetail<EntityDict, T>>) => React.ReactElement;
|
||||
declare const Upsert: <T extends keyof EntityDict>(...props: Parameters<typeof AbsUpsert<EntityDict, T>>) => React.ReactElement;
|
||||
export { FilterPanel, List, ListPro, Detail, Upsert, ReactComponentProps, ColumnProps, RowWithActions, OakExtraActionProps, OakAbsAttrDef, onActionFnDef, };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
export default function Render(props: {
|
||||
accountOpers: EntityDict['accountOper']['OpSchema'][];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "offlineAccount", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "order", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { EntityDict } from "../../../oak-app-domain";
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "order", false, {
|
||||
accountId: string;
|
||||
accountAvailMax: number;
|
||||
onSetPays: (pays: Partial<EntityDict['pay']['CreateOperationData']>[]) => void;
|
||||
onSetPays: (pays: Partial<EntityDict["pay"]["CreateOperationData"]>[]) => void;
|
||||
accountTips: string;
|
||||
autoStartPay: boolean;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
export default function Info(props: {
|
||||
price: number;
|
||||
t: (k: string) => string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { PayChannelOption } from "../../../types/Pay";
|
||||
export default function Render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { PayChannelOption } from "../../../types/Pay";
|
||||
export default function Render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "pay", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "refund", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from "../../../../oak-app-domain";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "wechatMpShip", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "withdrawTransfer", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "withdraw", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
export default function render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
export default function render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "withdrawTransfer", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ export const desc = {
|
|||
isDefault: {
|
||||
notNull: true,
|
||||
type: "boolean"
|
||||
},
|
||||
allowPwd: {
|
||||
type: "boolean"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export type OpSchema = EntityShape & {
|
|||
applicationId: ForeignKey<"application">;
|
||||
passportId: ForeignKey<"passport">;
|
||||
isDefault: Boolean;
|
||||
allowPwd?: Boolean | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -19,6 +20,7 @@ export type OpFilter = {
|
|||
applicationId: Q_StringValue;
|
||||
passportId: Q_StringValue;
|
||||
isDefault: Q_BooleanValue;
|
||||
allowPwd: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -30,6 +32,7 @@ export type OpProjection = {
|
|||
applicationId?: number;
|
||||
passportId?: number;
|
||||
isDefault?: number;
|
||||
allowPwd?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -39,6 +42,7 @@ export type OpSortAttr = Partial<{
|
|||
applicationId: number;
|
||||
passportId: number;
|
||||
isDefault: number;
|
||||
allowPwd: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"attr": {
|
||||
"application": "应用",
|
||||
"passport": "登录方式",
|
||||
"isDefault": "是否默认"
|
||||
"isDefault": "是否默认",
|
||||
"allowPwd": "是否支持密码登录"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ export const desc = {
|
|||
ref: "application"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsent", "sending", "sent", "failure"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
expiresAt: Datetime;
|
||||
type: "login" | "changePassword" | "confirm";
|
||||
applicationId?: ForeignKey<"application"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export const desc = {
|
|||
ref: "ship"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["depositing", "successful", "failed", "shipped"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
accountId: ForeignKey<"account">;
|
||||
creatorId: ForeignKey<"user">;
|
||||
shipId?: ForeignKey<"ship"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -107,6 +107,13 @@ export const desc = {
|
|||
notNull: true,
|
||||
type: "ref",
|
||||
ref: "application"
|
||||
},
|
||||
// 分片续传配置
|
||||
enableChunkedUpload: {
|
||||
type: "boolean"
|
||||
},
|
||||
chunkInfo: {
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,21 @@
|
|||
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
import { CosOrigin } from "oak-general-business/lib/types/Config";
|
||||
import { String, Text, Int, Float, Boolean } from "oak-domain/lib/types/DataType";
|
||||
type ChunkInfo = {
|
||||
chunkSize: number;
|
||||
partCount: number;
|
||||
uploadId: string;
|
||||
merged: boolean;
|
||||
parts: Array<{
|
||||
partNumber: number;
|
||||
uploadUrl: string;
|
||||
etag: string;
|
||||
formData?: Record<string, any>;
|
||||
}>;
|
||||
};
|
||||
export type OpSchema = EntityShape & {
|
||||
origin: CosOrigin;
|
||||
type: "image" | "video" | "audio" | "file";
|
||||
|
|
@ -25,6 +37,8 @@ export type OpSchema = EntityShape & {
|
|||
uploadState: "success" | "failed" | "uploading";
|
||||
uploadMeta?: Object | null;
|
||||
applicationId: ForeignKey<"application">;
|
||||
enableChunkedUpload?: Boolean | null;
|
||||
chunkInfo?: ChunkInfo | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -54,6 +68,8 @@ export type OpFilter = {
|
|||
uploadState: Q_EnumValue<"success" | "failed" | "uploading">;
|
||||
uploadMeta: Object;
|
||||
applicationId: Q_StringValue;
|
||||
enableChunkedUpload: Q_BooleanValue;
|
||||
chunkInfo: JsonFilter<ChunkInfo>;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -82,6 +98,8 @@ export type OpProjection = {
|
|||
uploadState?: number;
|
||||
uploadMeta?: number | Object;
|
||||
applicationId?: number;
|
||||
enableChunkedUpload?: number;
|
||||
chunkInfo?: number | JsonProjection<ChunkInfo>;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -106,7 +124,10 @@ export type OpSortAttr = Partial<{
|
|||
isBridge: number;
|
||||
uploadState: number;
|
||||
applicationId: number;
|
||||
enableChunkedUpload: number;
|
||||
chunkInfo: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
export type OpUpdateAction = "update" | string;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
"isBridge": "是否桥接访问",
|
||||
"uploadState": "上传状态",
|
||||
"uploadMeta": "上传需要的metadata",
|
||||
"application": "来源应用"
|
||||
"application": "来源应用",
|
||||
"enableChunkedUpload": "是否启用分片续传",
|
||||
"chunkInfo": "分片续传信息"
|
||||
},
|
||||
"v": {
|
||||
"origin": {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export const desc = {
|
|||
enumeration: ["sending", "success", "failure"]
|
||||
},
|
||||
visitState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unvisited", "visited"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export type OpSchema = EntityShape & {
|
|||
platformId?: ForeignKey<"platform"> | null;
|
||||
channels?: Channels | null;
|
||||
iState?: IState | null;
|
||||
visitState?: VisitState | null;
|
||||
visitState: VisitState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export const desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["active", "applied", "abandoned"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export type OpSchema = EntityShape & {
|
|||
data: Object;
|
||||
filter?: Object | null;
|
||||
extra?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export const desc = {
|
|||
}
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["sending", "success", "failure"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export type OpSchema = EntityShape & {
|
|||
data1?: Object | null;
|
||||
data2?: Object | null;
|
||||
templateId?: String<128> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export const desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["normal", "rollbacked"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export type OpSchema = EntityShape & {
|
|||
bornAt?: Datetime | null;
|
||||
logId?: ForeignKey<"log"> | null;
|
||||
undoData?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unpaid", "timeout", "cancelled", "paying", "partiallyPaid", "paid", "refunding", "partiallyRefunded", "refunded"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export type OpSchema = EntityShape & {
|
|||
systemId: ForeignKey<"system">;
|
||||
addressId?: ForeignKey<"address"> | null;
|
||||
payAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export const desc = {
|
|||
type: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb", "wechatNative"]
|
||||
enumeration: ["password", "sms", "email", "wechatWeb", "wechatMp", "wechatPublic", "wechatPublicForWeb", "wechatMpForWeb", "wechatNative", "loginName", "oauth"]
|
||||
},
|
||||
config: {
|
||||
type: "object"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ export const style = {
|
|||
wechatMp: '#ADDCCA',
|
||||
wechatMpForWeb: '#FDC454',
|
||||
wechatPublicForWeb: '#C0A27C',
|
||||
wechatNative: '#C0A27C'
|
||||
wechatNative: '#C0A27C',
|
||||
loginName: '#456B3C',
|
||||
oauth: '#3C4655',
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue,
|
|||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
import { Boolean } from "oak-domain/lib/types/DataType";
|
||||
export type Type = "password" | "sms" | "email" | "wechatWeb" | "wechatMp" | "wechatPublic" | "wechatPublicForWeb" | "wechatMpForWeb" | "wechatNative";
|
||||
export type Type = "password" | "sms" | "email" | "wechatWeb" | "wechatMp" | "wechatPublic" | "wechatPublicForWeb" | "wechatMpForWeb" | "wechatNative" | "loginName" | "oauth";
|
||||
export type SmsConfig = {
|
||||
mockSend?: boolean;
|
||||
defaultOrigin?: "ali" | "tencent" | "ctyun";
|
||||
|
|
@ -35,10 +35,21 @@ export type PwdConfig = {
|
|||
regexs?: string[];
|
||||
tip?: string;
|
||||
};
|
||||
export type NameConfig = {
|
||||
min?: number;
|
||||
max?: number;
|
||||
verify?: boolean;
|
||||
regexs?: string[];
|
||||
register?: boolean;
|
||||
tip?: string;
|
||||
};
|
||||
export type OAuthConfig = {
|
||||
oauthIds: string[];
|
||||
};
|
||||
export type OpSchema = EntityShape & {
|
||||
systemId: ForeignKey<"system">;
|
||||
type: Type;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig) | null;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig) | null;
|
||||
enabled: Boolean;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
@ -51,7 +62,7 @@ export type OpFilter = {
|
|||
$$updateAt$$: Q_DateValue;
|
||||
systemId: Q_StringValue;
|
||||
type: Q_EnumValue<Type>;
|
||||
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig>;
|
||||
config: JsonFilter<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig>;
|
||||
enabled: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
|
|
@ -63,7 +74,7 @@ export type OpProjection = {
|
|||
$$seq$$?: number;
|
||||
systemId?: number;
|
||||
type?: number;
|
||||
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig>;
|
||||
config?: number | JsonProjection<SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig | NameConfig | OAuthConfig>;
|
||||
enabled?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
|
|
|
|||
|
|
@ -9,14 +9,16 @@
|
|||
"v": {
|
||||
"type": {
|
||||
"email": "邮箱",
|
||||
"sms": "短信",
|
||||
"sms": "手机号",
|
||||
"password": "密码",
|
||||
"wechatMp": "小程序",
|
||||
"wechatPublic": "公众号",
|
||||
"wechatWeb": "微信网站",
|
||||
"wechatMpForWeb": "小程序授权网页",
|
||||
"wechatPublicForWeb": "公众号授权网页",
|
||||
"wechatNative": "微信APP授权"
|
||||
"wechatNative": "微信APP授权",
|
||||
"loginName": "账号",
|
||||
"oauth": "OAuth授权"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ export const desc = {
|
|||
type: "boolean"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unpaid", "paying", "paid", "closed", "refunding", "partiallyRefunded", "refunded"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export type OpSchema = EntityShape & {
|
|||
phantom4?: Int<8> | null;
|
||||
phantom5?: Object | null;
|
||||
autoStart?: Boolean | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["refunding", "successful", "failed"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
creatorId: ForeignKey<"user">;
|
||||
reason?: Text | null;
|
||||
successAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsettled", "settled", "closed"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
price: Price;
|
||||
settledAt?: Datetime | null;
|
||||
closedAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsettled", "settled", "closed"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
price: Price;
|
||||
settledAt?: Datetime | null;
|
||||
closedAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unshipped", "shipping", "cancelled", "received", "rejected", "unknown", "receiving"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export type OpSchema = EntityShape & {
|
|||
extraShipId?: String<128> | null;
|
||||
extraPaths?: Paths | null;
|
||||
receiveAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
idState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unverified", "verified", "verifying"]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export type OpSchema = EntityShape & {
|
|||
isRoot?: Boolean | null;
|
||||
hasPassword?: Boolean | null;
|
||||
verifyPasswordAt?: Datetime | null;
|
||||
idState?: IdState | null;
|
||||
idState: IdState;
|
||||
userState?: UserState | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wait", "success", "fail"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export type OpSchema = EntityShape & {
|
|||
wechatUserId: ForeignKey<"wechatUser">;
|
||||
sync: Boolean;
|
||||
syncAt: Datetime;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ export const desc = {
|
|||
wechatUserId: {
|
||||
type: "ref",
|
||||
ref: "wechatUser"
|
||||
},
|
||||
router: {
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { Action, ParticularAction } from "./Action";
|
||||
import { Boolean, Text, Datetime } from "oak-domain/lib/types/DataType";
|
||||
import { QrCodeType } from "oak-general-business/lib/types/Config";
|
||||
type Router = {
|
||||
pathname: string;
|
||||
props?: Record<string, any>;
|
||||
state?: Record<string, any>;
|
||||
};
|
||||
export type OpSchema = EntityShape & {
|
||||
userId?: ForeignKey<"user"> | null;
|
||||
type: "bind" | "login";
|
||||
|
|
@ -13,6 +18,7 @@ export type OpSchema = EntityShape & {
|
|||
expiresAt?: Datetime | null;
|
||||
expired?: Boolean | null;
|
||||
wechatUserId?: ForeignKey<"wechatUser"> | null;
|
||||
router?: Router | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -30,6 +36,7 @@ export type OpFilter = {
|
|||
expiresAt: Q_DateValue;
|
||||
expired: Q_BooleanValue;
|
||||
wechatUserId: Q_StringValue;
|
||||
router: JsonFilter<Router>;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -46,6 +53,7 @@ export type OpProjection = {
|
|||
expiresAt?: number;
|
||||
expired?: number;
|
||||
wechatUserId?: number;
|
||||
router?: number | JsonProjection<Router>;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -60,7 +68,9 @@ export type OpSortAttr = Partial<{
|
|||
expiresAt: number;
|
||||
expired: number;
|
||||
wechatUserId: number;
|
||||
router: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<Action | string>;
|
||||
export type OpUpdateAction = "update" | ParticularAction | string;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
"expiresAt": "过期时间",
|
||||
"qrCodeType": "二维码类型",
|
||||
"tokens": "相关令牌",
|
||||
"wechatUser": "微信用户"
|
||||
"wechatUser": "微信用户",
|
||||
"router": "目标路由"
|
||||
},
|
||||
"action": {
|
||||
"success": "成功"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export const desc = {
|
|||
ref: "wechatPublicTag"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wait", "success", "fail"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
menuConfig: Config;
|
||||
applicationId: ForeignKey<"application">;
|
||||
wechatPublicTagId?: ForeignKey<"wechatPublicTag"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export const desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wait", "success", "fail"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
wechatId?: Uint<4> | null;
|
||||
sync?: Boolean | null;
|
||||
syncAt?: Datetime | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export const desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["withdrawing", "successful", "partiallySuccessful", "failed", "applying"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export type OpSchema = EntityShape & {
|
|||
creatorId: ForeignKey<"user">;
|
||||
reason?: Text | null;
|
||||
meta?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { actions } from "./Action";
|
|||
export const desc = {
|
||||
attributes: {
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["transferring", "successful", "failed"]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/E
|
|||
import { Action, ParticularAction, IState } from "./Action";
|
||||
import { Price, String, Text } from "oak-domain/lib/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
withdrawId: ForeignKey<"withdraw">;
|
||||
withdrawAccountId: ForeignKey<"withdrawAccount">;
|
||||
price: Price;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Timer } from 'oak-domain/lib/types/Timer';
|
||||
import { EntityDict } from '../oak-app-domain/index';
|
||||
import { BRC } from '../types/RuntimeCxt';
|
||||
declare const _default: Timer<EntityDict, keyof EntityDict, BRC>[];
|
||||
declare const _default: Array<Timer<EntityDict, keyof EntityDict, BRC>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ import { BRC } from '../types/RuntimeCxt';
|
|||
* @param context
|
||||
* @param refunds
|
||||
*/
|
||||
export declare function updateWithdrawState(context: BRC, id: string): Promise<1 | 0>;
|
||||
export declare function updateWithdrawState(context: BRC, id: string): Promise<0 | 1>;
|
||||
declare const triggers: Trigger<EntityDict, 'withdraw', BRC>[];
|
||||
export default triggers;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import { EntityDict } from '../oak-app-domain';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import BackendRuntimeContext from '../context/BackendRuntimeContext';
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ export default class Account implements PayClazz {
|
|||
getRefundState(refund: EntityDict['refund']['Schema']): Promise<[EntityDict['refund']['Schema']['iState'], undefined]>;
|
||||
decodePayNotification(params: Record<string, any>, body: any): Promise<{
|
||||
payId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['pay']['Schema']['iState'];
|
||||
extra?: EntityDict['pay']['Update']['data'] | undefined;
|
||||
}>;
|
||||
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
||||
refundId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['refund']['OpSchema']['iState'];
|
||||
extra?: EntityDict['refund']['Update']['data'] | undefined;
|
||||
price?: number | undefined;
|
||||
}>;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default class AliPay extends AliPayDebug implements PayClazz {
|
|||
static DEFAULT_REFUND_DAYS_GAP: number;
|
||||
constructor(apProduct: ApProduct);
|
||||
refund(refund: Refund, context: BRC): Promise<RefundUpdateData | undefined>;
|
||||
getRefundState(refund: OpRefund): Promise<[string | null | undefined, RefundUpdateData | undefined]>;
|
||||
getRefundState(refund: OpRefund): Promise<[EntityDict['refund']['OpSchema']['iState'], RefundUpdateData | undefined]>;
|
||||
private analyzeResult;
|
||||
private caclRefundDeadline;
|
||||
prepay(pay: Pay, data: PayUpdateData, context: BRC): Promise<void>;
|
||||
|
|
@ -41,7 +41,7 @@ export default class AliPay extends AliPayDebug implements PayClazz {
|
|||
}>;
|
||||
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
||||
refundId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['refund']['OpSchema']['iState'];
|
||||
extra?: RefundUpdateData | undefined;
|
||||
price?: number | undefined;
|
||||
}>;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default class AliPay implements PayClazz {
|
|||
constructor(apProduct: ApProduct);
|
||||
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
||||
refundId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['refund']['OpSchema']['iState'];
|
||||
extra?: RefundUpdateData | undefined;
|
||||
price?: number | undefined;
|
||||
}>;
|
||||
|
|
@ -20,10 +20,10 @@ export default class AliPay implements PayClazz {
|
|||
calcRefundTax(price: number): [number, string, string];
|
||||
calcPayTax(price: number): [number, string, string];
|
||||
refund(refund: Refund, context: BRC): Promise<RefundUpdateData | undefined>;
|
||||
getRefundState(refund: Refund): Promise<[string | null | undefined, RefundUpdateData | undefined]>;
|
||||
getRefundState(refund: Refund): Promise<[EntityDict['refund']['OpSchema']['iState'], RefundUpdateData | undefined]>;
|
||||
decodePayNotification(params: Record<string, any>, body: any): Promise<{
|
||||
payId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['pay']['OpSchema']['iState'];
|
||||
extra?: PayUpdateData | undefined;
|
||||
}>;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ export default class Offline implements PayClazz {
|
|||
getRefundState(refund: RefundOpSchema): Promise<[PayOpSchema['iState'], PayUpdateData | undefined]>;
|
||||
decodePayNotification(params: Record<string, any>, body: any): Promise<{
|
||||
payId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['pay']['OpSchema']['iState'];
|
||||
extra?: PayUpdateData | undefined;
|
||||
}>;
|
||||
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
||||
refundId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['refund']['OpSchema']['iState'];
|
||||
extra?: EntityDict['refund']['Update']['data'] | undefined;
|
||||
price?: number | undefined;
|
||||
}>;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default class WechatPay extends WechatPayDebug implements PayClazz {
|
|||
static DEFAULT_REFUND_DAYS_GAP: number;
|
||||
constructor(wpProduct: WpProduct, appId: string);
|
||||
refund(refund: Refund, context: BRC): Promise<RefundUpdateData | undefined>;
|
||||
getRefundState(refund: OpRefund): Promise<[string | null | undefined, RefundUpdateData | undefined]>;
|
||||
getRefundState(refund: OpRefund): Promise<[EntityDict['refund']['OpSchema']['iState'], RefundUpdateData | undefined]>;
|
||||
private analyzeResult;
|
||||
private caclRefundDeadline;
|
||||
prepay(pay: Pay, data: PayUpdateData, context: BRC): Promise<void>;
|
||||
|
|
@ -33,7 +33,7 @@ export default class WechatPay extends WechatPayDebug implements PayClazz {
|
|||
}>;
|
||||
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
||||
refundId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['refund']['OpSchema']['iState'];
|
||||
extra?: RefundUpdateData | undefined;
|
||||
price?: number | undefined;
|
||||
}>;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default class WechatPay implements PayClazz {
|
|||
constructor(wpProduct: WpProduct);
|
||||
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
||||
refundId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['refund']['OpSchema']['iState'];
|
||||
extra?: RefundUpdateData | undefined;
|
||||
price?: number | undefined;
|
||||
}>;
|
||||
|
|
@ -20,10 +20,10 @@ export default class WechatPay implements PayClazz {
|
|||
calcRefundTax(price: number): [number, string, string];
|
||||
calcPayTax(price: number): [number, string, string];
|
||||
refund(refund: Refund, context: BRC): Promise<RefundUpdateData | undefined>;
|
||||
getRefundState(refund: Refund): Promise<[string | null | undefined, RefundUpdateData | undefined]>;
|
||||
getRefundState(refund: Refund): Promise<[EntityDict['refund']['OpSchema']['iState'], RefundUpdateData | undefined]>;
|
||||
decodePayNotification(params: Record<string, any>, body: any): Promise<{
|
||||
payId: string;
|
||||
iState: string | null | undefined;
|
||||
iState: EntityDict['pay']['OpSchema']['iState'];
|
||||
extra?: PayUpdateData | undefined;
|
||||
}>;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default class WechatMpShip extends DebugClazz {
|
|||
* 400001 异常阶段-订单取消
|
||||
* 400002 异常阶段-订单滞留
|
||||
*/
|
||||
let state = undefined;
|
||||
let state = 'unshipped';
|
||||
switch (latestType) {
|
||||
case 100001:
|
||||
case 100003:
|
||||
|
|
@ -51,7 +51,7 @@ export default class WechatMpShip extends DebugClazz {
|
|||
case 100002:
|
||||
case 300004:
|
||||
case 400002: {
|
||||
state = 'unknow';
|
||||
state = 'unknown';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { BRC } from '../types/RuntimeCxt';
|
|||
*/
|
||||
export declare function getMpShipState(params: {
|
||||
shipId: string;
|
||||
}, context: BRC): Promise<string | null | undefined>;
|
||||
}, context: BRC): Promise<string | undefined>;
|
||||
/**
|
||||
* 获取打印面单
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.initialize = exports.create = void 0;
|
||||
exports.create = create;
|
||||
exports.initialize = initialize;
|
||||
const tslib_1 = require("tslib");
|
||||
const lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
const features_1 = require("oak-general-business/es/features");
|
||||
|
|
@ -12,7 +13,6 @@ function create(features) {
|
|||
pay,
|
||||
};
|
||||
}
|
||||
exports.create = create;
|
||||
async function initialize(features, access, config, clazzes) {
|
||||
await (0, features_1.initialize)(features, access, config ? {
|
||||
dontAutoLoginInWechatmp: config.dontAutoLoginInWechatmp,
|
||||
|
|
@ -21,4 +21,3 @@ async function initialize(features, access, config, clazzes) {
|
|||
applicationExtraProjection: application_1.applicationProjection,
|
||||
}, clazzes);
|
||||
}
|
||||
exports.initialize = initialize;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ const Action_26 = require("./OfflineAccount/Action");
|
|||
const Action_27 = require("./Order/Action");
|
||||
const Action_28 = require("./Pay/Action");
|
||||
const Action_29 = require("./Refund/Action");
|
||||
const Action_30 = require("./Settlement/Action");
|
||||
const Action_31 = require("./SettlePlan/Action");
|
||||
const Action_30 = require("./SettlePlan/Action");
|
||||
const Action_31 = require("./Settlement/Action");
|
||||
const Action_32 = require("./Ship/Action");
|
||||
const Action_33 = require("./User/Action");
|
||||
const Action_34 = require("./Withdraw/Action");
|
||||
|
|
@ -69,8 +69,8 @@ exports.actionDefDict = {
|
|||
order: Action_27.actionDefDict,
|
||||
pay: Action_28.actionDefDict,
|
||||
refund: Action_29.actionDefDict,
|
||||
settlement: Action_30.actionDefDict,
|
||||
settlePlan: Action_31.actionDefDict,
|
||||
settlePlan: Action_30.actionDefDict,
|
||||
settlement: Action_31.actionDefDict,
|
||||
ship: Action_32.actionDefDict,
|
||||
user: Action_33.actionDefDict,
|
||||
withdraw: Action_34.actionDefDict,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ exports.desc = {
|
|||
isDefault: {
|
||||
notNull: true,
|
||||
type: "boolean"
|
||||
},
|
||||
allowPwd: {
|
||||
type: "boolean"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ export type OpSchema = EntityShape & {
|
|||
applicationId: ForeignKey<"application">;
|
||||
passportId: ForeignKey<"passport">;
|
||||
isDefault: Boolean;
|
||||
allowPwd?: Boolean | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -19,6 +20,7 @@ export type OpFilter = {
|
|||
applicationId: Q_StringValue;
|
||||
passportId: Q_StringValue;
|
||||
isDefault: Q_BooleanValue;
|
||||
allowPwd: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -30,6 +32,7 @@ export type OpProjection = {
|
|||
applicationId?: number;
|
||||
passportId?: number;
|
||||
isDefault?: number;
|
||||
allowPwd?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -39,6 +42,7 @@ export type OpSortAttr = Partial<{
|
|||
applicationId: number;
|
||||
passportId: number;
|
||||
isDefault: number;
|
||||
allowPwd: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"attr": {
|
||||
"application": "应用",
|
||||
"passport": "登录方式",
|
||||
"isDefault": "是否默认"
|
||||
"isDefault": "是否默认",
|
||||
"allowPwd": "是否支持密码登录"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ exports.desc = {
|
|||
ref: "application"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unsent", "sending", "sent", "failure"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export type OpSchema = EntityShape & {
|
|||
expiresAt: Datetime;
|
||||
type: "login" | "changePassword" | "confirm";
|
||||
applicationId?: ForeignKey<"application"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ exports.desc = {
|
|||
ref: "ship"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["depositing", "successful", "failed", "shipped"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export type OpSchema = EntityShape & {
|
|||
accountId: ForeignKey<"account">;
|
||||
creatorId: ForeignKey<"user">;
|
||||
shipId?: ForeignKey<"ship"> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -110,6 +110,13 @@ exports.desc = {
|
|||
notNull: true,
|
||||
type: "ref",
|
||||
ref: "application"
|
||||
},
|
||||
// 分片续传配置
|
||||
enableChunkedUpload: {
|
||||
type: "boolean"
|
||||
},
|
||||
chunkInfo: {
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,21 @@
|
|||
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { ForeignKey, JsonProjection } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey, JsonFilter } from "oak-domain/lib/types/Demand";
|
||||
import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
import { CosOrigin } from "oak-general-business/lib/types/Config";
|
||||
import { String, Text, Int, Float, Boolean } from "oak-domain/lib/types/DataType";
|
||||
type ChunkInfo = {
|
||||
chunkSize: number;
|
||||
partCount: number;
|
||||
uploadId: string;
|
||||
merged: boolean;
|
||||
parts: Array<{
|
||||
partNumber: number;
|
||||
uploadUrl: string;
|
||||
etag: string;
|
||||
formData?: Record<string, any>;
|
||||
}>;
|
||||
};
|
||||
export type OpSchema = EntityShape & {
|
||||
origin: CosOrigin;
|
||||
type: "image" | "video" | "audio" | "file";
|
||||
|
|
@ -25,6 +37,8 @@ export type OpSchema = EntityShape & {
|
|||
uploadState: "success" | "failed" | "uploading";
|
||||
uploadMeta?: Object | null;
|
||||
applicationId: ForeignKey<"application">;
|
||||
enableChunkedUpload?: Boolean | null;
|
||||
chunkInfo?: ChunkInfo | null;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
@ -54,6 +68,8 @@ export type OpFilter = {
|
|||
uploadState: Q_EnumValue<"success" | "failed" | "uploading">;
|
||||
uploadMeta: Object;
|
||||
applicationId: Q_StringValue;
|
||||
enableChunkedUpload: Q_BooleanValue;
|
||||
chunkInfo: JsonFilter<ChunkInfo>;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
"#id"?: NodeId;
|
||||
|
|
@ -82,6 +98,8 @@ export type OpProjection = {
|
|||
uploadState?: number;
|
||||
uploadMeta?: number | Object;
|
||||
applicationId?: number;
|
||||
enableChunkedUpload?: number;
|
||||
chunkInfo?: number | JsonProjection<ChunkInfo>;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
id: number;
|
||||
|
|
@ -106,7 +124,10 @@ export type OpSortAttr = Partial<{
|
|||
isBridge: number;
|
||||
uploadState: number;
|
||||
applicationId: number;
|
||||
enableChunkedUpload: number;
|
||||
chunkInfo: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
export type OpAction = OakMakeAction<GenericAction | string>;
|
||||
export type OpUpdateAction = "update" | string;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@
|
|||
"isBridge": "是否桥接访问",
|
||||
"uploadState": "上传状态",
|
||||
"uploadMeta": "上传需要的metadata",
|
||||
"application": "来源应用"
|
||||
"application": "来源应用",
|
||||
"enableChunkedUpload": "是否启用分片续传",
|
||||
"chunkInfo": "分片续传信息"
|
||||
},
|
||||
"v": {
|
||||
"origin": {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ exports.desc = {
|
|||
enumeration: ["sending", "success", "failure"]
|
||||
},
|
||||
visitState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unvisited", "visited"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export type OpSchema = EntityShape & {
|
|||
platformId?: ForeignKey<"platform"> | null;
|
||||
channels?: Channels | null;
|
||||
iState?: IState | null;
|
||||
visitState?: VisitState | null;
|
||||
visitState: VisitState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ exports.desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["active", "applied", "abandoned"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export type OpSchema = EntityShape & {
|
|||
data: Object;
|
||||
filter?: Object | null;
|
||||
extra?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ exports.desc = {
|
|||
}
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["sending", "success", "failure"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export type OpSchema = EntityShape & {
|
|||
data1?: Object | null;
|
||||
data2?: Object | null;
|
||||
templateId?: String<128> | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ exports.desc = {
|
|||
type: "object"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["normal", "rollbacked"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export type OpSchema = EntityShape & {
|
|||
bornAt?: Datetime | null;
|
||||
logId?: ForeignKey<"log"> | null;
|
||||
undoData?: Object | null;
|
||||
iState?: IState | null;
|
||||
iState: IState;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ exports.desc = {
|
|||
type: "datetime"
|
||||
},
|
||||
iState: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["unpaid", "timeout", "cancelled", "paying", "partiallyPaid", "paid", "refunding", "partiallyRefunded", "refunded"]
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue