sauruspro-bail 5.0.0 → 5.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 (39) hide show
  1. package/README.md +8 -9
  2. package/docs/CHANGELOG.md +25 -4
  3. package/docs/SPR.md +2 -2
  4. package/lib/Defaults/index.js +5 -1
  5. package/lib/Socket/dinonic-handler.d.ts +27 -0
  6. package/lib/Socket/dinonic-handler.js +882 -0
  7. package/lib/Socket/index.js +5 -1
  8. package/lib/Socket/messages-recv.js +26 -0
  9. package/lib/Socket/messages-send.js +25 -0
  10. package/lib/Utils/MessageBuilder.d.ts +215 -0
  11. package/lib/Utils/MessageBuilder.js +3991 -0
  12. package/lib/Utils/a2ui.d.ts +202 -0
  13. package/lib/Utils/a2ui.js +732 -0
  14. package/lib/Utils/airich-registry.js +3 -0
  15. package/lib/Utils/baileys-event-stream.js +58 -0
  16. package/lib/Utils/bot-signature.d.ts +22 -0
  17. package/lib/Utils/bot-signature.js +124 -0
  18. package/lib/Utils/{dinolith-spr.js → dinonic-spr.js} +1 -1
  19. package/lib/Utils/extras.d.ts +449 -0
  20. package/lib/Utils/extras.js +1377 -0
  21. package/lib/Utils/html-app.d.ts +39 -0
  22. package/lib/Utils/html-app.js +291 -0
  23. package/lib/Utils/index.js +14 -2
  24. package/lib/Utils/metaai.d.ts +438 -0
  25. package/lib/Utils/metaai.js +911 -0
  26. package/lib/Utils/modern-messages.d.ts +150 -0
  27. package/lib/Utils/modern-messages.js +496 -0
  28. package/lib/Utils/native-flow.d.ts +14 -0
  29. package/lib/Utils/native-flow.js +118 -0
  30. package/lib/Utils/newsletter-status.js +9 -53
  31. package/lib/Utils/payment-messages.d.ts +59 -0
  32. package/lib/Utils/payment-messages.js +156 -0
  33. package/lib/Utils/scheduled-message.d.ts +82 -0
  34. package/lib/Utils/scheduled-message.js +113 -0
  35. package/lib/Utils/status-stickers.d.ts +78 -0
  36. package/lib/Utils/status-stickers.js +261 -0
  37. package/lib/index.js +2 -2
  38. package/package.json +4 -4
  39. /package/lib/Utils/{dinolith-spr.d.ts → dinonic-spr.d.ts} +0 -0
@@ -0,0 +1,202 @@
1
+ export declare const A2UI_VERSION: string;
2
+ export declare const A2UI_BASIC_CATALOG: string;
3
+ export declare const A2UI_ROOT_ID: string;
4
+ export declare const BLOKS_A2UI_TYPE: string;
5
+ export declare const BLOKS_A2UI_REPLY_ACTION: string;
6
+ export declare const BLOKS_A2UI_SUPPORTED_ELEMENTS: readonly string[];
7
+
8
+ export interface BloksSectionOptions {
9
+ uuid?: string;
10
+ initialResponse?: string;
11
+ versioningId?: string;
12
+ }
13
+
14
+ export interface BloksWidgetOptions {
15
+ type?: string;
16
+ data?: any;
17
+ uuid?: string;
18
+ fallback?: string;
19
+ }
20
+
21
+ export interface A2UITextOptions {
22
+ variant?: string;
23
+ }
24
+
25
+ export interface A2UIImageOptions {
26
+ variant?: string;
27
+ fit?: string;
28
+ }
29
+
30
+ export interface A2UISurfaceOptions {
31
+ surfaceId?: string;
32
+ catalogId?: string;
33
+ sendDataModel?: boolean;
34
+ version?: string;
35
+ }
36
+
37
+ export interface A2UIWidgetOptions extends A2UISurfaceOptions {
38
+ uuid?: string;
39
+ fallback?: string;
40
+ }
41
+
42
+ export interface SendA2UIOptions extends A2UIWidgetOptions {
43
+ buttons?: any[];
44
+ contextInfo?: any;
45
+ messageId?: string;
46
+ additionalNodes?: any[];
47
+ [key: string]: any;
48
+ }
49
+
50
+ export interface SendBloksWidgetOptions extends BloksWidgetOptions {
51
+ body?: string;
52
+ contextInfo?: any;
53
+ messageId?: string;
54
+ additionalNodes?: any[];
55
+ [key: string]: any;
56
+ }
57
+
58
+ export interface A2UIAction {
59
+ action: string;
60
+ data?: Record<string, any>;
61
+ }
62
+
63
+ export interface A2UIActionOptions {
64
+ action?: string | A2UIAction;
65
+ data?: Record<string, any>;
66
+ }
67
+
68
+ export interface A2UIHeadingOptions {
69
+ level?: number;
70
+ variant?: string;
71
+ }
72
+
73
+ export interface A2UIButtonOptions {
74
+ style?: string;
75
+ enabled?: boolean;
76
+ icon?: string;
77
+ action?: string | A2UIAction;
78
+ }
79
+
80
+ export interface A2UIDividerOptions {
81
+ axis?: 'horizontal' | 'vertical';
82
+ }
83
+
84
+ export interface A2UISpacerOptions {
85
+ size?: number;
86
+ }
87
+
88
+ export interface A2UIIconOptions {
89
+ size?: number;
90
+ color?: string;
91
+ }
92
+
93
+ export interface A2UICheckBoxOptions {
94
+ checked?: boolean;
95
+ value?: string;
96
+ action?: string | A2UIAction;
97
+ }
98
+
99
+ export interface A2UITextFieldOptions {
100
+ label?: string;
101
+ placeholder?: string;
102
+ value?: string;
103
+ multiline?: boolean;
104
+ type?: string;
105
+ }
106
+
107
+ export interface A2UIChipOptions {
108
+ selected?: boolean;
109
+ value?: string;
110
+ action?: string | A2UIAction;
111
+ }
112
+
113
+ export interface A2UIListOptions {
114
+ axis?: 'horizontal' | 'vertical';
115
+ scrollable?: boolean;
116
+ }
117
+
118
+ export interface A2UIChoiceOption {
119
+ id: string;
120
+ label?: string;
121
+ value?: string;
122
+ }
123
+
124
+ export interface A2UIMultipleChoiceOptions {
125
+ selected?: string | string[];
126
+ multiple?: boolean;
127
+ action?: string | A2UIAction;
128
+ }
129
+
130
+ export interface A2UITab {
131
+ id: string;
132
+ label?: string;
133
+ child: string;
134
+ }
135
+
136
+ export interface A2UITabsOptions {
137
+ selected?: string;
138
+ }
139
+
140
+ export interface A2UIModalOptions {
141
+ title?: string;
142
+ dismissible?: boolean;
143
+ }
144
+
145
+ export declare const bloksSection: (type: string, data: any, options?: BloksSectionOptions) => any;
146
+ export declare const bloksWidget: (options?: BloksWidgetOptions) => any;
147
+ export declare const a2uiAction: (action: string, data?: Record<string, any>) => A2UIAction;
148
+ export declare const a2uiText: (id: string, text: string, options?: A2UITextOptions) => any;
149
+ export declare const a2uiImage: (id: string, url: string, options?: A2UIImageOptions) => any;
150
+ export declare const a2uiHeading: (id: string, text: string, options?: A2UIHeadingOptions) => any;
151
+ export declare const a2uiButton: (id: string, label: string, options?: A2UIButtonOptions) => any;
152
+ export declare const a2uiDivider: (id: string, options?: A2UIDividerOptions) => any;
153
+ export declare const a2uiSpacer: (id: string, options?: A2UISpacerOptions) => any;
154
+ export declare const a2uiIcon: (id: string, name: string, options?: A2UIIconOptions) => any;
155
+ export declare const a2uiCheckBox: (id: string, label?: string, options?: A2UICheckBoxOptions) => any;
156
+ export declare const a2uiTextField: (id: string, options?: A2UITextFieldOptions) => any;
157
+ export declare const a2uiChip: (id: string, label: string, options?: A2UIChipOptions) => any;
158
+ export declare const a2uiList: (id: string, children?: string[], options?: A2UIListOptions) => any;
159
+ export declare const a2uiMultipleChoice: (id: string, options: A2UIChoiceOption[], settings?: A2UIMultipleChoiceOptions) => any;
160
+ export declare const a2uiTabs: (id: string, tabs: A2UITab[], options?: A2UITabsOptions) => any;
161
+ export declare const a2uiModal: (id: string, child: string, options?: A2UIModalOptions) => any;
162
+ export declare const a2uiColumn: (id: string, children?: string[]) => any;
163
+ export declare const a2uiRow: (id: string, children?: string[]) => any;
164
+ export declare const a2uiCard: (id: string, child: string) => any;
165
+ export declare const a2uiSurface: (components: any[], options?: A2UISurfaceOptions) => any;
166
+ export declare const a2uiWidget: (components: any[], options?: A2UIWidgetOptions) => any;
167
+ export declare const sendA2UI: (sock: any, jid: string, components: any[], options?: SendA2UIOptions) => Promise<any>;
168
+ export declare const sendBloksWidget: (sock: any, jid: string, options?: SendBloksWidgetOptions) => Promise<any>;
169
+ export declare function sendA2UIWidget(sock: any, jid: string, options?: any): Promise<any>;
170
+
171
+ export declare class A2UI {
172
+ constructor();
173
+ surfaceId(id: string): this;
174
+ catalogId(id: string): this;
175
+ version(v: string): this;
176
+ text(id: string, text: string, options?: A2UITextOptions): this;
177
+ image(id: string, url: string, options?: A2UIImageOptions): this;
178
+ column(id: string, children?: string[]): this;
179
+ row(id: string, children?: string[]): this;
180
+ card(id: string, child: string): this;
181
+ heading(id: string, text: string, options?: A2UIHeadingOptions): this;
182
+ button(id: string, label: string, options?: A2UIButtonOptions): this;
183
+ divider(id: string, options?: A2UIDividerOptions): this;
184
+ spacer(id: string, options?: A2UISpacerOptions): this;
185
+ icon(id: string, name: string, options?: A2UIIconOptions): this;
186
+ headerImage(source: any): this;
187
+ headerTitle(title: string): this;
188
+ headerSubtitle(subtitle: string): this;
189
+ build(options?: { type?: string; wrapped?: boolean }): any;
190
+ send(sock: any, jid: string, options?: any): Promise<any>;
191
+
192
+ static text: typeof a2uiText;
193
+ static image: typeof a2uiImage;
194
+ static column: typeof a2uiColumn;
195
+ static row: typeof a2uiRow;
196
+ static card: typeof a2uiCard;
197
+ static surface: typeof a2uiSurface;
198
+ static widget: typeof a2uiWidget;
199
+ static send: typeof sendA2UI;
200
+ static sendWidget: typeof sendA2UIWidget;
201
+ static sendBloksWidget: typeof sendBloksWidget;
202
+ }