@deathnaitsa/wa-api 1.0.18 → 1.0.19

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,34 +1,48 @@
1
1
  import { proto } from "@deathnaitsa/baileys";
2
2
  import { SendMediaTypes, SendMessageTypes, SendReadTypes, SendTypingTypes } from "../Types";
3
- export declare const sendTextMessage: ({ sessionId, to, text, isGroup, ...props }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
4
- export declare const sendImage: ({ sessionId, to, text, isGroup, media, ...props }: SendMediaTypes) => Promise<proto.WebMessageInfo | undefined>;
5
- export declare const sendVideo: ({ sessionId, to, text, isGroup, media, ...props }: SendMediaTypes) => Promise<proto.WebMessageInfo | undefined>;
6
- export declare const sendDocument: ({ sessionId, to, text, isGroup, media, filename, ...props }: SendMediaTypes & {
7
- filename: string;
8
- }) => Promise<proto.WebMessageInfo | undefined>;
3
+
4
+ /**
5
+ * Send a message to target
6
+ *
7
+ * @param sessionId - Session ID
8
+ * @param jid - Target
9
+ * @param content - Message content
10
+ * @param options - Message options
11
+ */
9
12
  export declare function sendMessage(
10
13
  sessionId: string,
11
14
  jid: string,
12
15
  content: import("@deathnaitsa/baileys").AnyMessageContent,
13
16
  options?: import("@deathnaitsa/baileys").MiscMessageGenerationOptions
14
17
  ): Promise<import("@deathnaitsa/baileys").proto.WebMessageInfo>;
15
-
16
- export declare const kickusr: ({ sessionId, to, text }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
17
- export declare const del: ({ sessionId, to, id,sender }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
18
-
19
- export declare const sendVoiceNote: ({ sessionId, to, isGroup, media, ...props }: Omit<SendMediaTypes, "text">) => Promise<proto.WebMessageInfo | undefined>;
20
- export declare const sendSticker: ({ sessionId, to, isGroup, media, ...props }: SendMediaTypes) => Promise<proto.WebMessageInfo | undefined>;
21
- /**
22
- * Give typing effect to target
18
+ /**
19
+ * Sendet einen rohen WAMessage-Stanza an WhatsApp.
23
20
  *
24
- * Looks like human typing
21
+ * @param sessionId Deine Session-ID
22
+ * @param jid Ziel-JID oder Telefonnummer (z. B. '491234567890@s.whatsapp.net' oder 'status@broadcast')
23
+ * @param content Raw-Message-Node (z. B. protocolMessage, videoMessage, etc.)
24
+ * @param options Optional: Relay-Parameter wie messageId, participant, additionalNodes, statusJidList
25
+ * @returns Promise mit der gesendeten Nachricht-ID (msgId)
26
+ */
27
+ /**
28
+ * Low-level relayMessage-Wrapper für direkten Baileys-Stanza Dispatch.
25
29
  *
30
+ * Sendet ein rohes WAMessage-Stanza (z.B. protocolMessage, disappearingMessagesInChat,
31
+ * videoMessage, etc.) direkt an WhatsApp über die interne `relayMessage`-Methode.
26
32
  *
27
- * @param sessionId - Session ID
28
- * @param to - Target
29
- * @param duration - Duration in miliseconds typing effect will appear
33
+ * @param sessionId Deine Multi-Session-ID
34
+ * @param jid Ziel-JID oder Telefonnummer (z.B. '491234567890@s.whatsapp.net' oder 'status@broadcast')
35
+ * @param content Raw-Message-Node (proto.WebMessageInfo oder AnyMessageContent-ähnlich)
36
+ * @param options Optional: Relay-Parameter wie `messageId`, `participant`, `additionalNodes`,
37
+ * `statusJidList`, `useCachedGroupMetadata`, usw.
38
+ * @returns Promise mit der gesendeten Nachricht-ID (`msgId`)
30
39
  */
31
- export declare const sendTyping: ({ sessionId, to, duration, isGroup, }: SendTypingTypes) => Promise<void>;
40
+ export declare function relayMessage(
41
+ sessionId: string,
42
+ jid: string,
43
+ content: any,
44
+ options?: import('@deathnaitsa/baileys').MiscMessageGenerationOptions
45
+ ): Promise<string>;
32
46
  /**
33
47
  * Give typing effect to target
34
48
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deathnaitsa/wa-api",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Multi Session Whatsapp Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -19,7 +19,7 @@ Leichte Bibliothek zur Verwaltung mehrerer WhatsApp-Sessions – mit **einer** u
19
19
  * [Profilbild aktualisieren](#profilbild-aktualisieren)
20
20
  * [Chat als gelesen markieren](#chat-als-gelesen-markieren)
21
21
  6. [Listener](#-listener)
22
- 7. [Fehlerbehandlung](#fehlerbehandlung)
22
+ 7. [Fehlerbehandlung](#-fehlerbehandlung)
23
23
 
24
24
  ---
25
25