修改externalsdk引用问题
This commit is contained in:
parent
a87cfaa4cc
commit
c7c2027027
|
|
@ -12,7 +12,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "success" | "warning" | "default" | "primary" | "danger" | undefined;
|
||||
color?: "success" | "default" | "warning" | "primary" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "middle" | "large" | "mini" | undefined;
|
||||
block?: boolean | undefined;
|
||||
|
|
@ -21,12 +21,12 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
loadingIcon?: import("react").ReactNode;
|
||||
disabled?: boolean | undefined;
|
||||
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
|
||||
type?: "button" | "submit" | "reset" | undefined;
|
||||
type?: "button" | "reset" | "submit" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & {
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchStart" | "onTouchEnd"> & {
|
||||
className?: string | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--background-color" | "--border-color" | "--text-color" | "--border-width" | "--border-radius" | "--border-style", string>>) | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
|
||||
tabIndex?: number | undefined;
|
||||
} & import("react").AriaAttributes) | undefined;
|
||||
afterCommit?: AfterCommit;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: keyof EntityDict;
|
||||
entityFilter: any;
|
||||
relationIds: string[];
|
||||
rule: "all" | "single" | "free";
|
||||
ruleOnRow: "all" | "single" | "free";
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
onPickRelations: (ids: string[]) => void;
|
||||
onPickRows: (ids: string[]) => void;
|
||||
pickedRowIds: string[] | undefined;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
claimUrl: string;
|
||||
qrCodeType: QrCodeType;
|
||||
multiple: boolean;
|
||||
rule: "all" | "single" | "free";
|
||||
ruleOnRow: "all" | "single" | "free";
|
||||
rule: "single" | "all" | "free";
|
||||
ruleOnRow: "single" | "all" | "free";
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ import { ED as EntityDict } from '../types/RuntimeCxt';
|
|||
* @returns
|
||||
*/
|
||||
export declare function getConfig<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AspectDict<ED, Cxt>>>(context: Cxt | FrontCxt, service: Service, origin: Origin): {
|
||||
instance: import("oak-external-sdk/es/QiniuSDK").QiniuCloudInstance;
|
||||
instance: import("oak-external-sdk").QiniuCloudInstance;
|
||||
config: any;
|
||||
} | {
|
||||
instance: import("oak-external-sdk/es/CTYunSDK").CTYunInstance;
|
||||
instance: import("oak-external-sdk").CTYunInstance;
|
||||
config: any;
|
||||
} | {
|
||||
instance: import("oak-external-sdk/es/service/amap/Amap").AmapInstance;
|
||||
instance: import("oak-external-sdk").AmapInstance;
|
||||
config: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { OakDataException } from 'oak-domain/lib/types/Exception';
|
||||
import AmapSDK from 'oak-external-sdk/es/AmapSDK';
|
||||
import QiniuSDK from 'oak-external-sdk/es/QiniuSDK';
|
||||
import CTYunSDk from 'oak-external-sdk/es/CTYunSDK';
|
||||
import { AmapSDK, QiniuSDK, CTYunSDk } from 'oak-external-sdk';
|
||||
/**
|
||||
* 目前虽然数据结构上config也可能在platform上,但是实际中暂时还没有
|
||||
* @param context
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ import { ED as EntityDict } from '../types/RuntimeCxt';
|
|||
* @returns
|
||||
*/
|
||||
export declare function getConfig<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>, FrontCxt extends FrontendRuntimeContext<ED, Cxt, AspectDict<ED, Cxt>>>(context: Cxt | FrontCxt, service: Service, origin: Origin): {
|
||||
instance: import("oak-external-sdk/es/QiniuSDK").QiniuCloudInstance;
|
||||
instance: import("oak-external-sdk").QiniuCloudInstance;
|
||||
config: any;
|
||||
} | {
|
||||
instance: import("oak-external-sdk/es/CTYunSDK").CTYunInstance;
|
||||
instance: import("oak-external-sdk").CTYunInstance;
|
||||
config: any;
|
||||
} | {
|
||||
instance: import("oak-external-sdk/es/service/amap/Amap").AmapInstance;
|
||||
instance: import("oak-external-sdk").AmapInstance;
|
||||
config: any;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getConfig = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const Exception_1 = require("oak-domain/lib/types/Exception");
|
||||
const AmapSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/AmapSDK"));
|
||||
const QiniuSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/QiniuSDK"));
|
||||
const CTYunSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/CTYunSDK"));
|
||||
const oak_external_sdk_1 = require("oak-external-sdk");
|
||||
/**
|
||||
* 目前虽然数据结构上config也可能在platform上,但是实际中暂时还没有
|
||||
* @param context
|
||||
|
|
@ -25,8 +22,8 @@ function getConfig(context, service, origin) {
|
|||
platformConfig[service] && platformConfig[service][origin];
|
||||
originCloudAccounts =
|
||||
originConfig &&
|
||||
platformConfig.Account &&
|
||||
platformConfig.Account[origin];
|
||||
platformConfig.Account &&
|
||||
platformConfig.Account[origin];
|
||||
}
|
||||
if (!originConfig) {
|
||||
throw new Exception_1.OakDataException(`调用的服务${service}源${origin}找不到相应的配置,请联系管理员`);
|
||||
|
|
@ -45,7 +42,7 @@ function getConfig(context, service, origin) {
|
|||
case 'qiniu': {
|
||||
const qiniuAccount = originCloudAccounts.find((ele) => ele.accessKey === originConfig.accessKey);
|
||||
(0, assert_1.assert)(qiniuAccount, `调用的服务${service}源${origin}找不到相应的云平台帐号,请联系管理员`);
|
||||
const qiniuInstance = QiniuSDK_1.default.getInstance(qiniuAccount.accessKey, qiniuAccount.secretKey);
|
||||
const qiniuInstance = oak_external_sdk_1.QiniuSDK.getInstance(qiniuAccount.accessKey, qiniuAccount.secretKey);
|
||||
return {
|
||||
instance: qiniuInstance,
|
||||
config: originConfig,
|
||||
|
|
@ -54,7 +51,7 @@ function getConfig(context, service, origin) {
|
|||
case 'ctyun': {
|
||||
const ctyunAccount = originCloudAccounts.find((ele) => ele.accessKey === originConfig.accessKey);
|
||||
(0, assert_1.assert)(ctyunAccount, `调用的服务${service}源${origin}找不到相应的云平台帐号,请联系管理员`);
|
||||
const ctyunInstance = CTYunSDK_1.default.getInstance(ctyunAccount.accessKey, ctyunAccount.securityKey);
|
||||
const ctyunInstance = oak_external_sdk_1.CTYunSDk.getInstance(ctyunAccount.accessKey, ctyunAccount.securityKey);
|
||||
return {
|
||||
instance: ctyunInstance,
|
||||
config: originConfig,
|
||||
|
|
@ -64,7 +61,7 @@ function getConfig(context, service, origin) {
|
|||
(0, assert_1.assert)(origin === 'amap');
|
||||
const amapAccount = originCloudAccounts.find((ele) => ele.webApiKey === originConfig.webApiKey);
|
||||
(0, assert_1.assert)(amapAccount, `调用的服务${service}源${origin}找不到相应的云平台帐号,请联系管理员`);
|
||||
const amapInstance = AmapSDK_1.default.getInstance(amapAccount.webApiKey);
|
||||
const amapInstance = oak_external_sdk_1.AmapSDK.getInstance(amapAccount.webApiKey);
|
||||
return {
|
||||
instance: amapInstance,
|
||||
config: originConfig,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { OpSchema } from '../../oak-app-domain/ExtraFile/Schema';
|
|||
import { CTYunUploadInfo } from '../../types/Upload';
|
||||
import { getConfig } from '../getContextConfig';
|
||||
import { CTYunCosConfig } from '../../types/Config';
|
||||
import { CTYunInstance } from 'oak-external-sdk/es/service/ctyun/CTYun';
|
||||
import { CTYunInstance } from 'oak-external-sdk';
|
||||
import { urlSafeBase64Encode } from '../sign';
|
||||
import { OakUploadException } from '../../types/Exception';
|
||||
import { OakExternalException, OakNetworkException } from 'oak-domain/lib/types/Exception';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { OpSchema } from '../../oak-app-domain/ExtraFile/Schema';
|
|||
import { QiniuUploadInfo } from '../../types/Upload';
|
||||
import { getConfig } from '../getContextConfig';
|
||||
import { QiniuCosConfig } from '../../types/Config';
|
||||
import { QiniuCloudInstance } from 'oak-external-sdk/es/service/qiniu/QiniuCloud';
|
||||
import { QiniuCloudInstance } from 'oak-external-sdk';
|
||||
import { urlSafeBase64Encode } from '../sign';
|
||||
import { OakUploadException } from '../../types/Exception';
|
||||
import { OakExternalException, OakNetworkException } from 'oak-domain/lib/types/Exception';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { OakDataException } from 'oak-domain/lib/types/Exception';
|
||||
import AmapSDK from 'oak-external-sdk/lib/AmapSDK';
|
||||
import QiniuSDK from 'oak-external-sdk/lib/QiniuSDK';
|
||||
import CTYunSDk from 'oak-external-sdk/lib/CTYunSDK';
|
||||
import { AmapSDK, QiniuSDK, CTYunSDk } from 'oak-external-sdk';
|
||||
import {
|
||||
AliCloudConfig,
|
||||
AmapCloudConfig,
|
||||
|
|
|
|||
Loading…
Reference in New Issue