@orion-js/echoes 3.2.44 → 3.2.47
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.
- package/lib/request/index.d.ts +1 -1
- package/lib/request/index.js +2 -2
- package/lib/types.d.ts +2 -2
- package/package.json +2 -2
package/lib/request/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RequestOptions } from '../types';
|
|
2
|
-
export default function (options: RequestOptions): Promise<
|
|
2
|
+
export default function request<TData = any, TParams = any>(options: RequestOptions<TParams>): Promise<TData>;
|
package/lib/request/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const serialize_1 = __importDefault(require("../publish/serialize"));
|
|
|
9
9
|
const deserialize_1 = __importDefault(require("../echo/deserialize"));
|
|
10
10
|
const config_1 = __importDefault(require("../config"));
|
|
11
11
|
const makeRequest_1 = require("./makeRequest");
|
|
12
|
-
async function
|
|
12
|
+
async function request(options) {
|
|
13
13
|
const { method, service, params } = options;
|
|
14
14
|
const serializedParams = (0, serialize_1.default)(params);
|
|
15
15
|
const date = new Date();
|
|
@@ -39,4 +39,4 @@ async function default_1(options) {
|
|
|
39
39
|
throw new Error(`Echoes request network error calling ${service}/${method}: ${error.message}`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
exports.default =
|
|
42
|
+
exports.default = request;
|
package/lib/types.d.ts
CHANGED
|
@@ -13,10 +13,10 @@ export interface PublishOptions {
|
|
|
13
13
|
acks?: number;
|
|
14
14
|
timeout?: number;
|
|
15
15
|
}
|
|
16
|
-
export interface RequestOptions {
|
|
16
|
+
export interface RequestOptions<TParams> {
|
|
17
17
|
method: string;
|
|
18
18
|
service: string;
|
|
19
|
-
params:
|
|
19
|
+
params: TParams;
|
|
20
20
|
}
|
|
21
21
|
export interface RequestHandlerResponse {
|
|
22
22
|
result?: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/echoes",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.47",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "dc22bd779dd147a39f4909a7e10df4d5eaa8ad2a"
|
|
44
44
|
}
|