From fae809e4bdcb9f3c982d6068f01ea651aa4944d4 Mon Sep 17 00:00:00 2001 From: Xc Date: Thu, 16 Oct 2025 09:27:19 +0800 Subject: [PATCH] =?UTF-8?q?user/info=E7=9A=84=E5=B0=8F=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/aspects/session.js | 6 +-- es/aspects/template.d.ts | 2 +- es/aspects/token.js | 4 +- es/aspects/wechatQrCode.js | 2 +- es/checkers/index.d.ts | 2 +- es/components/address/list/index.d.ts | 1 + es/components/address/upsert/index.d.ts | 1 + .../amap/location/PositionPicker.d.ts | 1 + es/components/amap/location/index.d.ts | 1 + es/components/amap/map/index.d.ts | 1 + es/components/application/detail/index.d.ts | 1 + .../application/detailForPlatform/index.d.ts | 1 + es/components/application/panel/index.d.ts | 1 + es/components/application/upsert/index.d.ts | 1 + es/components/article/cell/index.d.ts | 1 + es/components/article/list/index.d.ts | 3 +- es/components/article/treeList/index.d.ts | 2 +- .../articleMenu/container/index.d.ts | 5 ++- es/components/articleMenu/list/index.d.ts | 3 +- es/components/articleMenu/treeCell/index.d.ts | 2 +- es/components/articleMenu/treeList/index.d.ts | 2 +- .../articleMenu/treeManager/index.d.ts | 2 +- .../changePassword/byMobile/index.d.ts | 1 + .../changePassword/byPassword/index.d.ts | 1 + es/components/common/download/index.d.ts | 5 ++- es/components/common/errorPage/index.d.ts | 4 +- es/components/common/qrCode/index.d.ts | 16 +++---- es/components/common/tabBar/index.d.ts | 10 ++--- .../config/style/platform/index.d.ts | 2 +- es/components/domain/detail/index.d.ts | 1 + es/components/domain/upsert/index.d.ts | 1 + es/components/extraFile/commit/index.d.ts | 32 ++++++++++--- es/components/extraFile/crop/index.d.ts | 6 +-- es/components/extraFile/gallery/index.d.ts | 2 +- es/components/extraFile/upload/index.d.ts | 7 +-- es/components/extraFile/upload/web.d.ts | 34 +++++++------- es/components/message/cell/index.d.ts | 1 + es/components/message/detail/index.d.ts | 1 + es/components/message/list/index.d.ts | 1 + .../messageTypeSmsTemplate/list/index.d.ts | 2 +- es/components/mobile/login/index.d.ts | 2 +- es/components/mobile/manageList/index.d.ts | 1 + es/components/my/avatar/index.d.ts | 2 +- es/components/my/message/index.d.ts | 1 + es/components/parasite/excess/index.d.ts | 1 + es/components/parasite/upsert/index.d.ts | 2 +- es/components/platform/detail/index.d.ts | 1 + es/components/platform/panel/index.d.ts | 1 + es/components/platform/upsert/index.d.ts | 1 + es/components/session/forMessage/index.d.ts | 2 +- es/components/session/header/index.d.ts | 1 + es/components/session/list/index.d.ts | 4 +- es/components/sessionMessage/list/index.d.ts | 2 +- .../subscription/config/upsert/index.d.ts | 1 + es/components/subscription/detail/index.d.ts | 1 + es/components/subwayLine/picker/index.d.ts | 2 +- es/components/system/detail/index.d.ts | 1 + es/components/system/panel/index.d.ts | 1 + es/components/system/upsert/index.d.ts | 1 + es/components/token/me/emptyBody/index.d.ts | 1 + es/components/token/me/index.d.ts | 3 +- es/components/user/info/index.js | 21 ++++++++- es/components/user/login/index.js | 8 ++-- es/components/user/login/password/index.js | 8 ++-- es/components/user/password/verify/index.d.ts | 2 +- es/components/user/password/verify/web.d.ts | 1 + .../user/password/verify/web.pc.d.ts | 1 + .../userEntityGrant/claim/index.d.ts | 12 ++--- .../userEntityGrant/claim/ubPicker/index.d.ts | 4 +- .../userEntityGrant/upsert/index.d.ts | 8 ++-- .../userRelation/upsert/byMobile/index.d.ts | 8 ++-- .../userRelation/upsert/byUser/index.d.ts | 4 +- .../upsert/byUserEntityGrant/index.d.ts | 8 ++-- es/components/userRelation/upsert/index.d.ts | 6 +-- .../userRelation/upsert/onUser/index.d.ts | 2 +- .../upsert/onUser/userRelation/index.d.ts | 2 +- es/components/wechatLogin/confirm/index.d.ts | 1 + es/components/wechatLogin/qrCode/index.d.ts | 2 +- es/components/wechatMenu/menuInfo/index.d.ts | 2 +- .../wechatUser/bindingList/index.d.ts | 1 + es/components/wechatUser/login/index.d.ts | 1 + es/components/wechatUser/unbindBtn/index.d.ts | 1 + .../ChangePasswordTemp/_baseSchema.d.ts | 10 +---- es/oak-app-domain/ExtraFile/_baseSchema.d.ts | 4 +- es/oak-app-domain/Passport/_baseSchema.d.ts | 14 ++---- es/triggers/index.d.ts | 2 +- es/utils/email/index.d.ts | 2 +- lib/aspects/config.js | 7 +-- lib/aspects/session.js | 9 ++-- lib/aspects/template.d.ts | 2 +- lib/aspects/token.js | 45 ++++++++++--------- lib/aspects/user.js | 7 +-- lib/aspects/wechatQrCode.js | 7 +-- .../ChangePasswordTemp/_baseSchema.d.ts | 10 +---- lib/oak-app-domain/ExtraFile/_baseSchema.d.ts | 4 +- lib/oak-app-domain/Passport/_baseSchema.d.ts | 14 ++---- lib/utils/cos/index.backend.js | 7 +-- lib/utils/cos/index.frontend.js | 7 +-- lib/utils/email/index.d.ts | 2 +- lib/utils/getContextConfig.js | 3 +- lib/utils/livestream.js | 7 +-- lib/utils/user.js | 7 +-- src/components/user/info/index.ts | 21 ++++++++- 103 files changed, 287 insertions(+), 211 deletions(-) diff --git a/es/aspects/session.js b/es/aspects/session.js index 53276de61..022bb1b58 100644 --- a/es/aspects/session.js +++ b/es/aspects/session.js @@ -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, diff --git a/es/aspects/template.d.ts b/es/aspects/template.d.ts index 290b776b2..3e1d30898 100644 --- a/es/aspects/template.d.ts +++ b/es/aspects/template.d.ts @@ -19,6 +19,6 @@ export declare function syncMessageTemplate(params: { example: string; keywordEnumValueList: { keywordCode: string; - enumValueList: Array; + enumValueList: string[]; }[]; }[]>; diff --git a/es/aspects/token.js b/es/aspects/token.js index 004e842aa..394f09502 100644 --- a/es/aspects/token.js +++ b/es/aspects/token.js @@ -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; diff --git a/es/aspects/wechatQrCode.js b/es/aspects/wechatQrCode.js index ef80f4cc2..2ce3a1b8d 100644 --- a/es/aspects/wechatQrCode.js +++ b/es/aspects/wechatQrCode.js @@ -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, }; // 直接创建 diff --git a/es/checkers/index.d.ts b/es/checkers/index.d.ts index d5207458d..fb6e13a8d 100644 --- a/es/checkers/index.d.ts +++ b/es/checkers/index.d.ts @@ -1,2 +1,2 @@ -declare const checkers: (import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker>)[]; +declare const checkers: (import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker> | import("oak-domain/lib/types").Checker>)[]; export default checkers; diff --git a/es/components/address/list/index.d.ts b/es/components/address/list/index.d.ts index ff8c6a49c..eb7c9c471 100644 --- a/es/components/address/list/index.d.ts +++ b/es/components/address/list/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/address/upsert/index.d.ts b/es/components/address/upsert/index.d.ts index 04a2aeb0b..543b66d91 100644 --- a/es/components/address/upsert/index.d.ts +++ b/es/components/address/upsert/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/amap/location/PositionPicker.d.ts b/es/components/amap/location/PositionPicker.d.ts index 079e9fc08..95455897b 100644 --- a/es/components/amap/location/PositionPicker.d.ts +++ b/es/components/amap/location/PositionPicker.d.ts @@ -1,3 +1,4 @@ +/// import React from 'react'; export type PositionProps = { loadUI: boolean; diff --git a/es/components/amap/location/index.d.ts b/es/components/amap/location/index.d.ts index 5c543de6b..67f2a992f 100644 --- a/es/components/amap/location/index.d.ts +++ b/es/components/amap/location/index.d.ts @@ -1,3 +1,4 @@ +/// import React from 'react'; import { ModalProps } from 'antd'; import { GeolocationProps } from '@uiw/react-amap'; diff --git a/es/components/amap/map/index.d.ts b/es/components/amap/map/index.d.ts index ed3e63766..288bdd24a 100644 --- a/es/components/amap/map/index.d.ts +++ b/es/components/amap/map/index.d.ts @@ -1,3 +1,4 @@ +/// import React from 'react'; import { MapProps, APILoaderConfig } from '@uiw/react-amap'; import './index.less'; diff --git a/es/components/application/detail/index.d.ts b/es/components/application/detail/index.d.ts index 6b6e8e37f..f1528b757 100644 --- a/es/components/application/detail/index.d.ts +++ b/es/components/application/detail/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/application/detailForPlatform/index.d.ts b/es/components/application/detailForPlatform/index.d.ts index 6b6e8e37f..f1528b757 100644 --- a/es/components/application/detailForPlatform/index.d.ts +++ b/es/components/application/detailForPlatform/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/application/panel/index.d.ts b/es/components/application/panel/index.d.ts index 6b6e8e37f..f1528b757 100644 --- a/es/components/application/panel/index.d.ts +++ b/es/components/application/panel/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/application/upsert/index.d.ts b/es/components/application/upsert/index.d.ts index 2ca3cf7d3..f0ad771b5 100644 --- a/es/components/application/upsert/index.d.ts +++ b/es/components/application/upsert/index.d.ts @@ -1,3 +1,4 @@ +/// import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/article/cell/index.d.ts b/es/components/article/cell/index.d.ts index cbb0af164..7e54e8a64 100644 --- a/es/components/article/cell/index.d.ts +++ b/es/components/article/cell/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/article/list/index.d.ts b/es/components/article/list/index.d.ts index c63d888b1..8550d91d3 100644 --- a/es/components/article/list/index.d.ts +++ b/es/components/article/list/index.d.ts @@ -1,9 +1,10 @@ +/// import { GenerateUrlFn } from "../../../types/Article"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; }>) => React.ReactElement; export default _default; diff --git a/es/components/article/treeList/index.d.ts b/es/components/article/treeList/index.d.ts index 531bb39b4..6f4290f52 100644 --- a/es/components/article/treeList/index.d.ts +++ b/es/components/article/treeList/index.d.ts @@ -1,7 +1,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; - show: "edit" | "doc" | "preview"; + show: "preview" | "doc" | "edit"; getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void; breadcrumbItems: string[]; drawerOpen: boolean; diff --git a/es/components/articleMenu/container/index.d.ts b/es/components/articleMenu/container/index.d.ts index dec902a78..c84d52042 100644 --- a/es/components/articleMenu/container/index.d.ts +++ b/es/components/articleMenu/container/index.d.ts @@ -1,3 +1,4 @@ +/// import { EntityDict } from "../../../oak-app-domain"; import { GenerateUrlFn } from "../../../types/Article"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/articleMenu/list/index.d.ts b/es/components/articleMenu/list/index.d.ts index 51ce01d13..ecf732e2b 100644 --- a/es/components/articleMenu/list/index.d.ts +++ b/es/components/articleMenu/list/index.d.ts @@ -1,3 +1,4 @@ +/// import { GenerateUrlFn } from "../../../types/Article"; declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; onArticleClick: (atricleId: string) => void; - empty: React.ReactNode | undefined; + empty: import("react").ReactNode; changeAddArticle: (show: boolean) => void; generateUrl: GenerateUrlFn; }>) => React.ReactElement; diff --git a/es/components/articleMenu/treeCell/index.d.ts b/es/components/articleMenu/treeCell/index.d.ts index be5317bd8..759325b36 100644 --- a/es/components/articleMenu/treeCell/index.d.ts +++ b/es/components/articleMenu/treeCell/index.d.ts @@ -2,7 +2,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< onRemove: () => void; onUpdateName: (name: string) => Promise; onChildEditArticleChange: (data: string) => void; - show: "edit" | "doc" | "preview"; + show: "preview" | "doc" | "edit"; getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void; breadItems: string[]; drawerOpen: boolean; diff --git a/es/components/articleMenu/treeList/index.d.ts b/es/components/articleMenu/treeList/index.d.ts index 79d6726d3..883f2ec84 100644 --- a/es/components/articleMenu/treeList/index.d.ts +++ b/es/components/articleMenu/treeList/index.d.ts @@ -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; diff --git a/es/components/articleMenu/treeManager/index.d.ts b/es/components/articleMenu/treeManager/index.d.ts index bd817dfbb..7e2f7ba89 100644 --- a/es/components/articleMenu/treeManager/index.d.ts +++ b/es/components/articleMenu/treeManager/index.d.ts @@ -1,7 +1,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/changePassword/byPassword/index.d.ts b/es/components/changePassword/byPassword/index.d.ts index 9b24ef2db..9e6eb4aca 100644 --- a/es/components/changePassword/byPassword/index.d.ts +++ b/es/components/changePassword/byPassword/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/common/download/index.d.ts b/es/components/common/download/index.d.ts index 35b6ec953..13d24ef6c 100644 --- a/es/components/common/download/index.d.ts +++ b/es/components/common/download/index.d.ts @@ -1,3 +1,4 @@ +/// 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; + var onDownload: (data: ArrayBuffer | ReadableStream, filename: string) => Promise; var base64ToBlob: (base64String: string) => Blob; var arrayBufferToBase64: (buffer: Buffer) => string; - var base64ToArrayBuffer: (base64String: string) => ArrayBuffer; + var base64ToArrayBuffer: (base64String: string) => ArrayBufferLike; } export default Download; diff --git a/es/components/common/errorPage/index.d.ts b/es/components/common/errorPage/index.d.ts index 4f66d7816..19593d8e7 100644 --- a/es/components/common/errorPage/index.d.ts +++ b/es/components/common/errorPage/index.d.ts @@ -4,8 +4,8 @@ import { ReactComponentProps } from 'oak-frontend-base'; import { ECode } from '../../../types/ErrorPage'; declare const _default: (props: ReactComponentProps) => React.ReactElement; diff --git a/es/components/common/qrCode/index.d.ts b/es/components/common/qrCode/index.d.ts index b6dc556f5..772ca4b3a 100644 --- a/es/components/common/qrCode/index.d.ts +++ b/es/components/common/qrCode/index.d.ts @@ -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: (props: ReactComponentProps 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; diff --git a/es/components/common/tabBar/index.d.ts b/es/components/common/tabBar/index.d.ts index 11ce7e31d..97fd2535a 100644 --- a/es/components/common/tabBar/index.d.ts +++ b/es/components/common/tabBar/index.d.ts @@ -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; diff --git a/es/components/config/style/platform/index.d.ts b/es/components/config/style/platform/index.d.ts index 9224d2cdc..8835a6c5f 100644 --- a/es/components/config/style/platform/index.d.ts +++ b/es/components/config/style/platform/index.d.ts @@ -1,7 +1,7 @@ import { Style } from '../../../../types/Style'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; diff --git a/es/components/domain/detail/index.d.ts b/es/components/domain/detail/index.d.ts index cfd5bb519..a7112bd2e 100644 --- a/es/components/domain/detail/index.d.ts +++ b/es/components/domain/detail/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/domain/upsert/index.d.ts b/es/components/domain/upsert/index.d.ts index cfd5bb519..a7112bd2e 100644 --- a/es/components/domain/upsert/index.d.ts +++ b/es/components/domain/upsert/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/extraFile/commit/index.d.ts b/es/components/extraFile/commit/index.d.ts index 9fc209ec1..e2e2d4efe 100644 --- a/es/components/extraFile/commit/index.d.ts +++ b/es/components/extraFile/commit/index.d.ts @@ -1,3 +1,4 @@ +/// 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) | undefined; declare const _default: (props: ReactComponentProps) => unknown) | undefined; + type?: "button" | "reset" | "submit" | undefined; + shape?: "default" | "rounded" | "rectangular" | undefined; + children?: import("react").ReactNode; + } & Pick & import("react").ButtonHTMLAttributes, "id" | "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & { + className?: string | undefined; + style?: (import("react").CSSProperties & Partial>) | undefined; + tabIndex?: number | undefined; + } & import("react").AriaAttributes) | undefined; afterCommit?: AfterCommit; beforeCommit?: BeforeCommit; - messageProps?: MessageProps | boolean; + messageProps?: boolean | MessageProps | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/extraFile/crop/index.d.ts b/es/components/extraFile/crop/index.d.ts index 31c97a1e0..76b906ef0 100644 --- a/es/components/extraFile/crop/index.d.ts +++ b/es/components/extraFile/crop/index.d.ts @@ -20,7 +20,7 @@ declare const _default: ) => React.ReactElement; export default _default; diff --git a/es/components/extraFile/upload/index.d.ts b/es/components/extraFile/upload/index.d.ts index d61cfcada..5a9f44ff6 100644 --- a/es/components/extraFile/upload/index.d.ts +++ b/es/components/extraFile/upload/index.d.ts @@ -1,3 +1,4 @@ +/// 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: Promise; }>) => React.ReactElement; export default _default; diff --git a/es/components/extraFile/upload/web.d.ts b/es/components/extraFile/upload/web.d.ts index 557f90d9b..6fbe667ff 100644 --- a/es/components/extraFile/upload/web.d.ts +++ b/es/components/extraFile/upload/web.d.ts @@ -8,23 +8,23 @@ export interface UploadHandle { } declare const _default: React.ForwardRefExoticComponent Promise | boolean; - style?: React.CSSProperties; - className?: string; - directory?: boolean; - onPreview?: (file: UploadFile) => void; - onDownload?: (file: UploadFile) => 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) | undefined; + style?: React.CSSProperties | undefined; + className?: string | undefined; + directory?: boolean | undefined; + onPreview?: ((file: UploadFile) => void) | undefined; + onDownload?: ((file: UploadFile) => 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; diff --git a/es/components/message/cell/index.d.ts b/es/components/message/cell/index.d.ts index a102be431..4243aadc6 100644 --- a/es/components/message/cell/index.d.ts +++ b/es/components/message/cell/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/message/detail/index.d.ts b/es/components/message/detail/index.d.ts index 8e5aeae49..b6a428c8d 100644 --- a/es/components/message/detail/index.d.ts +++ b/es/components/message/detail/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/message/list/index.d.ts b/es/components/message/list/index.d.ts index 59c862ae1..7d50f35ad 100644 --- a/es/components/message/list/index.d.ts +++ b/es/components/message/list/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/messageTypeSmsTemplate/list/index.d.ts b/es/components/messageTypeSmsTemplate/list/index.d.ts index 344a6070e..cd5b93954 100644 --- a/es/components/messageTypeSmsTemplate/list/index.d.ts +++ b/es/components/messageTypeSmsTemplate/list/index.d.ts @@ -1,6 +1,6 @@ import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/mobile/login/index.d.ts b/es/components/mobile/login/index.d.ts index bc8043074..c5b493c7e 100644 --- a/es/components/mobile/login/index.d.ts +++ b/es/components/mobile/login/index.d.ts @@ -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; diff --git a/es/components/mobile/manageList/index.d.ts b/es/components/mobile/manageList/index.d.ts index 9f53f5a71..1423e77bb 100644 --- a/es/components/mobile/manageList/index.d.ts +++ b/es/components/mobile/manageList/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/my/avatar/index.d.ts b/es/components/my/avatar/index.d.ts index 6b4976c3a..cecab0c89 100644 --- a/es/components/my/avatar/index.d.ts +++ b/es/components/my/avatar/index.d.ts @@ -1,6 +1,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; diff --git a/es/components/my/message/index.d.ts b/es/components/my/message/index.d.ts index fc416ef2a..4007eded7 100644 --- a/es/components/my/message/index.d.ts +++ b/es/components/my/message/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/parasite/excess/index.d.ts b/es/components/parasite/excess/index.d.ts index 4b5cde729..aeab4e2c1 100644 --- a/es/components/parasite/excess/index.d.ts +++ b/es/components/parasite/excess/index.d.ts @@ -1,3 +1,4 @@ +/// import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/parasite/upsert/index.d.ts b/es/components/parasite/upsert/index.d.ts index 3bbe5ff2a..cb8a698e0 100644 --- a/es/components/parasite/upsert/index.d.ts +++ b/es/components/parasite/upsert/index.d.ts @@ -5,7 +5,7 @@ declare const _default: declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/platform/panel/index.d.ts b/es/components/platform/panel/index.d.ts index 92179f82c..2f4ee4714 100644 --- a/es/components/platform/panel/index.d.ts +++ b/es/components/platform/panel/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/platform/upsert/index.d.ts b/es/components/platform/upsert/index.d.ts index 92179f82c..2f4ee4714 100644 --- a/es/components/platform/upsert/index.d.ts +++ b/es/components/platform/upsert/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/session/forMessage/index.d.ts b/es/components/session/forMessage/index.d.ts index 162fded2e..3040df8a6 100644 --- a/es/components/session/forMessage/index.d.ts +++ b/es/components/session/forMessage/index.d.ts @@ -1,7 +1,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps Array; + entityDisplay: (data: any) => any[]; entityProjection: any; }>) => React.ReactElement; export default _default; diff --git a/es/components/session/header/index.d.ts b/es/components/session/header/index.d.ts index fc416ef2a..4007eded7 100644 --- a/es/components/session/header/index.d.ts +++ b/es/components/session/header/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/session/list/index.d.ts b/es/components/session/list/index.d.ts index 419f5cf42..bf432d40c 100644 --- a/es/components/session/list/index.d.ts +++ b/es/components/session/list/index.d.ts @@ -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[]) => Array; + entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions[]) => any[]; entityProjection: any; sessionId: string; dialog: boolean; - onItemClick: ((sessionId: string) => {}) | undefined | null; + onItemClick: ((sessionId: string) => {}) | null | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/sessionMessage/list/index.d.ts b/es/components/sessionMessage/list/index.d.ts index 41e8e86d4..ab50d269f 100644 --- a/es/components/sessionMessage/list/index.d.ts +++ b/es/components/sessionMessage/list/index.d.ts @@ -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[]) => Array; + entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions[]) => any[]; entityProjection: any; }>) => React.ReactElement; export default _default; diff --git a/es/components/subscription/config/upsert/index.d.ts b/es/components/subscription/config/upsert/index.d.ts index ae1dbd523..e5f2d178d 100644 --- a/es/components/subscription/config/upsert/index.d.ts +++ b/es/components/subscription/config/upsert/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/subscription/detail/index.d.ts b/es/components/subscription/detail/index.d.ts index 5a7970c9c..66d28049e 100644 --- a/es/components/subscription/detail/index.d.ts +++ b/es/components/subscription/detail/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/subwayLine/picker/index.d.ts b/es/components/subwayLine/picker/index.d.ts index 7907e4ed6..12eb7190d 100644 --- a/es/components/subwayLine/picker/index.d.ts +++ b/es/components/subwayLine/picker/index.d.ts @@ -1,5 +1,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps void) | undefined; onConfirm: ((stationIds: string[]) => void) | undefined; selectIds: string[] | undefined; diff --git a/es/components/system/detail/index.d.ts b/es/components/system/detail/index.d.ts index aaf164c34..8bf853bbb 100644 --- a/es/components/system/detail/index.d.ts +++ b/es/components/system/detail/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/system/panel/index.d.ts b/es/components/system/panel/index.d.ts index aaf164c34..8bf853bbb 100644 --- a/es/components/system/panel/index.d.ts +++ b/es/components/system/panel/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/system/upsert/index.d.ts b/es/components/system/upsert/index.d.ts index aaf164c34..8bf853bbb 100644 --- a/es/components/system/upsert/index.d.ts +++ b/es/components/system/upsert/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/token/me/emptyBody/index.d.ts b/es/components/token/me/emptyBody/index.d.ts index ce03a624e..094ac520b 100644 --- a/es/components/token/me/emptyBody/index.d.ts +++ b/es/components/token/me/emptyBody/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/token/me/index.d.ts b/es/components/token/me/index.d.ts index c3b729bd6..85b087bea 100644 --- a/es/components/token/me/index.d.ts +++ b/es/components/token/me/index.d.ts @@ -1,8 +1,9 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; myInfoUrl: string; manageUserUrl: string; loginUrl: string; - Body: React.ReactNode | undefined; + Body: import("react").ReactNode; }>) => React.ReactElement; export default _default; diff --git a/es/components/user/info/index.js b/es/components/user/info/index.js index c6a54276b..ad0314134 100644 --- a/es/components/user/info/index.js +++ b/es/components/user/info/index.js @@ -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 && diff --git a/es/components/user/login/index.js b/es/components/user/login/index.js index 4d6ae230f..415cd1270 100644 --- a/es/components/user/login/index.js +++ b/es/components/user/login/index.js @@ -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 }) { diff --git a/es/components/user/login/password/index.js b/es/components/user/login/password/index.js index 5b025a2d9..a4e1a9e03 100644 --- a/es/components/user/login/password/index.js +++ b/es/components/user/login/password/index.js @@ -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', //密码明文密文存储模式 }, diff --git a/es/components/user/password/verify/index.d.ts b/es/components/user/password/verify/index.d.ts index 721288d6b..c5fb2e667 100644 --- a/es/components/user/password/verify/index.d.ts +++ b/es/components/user/password/verify/index.d.ts @@ -1,4 +1,4 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps void); + onVerified: (() => void) | undefined; }>) => React.ReactElement; export default _default; diff --git a/es/components/user/password/verify/web.d.ts b/es/components/user/password/verify/web.d.ts index 8c7e08cdd..cb271e15f 100644 --- a/es/components/user/password/verify/web.d.ts +++ b/es/components/user/password/verify/web.d.ts @@ -1,3 +1,4 @@ +/// import { WebComponentProps } from "oak-frontend-base"; import { EntityDict } from "../../../../oak-app-domain"; export default function Render(props: WebComponentProps import { WebComponentProps } from "oak-frontend-base"; import { EntityDict } from "../../../../oak-app-domain"; export default function Render(props: WebComponentProps 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; diff --git a/es/components/userEntityGrant/claim/ubPicker/index.d.ts b/es/components/userEntityGrant/claim/ubPicker/index.d.ts index d7583bcca..3ff190b84 100644 --- a/es/components/userEntityGrant/claim/ubPicker/index.d.ts +++ b/es/components/userEntityGrant/claim/ubPicker/index.d.ts @@ -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; diff --git a/es/components/userEntityGrant/upsert/index.d.ts b/es/components/userEntityGrant/upsert/index.d.ts index 5ab1ea9b4..0268e541f 100644 --- a/es/components/userEntityGrant/upsert/index.d.ts +++ b/es/components/userEntityGrant/upsert/index.d.ts @@ -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; diff --git a/es/components/userRelation/upsert/byMobile/index.d.ts b/es/components/userRelation/upsert/byMobile/index.d.ts index 83fdd447c..7ed47c734 100644 --- a/es/components/userRelation/upsert/byMobile/index.d.ts +++ b/es/components/userRelation/upsert/byMobile/index.d.ts @@ -4,9 +4,9 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; declare const _default: (props: ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/userRelation/upsert/byUser/index.d.ts b/es/components/userRelation/upsert/byUser/index.d.ts index 4940119bf..57ff8d988 100644 --- a/es/components/userRelation/upsert/byUser/index.d.ts +++ b/es/components/userRelation/upsert/byUser/index.d.ts @@ -4,7 +4,7 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; declare const _default: (props: ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/userRelation/upsert/byUserEntityGrant/index.d.ts b/es/components/userRelation/upsert/byUserEntityGrant/index.d.ts index f5b4288cf..61a363cf2 100644 --- a/es/components/userRelation/upsert/byUserEntityGrant/index.d.ts +++ b/es/components/userRelation/upsert/byUserEntityGrant/index.d.ts @@ -7,11 +7,11 @@ declare const _default: ) => React.ReactElement; export default _default; diff --git a/es/components/userRelation/upsert/index.d.ts b/es/components/userRelation/upsert/index.d.ts index bfce90975..924306f4c 100644 --- a/es/components/userRelation/upsert/index.d.ts +++ b/es/components/userRelation/upsert/index.d.ts @@ -7,8 +7,8 @@ declare const _default: ; - mode: "byMobile" | "byUserEntityGrant" | "byEmail"; + passwordRequired?: boolean | undefined; + disabledMethods: Array<'email' | 'mobile' | 'userEntityGrant'>; + mode: 'byMobile' | 'byUserEntityGrant' | 'byEmail'; }>) => React.ReactElement; export default _default; diff --git a/es/components/userRelation/upsert/onUser/index.d.ts b/es/components/userRelation/upsert/onUser/index.d.ts index 1f0ec1ff8..cafe99e04 100644 --- a/es/components/userRelation/upsert/onUser/index.d.ts +++ b/es/components/userRelation/upsert/onUser/index.d.ts @@ -2,7 +2,7 @@ import { EntityDict } from '../../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; passwordRequired: boolean; diff --git a/es/components/userRelation/upsert/onUser/userRelation/index.d.ts b/es/components/userRelation/upsert/onUser/userRelation/index.d.ts index 3ce27eed3..5db0a88be 100644 --- a/es/components/userRelation/upsert/onUser/userRelation/index.d.ts +++ b/es/components/userRelation/upsert/onUser/userRelation/index.d.ts @@ -2,6 +2,6 @@ import { EntityDict } from '../../../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/wechatLogin/confirm/index.d.ts b/es/components/wechatLogin/confirm/index.d.ts index ddbd0e992..7e6f4d539 100644 --- a/es/components/wechatLogin/confirm/index.d.ts +++ b/es/components/wechatLogin/confirm/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/wechatLogin/qrCode/index.d.ts b/es/components/wechatLogin/qrCode/index.d.ts index 6f4ca60a8..db7fcdc9b 100644 --- a/es/components/wechatLogin/qrCode/index.d.ts +++ b/es/components/wechatLogin/qrCode/index.d.ts @@ -1,6 +1,6 @@ import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; diff --git a/es/components/wechatMenu/menuInfo/index.d.ts b/es/components/wechatMenu/menuInfo/index.d.ts index a13918aba..f7b3a780b 100644 --- a/es/components/wechatMenu/menuInfo/index.d.ts +++ b/es/components/wechatMenu/menuInfo/index.d.ts @@ -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; diff --git a/es/components/wechatUser/bindingList/index.d.ts b/es/components/wechatUser/bindingList/index.d.ts index aaff0d728..ab29006fe 100644 --- a/es/components/wechatUser/bindingList/index.d.ts +++ b/es/components/wechatUser/bindingList/index.d.ts @@ -1,3 +1,4 @@ +/// import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/wechatUser/login/index.d.ts b/es/components/wechatUser/login/index.d.ts index fc416ef2a..4007eded7 100644 --- a/es/components/wechatUser/login/index.d.ts +++ b/es/components/wechatUser/login/index.d.ts @@ -1,2 +1,3 @@ +/// declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/components/wechatUser/unbindBtn/index.d.ts b/es/components/wechatUser/unbindBtn/index.d.ts index 3315ada56..611b25119 100644 --- a/es/components/wechatUser/unbindBtn/index.d.ts +++ b/es/components/wechatUser/unbindBtn/index.d.ts @@ -1,3 +1,4 @@ +/// import { EntityDict } from '../../../oak-app-domain'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; export default _default; diff --git a/es/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts b/es/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts index f051e4062..623588f4f 100644 --- a/es/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts +++ b/es/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts @@ -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; export type OpProjection = { @@ -36,8 +32,6 @@ export type OpProjection = { userId?: number; prevPassword?: number; newPassword?: number; - prevPasswordSha1?: number; - newPasswordSha1?: number; result?: number; } & Partial>; 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>; diff --git a/es/oak-app-domain/ExtraFile/_baseSchema.d.ts b/es/oak-app-domain/ExtraFile/_baseSchema.d.ts index 6149c8541..a58c04f9b 100644 --- a/es/oak-app-domain/ExtraFile/_baseSchema.d.ts +++ b/es/oak-app-domain/ExtraFile/_baseSchema.d.ts @@ -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; diff --git a/es/oak-app-domain/Passport/_baseSchema.d.ts b/es/oak-app-domain/Passport/_baseSchema.d.ts index 72cfb8b53..a63db40d0 100644 --- a/es/oak-app-domain/Passport/_baseSchema.d.ts +++ b/es/oak-app-domain/Passport/_baseSchema.d.ts @@ -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; - config: JsonFilter; + config: JsonFilter; enabled: Q_BooleanValue; } & ExprOp; export type OpProjection = { @@ -63,7 +55,7 @@ export type OpProjection = { $$seq$$?: number; systemId?: number; type?: number; - config?: number | JsonProjection; + config?: number | JsonProjection; enabled?: number; } & Partial>; export type OpSortAttr = Partial<{ diff --git a/es/triggers/index.d.ts b/es/triggers/index.d.ts index fc7f50979..453fdc0cd 100644 --- a/es/triggers/index.d.ts +++ b/es/triggers/index.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger>)[]; +declare const _default: (import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger> | import("oak-domain/lib/types").Trigger>)[]; export default _default; diff --git a/es/utils/email/index.d.ts b/es/utils/email/index.d.ts index 6f2b842fa..da272a8d0 100644 --- a/es/utils/email/index.d.ts +++ b/es/utils/email/index.d.ts @@ -10,7 +10,7 @@ export declare function getEmail(origin: string): Email(options: EmailOptions, context: BRC): Promise<{ success: boolean; - error?: string; + error?: string | undefined; } | { success: boolean; error: unknown; diff --git a/lib/aspects/config.js b/lib/aspects/config.js index 0643205b5..f75072b6c 100644 --- a/lib/aspects/config.js +++ b/lib/aspects/config.js @@ -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; diff --git a/lib/aspects/session.js b/lib/aspects/session.js index 5981a5f5b..0f5331d91 100644 --- a/lib/aspects/session.js +++ b/lib/aspects/session.js @@ -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; diff --git a/lib/aspects/template.d.ts b/lib/aspects/template.d.ts index 290b776b2..3e1d30898 100644 --- a/lib/aspects/template.d.ts +++ b/lib/aspects/template.d.ts @@ -19,6 +19,6 @@ export declare function syncMessageTemplate(params: { example: string; keywordEnumValueList: { keywordCode: string; - enumValueList: Array; + enumValueList: string[]; }[]; }[]>; diff --git a/lib/aspects/token.js b/lib/aspects/token.js index 883bb3d12..1bd4fd285 100644 --- a/lib/aspects/token.js +++ b/lib/aspects/token.js @@ -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; diff --git a/lib/aspects/user.js b/lib/aspects/user.js index 18e61236e..cf5a985c2 100644 --- a/lib/aspects/user.js +++ b/lib/aspects/user.js @@ -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; diff --git a/lib/aspects/wechatQrCode.js b/lib/aspects/wechatQrCode.js index b73aafe47..c53c64cc7 100644 --- a/lib/aspects/wechatQrCode.js +++ b/lib/aspects/wechatQrCode.js @@ -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; diff --git a/lib/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts b/lib/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts index f051e4062..623588f4f 100644 --- a/lib/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts +++ b/lib/oak-app-domain/ChangePasswordTemp/_baseSchema.d.ts @@ -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; export type OpProjection = { @@ -36,8 +32,6 @@ export type OpProjection = { userId?: number; prevPassword?: number; newPassword?: number; - prevPasswordSha1?: number; - newPasswordSha1?: number; result?: number; } & Partial>; 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>; diff --git a/lib/oak-app-domain/ExtraFile/_baseSchema.d.ts b/lib/oak-app-domain/ExtraFile/_baseSchema.d.ts index 6149c8541..a58c04f9b 100644 --- a/lib/oak-app-domain/ExtraFile/_baseSchema.d.ts +++ b/lib/oak-app-domain/ExtraFile/_baseSchema.d.ts @@ -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; diff --git a/lib/oak-app-domain/Passport/_baseSchema.d.ts b/lib/oak-app-domain/Passport/_baseSchema.d.ts index 72cfb8b53..a63db40d0 100644 --- a/lib/oak-app-domain/Passport/_baseSchema.d.ts +++ b/lib/oak-app-domain/Passport/_baseSchema.d.ts @@ -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; - config: JsonFilter; + config: JsonFilter; enabled: Q_BooleanValue; } & ExprOp; export type OpProjection = { @@ -63,7 +55,7 @@ export type OpProjection = { $$seq$$?: number; systemId?: number; type?: number; - config?: number | JsonProjection; + config?: number | JsonProjection; enabled?: number; } & Partial>; export type OpSortAttr = Partial<{ diff --git a/lib/utils/cos/index.backend.js b/lib/utils/cos/index.backend.js index a93709f6c..c7c24e626 100644 --- a/lib/utils/cos/index.backend.js +++ b/lib/utils/cos/index.backend.js @@ -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; diff --git a/lib/utils/cos/index.frontend.js b/lib/utils/cos/index.frontend.js index 38c42ddc9..67a18751e 100644 --- a/lib/utils/cos/index.frontend.js +++ b/lib/utils/cos/index.frontend.js @@ -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; diff --git a/lib/utils/email/index.d.ts b/lib/utils/email/index.d.ts index 6f2b842fa..da272a8d0 100644 --- a/lib/utils/email/index.d.ts +++ b/lib/utils/email/index.d.ts @@ -10,7 +10,7 @@ export declare function getEmail(origin: string): Email(options: EmailOptions, context: BRC): Promise<{ success: boolean; - error?: string; + error?: string | undefined; } | { success: boolean; error: unknown; diff --git a/lib/utils/getContextConfig.js b/lib/utils/getContextConfig.js index b50dc75e3..28e6df2a0 100644 --- a/lib/utils/getContextConfig.js +++ b/lib/utils/getContextConfig.js @@ -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; diff --git a/lib/utils/livestream.js b/lib/utils/livestream.js index 1b97eadb6..672de8527 100644 --- a/lib/utils/livestream.js +++ b/lib/utils/livestream.js @@ -1,8 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getLivestream = getLivestream; -exports.getStreamObj = getStreamObj; -exports.getPlayBackUrl = getPlayBackUrl; +exports.getPlayBackUrl = exports.getStreamObj = exports.getLivestream = void 0; const assert_1 = require("oak-domain/lib/utils/assert"); const getContextConfig_1 = require("./getContextConfig"); /** @@ -29,6 +27,7 @@ async function getLivestream(params, context) { expireAt, }; } +exports.getLivestream = getLivestream; // 获取推拉流地址 /** * 直播流已存在的情况下,获取推拉流地址 @@ -53,6 +52,7 @@ async function getStreamObj(params, context) { expireAt, }; } +exports.getStreamObj = getStreamObj; // 生成直播回放 async function getPlayBackUrl(params, context) { const { streamTitle, start, end, origin } = params; @@ -61,3 +61,4 @@ async function getPlayBackUrl(params, context) { const { hub, playBackDomain, liveHost } = config; return instance.getPlayBackUrl(hub, playBackDomain, streamTitle, start, end, 'POST', liveHost); } +exports.getPlayBackUrl = getPlayBackUrl; diff --git a/lib/utils/user.js b/lib/utils/user.js index f407104b0..0866734d7 100644 --- a/lib/utils/user.js +++ b/lib/utils/user.js @@ -1,8 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getUserSafetyFilter = getUserSafetyFilter; -exports.maskPassword = maskPassword; -exports.checkPassword = checkPassword; +exports.checkPassword = exports.maskPassword = exports.getUserSafetyFilter = void 0; const types_1 = require("oak-domain/lib/types"); function getUserSafetyFilter(context) { const application = context.getApplication(); @@ -25,10 +23,12 @@ function getUserSafetyFilter(context) { }; } } +exports.getUserSafetyFilter = getUserSafetyFilter; function maskPassword(password) { const encStr = "****************************************".slice(0, password.length - 2); return password[0] + encStr + password[password.length - 1]; } +exports.maskPassword = maskPassword; async function checkPassword(context, password) { const systemId = context.getSystemId(); const [passport] = await context.select('passport', { @@ -65,3 +65,4 @@ async function checkPassword(context, password) { } } } +exports.checkPassword = checkPassword; diff --git a/src/components/user/info/index.ts b/src/components/user/info/index.ts index 3a261244d..427018c95 100644 --- a/src/components/user/info/index.ts +++ b/src/components/user/info/index.ts @@ -74,7 +74,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]) ||