@kyyinfinite/zapo-message 0.0.0-stage → 1.0.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.
Files changed (191) hide show
  1. package/CHANGELOG.md +159 -0
  2. package/LICENSE +20 -0
  3. package/README.md +1401 -2
  4. package/build.config.json +28 -0
  5. package/dist/airich/airich.d.ts +180 -0
  6. package/dist/airich/airich.js +548 -0
  7. package/dist/airich/context.d.ts +24 -0
  8. package/dist/airich/context.js +48 -0
  9. package/dist/airich/encode.d.ts +3 -0
  10. package/dist/airich/encode.js +16 -0
  11. package/dist/airich/index.d.ts +20 -0
  12. package/dist/airich/index.js +11 -0
  13. package/dist/airich/inline.d.ts +45 -0
  14. package/dist/airich/inline.js +152 -0
  15. package/dist/airich/nodes.d.ts +30 -0
  16. package/dist/airich/nodes.js +121 -0
  17. package/dist/airich/primitives.d.ts +144 -0
  18. package/dist/airich/primitives.js +230 -0
  19. package/dist/airich/protocol.d.ts +35 -0
  20. package/dist/airich/protocol.js +65 -0
  21. package/dist/airich/table.d.ts +22 -0
  22. package/dist/airich/table.js +35 -0
  23. package/dist/airich/tokenizer.d.ts +13 -0
  24. package/dist/airich/tokenizer.js +717 -0
  25. package/dist/airich/transport.d.ts +15 -0
  26. package/dist/airich/transport.js +56 -0
  27. package/dist/branding.d.ts +5 -0
  28. package/dist/branding.js +9 -0
  29. package/dist/btn/builders.d.ts +246 -0
  30. package/dist/btn/builders.js +710 -0
  31. package/dist/btn/media-slot.d.ts +28 -0
  32. package/dist/btn/media-slot.js +323 -0
  33. package/dist/btn/media-source.d.ts +36 -0
  34. package/dist/btn/media-source.js +116 -0
  35. package/dist/btn/sharp-loader.d.ts +5 -0
  36. package/dist/btn/sharp-loader.js +18 -0
  37. package/dist/btn/thumbnail.d.ts +21 -0
  38. package/dist/btn/thumbnail.js +124 -0
  39. package/dist/btn/validators.d.ts +40 -0
  40. package/dist/btn/validators.js +135 -0
  41. package/dist/btn.d.ts +1 -0
  42. package/dist/btn.js +1 -0
  43. package/dist/core/async-send.d.ts +20 -0
  44. package/dist/core/async-send.js +1 -0
  45. package/dist/core/base-builder.d.ts +20 -0
  46. package/dist/core/base-builder.js +67 -0
  47. package/dist/core/errors.d.ts +30 -0
  48. package/dist/core/errors.js +61 -0
  49. package/dist/download.d.ts +24 -0
  50. package/dist/download.js +123 -0
  51. package/dist/index.d.ts +38 -0
  52. package/dist/index.js +22 -0
  53. package/dist/integration/augment.d.ts +97 -0
  54. package/dist/integration/augment.js +1 -0
  55. package/dist/integration/auto.d.ts +8 -0
  56. package/dist/integration/auto.js +79 -0
  57. package/dist/integration/index.d.ts +4 -0
  58. package/dist/integration/index.js +2 -0
  59. package/dist/integration/methods.d.ts +25 -0
  60. package/dist/integration/methods.js +24 -0
  61. package/dist/interactive.d.ts +24 -0
  62. package/dist/interactive.js +121 -0
  63. package/dist/media-gate.d.ts +99 -0
  64. package/dist/media-gate.js +322 -0
  65. package/dist/message/album.d.ts +33 -0
  66. package/dist/message/album.js +107 -0
  67. package/dist/message/contact.d.ts +29 -0
  68. package/dist/message/contact.js +123 -0
  69. package/dist/message/forward.d.ts +23 -0
  70. package/dist/message/forward.js +77 -0
  71. package/dist/message/index.d.ts +26 -0
  72. package/dist/message/index.js +13 -0
  73. package/dist/message/link-preview.d.ts +28 -0
  74. package/dist/message/link-preview.js +98 -0
  75. package/dist/message/location.d.ts +24 -0
  76. package/dist/message/location.js +94 -0
  77. package/dist/message/media.d.ts +90 -0
  78. package/dist/message/media.js +123 -0
  79. package/dist/message/poll.d.ts +24 -0
  80. package/dist/message/poll.js +98 -0
  81. package/dist/message/reaction.d.ts +20 -0
  82. package/dist/message/reaction.js +71 -0
  83. package/dist/message/sticker.d.ts +29 -0
  84. package/dist/message/sticker.js +44 -0
  85. package/dist/message/target.d.ts +18 -0
  86. package/dist/message/target.js +24 -0
  87. package/dist/message/text.d.ts +17 -0
  88. package/dist/message/text.js +29 -0
  89. package/dist/message/vcard.d.ts +9 -0
  90. package/dist/message/vcard.js +23 -0
  91. package/dist/message/webp.d.ts +6 -0
  92. package/dist/message/webp.js +57 -0
  93. package/dist/payloads.d.ts +180 -0
  94. package/dist/payloads.js +1 -0
  95. package/dist/serialize.d.ts +41 -0
  96. package/dist/serialize.js +93 -0
  97. package/dist/status.d.ts +3 -0
  98. package/dist/status.js +21 -0
  99. package/dist/zapo-client.d.ts +44 -0
  100. package/dist/zapo-client.js +1 -0
  101. package/examples/airich.ts +59 -0
  102. package/examples/buttons.ts +48 -0
  103. package/examples/client-methods.ts +58 -0
  104. package/examples/hybrid.ts +133 -0
  105. package/examples/serialize.ts +61 -0
  106. package/package.json +271 -4
  107. package/scripts/check-no-comments.mjs +101 -0
  108. package/scripts/compare-golden.mjs +461 -0
  109. package/scripts/lib-config.mjs +9 -0
  110. package/scripts/smoke-auto.mjs +75 -0
  111. package/scripts/test-external-consumer.mjs +316 -0
  112. package/scripts/verify-package.mjs +78 -0
  113. package/src/airich/airich.ts +970 -0
  114. package/src/airich/context.ts +96 -0
  115. package/src/airich/encode.ts +25 -0
  116. package/src/airich/index.ts +98 -0
  117. package/src/airich/inline.ts +272 -0
  118. package/src/airich/nodes.ts +174 -0
  119. package/src/airich/primitives.ts +474 -0
  120. package/src/airich/protocol.ts +133 -0
  121. package/src/airich/table.ts +70 -0
  122. package/src/airich/tokenizer.ts +799 -0
  123. package/src/airich/transport.ts +106 -0
  124. package/src/branding.ts +23 -0
  125. package/src/btn/builders.ts +1073 -0
  126. package/src/btn/media-slot.ts +486 -0
  127. package/src/btn/media-source.ts +189 -0
  128. package/src/btn/sharp-loader.ts +23 -0
  129. package/src/btn/thumbnail.ts +182 -0
  130. package/src/btn/validators.ts +237 -0
  131. package/src/btn.ts +8 -0
  132. package/src/core/async-send.ts +28 -0
  133. package/src/core/base-builder.ts +104 -0
  134. package/src/core/errors.ts +82 -0
  135. package/src/download.ts +212 -0
  136. package/src/index.ts +229 -0
  137. package/src/integration/augment.ts +262 -0
  138. package/src/integration/auto.ts +103 -0
  139. package/src/integration/index.ts +8 -0
  140. package/src/integration/methods.ts +45 -0
  141. package/src/interactive.ts +188 -0
  142. package/src/media-gate.ts +499 -0
  143. package/src/message/album.ts +187 -0
  144. package/src/message/contact.ts +170 -0
  145. package/src/message/forward.ts +123 -0
  146. package/src/message/index.ts +83 -0
  147. package/src/message/link-preview.ts +148 -0
  148. package/src/message/location.ts +150 -0
  149. package/src/message/media.ts +323 -0
  150. package/src/message/poll.ts +158 -0
  151. package/src/message/reaction.ts +133 -0
  152. package/src/message/sticker.ts +100 -0
  153. package/src/message/target.ts +38 -0
  154. package/src/message/text.ts +61 -0
  155. package/src/message/vcard.ts +36 -0
  156. package/src/message/webp.ts +78 -0
  157. package/src/payloads.ts +204 -0
  158. package/src/serialize.ts +180 -0
  159. package/src/status.ts +29 -0
  160. package/src/zapo-client.ts +84 -0
  161. package/test/airich-inline.test.ts +200 -0
  162. package/test/airich-primitives.test.ts +226 -0
  163. package/test/airich-tokenizer.test.ts +145 -0
  164. package/test/airich.golden.test.ts +406 -0
  165. package/test/airich.test.ts +1006 -0
  166. package/test/btn-button.test.ts +416 -0
  167. package/test/btn-header.test.ts +646 -0
  168. package/test/btn-legacy.test.ts +342 -0
  169. package/test/btn-lifecycle.test.ts +295 -0
  170. package/test/btn-list.test.ts +261 -0
  171. package/test/btn-media-source.test.ts +150 -0
  172. package/test/btn-thumbnail.test.ts +160 -0
  173. package/test/builder-compat.test.ts +264 -0
  174. package/test/helpers.ts +27 -0
  175. package/test/hybrid-airich.test.ts +345 -0
  176. package/test/hybrid-client.test.ts +239 -0
  177. package/test/hybrid-errors.test.ts +557 -0
  178. package/test/hybrid-interactive.test.ts +455 -0
  179. package/test/hybrid.golden.test.ts +349 -0
  180. package/test/hybrid.test.ts +479 -0
  181. package/test/integration-auto.test.ts +159 -0
  182. package/test/integration.fakeserver.test.ts +440 -0
  183. package/test/media-gate.test.ts +215 -0
  184. package/test/message-album.test.ts +145 -0
  185. package/test/message-builders.test.ts +401 -0
  186. package/test/message-media.test.ts +303 -0
  187. package/test/message.fakeserver.test.ts +284 -0
  188. package/test/message.golden.test.ts +254 -0
  189. package/test/serializer.test.ts +448 -0
  190. package/tsconfig.json +26 -0
  191. package/tsconfig.test.json +10 -0
@@ -0,0 +1,15 @@
1
+ import type { WaMessagePublishResult } from "zapo-js";
2
+ import type { ZapoClient, ZapoSendOptions } from "../zapo-client.js";
3
+ import type { EditBuildResult, PlaceholderBuildResult, WrapBotForwardedResult } from "../payloads.js";
4
+ export declare const isZapoClient: (value: unknown) => value is ZapoClient;
5
+ export declare const sendAttributes: (options?: Record<string, unknown>) => ZapoSendOptions;
6
+ export declare const sendViaZapo: (client: ZapoClient, jid: string, content: WrapBotForwardedResult | PlaceholderBuildResult | EditBuildResult, options?: Record<string, unknown>) => Promise<WaMessagePublishResult>;
7
+ export interface SendPlaceholderThenEditInput {
8
+ client: ZapoClient;
9
+ jid: string;
10
+ placeholder: PlaceholderBuildResult;
11
+ buildEdit: (messageId: string) => WrapBotForwardedResult | EditBuildResult;
12
+ options?: Record<string, unknown> | undefined;
13
+ onPlaceholderSent?: (jid: string, messageId: string) => void;
14
+ }
15
+ export declare const sendPlaceholderThenEdit: ({ client, jid, placeholder, buildEdit, options, onPlaceholderSent, }: SendPlaceholderThenEditInput) => Promise<WaMessagePublishResult>;
@@ -0,0 +1,56 @@
1
+ import { MessageError, ProtocolSendError, ValidationError, } from "../core/errors.js";
2
+ export const isZapoClient = (value) => typeof value?.message?.send === "function";
3
+ export const sendAttributes = (options = {}) => {
4
+ const { additionalAttributes, ...rest } = options ?? {};
5
+ return {
6
+ ...rest,
7
+ additionalAttributes: {
8
+ type: "text",
9
+ ...additionalAttributes,
10
+ },
11
+ };
12
+ };
13
+ export const sendViaZapo = async (client, jid, content, options = {}) => {
14
+ if (!isZapoClient(client)) {
15
+ throw new MessageError("client harus WaClient zapo-js (punya client.message.send)", "NO_CLIENT");
16
+ }
17
+ if (typeof jid !== "string" || !jid.trim()) {
18
+ throw new ValidationError("jid tujuan harus string non-empty");
19
+ }
20
+ return client.message.send(jid, content, sendAttributes(options));
21
+ };
22
+ export const sendPlaceholderThenEdit = async ({ client, jid, placeholder, buildEdit, options = {}, onPlaceholderSent, }) => {
23
+ if (!isZapoClient(client)) {
24
+ throw new MessageError("client harus WaClient zapo-js (punya client.message.send)", "NO_CLIENT");
25
+ }
26
+ if (typeof jid !== "string" || !jid.trim()) {
27
+ throw new ValidationError("jid tujuan harus string non-empty");
28
+ }
29
+ let sent;
30
+ try {
31
+ sent = await sendViaZapo(client, jid, placeholder, options);
32
+ }
33
+ catch (error) {
34
+ if (error instanceof ProtocolSendError)
35
+ throw error;
36
+ throw new ProtocolSendError("placeholder", { jid, cause: error });
37
+ }
38
+ const messageId = sent?.id;
39
+ if (typeof messageId !== "string" || !messageId.trim()) {
40
+ throw new ProtocolSendError("validate_id", { jid, result: sent });
41
+ }
42
+ onPlaceholderSent?.(jid, messageId);
43
+ try {
44
+ await sendViaZapo(client, jid, buildEdit(messageId), options);
45
+ }
46
+ catch (error) {
47
+ if (error instanceof ProtocolSendError)
48
+ throw error;
49
+ throw new ProtocolSendError("edit", {
50
+ jid,
51
+ placeholderId: messageId,
52
+ cause: error,
53
+ });
54
+ }
55
+ return sent;
56
+ };
@@ -0,0 +1,5 @@
1
+ export type ReplyBrandingProvider = (text: string, options: Record<string, unknown>) => Record<string, unknown>;
2
+ export declare const setReplyBranding: (branding: ReplyBrandingProvider | null) => void;
3
+ export declare const getReplyBranding: () => ReplyBrandingProvider | null;
4
+ export declare const resetReplyBranding: () => void;
5
+ export declare const applyReplyBranding: (text: string, options: Record<string, unknown>) => Record<string, unknown>;
@@ -0,0 +1,9 @@
1
+ let provider = null;
2
+ export const setReplyBranding = (branding) => {
3
+ provider = branding;
4
+ };
5
+ export const getReplyBranding = () => provider;
6
+ export const resetReplyBranding = () => {
7
+ provider = null;
8
+ };
9
+ export const applyReplyBranding = (text, options) => provider?.(text, options) ?? options;
@@ -0,0 +1,246 @@
1
+ import type { Proto } from "zapo-js";
2
+ import { BaseBuilder, type SendResolutionArg } from "../core/base-builder.js";
3
+ import { type MessageSendOptions } from "../core/async-send.js";
4
+ import type { MessageSendResult } from "../zapo-client.js";
5
+ import type { ZapoClient } from "../zapo-client.js";
6
+ import type { ButtonBuildResult, InteractiveCardPayload, InteractiveHeaderPayload, LegacyButtonBuildResult, ListBuildResult, LocationMessagePayload, MediaSlotResolution } from "../payloads.js";
7
+ import { type MediaSlot, type MediaSlotOptions } from "./media-slot.js";
8
+ import type { MediaSource } from "./media-source.js";
9
+ import { type NativeSection, type NativeSectionRow } from "./validators.js";
10
+ type HeaderMediaSlot = MediaSlot & {
11
+ kind: "image" | "video" | "document";
12
+ };
13
+ export interface ImageHeaderOptions {
14
+ mimetype?: string;
15
+ width?: number;
16
+ height?: number;
17
+ caption?: string;
18
+ thumbnail?: Buffer | Uint8Array | false;
19
+ }
20
+ export interface VideoHeaderOptions {
21
+ mimetype?: string;
22
+ seconds?: number;
23
+ width?: number;
24
+ height?: number;
25
+ thumbnail?: Buffer | Uint8Array | false;
26
+ }
27
+ export interface DocumentHeaderOptions {
28
+ mimetype?: string;
29
+ fileName?: string;
30
+ title?: string;
31
+ thumbnail?: Buffer | Uint8Array | false;
32
+ }
33
+ export interface LocationHeaderOptions {
34
+ latitude?: number;
35
+ longitude?: number;
36
+ name?: string;
37
+ address?: string;
38
+ thumbnail?: Buffer | Uint8Array;
39
+ }
40
+ interface StoredLocation {
41
+ latitude: number;
42
+ longitude: number;
43
+ name?: string;
44
+ address?: string;
45
+ }
46
+ declare class BaseMessage extends BaseBuilder {
47
+ _body: string;
48
+ _footer: string | undefined;
49
+ constructor(client?: ZapoClient);
50
+ body(text: string): this;
51
+ footer(text: string | undefined): this;
52
+ }
53
+ declare class HeaderMessage extends BaseMessage {
54
+ #private;
55
+ _title: string | undefined;
56
+ _subtitle: string | undefined;
57
+ _location: StoredLocation | null;
58
+ _thumb: Uint8Array | null;
59
+ _headerThumbnail: Uint8Array | null;
60
+ _mediaSlot: HeaderMediaSlot | null;
61
+ constructor(client?: ZapoClient);
62
+ location({ latitude, longitude, name, address, thumbnail, }?: LocationHeaderOptions): this;
63
+ thumb(buffer?: Buffer | Uint8Array | null): this;
64
+ headerThumbnail(bytes: Buffer | Uint8Array): this;
65
+ image(source: MediaSource, options?: ImageHeaderOptions): this;
66
+ video(source: MediaSource, options?: VideoHeaderOptions): this;
67
+ document(source: MediaSource, options?: DocumentHeaderOptions): this;
68
+ protected _resolveLocation(): Promise<LocationMessagePayload | null>;
69
+ protected _resolveSlotMedia(): Promise<MediaSlotResolution | null>;
70
+ protected _resolveInteractiveHeader(): Promise<InteractiveHeaderPayload | null>;
71
+ }
72
+ export declare class Button extends HeaderMessage {
73
+ #private;
74
+ _buttons: {
75
+ name: string;
76
+ buttonParamsJson: string;
77
+ }[];
78
+ _params: Record<string, unknown>;
79
+ _offer: {
80
+ text?: string;
81
+ url?: string;
82
+ copy_code?: string;
83
+ expiresIn: number;
84
+ } | null;
85
+ _offerExpiration: number | null;
86
+ _ids: Set<string>;
87
+ constructor(client?: ZapoClient);
88
+ title(text: string | undefined): this;
89
+ subtitle(text: string | undefined): this;
90
+ quick_reply(display_text: string, id: string): this;
91
+ cta_url(display_text: string, url: string): this;
92
+ cta_copy(display_text: string, copy_code: string): this;
93
+ cta_call(display_text: string, phone_number: string): this;
94
+ send_location(display_text?: string): this;
95
+ single_select(title: string, sections: NativeSection[]): this;
96
+ bottom_sheet({ limit, listTitle, buttonTitle, }?: {
97
+ limit?: number;
98
+ listTitle?: string;
99
+ buttonTitle?: string;
100
+ }): this;
101
+ limited_time_offer({ text, url, copyCode, expiresIn, }?: {
102
+ text?: string;
103
+ url?: string;
104
+ copyCode?: string;
105
+ expiresIn?: number;
106
+ }): this;
107
+ toCard(): Promise<InteractiveCardPayload>;
108
+ build(): Promise<ButtonBuildResult>;
109
+ }
110
+ export declare class LegacyButton extends HeaderMessage {
111
+ _buttons: Proto.Message.ButtonsMessage.Button.$Properties[];
112
+ _ids: Set<string>;
113
+ constructor(client?: ZapoClient);
114
+ title(text: string | undefined): this;
115
+ headerThumbnail(_bytes?: Buffer | Uint8Array): this;
116
+ button(id: string, text: string): this;
117
+ build(): Promise<LegacyButtonBuildResult>;
118
+ }
119
+ export interface ListRowInput {
120
+ id: string;
121
+ title: string;
122
+ description?: string;
123
+ }
124
+ export type ListFallbackMode = "auto" | "native" | "never";
125
+ export declare class ListMessage extends BaseMessage {
126
+ _title: string;
127
+ _buttonText: string;
128
+ _sections: Proto.Message.ListMessage.Section.$Properties[];
129
+ _fallback: ListFallbackMode;
130
+ _inGroupOverride: boolean | null;
131
+ _rowIds: Set<string>;
132
+ constructor(client?: ZapoClient);
133
+ title(text: string | undefined): this;
134
+ buttonText(text: string): this;
135
+ section(title: string | undefined, rows: ListRowInput[]): this;
136
+ fallback(mode: ListFallbackMode): this;
137
+ inGroup(flag: boolean): this;
138
+ toNativeFlow(): ButtonBuildResult;
139
+ build(): ListBuildResult;
140
+ send(jid?: string, arg?: SendResolutionArg): Promise<unknown>;
141
+ }
142
+ export declare function button(client?: ZapoClient): Button;
143
+ export declare function button(client: ZapoClient | undefined, jid: string, config: ButtonConfig, options?: MessageSendOptions): Promise<MessageSendResult>;
144
+ export declare function legacyButton(client?: ZapoClient): LegacyButton;
145
+ export declare function legacyButton(client: ZapoClient | undefined, jid: string, config: LegacyButtonConfig, options?: MessageSendOptions): Promise<MessageSendResult>;
146
+ export declare function listMessage(client?: ZapoClient): ListMessage;
147
+ export declare function listMessage(client: ZapoClient | undefined, jid: string, config: ListMessageConfig, options?: MessageSendOptions): Promise<MessageSendResult>;
148
+ export type InteractiveHeaderConfig = ({
149
+ type: "image";
150
+ source: MediaSource;
151
+ } & ImageHeaderOptions) | ({
152
+ type: "video";
153
+ source: MediaSource;
154
+ } & VideoHeaderOptions) | ({
155
+ type: "document";
156
+ source: MediaSource;
157
+ } & DocumentHeaderOptions) | {
158
+ type: "location";
159
+ latitude: number;
160
+ longitude: number;
161
+ name?: string;
162
+ address?: string;
163
+ thumbnail?: Buffer | Uint8Array;
164
+ } | {
165
+ type: "thumbnail";
166
+ jpegThumbnail: Buffer | Uint8Array;
167
+ };
168
+ export type LegacyButtonHeaderConfig = Extract<InteractiveHeaderConfig, {
169
+ type: "image" | "video" | "document" | "location";
170
+ }>;
171
+ export type ButtonItemConfig = {
172
+ type: "quick_reply";
173
+ text: string;
174
+ id: string;
175
+ } | {
176
+ type: "cta_url";
177
+ text: string;
178
+ url: string;
179
+ } | {
180
+ type: "cta_copy";
181
+ text: string;
182
+ copyCode: string;
183
+ } | {
184
+ type: "cta_call";
185
+ text: string;
186
+ phoneNumber: string;
187
+ } | {
188
+ type: "send_location";
189
+ text?: string;
190
+ } | {
191
+ type: "single_select";
192
+ title: string;
193
+ sections: readonly NativeSection[];
194
+ };
195
+ export interface BottomSheetConfig {
196
+ limit?: number;
197
+ listTitle?: string;
198
+ buttonTitle?: string;
199
+ }
200
+ export interface LimitedTimeOfferConfig {
201
+ text?: string;
202
+ url?: string;
203
+ copyCode?: string;
204
+ expiresIn?: number;
205
+ }
206
+ export interface ButtonConfig {
207
+ title?: string;
208
+ subtitle?: string;
209
+ body: string;
210
+ footer?: string;
211
+ header?: InteractiveHeaderConfig;
212
+ buttons?: readonly ButtonItemConfig[];
213
+ bottomSheet?: BottomSheetConfig;
214
+ limitedTimeOffer?: LimitedTimeOfferConfig;
215
+ }
216
+ export interface LegacyButtonConfig {
217
+ title?: string;
218
+ body: string;
219
+ footer?: string;
220
+ header?: LegacyButtonHeaderConfig;
221
+ buttons: readonly {
222
+ id: string;
223
+ text: string;
224
+ }[];
225
+ }
226
+ export interface ListSectionConfig {
227
+ title?: string;
228
+ rows: readonly ListRowInput[];
229
+ }
230
+ export interface ListMessageConfig {
231
+ title?: string;
232
+ body: string;
233
+ footer?: string;
234
+ buttonText: string;
235
+ sections: readonly ListSectionConfig[];
236
+ fallback?: ListFallbackMode;
237
+ inGroup?: boolean;
238
+ }
239
+ export declare const applyButtonConfig: (builder: Button, config: ButtonConfig) => void;
240
+ export declare const sendButton: (client: ZapoClient | undefined, jid: string | undefined, config: ButtonConfig, options?: MessageSendOptions) => Promise<MessageSendResult>;
241
+ export declare const applyLegacyButtonConfig: (builder: LegacyButton, config: LegacyButtonConfig) => void;
242
+ export declare const sendLegacyButton: (client: ZapoClient | undefined, jid: string | undefined, config: LegacyButtonConfig, options?: MessageSendOptions) => Promise<MessageSendResult>;
243
+ export declare const applyListMessageConfig: (builder: ListMessage, config: ListMessageConfig) => void;
244
+ export declare const sendListMessage: (client: ZapoClient | undefined, jid: string | undefined, config: ListMessageConfig, options?: MessageSendOptions) => Promise<MessageSendResult>;
245
+ export type { NativeSection, NativeSectionRow };
246
+ export type { MediaSlot, MediaSlotOptions };