token
This commit is contained in:
parent
4b6a340383
commit
fb42a7efb9
|
|
@ -1,7 +1,7 @@
|
|||
import { Style } from '../../../../types/Style';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, {
|
||||
style: Style;
|
||||
entity: "application" | "system" | "platform";
|
||||
entity: "application" | "platform" | "system";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Config } from '../../../types/Config';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
config: Config;
|
||||
entity: "system" | "platform";
|
||||
entity: "platform" | "system";
|
||||
name: string;
|
||||
entityId: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "default" | "success" | "primary" | "warning" | "danger" | undefined;
|
||||
color?: "default" | "success" | "warning" | "primary" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "large" | "middle" | "mini" | undefined;
|
||||
size?: "small" | "middle" | "large" | "mini" | undefined;
|
||||
block?: boolean | undefined;
|
||||
loading?: boolean | "auto" | undefined;
|
||||
loadingText?: string | undefined;
|
||||
|
|
@ -24,7 +24,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
type?: "button" | "submit" | "reset" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseUp" | "onMouseDown" | "onTouchStart" | "onTouchEnd"> & {
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchStart" | "onTouchEnd"> & {
|
||||
className?: string | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
|
||||
tabIndex?: number | undefined;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: keyof EntityDict;
|
||||
entityFilter: any;
|
||||
relationIds: string[];
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
rule: "all" | "single" | "free";
|
||||
ruleOnRow: "all" | "single" | "free";
|
||||
onPickRelations: (ids: string[]) => void;
|
||||
onPickRows: (ids: string[]) => void;
|
||||
pickedRowIds: string[] | undefined;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
claimUrl: string;
|
||||
qrCodeType: QrCodeType;
|
||||
multiple: boolean;
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
rule: "all" | "single" | "free";
|
||||
ruleOnRow: "all" | "single" | "free";
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default function render(props) {
|
|||
}} options={relations?.map((ele) => ({
|
||||
value: ele.id,
|
||||
label: ele.display ||
|
||||
t(`${relationEntity}:r.${ele.name}`),
|
||||
relationEntity && t(`${relationEntity}:r.${ele.name}`),
|
||||
}))}/>
|
||||
</Form.Item>
|
||||
{relationIds?.length > 1 && (<Form.Item label={t('userEntityGrant:attr.rule')} help={t('helpRule')}>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { makeAbleActionDef } from 'oak-domain/lib/actions/action';
|
||||
import { makeAbleActionDef } from "oak-domain/lib/actions/action";
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable", "charge", "withdraw", "cost", "refund", "loan", "repay"];
|
||||
const AbleActionDef = makeAbleActionDef('enabled');
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { makeAbleActionDef } from 'oak-domain/lib/actions/action';
|
||||
import { makeAbleActionDef } from "oak-domain/lib/actions/action";
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable"];
|
||||
const AbleActionDef = makeAbleActionDef('enabled');
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { makeAbleActionDef } from 'oak-domain/lib/actions/action';
|
||||
import { makeAbleActionDef } from "oak-domain/lib/actions/action";
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable"];
|
||||
const AbleActionDef = makeAbleActionDef('enabled');
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -32,5 +32,5 @@ export const desc = {
|
|||
},
|
||||
actionType: "crud",
|
||||
actions,
|
||||
relation: ['partner']
|
||||
relation: ["partner"]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,5 +51,5 @@ export const desc = {
|
|||
},
|
||||
actionType: "crud",
|
||||
actions,
|
||||
relation: ['collaborator']
|
||||
relation: ["collaborator"]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { makeAbleActionDef } from 'oak-domain/lib/actions/action';
|
||||
import { makeAbleActionDef } from "oak-domain/lib/actions/action";
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "enable", "disable"];
|
||||
const AbleActionDef = makeAbleActionDef('enabled');
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export const desc = {
|
|||
qrCodeType: {
|
||||
notNull: true,
|
||||
type: "enum",
|
||||
enumeration: ["wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublic", "wechatPublicForMp", "webForWechatPublic"]
|
||||
enumeration: ["wechatPublic", "wechatMpDomainUrl", "wechatMpWxaCode", "wechatPublicForMp", "webForWechatPublic"]
|
||||
},
|
||||
expiresAt: {
|
||||
type: "datetime"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export declare function createToDo<ED extends EntityDict & BaseEntityDict, T ext
|
|||
redirectTo: EntityDict['toDo']['OpSchema']['redirectTo'];
|
||||
entity: any;
|
||||
entityId: string;
|
||||
}, userIds?: string[]): Promise<0 | 1>;
|
||||
}, userIds?: string[]): Promise<1 | 0>;
|
||||
/**
|
||||
* 完成todo例程,当在entity对象上进行action操作时(操作条件是filter),将对应的todo完成
|
||||
* 必须在entity的action的后trigger中调用
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@ const assert_1 = require("oak-domain/lib/utils/assert");
|
|||
const oak_external_sdk_1 = require("oak-external-sdk");
|
||||
async function wechatMpJump(params, context) {
|
||||
const { applicationId, jump_wxa, expireType, expiresAt, expireInterval } = params;
|
||||
const envVersionVersionDict = {
|
||||
development: 'develop',
|
||||
staging: 'trial',
|
||||
production: 'release',
|
||||
};
|
||||
Object.assign(jump_wxa, {
|
||||
env_version: envVersionVersionDict[process.env.NODE_ENV],
|
||||
});
|
||||
(0, assert_1.assert)(applicationId);
|
||||
const [application] = await context.select('application', {
|
||||
data: (0, lodash_1.cloneDeep)(Projection_1.applicationProjection),
|
||||
|
|
|
|||
|
|
@ -30,5 +30,7 @@ exports.tokens = [
|
|||
},
|
||||
userId: constants_1.ROOT_USER_ID,
|
||||
playerId: constants_1.ROOT_USER_ID,
|
||||
refreshedAt: Date.now(),
|
||||
value:constants_1.ROOT_TOKEN_ID,
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -29,6 +29,14 @@ export async function wechatMpJump<
|
|||
context: Cxt
|
||||
): Promise<any> {
|
||||
const { applicationId, jump_wxa, expireType, expiresAt, expireInterval } = params;
|
||||
const envVersionVersionDict = {
|
||||
development: 'develop',
|
||||
staging: 'trial',
|
||||
production: 'release',
|
||||
};
|
||||
Object.assign(jump_wxa, {
|
||||
env_version: envVersionVersionDict[process.env.NODE_ENV as keyof typeof envVersionVersionDict],
|
||||
});
|
||||
assert(applicationId);
|
||||
const [application] = await context.select(
|
||||
'application',
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default function render(
|
|||
value: ele.id,
|
||||
label:
|
||||
ele.display ||
|
||||
t(`${relationEntity as string}:r.${ele.name}`),
|
||||
relationEntity && t(`${relationEntity as string}:r.${ele.name}`),
|
||||
}))}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
|
|
|||
|
|
@ -33,5 +33,7 @@ export const tokens: Array<TokenCreate> = [
|
|||
},
|
||||
userId: ROOT_USER_ID,
|
||||
playerId: ROOT_USER_ID,
|
||||
refreshedAt: Date.now(),
|
||||
value: ROOT_TOKEN_ID,
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue