feat: 在CosBackend的相关方法中加入context参数并适配现有代码
This commit is contained in:
parent
3995ff52f8
commit
68b3f93e9f
|
|
@ -19,6 +19,6 @@ export declare function syncMessageTemplate<ED extends EntityDict>(params: {
|
|||
example: string;
|
||||
keywordEnumValueList: {
|
||||
keywordCode: string;
|
||||
enumValueList: string[];
|
||||
enumValueList: Array<string>;
|
||||
}[];
|
||||
}[]>;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
|||
import WechatSDK from 'oak-external-sdk/lib/WechatSDK';
|
||||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { OakPreConditionUnsetException, OakRowInconsistencyException, OakUnloggedInException, OakUserException, OakOperationUnpermittedException, } from 'oak-domain/lib/types';
|
||||
import { composeFileUrl } from '../utils/cos/index.backend';
|
||||
import { composeFileUrlBackend } from '../utils/cos/index.backend';
|
||||
import { OakChangeLoginWayException, OakDistinguishUserException, OakIncompleteConfig, OakUserDisabledException, } from '../types/Exception';
|
||||
import { encryptPasswordSha1 } from '../utils/password';
|
||||
import { tokenProjection } from '../types/Projection';
|
||||
|
|
@ -1362,7 +1362,7 @@ async function setUserInfoFromWechat(user, userInfo, context) {
|
|||
}
|
||||
if (avatar &&
|
||||
(extraFile$entity?.length === 0 ||
|
||||
composeFileUrl(application, extraFile$entity[0]) !== avatar)) {
|
||||
await composeFileUrlBackend(application, extraFile$entity[0], context) !== avatar)) {
|
||||
// 需要更新新的avatar extra file
|
||||
const extraFileOperations = [
|
||||
{
|
||||
|
|
@ -1437,7 +1437,7 @@ export async function setUserAvatarFromWechat(params, context) {
|
|||
const updateData = {};
|
||||
if (avatar &&
|
||||
(extraFiles?.length === 0 ||
|
||||
composeFileUrl(application, extraFiles[0]) !== avatar)) {
|
||||
await composeFileUrlBackend(application, extraFiles[0], context) !== avatar)) {
|
||||
// 需要更新新的avatar extra file
|
||||
const extraFileOperations = [
|
||||
{
|
||||
|
|
@ -2546,8 +2546,8 @@ export async function refreshToken(params, context) {
|
|||
// 只有server模式去刷新token
|
||||
// 'development' | 'production' | 'staging'
|
||||
const intervals = {
|
||||
development: 7200 * 1000,
|
||||
staging: 600 * 1000,
|
||||
development: 7200 * 1000, // 2小时
|
||||
staging: 600 * 1000, // 十分钟
|
||||
production: 600 * 1000, // 十分钟
|
||||
};
|
||||
let applicationId = token.applicationId;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const checkers: (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, "wechatPublicTag", 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, "userEntityGrant", 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, "applicationPassport", 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, "article", 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, "wechatQrCode", 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, "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, "applicationPassport", 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, "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, "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>>)[];
|
||||
export default checkers;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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,4 +1,3 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
export type PositionProps = {
|
||||
loadUI: boolean;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
import { ModalProps } from 'antd';
|
||||
import { GeolocationProps } from '@uiw/react-amap';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="@uiw/react-amap-types" />
|
||||
import React from 'react';
|
||||
import { MapProps, APILoaderConfig } from '@uiw/react-amap';
|
||||
import './index.less';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const Cos: (props: WebComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
currentConfig: EntityDict['application']['OpSchema']['config'];
|
||||
currentConfig: EntityDict["application"]["OpSchema"]["config"];
|
||||
dirty: boolean;
|
||||
entity: string;
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,2 @@
|
|||
/// <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,4 +1,3 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ export default OakComponent({
|
|||
tocFixed: true,
|
||||
tocPosition: 'none',
|
||||
highlightBgColor: 'none',
|
||||
headerTop: 0,
|
||||
headerTop: 0, //页面中吸顶部分高度
|
||||
className: '',
|
||||
scrollId: '',
|
||||
scrollId: '', // 滚动条所在容器id,不传默认body
|
||||
tocWidth: undefined,
|
||||
tocHeight: undefined,
|
||||
showtitle: false,
|
||||
showtitle: false, //大纲顶层显示文章名称
|
||||
activeColor: undefined,
|
||||
},
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
/// <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, {
|
||||
entity: string;
|
||||
entityId: string;
|
||||
title: string;
|
||||
origin: import("../../../types/Config").CosOrigin | null;
|
||||
menuEmpty: import("react").ReactNode;
|
||||
articleEmpty: import("react").ReactNode;
|
||||
origin: null | EntityDict["extraFile"]["Schema"]["origin"];
|
||||
menuEmpty: React.ReactNode | undefined;
|
||||
articleEmpty: React.ReactNode | undefined;
|
||||
generateUrl: GenerateUrlFn;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ export default OakComponent({
|
|||
entity: '',
|
||||
entityId: '',
|
||||
title: '',
|
||||
origin: null,
|
||||
origin: null, // cos origin默认由系统决定
|
||||
menuEmpty: undefined,
|
||||
articleEmpty: undefined,
|
||||
generateUrl: ((mode, type, id) => { }), //构造文章显示路由
|
||||
|
|
@ -20,7 +20,7 @@ export default OakComponent({
|
|||
showAddArticle: false,
|
||||
showAddMenu: true,
|
||||
parentId: '',
|
||||
articleMenuId: '',
|
||||
articleMenuId: '', //非空时展示atricle表格
|
||||
unsub: undefined,
|
||||
},
|
||||
listeners: {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/// <reference types="react" />
|
||||
import { GenerateUrlFn } from "../../../types/Article";
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "articleMenu", true, {
|
||||
entity: string;
|
||||
entityId: string;
|
||||
parentId: string | undefined;
|
||||
origin: import("../../../types/Config").CosOrigin | null;
|
||||
origin: EntityDict["extraFile"]["Schema"]["origin"] | null;
|
||||
onMenuClick: (menuId: string, menuName: string, isArticle: boolean) => void;
|
||||
onArticleClick: (atricleId: string) => void;
|
||||
empty: import("react").ReactNode;
|
||||
empty: React.ReactNode | undefined;
|
||||
changeAddArticle: (show: boolean) => void;
|
||||
generateUrl: GenerateUrlFn;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default OakComponent({
|
|||
entity: '',
|
||||
entityId: '',
|
||||
parentId: '',
|
||||
origin: null,
|
||||
origin: null, // cos origin默认由系统决定
|
||||
onMenuClick: (menuId, menuName, isArticle) => undefined,
|
||||
onArticleClick: (atricleId) => undefined,
|
||||
empty: undefined,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onRemove: () => void;
|
||||
onUpdateName: (name: string) => Promise<void>;
|
||||
onChildEditArticleChange: (data: string) => void;
|
||||
show: "preview" | "edit" | "doc";
|
||||
show: "edit" | "doc" | "preview";
|
||||
getBreadcrumbItemsByParent: (breadcrumbItems: string[]) => void;
|
||||
breadItems: string[];
|
||||
drawerOpen: boolean;
|
||||
|
|
@ -25,6 +25,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
setCurrentArticle: (id: string) => void;
|
||||
onMenuViewById: (articleMenuId: string) => void;
|
||||
setCopyArticleUrl: (id: string) => string;
|
||||
origin: import("../../../types/Config").CosOrigin | null;
|
||||
origin: null | EntityDict["extraFile"]["Schema"]["origin"];
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
parentId: string | undefined;
|
||||
onGrandChildEditArticleChange: (data: string) => void;
|
||||
show: "preview" | "edit" | "doc";
|
||||
show: "edit" | "doc" | "preview";
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
getBreadcrumbItems: (breadcrumbItems: string[]) => void;
|
||||
|
|
@ -31,6 +31,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
setCurrentArticle: (id: string) => void;
|
||||
onMenuViewById: (articleMenuId: string) => void;
|
||||
setCopyArticleUrl: (id: string) => string;
|
||||
origin: import("../../../types/Config").CosOrigin | null;
|
||||
origin: null | EntityDict["extraFile"]["Schema"]["origin"];
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { EntityDict } from "../../../oak-app-domain/EntityDict";
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "articleMenu", true, {
|
||||
entity: string;
|
||||
entityId: string;
|
||||
show: "preview" | "edit" | "doc";
|
||||
show: "edit" | "doc" | "preview";
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
tocPosition: "none" | "left" | "right";
|
||||
|
|
@ -13,7 +13,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onArticlePreview: (content?: string, title?: string) => void;
|
||||
onArticleEdit: (articleId: string) => void;
|
||||
setCopyArticleUrl: (articleId: string) => string;
|
||||
origin: import("../../../types/Config").CosOrigin | null;
|
||||
origin: EntityDict["extraFile"]["Schema"]["origin"] | null;
|
||||
scrollId: string;
|
||||
activeColor: string | undefined;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,2 @@
|
|||
/// <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,4 +1,3 @@
|
|||
/// <reference types="node" />
|
||||
import * as React from 'react';
|
||||
type IDownloadProps = {
|
||||
children?: React.ReactNode;
|
||||
|
|
@ -9,9 +8,9 @@ type IDownloadProps = {
|
|||
};
|
||||
declare function Download(props: IDownloadProps): React.JSX.Element;
|
||||
declare namespace Download {
|
||||
var onDownload: (data: ArrayBuffer | ReadableStream<any>, filename: string) => Promise<void>;
|
||||
var onDownload: (data: ArrayBuffer | ReadableStream, filename: string) => Promise<void>;
|
||||
var base64ToBlob: (base64String: string) => Blob;
|
||||
var arrayBufferToBase64: (buffer: Buffer) => string;
|
||||
var base64ToArrayBuffer: (base64String: string) => ArrayBufferLike;
|
||||
var base64ToArrayBuffer: (base64String: string) => ArrayBuffer;
|
||||
}
|
||||
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 | undefined;
|
||||
desc?: string | undefined;
|
||||
title?: string;
|
||||
desc?: string;
|
||||
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 | undefined;
|
||||
expiresAt?: number | undefined;
|
||||
filename?: string;
|
||||
expiresAt?: number;
|
||||
tips?: React.ReactNode;
|
||||
onDownload?: ((qrCodeImage: string, filename?: string) => void) | undefined;
|
||||
onRefresh?: (() => void) | undefined;
|
||||
size?: number | undefined;
|
||||
onDownload?: (qrCodeImage: string, filename?: string) => void;
|
||||
onRefresh?: () => void;
|
||||
size?: number;
|
||||
url: string;
|
||||
loading?: boolean | undefined;
|
||||
disableDownload?: boolean | undefined;
|
||||
loading?: boolean;
|
||||
disableDownload?: boolean;
|
||||
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 | undefined;
|
||||
selectedIconName?: string | undefined;
|
||||
iconPath?: string | undefined;
|
||||
selectedIconPath?: string | undefined;
|
||||
iconSize?: string | undefined;
|
||||
iconName?: string;
|
||||
selectedIconName?: string;
|
||||
iconPath?: string;
|
||||
selectedIconPath?: string;
|
||||
iconSize?: string;
|
||||
}[];
|
||||
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: "application" | "system" | "platform";
|
||||
entity: "system" | "platform" | "application";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,2 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
tag1: string;
|
||||
tag2: string;
|
||||
origin: import("../../types/Config").CosOrigin | null;
|
||||
origin: EntityDict["extraFile"]["Schema"]["origin"] | null;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ declare const Authorize: (props: WebComponentProps<EntityDict, keyof EntityDict,
|
|||
loading: boolean;
|
||||
hasError: boolean;
|
||||
errorMsg: string;
|
||||
userInfo: EntityDict['token']['Schema']['user'] | null;
|
||||
userInfo: EntityDict["token"]["Schema"]["user"] | null;
|
||||
response_type: string;
|
||||
client_id: string;
|
||||
redirect_uri: string;
|
||||
scope: string;
|
||||
state: string;
|
||||
clientInfo: EntityDict['oauthApplication']['Schema'] | null;
|
||||
clientInfo: EntityDict["oauthApplication"]["Schema"] | null;
|
||||
name: string;
|
||||
nickname: string;
|
||||
mobile: string;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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: import("../../../oak-app-domain/SmsTemplate/_baseSchema").Origin;
|
||||
origin: EntityDict["smsTemplate"]["Schema"]["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,3 +1,2 @@
|
|||
/// <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: string | number;
|
||||
size: number | string;
|
||||
iconColor: string;
|
||||
iconName: string;
|
||||
}>) => React.ReactElement;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,8 +1,8 @@
|
|||
import React from 'react';
|
||||
import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../../oak-app-domain';
|
||||
declare const Upsert: (props: WebComponentProps<EntityDict, 'oauthApplication', false, {
|
||||
item: RowWithActions<EntityDict, 'oauthApplication'>;
|
||||
declare const Upsert: (props: WebComponentProps<EntityDict, "oauthApplication", false, {
|
||||
item: RowWithActions<EntityDict, "oauthApplication">;
|
||||
clientSecret: string;
|
||||
isCreation: boolean;
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react';
|
||||
import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../oak-app-domain';
|
||||
declare const OauthProvider: (props: WebComponentProps<EntityDict, 'oauthApplication', true, {
|
||||
list: RowWithActions<EntityDict, 'oauthApplication'>[];
|
||||
declare const OauthProvider: (props: WebComponentProps<EntityDict, "oauthApplication", true, {
|
||||
list: RowWithActions<EntityDict, "oauthApplication">[];
|
||||
systemId: string;
|
||||
}>) => React.JSX.Element;
|
||||
export default OauthProvider;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../../oak-app-domain';
|
||||
declare const Upsert: (props: WebComponentProps<EntityDict, 'oauthProvider', false, {
|
||||
item: RowWithActions<EntityDict, 'oauthProvider'>;
|
||||
declare const Upsert: (props: WebComponentProps<EntityDict, "oauthProvider", false, {
|
||||
item: RowWithActions<EntityDict, "oauthProvider">;
|
||||
}>) => React.JSX.Element;
|
||||
export default Upsert;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react';
|
||||
import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../oak-app-domain';
|
||||
declare const OauthProvider: (props: WebComponentProps<EntityDict, 'oauthProvider', true, {
|
||||
list: RowWithActions<EntityDict, 'oauthProvider'>[];
|
||||
declare const OauthProvider: (props: WebComponentProps<EntityDict, "oauthProvider", true, {
|
||||
list: RowWithActions<EntityDict, "oauthProvider">[];
|
||||
systemId: string;
|
||||
}>) => React.JSX.Element;
|
||||
export default OauthProvider;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import React from 'react';
|
|||
import { RowWithActions, WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const Records: (props: WebComponentProps<EntityDict, "oauthUserAuthorization", true, {
|
||||
list: RowWithActions<EntityDict, 'oauthUserAuthorization'>[];
|
||||
list: RowWithActions<EntityDict, "oauthUserAuthorization">[];
|
||||
}, {
|
||||
revoke: (item: RowWithActions<EntityDict, 'oauthUserAuthorization'>) => void;
|
||||
revoke: (item: RowWithActions<EntityDict, "oauthUserAuthorization">) => void;
|
||||
}>) => React.JSX.Element;
|
||||
export default Records;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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) => any[];
|
||||
entityDisplay: (data: any) => Array<any>;
|
||||
entityProjection: any;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, 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'>[]) => any[];
|
||||
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>;
|
||||
entityProjection: any;
|
||||
sessionId: string;
|
||||
dialog: boolean;
|
||||
onItemClick: ((sessionId: string) => {}) | null | undefined;
|
||||
onItemClick: ((sessionId: string) => {}) | undefined | null;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -140,12 +140,12 @@ export default OakComponent({
|
|||
unSub: undefined,
|
||||
},
|
||||
properties: {
|
||||
entity: '',
|
||||
entityFilter: null,
|
||||
entity: '', // entity端,指示相应的entity
|
||||
entityFilter: null, // entity端,指示相应的entity查询条件
|
||||
entityFilterSubStr: '',
|
||||
entityDisplay: (data) => [],
|
||||
entityProjection: null,
|
||||
sessionId: '',
|
||||
entityDisplay: (data) => [], // user端,指示如何显示entity对象名称
|
||||
entityProjection: null, // user端,指示需要取哪些entity的属性来显示entityDisplay
|
||||
sessionId: '', // 指示需要打开的默认session
|
||||
dialog: false,
|
||||
onItemClick: null,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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'>[]) => any[];
|
||||
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>;
|
||||
entityProjection: any;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default OakComponent({
|
|||
dialog: false,
|
||||
entity: '',
|
||||
entityId: '',
|
||||
entityDisplay: (data) => [],
|
||||
entityDisplay: (data) => [], // user端,指示如何显示entity对象名称
|
||||
entityProjection: null, // user端,指示需要取哪些entity的属性来显示entityDisplay
|
||||
},
|
||||
filters: [
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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 | null | undefined;
|
||||
areaId: string | undefined | null;
|
||||
onCancel: (() => void) | undefined;
|
||||
onConfirm: ((stationIds: string[]) => void) | undefined;
|
||||
selectIds: string[] | undefined;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/// <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: import("react").ReactNode;
|
||||
Body: React.ReactNode | undefined;
|
||||
}>) => 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, "extraFile", true, {
|
||||
origin: import("../../../../types/Config").CosOrigin | null;
|
||||
origin: EntityDict["extraFile"]["Schema"]["origin"] | null;
|
||||
idCardType: string;
|
||||
entityId: string;
|
||||
entity: string;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "user", false, {
|
||||
origin: import("../../../types/Config").CosOrigin | null;
|
||||
origin: EntityDict["extraFile"]["Schema"]["origin"] | null;
|
||||
autoUpload: boolean;
|
||||
onFinish: (() => void) | undefined;
|
||||
needUploadPhotos: boolean;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ export default OakComponent({
|
|||
},
|
||||
properties: {
|
||||
disabled: '',
|
||||
url: '',
|
||||
callback: undefined,
|
||||
url: '', // 登录系统之后要返回的页面
|
||||
callback: undefined, // 登录成功回调,排除微信登录方式
|
||||
setLoginMode: (value) => undefined,
|
||||
digit: 4, //验证码位数
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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: '',
|
||||
url: '',
|
||||
redirectUri: '', // 微信登录后的redirectUri,要指向wechatUser/login去处理
|
||||
url: '', // 登录系统之后要返回的页面
|
||||
callback: undefined, // 登录成功回调,排除微信登录方式
|
||||
},
|
||||
formData({ features, props }) {
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ export default OakComponent({
|
|||
},
|
||||
properties: {
|
||||
disabled: '',
|
||||
redirectUri: '',
|
||||
url: '',
|
||||
callback: undefined,
|
||||
redirectUri: '', // 微信登录后的redirectUri,要指向wechatUser/login去处理
|
||||
url: '', // 登录系统之后要返回的页面
|
||||
callback: undefined, // 登录成功回调,排除微信登录方式
|
||||
allowSms: false,
|
||||
allowEmail: false,
|
||||
allowWechatMp: false,
|
||||
allowWechatMp: false, //小程序切换授权登录
|
||||
setLoginMode: (value) => undefined,
|
||||
pwdMode: 'all', //密码明文密文存储模式
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ export default OakComponent({
|
|||
},
|
||||
properties: {
|
||||
disabled: '',
|
||||
url: '',
|
||||
callback: undefined,
|
||||
allowPassword: false,
|
||||
allowWechatMp: false,
|
||||
url: '', // 登录系统之后要返回的页面
|
||||
callback: undefined, // 登录成功回调,排除微信登录方式
|
||||
allowPassword: false, //小程序切换密码登录
|
||||
allowWechatMp: false, //小程序切换授权登录
|
||||
setLoginMode: (value) => undefined,
|
||||
digit: 4 //验证码位数,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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: (() => void) | undefined;
|
||||
onVerified: undefined | (() => void);
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <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,4 +1,3 @@
|
|||
/// <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 | undefined;
|
||||
disabled?: boolean;
|
||||
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[] | undefined;
|
||||
pickedRelationIds?: string[] | undefined;
|
||||
pickedRowIds?: string[];
|
||||
pickedRelationIds?: string[];
|
||||
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: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
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: "grant" | "transfer";
|
||||
redirectToAfterConfirm: import("../../../oak-app-domain/UserEntityGrant/_baseSchema").RedirectToProps | null | undefined;
|
||||
type: EntityDict["userEntityGrant"]["Schema"]["type"];
|
||||
redirectToAfterConfirm: EntityDict["userEntityGrant"]["Schema"]["redirectTo"];
|
||||
claimUrl: string;
|
||||
qrCodeType: QrCodeType;
|
||||
multiple: boolean;
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
}>) => 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 | undefined;
|
||||
allowUpdateName?: boolean | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
relations: EntityDict["relation"]["OpSchema"][];
|
||||
passwordRequired?: boolean;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
}>) => 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 | undefined;
|
||||
allowUpdateNickname?: boolean | undefined;
|
||||
allowUpdateName?: boolean;
|
||||
allowUpdateNickname?: boolean;
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ 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'];
|
||||
onUserEntityGrantCreated?: ((id: string) => void) | undefined;
|
||||
rule: EntityDict["userEntityGrant"]["Schema"]["rule"];
|
||||
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
|
||||
onUserEntityGrantCreated?: (id: string) => void;
|
||||
}>) => 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 | undefined;
|
||||
disabledMethods: Array<'email' | 'mobile' | 'userEntityGrant'>;
|
||||
mode: 'byMobile' | 'byUserEntityGrant' | 'byEmail';
|
||||
passwordRequired?: boolean;
|
||||
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: import("../../../../oak-app-domain/Relation/_baseSchema").OpSchema[];
|
||||
relations: EntityDict["relation"]["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: import("../../../../../oak-app-domain/Relation/_baseSchema").OpSchema[];
|
||||
relations: EntityDict["relation"]["OpSchema"][];
|
||||
}>) => React.ReactElement;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "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: "login" | "bind";
|
||||
type: EntityDict["wechatLogin"]["Schema"]["type"];
|
||||
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,4 +1,3 @@
|
|||
/// <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,3 +1,2 @@
|
|||
/// <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,4 +1,3 @@
|
|||
/// <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;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
export declare let WechatPublicTags: Record<string, string>;
|
||||
export declare function registerWechatPublicTags(_WechatPublicTags: Record<string, string>): void;
|
||||
export declare function getWechatPublicTags(): Record<string, string>;
|
||||
export declare const LOCAL_STORAGE_KEYS: {
|
||||
captchaSendAt: string;
|
||||
loginMode: string;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
export let WechatPublicTags = {};
|
||||
export function registerWechatPublicTags(_WechatPublicTags) {
|
||||
WechatPublicTags = _WechatPublicTags;
|
||||
}
|
||||
export function getWechatPublicTags() {
|
||||
return WechatPublicTags;
|
||||
}
|
||||
export const LOCAL_STORAGE_KEYS = {
|
||||
captchaSendAt: 'ogb:c-changePassword-byMobile-captchaSendAt',
|
||||
loginMode: 'ogb:c-user-login-loginMode',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { generateNewIdAsync } from "oak-domain/lib/utils/uuid";
|
||||
import { randomUUID } from "crypto";
|
||||
import { composeFileUrl } from "../utils/cos/index.backend";
|
||||
import { composeFileUrlBackend } from "../utils/cos/index.backend";
|
||||
import assert from "assert";
|
||||
import { checkOauthTokenAvaliable } from "../utils/oauth";
|
||||
import { createHash } from "crypto";
|
||||
|
|
@ -316,7 +316,7 @@ const oauthUserInfoEndpoint = {
|
|||
const application = tokenRecord.code.application;
|
||||
let avatarUrl = '';
|
||||
if (extrafile) {
|
||||
avatarUrl = composeFileUrl(application, extrafile);
|
||||
avatarUrl = await composeFileUrlBackend(application, extrafile, context);
|
||||
}
|
||||
await context.commit();
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* 后端注入自定义功能的注册入口
|
||||
* 如需要注入,请在routine中编写注册逻辑,使用此处提供的注册方法进行注册
|
||||
*/
|
||||
export {
|
||||
/**
|
||||
* 注册消息类型
|
||||
*/
|
||||
registerMessageType, } from './aspects/template';
|
||||
export { registerWeChatPublicEventCallback, } from './endpoints/wechat';
|
||||
export { registerMessageNotificationConverters, } from './triggers/message';
|
||||
export { registSms, } from './utils/sms';
|
||||
export { registerCosBackend, } from './utils/cos/index.backend';
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* 后端注入自定义功能的注册入口
|
||||
* 如需要注入,请在routine中编写注册逻辑,使用此处提供的注册方法进行注册
|
||||
*/
|
||||
export {
|
||||
/**
|
||||
* 注册消息类型
|
||||
*/
|
||||
registerMessageType, } from './aspects/template';
|
||||
export {
|
||||
// 注册微信事件回调处理器endpoint
|
||||
registerWeChatPublicEventCallback, } from './endpoints/wechat';
|
||||
export {
|
||||
// 注册消息通知转换器trigger
|
||||
registerMessageNotificationConverters, } from './triggers/message';
|
||||
export {
|
||||
// 注册短信服务商实现
|
||||
registSms, } from './utils/sms';
|
||||
export {
|
||||
// 注册对象存储服务商实现(后端)
|
||||
registerCosBackend, } from './utils/cos/index.backend';
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* 前端注入自定义功能的注册入口
|
||||
* 如需要注入,请在features初始化中编写注册逻辑,使用此处提供的注册方法进行注册
|
||||
*/
|
||||
export { registerCos, } from './utils/cos/index.frontend';
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* 前端注入自定义功能的注册入口
|
||||
* 如需要注入,请在features初始化中编写注册逻辑,使用此处提供的注册方法进行注册
|
||||
*/
|
||||
export {
|
||||
// 注册对象存储服务商实现(前端),前端无需直接使用,在Features-Extrafile初始化时传入实现类即可
|
||||
registerCos, } from './utils/cos/index.frontend';
|
||||
|
|
@ -56,7 +56,7 @@ const triggers = [
|
|||
if (!cos) {
|
||||
throw new OakException(`origin为${configOrigin}的extraFile没有定义Cos类,请调用registerCos注入`);
|
||||
}
|
||||
await cos.formUploadMeta(context.getApplication(), data);
|
||||
await cos.formUploadMeta(context.getApplication(), data, context);
|
||||
Object.assign(data, {
|
||||
uploadState: 'uploading',
|
||||
});
|
||||
|
|
@ -105,7 +105,7 @@ const triggers = [
|
|||
if (count === 0) {
|
||||
const uploader = getCosBackend(origin);
|
||||
const application2 = context.getApplication(true) || application;
|
||||
await uploader.removeFile(application2, extraFile);
|
||||
await uploader.removeFile(application2, extraFile, context);
|
||||
}
|
||||
}
|
||||
fn();
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (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, "system", 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, "wechatMenu", 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, "wechatLogin", 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, "wechatQrCode", 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, "user", 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, "article", 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, "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, "parasite", 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, "passport", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthApplication", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthProvider", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUser", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUserAuthorization", import("../context/BackendRuntimeContext").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "mobile", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (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, "articleMenu", 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, "oauthUser", 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, "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, "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, "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>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthApplication", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthProvider", import("..").BRC<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "oauthUserAuthorization", import("../context/BackendRuntimeContext").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain/lib/types").Trigger<import("../oak-app-domain").EntityDict, "mobile", import("..").BRC<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'assert';
|
||||
import { extraFileProjection } from '../types/Projection';
|
||||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
import { composeFileUrl } from '../utils/cos/index.backend';
|
||||
import { composeFileUrlBackend } from '../utils/cos/index.backend';
|
||||
import { processUserInfo } from '../utils/oauth';
|
||||
const triggers = [
|
||||
{
|
||||
|
|
@ -62,7 +62,7 @@ const triggers = [
|
|||
const application = context.getApplication();
|
||||
if (newAvatarUrl &&
|
||||
(extraFile$entity?.length === 0 ||
|
||||
composeFileUrl(application, extraFile$entity[0]) !== newAvatarUrl)) {
|
||||
await composeFileUrlBackend(application, extraFile$entity[0], context) !== newAvatarUrl)) {
|
||||
console.log("需要更新用户头像为:", newAvatarUrl);
|
||||
// 需要更新新的avatar extra file
|
||||
const extraFileOperations = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { EntityDict } from '../oak-app-domain';
|
||||
import { BRC } from '..';
|
||||
export type UploadFn = (file: File | string, name: string, // 文件的part name
|
||||
uploadUrl: string, // 上传的url
|
||||
formData: Record<string, any>, // 上传的其它part参数
|
||||
|
|
@ -40,22 +41,22 @@ export interface CosBackend<ED extends EntityDict> {
|
|||
* @param context 后台上下文
|
||||
* @returns
|
||||
*/
|
||||
formUploadMeta: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema']) => Promise<void>;
|
||||
formUploadMeta: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema'], context: BRC<ED>) => Promise<void>;
|
||||
/**
|
||||
* 构建出访问图片的url,注意这个url应当和objectId一对一映射,这样才可以实现多个extraFile之间共享cos上的路径
|
||||
*/
|
||||
composeFileUrl: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema'], style?: string) => string;
|
||||
composeFileUrlBackend: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema'], context: BRC<ED>, style?: string) => Promise<string>;
|
||||
/**
|
||||
* 后台对upload是否成功不确定的文件,向OSS发起主动确认
|
||||
* @param extraFile
|
||||
* @returns 是否已经上传OSS成功
|
||||
*/
|
||||
checkWhetherSuccess: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema']) => Promise<boolean>;
|
||||
checkWhetherSuccess: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema'], context: BRC<ED>) => Promise<boolean>;
|
||||
/**
|
||||
* 后台向OSS发起删除命令
|
||||
* @param extraFile
|
||||
* @param config
|
||||
* @returns
|
||||
*/
|
||||
removeFile: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema']) => Promise<void>;
|
||||
removeFile: (application: ED['application']['Schema'], extraFile: ED['extraFile']['OpSchema'], context: BRC<ED>) => Promise<void>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ import { EntityDict } from '../../oak-app-domain';
|
|||
import { CosBackend } from '../../types/Cos';
|
||||
import ALiYun from './aliyun';
|
||||
import { OpSchema } from '../../oak-app-domain/ExtraFile/Schema';
|
||||
import { BRC } from '../..';
|
||||
export default class ALiYunBackend extends ALiYun implements CosBackend<EntityDict> {
|
||||
private getConfigAndInstance;
|
||||
composeFileUrlBackend(application: EntityDict['application']['Schema'], extraFile: OpSchema, context: BRC<EntityDict>, style?: string): Promise<string>;
|
||||
formUploadMeta(application: EntityDict['application']['Schema'], extraFile: OpSchema): Promise<void>;
|
||||
checkWhetherSuccess(application: EntityDict['application']['Schema'], extraFile: OpSchema): Promise<boolean>;
|
||||
removeFile(application: EntityDict['application']['Schema'], extraFile: OpSchema): Promise<void>;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ export default class ALiYunBackend extends ALiYun {
|
|||
instance,
|
||||
};
|
||||
}
|
||||
async composeFileUrlBackend(application, extraFile, context, style) {
|
||||
return this.composeFileUrl(application, extraFile, style);
|
||||
}
|
||||
async formUploadMeta(application, extraFile) {
|
||||
const { bucket } = extraFile;
|
||||
// 构造文件上传所需的key
|
||||
|
|
|
|||
|
|
@ -2,8 +2,10 @@ import { EntityDict } from '../../oak-app-domain';
|
|||
import { CosBackend } from '../../types/Cos';
|
||||
import CTYun from './ctyun';
|
||||
import { OpSchema } from '../../oak-app-domain/ExtraFile/Schema';
|
||||
import { BRC } from '../..';
|
||||
export default class CTYunBackend extends CTYun implements CosBackend<EntityDict> {
|
||||
private getConfigAndInstance;
|
||||
composeFileUrlBackend(application: EntityDict['application']['Schema'], extraFile: OpSchema, context: BRC<EntityDict>, style?: string): Promise<string>;
|
||||
formUploadMeta(application: EntityDict['application']['Schema'], extraFile: OpSchema): Promise<void>;
|
||||
checkWhetherSuccess(application: EntityDict['application']['Schema'], extraFile: OpSchema): Promise<boolean>;
|
||||
removeFile(application: EntityDict['application']['Schema'], extraFile: OpSchema): Promise<void>;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ export default class CTYunBackend extends CTYun {
|
|||
instance,
|
||||
};
|
||||
}
|
||||
async composeFileUrlBackend(application, extraFile, context, style) {
|
||||
return this.composeFileUrl(application, extraFile, style);
|
||||
}
|
||||
async formUploadMeta(application, extraFile) {
|
||||
const { bucket } = extraFile;
|
||||
// 构造文件上传所需的key
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue