@open-wa/wa-automate-types-only 4.64.0 → 4.64.1

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.
@@ -1,6 +1,13 @@
1
1
  import { Client } from "../api/Client";
2
2
  import { Message } from "../api/model/message";
3
- export type MessagePreProcessor = (message: Message, client?: Client) => Promise<Message>;
3
+ /**
4
+ * A function that takes a message and returns a message.
5
+ *
6
+ * @param message The message to be processed
7
+ * @param client The client that received the message
8
+ * @param alreadyProcessed Whether the message has already been processed by another preprocessor. (This is useful in cases where you want to mutate the message for both onMessage and onAnyMessage events but only want to do the actual process, like uploading to s3, once.)
9
+ */
10
+ export type MessagePreProcessor = (message: Message, client?: Client, alreadyProcessed?: boolean) => Promise<Message>;
4
11
  /**
5
12
  * An object that contains all available [[PREPROCESSORS]].
6
13
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.64.0",
3
+ "version": "4.64.1",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",