@orion-js/echoes 3.2.48 → 3.2.49

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.
@@ -2,4 +2,4 @@ import { PublishOptions } from '../types';
2
2
  /**
3
3
  * Publish
4
4
  */
5
- export default function (options: PublishOptions): Promise<import("kafkajs").RecordMetadata[]>;
5
+ export default function publish<TParams = any>(options: PublishOptions<TParams>): Promise<import("kafkajs").RecordMetadata[]>;
@@ -8,7 +8,7 @@ const serialize_1 = __importDefault(require("./serialize"));
8
8
  /**
9
9
  * Publish
10
10
  */
11
- async function default_1(options) {
11
+ async function publish(options) {
12
12
  if (!config_1.default.producer) {
13
13
  throw new Error('You must initialize echoes configruation to use publish');
14
14
  }
@@ -27,4 +27,4 @@ async function default_1(options) {
27
27
  ]
28
28
  });
29
29
  }
30
- exports.default = default_1;
30
+ exports.default = publish;
package/lib/types.d.ts CHANGED
@@ -7,9 +7,9 @@ export interface EchoType extends EchoConfig {
7
7
  onMessage(messageData: EachMessagePayload): Promise<void>;
8
8
  onRequest(serializedParams: string): any;
9
9
  }
10
- export interface PublishOptions {
10
+ export interface PublishOptions<TParams = any> {
11
11
  topic: string;
12
- params: any;
12
+ params: TParams;
13
13
  acks?: number;
14
14
  timeout?: number;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-js/echoes",
3
- "version": "3.2.48",
3
+ "version": "3.2.49",
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": "ff49b7ffd93c1a72e66c2ed93fdb056360e85e96"
43
+ "gitHead": "0f73de8793c3ff9a30159a89e3218530baa63b64"
44
44
  }