@byted-apaas/server-sdk-node 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -126,7 +126,7 @@ class _KunlunFile {
|
|
|
126
126
|
data = fs.createReadStream(data);
|
|
127
127
|
}
|
|
128
128
|
// 2. data must be Stream at here.
|
|
129
|
-
return await Request.
|
|
129
|
+
return await Request.GetHttpInstance().uploadFile(data, expire);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
exports._KunlunFile = _KunlunFile;
|
package/package.json
CHANGED
package/request/innerapi.js
CHANGED
package/request/interface.d.ts
CHANGED
|
@@ -5,13 +5,14 @@ import { Stream } from "stream";
|
|
|
5
5
|
import { ExecutionInfo, ExecutionResult, RevokeExecutionOptions } from "@byted-apaas/server-common-node/context/workflow/workflow";
|
|
6
6
|
import { AppCtx } from "../application/application";
|
|
7
7
|
import { Order } from "../context/db/impl/order";
|
|
8
|
+
export declare function GetHttpInstance(): IInnerAPIRequest;
|
|
8
9
|
export declare function GetInstance(): IInnerAPIRequest;
|
|
9
10
|
export declare function GetFaaSInfraInstance(): IFaaSInfraRequest;
|
|
10
11
|
export type UploadFileResp = {
|
|
11
12
|
id: string;
|
|
12
13
|
token: string;
|
|
13
14
|
size: bigint;
|
|
14
|
-
|
|
15
|
+
mime_type: string;
|
|
15
16
|
name: string;
|
|
16
17
|
};
|
|
17
18
|
export type OrderV2 = {
|
package/request/interface.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2022 ByteDance Ltd. and/or its affiliates
|
|
3
3
|
// SPDX-License-Identifier: MIT
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.GetFaaSInfraInstance = exports.GetInstance = void 0;
|
|
5
|
+
exports.GetFaaSInfraInstance = exports.GetInstance = exports.GetHttpInstance = void 0;
|
|
6
6
|
const openapi_1 = require("./openapi");
|
|
7
7
|
const innerapi_1 = require("./innerapi");
|
|
8
8
|
const common = require("@byted-apaas/server-common-node");
|
|
@@ -19,6 +19,7 @@ function GetHttpInstance() {
|
|
|
19
19
|
}
|
|
20
20
|
return requestInstanceMap["httpRequest"];
|
|
21
21
|
}
|
|
22
|
+
exports.GetHttpInstance = GetHttpInstance;
|
|
22
23
|
function GetRpcInstance() {
|
|
23
24
|
if (!requestInstanceMap["rpcRequest"]) {
|
|
24
25
|
requestInstanceMap["rpcRequest"] = new innerapi_1.RequestRpc();
|