user/info的小更新
This commit is contained in:
parent
32fe168559
commit
fae809e4bd
|
|
@ -103,7 +103,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'image',
|
||||
tag1: 'image',
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
objectId: await generateNewIdAsync(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -128,7 +128,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'video',
|
||||
tag1: 'video',
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
objectId: await generateNewIdAsync(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -150,7 +150,7 @@ export async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'audio',
|
||||
tag1: 'audio',
|
||||
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
|
||||
objectId: await generateNewIdAsync(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ export declare function syncMessageTemplate<ED extends EntityDict>(params: {
|
|||
example: string;
|
||||
keywordEnumValueList: {
|
||||
keywordCode: string;
|
||||
enumValueList: Array<string>;
|
||||
enumValueList: string[];
|
||||
}[];
|
||||
}[]>;
|
||||
|
|
|
|||
|
|
@ -2467,8 +2467,8 @@ export async function refreshToken(params, context) {
|
|||
// 只有server模式去刷新token
|
||||
// 'development' | 'production' | 'staging'
|
||||
const intervals = {
|
||||
development: 7200 * 1000, // 2小时
|
||||
staging: 600 * 1000, // 十分钟
|
||||
development: 7200 * 1000,
|
||||
staging: 600 * 1000,
|
||||
production: 600 * 1000, // 十分钟
|
||||
};
|
||||
let applicationId = token.applicationId;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "applicationPassport", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "article", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "articleMenu", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "system", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "platform", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const checkers: (import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "applicationPassport", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "article", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "articleMenu", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "system", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../oak-app-domain").EntityDict, "platform", import("..").RuntimeCxt<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default checkers;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
export type PositionProps = {
|
||||
loadUI: boolean;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
import { ModalProps } from 'antd';
|
||||
import { GeolocationProps } from '@uiw/react-amap';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
import { MapProps, APILoaderConfig } from '@uiw/react-amap';
|
||||
import './index.less';
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
/// <reference types="react" />
|
||||
import { GenerateUrlFn } from "../../../types/Article";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, {
|
||||
entityId: string;
|
||||
articleMenuId: string | undefined;
|
||||
generateUrl: GenerateUrlFn;
|
||||
empty: React.ReactNode | undefined;
|
||||
empty: import("react").ReactNode;
|
||||
menuCheck: (isArticle: boolean) => void;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, {
|
||||
articleMenuId: string | undefined;
|
||||
onChildEditArticleChange: (data: string) => void;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "doc" | "edit";
|
||||
getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void;
|
||||
breadcrumbItems: string[];
|
||||
drawerOpen: boolean;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
import { GenerateUrlFn } from "../../../types/Article";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
|
|
@ -5,8 +6,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
title: string;
|
||||
origin: string;
|
||||
menuEmpty: React.ReactNode | undefined;
|
||||
articleEmpty: React.ReactNode | undefined;
|
||||
menuEmpty: import("react").ReactNode;
|
||||
articleEmpty: import("react").ReactNode;
|
||||
generateUrl: GenerateUrlFn;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { GenerateUrlFn } from "../../../types/Article";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "articleMenu", true, {
|
||||
entity: string;
|
||||
|
|
@ -6,7 +7,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
origin: string;
|
||||
onMenuClick: (menuId: string, menuName: string, isArticle: boolean) => void;
|
||||
onArticleClick: (atricleId: string) => void;
|
||||
empty: React.ReactNode | undefined;
|
||||
empty: import("react").ReactNode;
|
||||
changeAddArticle: (show: boolean) => void;
|
||||
generateUrl: GenerateUrlFn;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onRemove: () => void;
|
||||
onUpdateName: (name: string) => Promise<void>;
|
||||
onChildEditArticleChange: (data: string) => void;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "doc" | "edit";
|
||||
getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void;
|
||||
breadItems: string[];
|
||||
drawerOpen: boolean;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
parentId: string | undefined;
|
||||
onGrandChildEditArticleChange: (data: string) => void;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "doc" | "edit";
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
getBreadcrumbItems: (breadcrumbItems: string[]) => void;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "articleMenu", true, {
|
||||
entity: string;
|
||||
entityId: string;
|
||||
show: "edit" | "doc" | "preview";
|
||||
show: "preview" | "doc" | "edit";
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
tocPosition: "none" | "left" | "right";
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="node" />
|
||||
import * as React from 'react';
|
||||
type IDownloadProps = {
|
||||
children?: React.ReactNode;
|
||||
|
|
@ -8,9 +9,9 @@ type IDownloadProps = {
|
|||
};
|
||||
declare function Download(props: IDownloadProps): React.JSX.Element;
|
||||
declare namespace Download {
|
||||
var onDownload: (data: ArrayBuffer | ReadableStream, filename: string) => Promise<void>;
|
||||
var onDownload: (data: ArrayBuffer | ReadableStream<any>, filename: string) => Promise<void>;
|
||||
var base64ToBlob: (base64String: string) => Blob;
|
||||
var arrayBufferToBase64: (buffer: Buffer) => string;
|
||||
var base64ToArrayBuffer: (base64String: string) => ArrayBuffer;
|
||||
var base64ToArrayBuffer: (base64String: string) => ArrayBufferLike;
|
||||
}
|
||||
export default Download;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { ReactComponentProps } from 'oak-frontend-base';
|
|||
import { ECode } from '../../../types/ErrorPage';
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
code: ECode;
|
||||
title?: string;
|
||||
desc?: string;
|
||||
title?: string | undefined;
|
||||
desc?: string | undefined;
|
||||
children?: React.ReactNode;
|
||||
icon?: React.ReactNode;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -2,21 +2,21 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ReactComponentProps } from 'oak-frontend-base';
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
|
||||
filename?: string;
|
||||
expiresAt?: number;
|
||||
filename?: string | undefined;
|
||||
expiresAt?: number | undefined;
|
||||
tips?: React.ReactNode;
|
||||
onDownload?: (qrCodeImage: string, filename?: string) => void;
|
||||
onRefresh?: () => void;
|
||||
size?: number;
|
||||
onDownload?: ((qrCodeImage: string, filename?: string) => void) | undefined;
|
||||
onRefresh?: (() => void) | undefined;
|
||||
size?: number | undefined;
|
||||
url: string;
|
||||
loading?: boolean;
|
||||
disableDownload?: boolean;
|
||||
loading?: boolean | undefined;
|
||||
disableDownload?: boolean | undefined;
|
||||
disabled: boolean;
|
||||
color: string;
|
||||
bgColor: string;
|
||||
maskColor: string;
|
||||
maskTextColor: string;
|
||||
maskText: string;
|
||||
mode: "simple" | "default";
|
||||
mode: 'simple' | 'default';
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
redDot: boolean;
|
||||
text: string;
|
||||
pagePath: string;
|
||||
iconName?: string;
|
||||
selectedIconName?: string;
|
||||
iconPath?: string;
|
||||
selectedIconPath?: string;
|
||||
iconSize?: string;
|
||||
iconName?: string | undefined;
|
||||
selectedIconName?: string | undefined;
|
||||
iconPath?: string | undefined;
|
||||
selectedIconPath?: string | undefined;
|
||||
iconSize?: string | undefined;
|
||||
}[];
|
||||
color: string;
|
||||
selectedColor: string;
|
||||
|
|
|
|||
|
|
@ -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: "system" | "platform" | "application";
|
||||
entity: "application" | "system" | "platform";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page';
|
||||
|
|
@ -8,14 +9,31 @@ type AfterCommit = (() => void) | undefined;
|
|||
type BeforeCommit = (() => boolean | undefined | Promise<boolean | undefined>) | undefined;
|
||||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
action?: string;
|
||||
size?: ButtonProps["size"] | AmButtonProps["size"];
|
||||
block?: boolean;
|
||||
type?: ButtonProps["type"] | AmButtonProps["type"];
|
||||
executeText?: string;
|
||||
buttonProps?: ButtonProps & AmButtonProps;
|
||||
action?: string | undefined;
|
||||
size?: ButtonProps['size'] | AmButtonProps['size'];
|
||||
block?: boolean | undefined;
|
||||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "success" | "default" | "warning" | "primary" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "middle" | "large" | "mini" | undefined;
|
||||
block?: boolean | undefined;
|
||||
loading?: boolean | "auto" | undefined;
|
||||
loadingText?: string | undefined;
|
||||
loadingIcon?: import("react").ReactNode;
|
||||
disabled?: boolean | undefined;
|
||||
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
|
||||
type?: "button" | "reset" | "submit" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & {
|
||||
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;
|
||||
} & import("react").AriaAttributes) | undefined;
|
||||
afterCommit?: AfterCommit;
|
||||
beforeCommit?: BeforeCommit;
|
||||
messageProps?: MessageProps | boolean;
|
||||
messageProps?: boolean | MessageProps | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
extension: string[];
|
||||
selectCount: number;
|
||||
sourceType: SourceType[];
|
||||
mediaType: ("image" | "video")[];
|
||||
mediaType: ('image' | 'video')[];
|
||||
mode: ImageMode;
|
||||
size: number;
|
||||
showUploadList: boolean;
|
||||
|
|
@ -52,7 +52,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
aspect: number;
|
||||
minZoom: number;
|
||||
maxZoom: number;
|
||||
cropShape: "rect" | "round";
|
||||
cropShape: 'rect' | 'round';
|
||||
cropperProps: object;
|
||||
modalTitle: string;
|
||||
modalWidth: string;
|
||||
|
|
@ -67,7 +67,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
minHeight: number;
|
||||
compressWidth: number;
|
||||
compressHeight: number;
|
||||
resize: "contain" | "cover" | "none";
|
||||
resize: 'contain' | 'cover' | 'none';
|
||||
compressQuality: number;
|
||||
mimeType: string;
|
||||
convertTypes: string[];
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
tag2: string;
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
style?: string;
|
||||
style?: string | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { FileState } from '../../../features/extraFile';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
|
|
@ -20,7 +21,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
extension: string[];
|
||||
selectCount: number;
|
||||
sourceType: SourceType[];
|
||||
mediaType: ("image" | "video")[];
|
||||
mediaType: ('image' | 'video')[];
|
||||
mode: ImageMode;
|
||||
size: number;
|
||||
showUploadList: boolean;
|
||||
|
|
@ -39,8 +40,8 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
entityId: string;
|
||||
theme: Theme;
|
||||
children?: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
style?: import("react").CSSProperties | undefined;
|
||||
className?: string | undefined;
|
||||
beforeUpload: (file: File) => Promise<string>;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@ export interface UploadHandle {
|
|||
}
|
||||
declare const _default: React.ForwardRefExoticComponent<WebComponentProps<EntityDict, "extraFile", true, {
|
||||
files: EnhancedExtraFile[];
|
||||
accept?: string;
|
||||
maxNumber?: number;
|
||||
multiple?: boolean;
|
||||
draggable?: boolean;
|
||||
theme?: Theme;
|
||||
beforeUpload?: (file: File) => Promise<boolean> | boolean;
|
||||
style?: React.CSSProperties;
|
||||
className?: string;
|
||||
directory?: boolean;
|
||||
onPreview?: (file: UploadFile<any>) => void;
|
||||
onDownload?: (file: UploadFile<any>) => void;
|
||||
showUploadList?: boolean;
|
||||
children?: JSX.Element;
|
||||
disableInsert?: boolean;
|
||||
disableDownload?: boolean;
|
||||
disableDelete?: boolean;
|
||||
disablePreview?: boolean;
|
||||
accept?: string | undefined;
|
||||
maxNumber?: number | undefined;
|
||||
multiple?: boolean | undefined;
|
||||
draggable?: boolean | undefined;
|
||||
theme?: Theme | undefined;
|
||||
beforeUpload?: ((file: File) => Promise<boolean> | boolean) | undefined;
|
||||
style?: React.CSSProperties | undefined;
|
||||
className?: string | undefined;
|
||||
directory?: boolean | undefined;
|
||||
onPreview?: ((file: UploadFile<any>) => void) | undefined;
|
||||
onDownload?: ((file: UploadFile<any>) => void) | undefined;
|
||||
showUploadList?: boolean | undefined;
|
||||
children?: JSX.Element | undefined;
|
||||
disableInsert?: boolean | undefined;
|
||||
disableDownload?: boolean | undefined;
|
||||
disableDelete?: boolean | undefined;
|
||||
disablePreview?: boolean | undefined;
|
||||
}, {
|
||||
onRemove: (file: UploadFile) => void;
|
||||
addFileByWeb: (file: UploadFile) => void;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeSmsTemplate", true, {
|
||||
systemId: string;
|
||||
origin: EntityDict["smsTemplate"]["Schema"]["origin"];
|
||||
origin: import("../../../oak-app-domain/SmsTemplate/_baseSchema").Origin;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onlyCaptcha: boolean;
|
||||
onlyPassword: boolean;
|
||||
eventLoggedIn: string;
|
||||
callback: ((() => void) | undefined);
|
||||
callback: (() => void) | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
shape: string;
|
||||
size: number | string;
|
||||
size: string | number;
|
||||
iconColor: string;
|
||||
iconName: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
relation: string;
|
||||
redirectTo: EntityDict["parasite"]["Schema"]["redirectTo"];
|
||||
redirectTo: EntityDict['parasite']['Schema']['redirectTo'];
|
||||
multiple: boolean;
|
||||
nameLabel: string;
|
||||
nameRequired: boolean;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
sessionId: string;
|
||||
isEntity: boolean;
|
||||
entityDisplay: (data: any) => Array<any>;
|
||||
entityDisplay: (data: any) => any[];
|
||||
entityProjection: any;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: string;
|
||||
entityFilter: any;
|
||||
entityFilterSubStr: string;
|
||||
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>;
|
||||
entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
|
||||
entityProjection: any;
|
||||
sessionId: string;
|
||||
dialog: boolean;
|
||||
onItemClick: ((sessionId: string) => {}) | undefined | null;
|
||||
onItemClick: ((sessionId: string) => {}) | null | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
dialog: boolean;
|
||||
entity: string;
|
||||
entityId: string;
|
||||
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>;
|
||||
entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
|
||||
entityProjection: any;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, true, {
|
||||
areaId: string | undefined | null;
|
||||
areaId: string | null | undefined;
|
||||
onCancel: (() => void) | undefined;
|
||||
onConfirm: ((stationIds: string[]) => void) | undefined;
|
||||
selectIds: string[] | undefined;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <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,2 +1,3 @@
|
|||
/// <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,2 +1,3 @@
|
|||
/// <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,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, {
|
||||
onMyInfoClicked: () => void;
|
||||
myInfoUrl: string;
|
||||
manageUserUrl: string;
|
||||
loginUrl: string;
|
||||
Body: React.ReactNode | undefined;
|
||||
Body: import("react").ReactNode;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,26 @@ export default OakComponent({
|
|||
},
|
||||
isList: false,
|
||||
formData({ data: user, features, origin }) {
|
||||
const avatar = user?.extraFile$entity && user?.extraFile$entity[0];
|
||||
const extraFiles = user && this.select('extraFile', {
|
||||
data: {
|
||||
id: 1,
|
||||
tag1: 1,
|
||||
origin: 1,
|
||||
bucket: 1,
|
||||
objectId: 1,
|
||||
filename: 1,
|
||||
extra1: 1,
|
||||
extension: 1,
|
||||
type: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
},
|
||||
filter: {
|
||||
tag1: 'avatar',
|
||||
entityId: user.id,
|
||||
},
|
||||
});
|
||||
const avatar = extraFiles?.[0];
|
||||
const avatarUrl = features.extraFile.getUrl(avatar);
|
||||
const { mobile } = (user?.mobile$user && user?.mobile$user[0]) ||
|
||||
(user?.user$ref &&
|
||||
|
|
|
|||
|
|
@ -17,16 +17,16 @@ export default OakComponent({
|
|||
allowPassword: false,
|
||||
allowWechatMp: false,
|
||||
setLoginModeMp(value) { this.setLoginMode(value); },
|
||||
smsDigit: 4, //短信验证码位数
|
||||
emailDigit: 4, //邮箱验证码位数
|
||||
smsDigit: 4,
|
||||
emailDigit: 4,
|
||||
pwdMode: 'all', //密码明文密文存储模式
|
||||
},
|
||||
properties: {
|
||||
onlyCaptcha: false,
|
||||
onlyPassword: false,
|
||||
disabled: '',
|
||||
redirectUri: '', // 微信登录后的redirectUri,要指向wechatUser/login去处理
|
||||
url: '', // 登录系统之后要返回的页面
|
||||
redirectUri: '',
|
||||
url: '',
|
||||
callback: undefined, // 登录成功回调,排除微信登录方式
|
||||
},
|
||||
formData({ features, props }) {
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ export default OakComponent({
|
|||
},
|
||||
properties: {
|
||||
disabled: '',
|
||||
redirectUri: '', // 微信登录后的redirectUri,要指向wechatUser/login去处理
|
||||
url: '', // 登录系统之后要返回的页面
|
||||
callback: undefined, // 登录成功回调,排除微信登录方式
|
||||
redirectUri: '',
|
||||
url: '',
|
||||
callback: undefined,
|
||||
allowSms: false,
|
||||
allowEmail: false,
|
||||
allowWechatMp: false, //小程序切换授权登录
|
||||
allowWechatMp: false,
|
||||
setLoginMode: (value) => undefined,
|
||||
pwdMode: 'all', //密码明文密文存储模式
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, {
|
||||
onVerified: undefined | (() => void);
|
||||
onVerified: (() => void) | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from "oak-frontend-base";
|
||||
import { EntityDict } from "../../../../oak-app-domain";
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from "oak-frontend-base";
|
||||
import { EntityDict } from "../../../../oak-app-domain";
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "userEntityGrant", false, {
|
||||
picker: ((props: {
|
||||
disabled?: boolean;
|
||||
disabled?: boolean | undefined;
|
||||
entity: keyof EntityDict;
|
||||
entityFilter: object;
|
||||
relationIds: string[];
|
||||
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
rule: EntityDict['userEntityGrant']['OpSchema']['rule'];
|
||||
ruleOnRow: EntityDict['userEntityGrant']['OpSchema']['ruleOnRow'];
|
||||
onPickRelations: (ids: string[]) => void;
|
||||
onPickRows: (ids: string[]) => void;
|
||||
pickedRowIds?: string[];
|
||||
pickedRelationIds?: string[];
|
||||
pickedRowIds?: string[] | undefined;
|
||||
pickedRelationIds?: string[] | undefined;
|
||||
oakPath: string;
|
||||
}) => React.ReactElement) | undefined;
|
||||
hideInfo: boolean;
|
||||
hideTip: boolean;
|
||||
afterClaim: ((ueg: EntityDict["userEntityGrant"]["OpSchema"]) => void) | undefined;
|
||||
afterClaim: ((ueg: EntityDict['userEntityGrant']['OpSchema']) => void) | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: keyof EntityDict;
|
||||
entityFilter: any;
|
||||
relationIds: string[];
|
||||
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
onPickRelations: (ids: string[]) => void;
|
||||
onPickRows: (ids: string[]) => void;
|
||||
pickedRowIds: string[] | undefined;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
relationEntity: string;
|
||||
relationEntityFilter: any;
|
||||
relationIds: string[];
|
||||
type: EntityDict["userEntityGrant"]["Schema"]["type"];
|
||||
redirectToAfterConfirm: EntityDict["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
type: "grant" | "transfer";
|
||||
redirectToAfterConfirm: import("../../../oak-app-domain/UserEntityGrant/_baseSchema").RedirectToProps | null | undefined;
|
||||
claimUrl: string;
|
||||
qrCodeType: QrCodeType;
|
||||
multiple: boolean;
|
||||
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
|||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
relations: EntityDict["relation"]["OpSchema"][];
|
||||
passwordRequired?: boolean;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
passwordRequired?: boolean | undefined;
|
||||
allowUpdateName?: boolean | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
|||
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
|
||||
entity: keyof ED2;
|
||||
entityId: string;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
allowUpdateName?: boolean | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
entityId: string;
|
||||
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
qrCodeType: QrCodeType;
|
||||
type: EntityDict["userEntityGrant"]["Schema"]["type"];
|
||||
relations: EntityDict["relation"]["OpSchema"][];
|
||||
type: EntityDict['userEntityGrant']['Schema']['type'];
|
||||
relations: EntityDict['relation']['OpSchema'][];
|
||||
claimUrl: string;
|
||||
multiple: boolean;
|
||||
rule: EntityDict["userEntityGrant"]["Schema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
rule: EntityDict['userEntityGrant']['Schema']['rule'];
|
||||
ruleOnRow: EntityDict['userEntityGrant']['OpSchema']['ruleOnRow'];
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
claimUrl: string;
|
||||
qrCodeType: string;
|
||||
passwordRequired?: boolean;
|
||||
disabledMethods: Array<"email" | "mobile" | "userEntityGrant">;
|
||||
mode: "byMobile" | "byUserEntityGrant" | "byEmail";
|
||||
passwordRequired?: boolean | undefined;
|
||||
disabledMethods: Array<'email' | 'mobile' | 'userEntityGrant'>;
|
||||
mode: 'byMobile' | 'byUserEntityGrant' | 'byEmail';
|
||||
}>) => 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, "user", false, {
|
||||
entity: keyof EntityDict;
|
||||
entityId: string;
|
||||
relations: EntityDict["relation"]["OpSchema"][];
|
||||
relations: import("../../../../oak-app-domain/Relation/_baseSchema").OpSchema[];
|
||||
mobile: string;
|
||||
setPasswordConfirm: (value: boolean) => void;
|
||||
passwordRequired: boolean;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ import { EntityDict } from '../../../../../oak-app-domain';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "userRelation", true, {
|
||||
entity: keyof EntityDict;
|
||||
entityId: string;
|
||||
relations: EntityDict["relation"]["OpSchema"][];
|
||||
relations: import("../../../../../oak-app-domain/Relation/_baseSchema").OpSchema[];
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "wechatLogin", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
type: EntityDict["wechatLogin"]["Schema"]["type"];
|
||||
type: "login" | "bind";
|
||||
url: string;
|
||||
size: undefined;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
config: any;
|
||||
menuIndex: number;
|
||||
changeConfig: (config: any) => void;
|
||||
publish: (iState: "wait" | "fail") => void;
|
||||
publish: (iState: 'wait' | 'fail') => void;
|
||||
getErrorIndex: (errorIndex: number[]) => void;
|
||||
createMenu: () => void;
|
||||
selectedBtn: number;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "wechatUser", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "wechatUser", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 { String, Text } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
prevPassword?: String<32> | null;
|
||||
newPassword?: String<32> | null;
|
||||
prevPasswordSha1?: Text | null;
|
||||
newPasswordSha1?: Text | null;
|
||||
result: "success" | "fail";
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
@ -22,8 +20,6 @@ export type OpFilter = {
|
|||
userId: Q_StringValue;
|
||||
prevPassword: Q_StringValue;
|
||||
newPassword: Q_StringValue;
|
||||
prevPasswordSha1: Q_StringValue;
|
||||
newPasswordSha1: Q_StringValue;
|
||||
result: Q_EnumValue<"success" | "fail">;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
|
|
@ -36,8 +32,6 @@ export type OpProjection = {
|
|||
userId?: number;
|
||||
prevPassword?: number;
|
||||
newPassword?: number;
|
||||
prevPasswordSha1?: number;
|
||||
newPasswordSha1?: number;
|
||||
result?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
|
|
@ -48,8 +42,6 @@ export type OpSortAttr = Partial<{
|
|||
userId: number;
|
||||
prevPassword: number;
|
||||
newPassword: number;
|
||||
prevPasswordSha1: number;
|
||||
newPasswordSha1: number;
|
||||
result: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/E
|
|||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
import { String, Text, Int, Float, Boolean } from "oak-domain/lib/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown" | "s3";
|
||||
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown";
|
||||
type: "image" | "video" | "audio" | "file";
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
|
|
@ -33,7 +33,7 @@ export type OpFilter = {
|
|||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
origin: Q_EnumValue<"qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown" | "s3">;
|
||||
origin: Q_EnumValue<"qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown">;
|
||||
type: Q_EnumValue<"image" | "video" | "audio" | "file">;
|
||||
bucket: Q_StringValue;
|
||||
objectId: Q_StringValue;
|
||||
|
|
|
|||
|
|
@ -27,18 +27,10 @@ export type PfwConfig = {
|
|||
export type MfwConfig = {
|
||||
appId: string;
|
||||
};
|
||||
export type PwdConfig = {
|
||||
mode: "all" | "plain" | "sha1";
|
||||
min: number;
|
||||
max: number;
|
||||
verify?: boolean;
|
||||
regexs?: string[];
|
||||
tip?: string;
|
||||
};
|
||||
export type OpSchema = EntityShape & {
|
||||
systemId: ForeignKey<"system">;
|
||||
type: Type;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig) | null;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig) | null;
|
||||
enabled: Boolean;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
@ -51,7 +43,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>;
|
||||
enabled: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
|
|
@ -63,7 +55,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>;
|
||||
enabled?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "system", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "wechatMpJump", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "system", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export declare function getEmail<ED extends EntityDict>(origin: string): Email<E
|
|||
export declare function getOrigin(): string[];
|
||||
export declare function sendEmail<ED extends EntityDict>(options: EmailOptions, context: BRC<ED>): Promise<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
error?: string | undefined;
|
||||
} | {
|
||||
success: boolean;
|
||||
error: unknown;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.updateConfig = updateConfig;
|
||||
exports.updateApplicationConfig = updateApplicationConfig;
|
||||
exports.updateStyle = updateStyle;
|
||||
exports.updateStyle = exports.updateApplicationConfig = exports.updateConfig = void 0;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
async function updateConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
|
|
@ -17,6 +15,7 @@ async function updateConfig(params, context) {
|
|||
}
|
||||
}, {});
|
||||
}
|
||||
exports.updateConfig = updateConfig;
|
||||
async function updateApplicationConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
|
|
@ -30,6 +29,7 @@ async function updateApplicationConfig(params, context) {
|
|||
},
|
||||
}, {});
|
||||
}
|
||||
exports.updateApplicationConfig = updateApplicationConfig;
|
||||
async function updateStyle(params, context) {
|
||||
const { entity, entityId, style } = params;
|
||||
await context.operate(entity, {
|
||||
|
|
@ -43,3 +43,4 @@ async function updateStyle(params, context) {
|
|||
},
|
||||
}, {});
|
||||
}
|
||||
exports.updateStyle = updateStyle;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createSession = createSession;
|
||||
exports.createSession = void 0;
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
async function createSession(params, context) {
|
||||
|
|
@ -106,7 +106,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'image',
|
||||
tag1: 'image',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -131,7 +131,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'video',
|
||||
tag1: 'video',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -153,7 +153,7 @@ async function createSession(params, context) {
|
|||
origin: 'wechat',
|
||||
type: 'audio',
|
||||
tag1: 'audio',
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(), // 这个域用来标识唯一性
|
||||
objectId: await (0, uuid_1.generateNewIdAsync)(),
|
||||
sort: 1000,
|
||||
uploadState: 'success',
|
||||
extra1: data.MediaId,
|
||||
|
|
@ -222,3 +222,4 @@ async function createSession(params, context) {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
exports.createSession = createSession;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@ export declare function syncMessageTemplate<ED extends EntityDict>(params: {
|
|||
example: string;
|
||||
keywordEnumValueList: {
|
||||
keywordCode: string;
|
||||
enumValueList: Array<string>;
|
||||
enumValueList: string[];
|
||||
}[];
|
||||
}[]>;
|
||||
|
|
|
|||
|
|
@ -1,25 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.loginByMobile = loginByMobile;
|
||||
exports.verifyPassword = verifyPassword;
|
||||
exports.loginByAccount = loginByAccount;
|
||||
exports.loginByEmail = loginByEmail;
|
||||
exports.bindByMobile = bindByMobile;
|
||||
exports.bindByEmail = bindByEmail;
|
||||
exports.refreshWechatPublicUserInfo = refreshWechatPublicUserInfo;
|
||||
exports.loginByWechat = loginByWechat;
|
||||
exports.loginWechatNative = loginWechatNative;
|
||||
exports.loginWechat = loginWechat;
|
||||
exports.loginWechatMp = loginWechatMp;
|
||||
exports.syncUserInfoWechatMp = syncUserInfoWechatMp;
|
||||
exports.sendCaptchaByMobile = sendCaptchaByMobile;
|
||||
exports.sendCaptchaByEmail = sendCaptchaByEmail;
|
||||
exports.switchTo = switchTo;
|
||||
exports.getWechatMpUserPhoneNumber = getWechatMpUserPhoneNumber;
|
||||
exports.logout = logout;
|
||||
exports.wakeupParasite = wakeupParasite;
|
||||
exports.refreshToken = refreshToken;
|
||||
exports.loginWebByMpToken = loginWebByMpToken;
|
||||
exports.loginWebByMpToken = exports.refreshToken = exports.wakeupParasite = exports.logout = exports.getWechatMpUserPhoneNumber = exports.switchTo = exports.sendCaptchaByEmail = exports.sendCaptchaByMobile = exports.syncUserInfoWechatMp = exports.loginWechatMp = exports.loginWechat = exports.loginWechatNative = exports.loginByWechat = exports.refreshWechatPublicUserInfo = exports.bindByEmail = exports.bindByMobile = exports.loginByEmail = exports.loginByAccount = exports.verifyPassword = exports.loginByMobile = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const WechatSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/WechatSDK"));
|
||||
|
|
@ -557,6 +538,7 @@ async function loginByMobile(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginByMobile = loginByMobile;
|
||||
async function verifyPassword(params, context) {
|
||||
const { password } = params;
|
||||
const systemId = context.getSystemId();
|
||||
|
|
@ -621,6 +603,7 @@ async function verifyPassword(params, context) {
|
|||
}
|
||||
}, {});
|
||||
}
|
||||
exports.verifyPassword = verifyPassword;
|
||||
async function loginByAccount(params, context) {
|
||||
const { account, password, env } = params;
|
||||
let needUpdatePassword = false;
|
||||
|
|
@ -973,6 +956,7 @@ async function loginByAccount(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginByAccount = loginByAccount;
|
||||
async function loginByEmail(params, context) {
|
||||
const { email, captcha, env, disableRegister } = params;
|
||||
const loginLogic = async () => {
|
||||
|
|
@ -1043,6 +1027,7 @@ async function loginByEmail(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginByEmail = loginByEmail;
|
||||
async function bindByMobile(params, context) {
|
||||
const { mobile, captcha, env, } = params;
|
||||
const userId = context.getCurrentUserId();
|
||||
|
|
@ -1154,6 +1139,7 @@ async function bindByMobile(params, context) {
|
|||
await bindLogic();
|
||||
closeRootMode();
|
||||
}
|
||||
exports.bindByMobile = bindByMobile;
|
||||
async function bindByEmail(params, context) {
|
||||
const { email, captcha, env, } = params;
|
||||
const userId = context.getCurrentUserId();
|
||||
|
|
@ -1266,6 +1252,7 @@ async function bindByEmail(params, context) {
|
|||
await bindLogic();
|
||||
closeRootMode();
|
||||
}
|
||||
exports.bindByEmail = bindByEmail;
|
||||
async function setupLoginName(name, env, context) {
|
||||
const result2 = await context.select('loginName', {
|
||||
data: {
|
||||
|
|
@ -1519,6 +1506,7 @@ async function refreshWechatPublicUserInfo({}, context) {
|
|||
(0, assert_1.assert)(token.entityId);
|
||||
return await tryRefreshWechatPublicUserInfo(token.entityId, context);
|
||||
}
|
||||
exports.refreshWechatPublicUserInfo = refreshWechatPublicUserInfo;
|
||||
// 用户在微信端授权登录后,在web端触发该方法
|
||||
async function loginByWechat(params, context) {
|
||||
const { wechatLoginId, env } = params;
|
||||
|
|
@ -1548,6 +1536,7 @@ async function loginByWechat(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginByWechat = loginByWechat;
|
||||
async function loginFromWechatEnv(code, env, context, wechatLoginId) {
|
||||
const application = context.getApplication();
|
||||
const { type, config, systemId } = application;
|
||||
|
|
@ -1891,6 +1880,7 @@ async function loginWechatNative({ code, env, }, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginWechatNative = loginWechatNative;
|
||||
/**
|
||||
* 公众号授权登录
|
||||
* @param param0
|
||||
|
|
@ -1921,6 +1911,7 @@ async function loginWechat({ code, env, wechatLoginId, }, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginWechat = loginWechat;
|
||||
/**
|
||||
* 小程序授权登录
|
||||
* @param param0
|
||||
|
|
@ -1934,6 +1925,7 @@ async function loginWechatMp({ code, env, }, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginWechatMp = loginWechatMp;
|
||||
/**
|
||||
* 同步从wx.getUserProfile拿到的用户信息
|
||||
* @param param0
|
||||
|
|
@ -1987,6 +1979,7 @@ async function syncUserInfoWechatMp({ nickname, avatarUrl, encryptedData, iv, si
|
|||
// 实测发现解密出来的和userInfo完全一致……
|
||||
await setUserInfoFromWechat(user, { nickname, avatar: avatarUrl }, context);
|
||||
}
|
||||
exports.syncUserInfoWechatMp = syncUserInfoWechatMp;
|
||||
async function sendCaptchaByMobile({ mobile, env, type: captchaType, }, context) {
|
||||
const { type } = env;
|
||||
let visitorId = mobile;
|
||||
|
|
@ -2149,6 +2142,7 @@ async function sendCaptchaByMobile({ mobile, env, type: captchaType, }, context)
|
|||
return '验证码发送失败';
|
||||
}
|
||||
}
|
||||
exports.sendCaptchaByMobile = sendCaptchaByMobile;
|
||||
async function sendCaptchaByEmail({ email, env, type: captchaType, }, context) {
|
||||
const { type } = env;
|
||||
let visitorId = email;
|
||||
|
|
@ -2296,6 +2290,7 @@ async function sendCaptchaByEmail({ email, env, type: captchaType, }, context) {
|
|||
return '验证码发送失败';
|
||||
}
|
||||
}
|
||||
exports.sendCaptchaByEmail = sendCaptchaByEmail;
|
||||
async function switchTo({ userId }, context) {
|
||||
const reallyRoot = context.isReallyRoot();
|
||||
if (!reallyRoot) {
|
||||
|
|
@ -2317,6 +2312,7 @@ async function switchTo({ userId }, context) {
|
|||
},
|
||||
}, {});
|
||||
}
|
||||
exports.switchTo = switchTo;
|
||||
async function getWechatMpUserPhoneNumber({ code, env }, context) {
|
||||
const application = context.getApplication();
|
||||
const { type, config, systemId } = application;
|
||||
|
|
@ -2332,6 +2328,7 @@ async function getWechatMpUserPhoneNumber({ code, env }, context) {
|
|||
closeRootMode();
|
||||
return reuslt;
|
||||
}
|
||||
exports.getWechatMpUserPhoneNumber = getWechatMpUserPhoneNumber;
|
||||
async function logout(params, context) {
|
||||
const { tokenValue } = params;
|
||||
if (tokenValue) {
|
||||
|
|
@ -2354,6 +2351,7 @@ async function logout(params, context) {
|
|||
closeRootMode();
|
||||
}
|
||||
}
|
||||
exports.logout = logout;
|
||||
/**
|
||||
* 创建一个当前parasite上的token
|
||||
* @param params
|
||||
|
|
@ -2420,6 +2418,7 @@ async function wakeupParasite(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.wakeupParasite = wakeupParasite;
|
||||
/**
|
||||
* todo 检查登录环境一致性,同一个token不能跨越不同设备
|
||||
* @param env1
|
||||
|
|
@ -2490,8 +2489,8 @@ async function refreshToken(params, context) {
|
|||
// 只有server模式去刷新token
|
||||
// 'development' | 'production' | 'staging'
|
||||
const intervals = {
|
||||
development: 7200 * 1000, // 2小时
|
||||
staging: 600 * 1000, // 十分钟
|
||||
development: 7200 * 1000,
|
||||
staging: 600 * 1000,
|
||||
production: 600 * 1000, // 十分钟
|
||||
};
|
||||
let applicationId = token.applicationId;
|
||||
|
|
@ -2564,6 +2563,7 @@ async function refreshToken(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.refreshToken = refreshToken;
|
||||
/**
|
||||
* 使用微信小程序中的token登录web
|
||||
* @param tokenValue
|
||||
|
|
@ -2631,3 +2631,4 @@ async function loginWebByMpToken(params, context) {
|
|||
closeRootMode();
|
||||
return tokenValue;
|
||||
}
|
||||
exports.loginWebByMpToken = loginWebByMpToken;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mergeUser = mergeUser;
|
||||
exports.getChangePasswordChannels = getChangePasswordChannels;
|
||||
exports.updateUserPassword = updateUserPassword;
|
||||
exports.updateUserPassword = exports.getChangePasswordChannels = exports.mergeUser = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const types_1 = require("oak-domain/lib/types");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
|
|
@ -120,6 +118,7 @@ async function mergeUser(params, context, innerLogic) {
|
|||
}, { dontCollect: true });
|
||||
}
|
||||
}
|
||||
exports.mergeUser = mergeUser;
|
||||
async function getChangePasswordChannels(params, context, innerLogic) {
|
||||
const { userId } = params;
|
||||
const mobileList = await context.select('mobile', {
|
||||
|
|
@ -156,6 +155,7 @@ async function getChangePasswordChannels(params, context, innerLogic) {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
exports.getChangePasswordChannels = getChangePasswordChannels;
|
||||
async function updateUserPassword(params, context, innerLogic) {
|
||||
const { userId, prevPassword, captcha, mobile, newPassword } = params;
|
||||
const systemId = context.getSystemId();
|
||||
|
|
@ -412,3 +412,4 @@ async function updateUserPassword(params, context, innerLogic) {
|
|||
throw err;
|
||||
}
|
||||
}
|
||||
exports.updateUserPassword = updateUserPassword;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createWechatQrCode = createWechatQrCode;
|
||||
exports.getMpUnlimitWxaCode = getMpUnlimitWxaCode;
|
||||
exports.getMpUnlimitWxaCode = exports.createWechatQrCode = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
|
|
@ -167,7 +166,7 @@ async function createWechatQrCode(options, context) {
|
|||
permanent,
|
||||
url,
|
||||
expired: false,
|
||||
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大,由上层关联对象来主动过期(by Xc, 20230131)
|
||||
expiresAt: Date.now() + 2592000 * 1000,
|
||||
props,
|
||||
};
|
||||
// 直接创建
|
||||
|
|
@ -219,6 +218,7 @@ async function createWechatQrCode(options, context) {
|
|||
data,
|
||||
}, {});
|
||||
}
|
||||
exports.createWechatQrCode = createWechatQrCode;
|
||||
async function getMpUnlimitWxaCode(wechatQrCodeId, context) {
|
||||
const [wechatQrCode] = await context.select('wechatQrCode', {
|
||||
data: {
|
||||
|
|
@ -257,3 +257,4 @@ async function getMpUnlimitWxaCode(wechatQrCodeId, context) {
|
|||
return str;
|
||||
}
|
||||
}
|
||||
exports.getMpUnlimitWxaCode = getMpUnlimitWxaCode;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@ import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|||
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, ExprOp, ExpressionKey } 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 { String, Text } from "oak-domain/lib/types/DataType";
|
||||
import { String } from "oak-domain/lib/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
userId: ForeignKey<"user">;
|
||||
prevPassword?: String<32> | null;
|
||||
newPassword?: String<32> | null;
|
||||
prevPasswordSha1?: Text | null;
|
||||
newPasswordSha1?: Text | null;
|
||||
result: "success" | "fail";
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
@ -22,8 +20,6 @@ export type OpFilter = {
|
|||
userId: Q_StringValue;
|
||||
prevPassword: Q_StringValue;
|
||||
newPassword: Q_StringValue;
|
||||
prevPasswordSha1: Q_StringValue;
|
||||
newPasswordSha1: Q_StringValue;
|
||||
result: Q_EnumValue<"success" | "fail">;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
|
|
@ -36,8 +32,6 @@ export type OpProjection = {
|
|||
userId?: number;
|
||||
prevPassword?: number;
|
||||
newPassword?: number;
|
||||
prevPasswordSha1?: number;
|
||||
newPasswordSha1?: number;
|
||||
result?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
|
|
@ -48,8 +42,6 @@ export type OpSortAttr = Partial<{
|
|||
userId: number;
|
||||
prevPassword: number;
|
||||
newPassword: number;
|
||||
prevPasswordSha1: number;
|
||||
newPasswordSha1: number;
|
||||
result: number;
|
||||
[k: string]: any;
|
||||
} | ExprOp<OpAttr | string>>;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/E
|
|||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
import { String, Text, Int, Float, Boolean } from "oak-domain/lib/types/DataType";
|
||||
export type OpSchema = EntityShape & {
|
||||
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown" | "s3";
|
||||
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown";
|
||||
type: "image" | "video" | "audio" | "file";
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
|
|
@ -33,7 +33,7 @@ export type OpFilter = {
|
|||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_NumberValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
origin: Q_EnumValue<"qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown" | "s3">;
|
||||
origin: Q_EnumValue<"qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "local" | "unknown">;
|
||||
type: Q_EnumValue<"image" | "video" | "audio" | "file">;
|
||||
bucket: Q_StringValue;
|
||||
objectId: Q_StringValue;
|
||||
|
|
|
|||
|
|
@ -27,18 +27,10 @@ export type PfwConfig = {
|
|||
export type MfwConfig = {
|
||||
appId: string;
|
||||
};
|
||||
export type PwdConfig = {
|
||||
mode: "all" | "plain" | "sha1";
|
||||
min: number;
|
||||
max: number;
|
||||
verify?: boolean;
|
||||
regexs?: string[];
|
||||
tip?: string;
|
||||
};
|
||||
export type OpSchema = EntityShape & {
|
||||
systemId: ForeignKey<"system">;
|
||||
type: Type;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig | PwdConfig) | null;
|
||||
config?: (SmsConfig | EmailConfig | PfwConfig | MfwConfig) | null;
|
||||
enabled: Boolean;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
|
|
@ -51,7 +43,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>;
|
||||
enabled: Q_BooleanValue;
|
||||
} & ExprOp<OpAttr | string>;
|
||||
export type OpProjection = {
|
||||
|
|
@ -63,7 +55,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>;
|
||||
enabled?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export type OpSortAttr = Partial<{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.registerCosBackend = registerCosBackend;
|
||||
exports.getCosBackend = getCosBackend;
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
exports.composeFileUrl = exports.getCosBackend = exports.registerCosBackend = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const ctyun_backend_1 = tslib_1.__importDefault(require("./ctyun.backend"));
|
||||
|
|
@ -29,12 +27,15 @@ function registerCosBackend(clazz) {
|
|||
const instance = new clazz();
|
||||
CosBackendDict[instance.name] = instance;
|
||||
}
|
||||
exports.registerCosBackend = registerCosBackend;
|
||||
function getCosBackend(origin) {
|
||||
(0, assert_1.assert)(CosBackendDict.hasOwnProperty(origin));
|
||||
return CosBackendDict[origin];
|
||||
}
|
||||
exports.getCosBackend = getCosBackend;
|
||||
function composeFileUrl(application, extraFile, style) {
|
||||
const { origin } = extraFile;
|
||||
const cos = CosBackendDict[origin];
|
||||
return cos.composeFileUrl(application, extraFile, style);
|
||||
}
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.registerCos = registerCos;
|
||||
exports.getCos = getCos;
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
exports.composeFileUrl = exports.getCos = exports.registerCos = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const unknown_1 = tslib_1.__importDefault(require("./unknown"));
|
||||
|
|
@ -17,12 +15,15 @@ function registerCos(clazz) {
|
|||
const instance = new clazz();
|
||||
CosDict[instance.name] = instance;
|
||||
}
|
||||
exports.registerCos = registerCos;
|
||||
function getCos(origin) {
|
||||
(0, assert_1.assert)(CosDict.hasOwnProperty(origin));
|
||||
return CosDict[origin];
|
||||
}
|
||||
exports.getCos = getCos;
|
||||
function composeFileUrl(application, extraFile, style) {
|
||||
const { origin } = extraFile;
|
||||
const cos = CosDict[origin];
|
||||
return cos.composeFileUrl(application, extraFile, style);
|
||||
}
|
||||
exports.composeFileUrl = composeFileUrl;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export declare function getEmail<ED extends EntityDict>(origin: string): Email<E
|
|||
export declare function getOrigin(): string[];
|
||||
export declare function sendEmail<ED extends EntityDict>(options: EmailOptions, context: BRC<ED>): Promise<{
|
||||
success: boolean;
|
||||
error?: string;
|
||||
error?: string | undefined;
|
||||
} | {
|
||||
success: boolean;
|
||||
error: unknown;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getConfig = getConfig;
|
||||
exports.getConfig = void 0;
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const Exception_1 = require("oak-domain/lib/types/Exception");
|
||||
const oak_external_sdk_1 = require("oak-external-sdk");
|
||||
|
|
@ -75,3 +75,4 @@ function getConfig(systemConfig, service, origin) {
|
|||
}
|
||||
}
|
||||
}
|
||||
exports.getConfig = getConfig;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue