@marktoflow/integrations 2.0.1 → 2.0.3

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 (57) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/claude-agent-hooks.d.ts +176 -0
  3. package/dist/adapters/claude-agent-types.d.ts +45 -43
  4. package/dist/adapters/claude-agent-types.d.ts.map +1 -1
  5. package/dist/adapters/claude-agent-types.js.map +1 -1
  6. package/dist/adapters/claude-agent-workflow.d.ts +16 -16
  7. package/dist/adapters/claude-agent.d.ts +2 -2
  8. package/dist/adapters/claude-agent.d.ts.map +1 -1
  9. package/dist/adapters/claude-agent.js +8 -2
  10. package/dist/adapters/claude-agent.js.map +1 -1
  11. package/dist/adapters/codex-types.d.ts +20 -20
  12. package/dist/adapters/codex-workflow.d.ts +12 -12
  13. package/dist/adapters/github-copilot-types.d.ts +44 -44
  14. package/dist/adapters/github-copilot-workflow.d.ts +32 -32
  15. package/dist/adapters/ollama-types.d.ts +126 -126
  16. package/dist/adapters/openai-types.d.ts +194 -0
  17. package/dist/adapters/openai-types.d.ts.map +1 -0
  18. package/dist/adapters/openai-types.js +38 -0
  19. package/dist/adapters/openai-types.js.map +1 -0
  20. package/dist/adapters/openai.d.ts +74 -0
  21. package/dist/adapters/openai.d.ts.map +1 -0
  22. package/dist/adapters/openai.js +208 -0
  23. package/dist/adapters/openai.js.map +1 -0
  24. package/dist/adapters/opencode.d.ts +25 -0
  25. package/dist/adapters/opencode.d.ts.map +1 -1
  26. package/dist/adapters/opencode.js +205 -15
  27. package/dist/adapters/opencode.js.map +1 -1
  28. package/dist/index.d.ts +2 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +6 -3
  31. package/dist/index.js.map +1 -1
  32. package/dist/services/ai-browser.d.ts +3 -3
  33. package/dist/services/ai-browser.d.ts.map +1 -1
  34. package/dist/services/ai-browser.js +1 -1
  35. package/dist/services/ai-browser.js.map +1 -1
  36. package/dist/services/github.d.ts +3 -0
  37. package/dist/services/gmail-trigger.d.ts +92 -0
  38. package/dist/services/gmail.d.ts +116 -0
  39. package/dist/services/google-calendar.d.ts +220 -0
  40. package/dist/services/google-docs.d.ts +197 -0
  41. package/dist/services/google-drive.d.ts +149 -0
  42. package/dist/services/google-sheets.d.ts +165 -0
  43. package/dist/services/http.d.ts +120 -0
  44. package/dist/services/jira.d.ts +3 -0
  45. package/dist/services/linear.d.ts +163 -0
  46. package/dist/services/mysql.d.ts +91 -0
  47. package/dist/services/outlook-trigger.d.ts +121 -0
  48. package/dist/services/outlook.d.ts +237 -0
  49. package/dist/services/playwright.d.ts +3 -3
  50. package/dist/services/playwright.d.ts.map +1 -1
  51. package/dist/services/playwright.js +1 -1
  52. package/dist/services/playwright.js.map +1 -1
  53. package/dist/services/postgres.d.ts +83 -0
  54. package/dist/services/slack-socket.d.ts +18 -0
  55. package/dist/services/slack.d.ts +3 -0
  56. package/dist/services/whatsapp.d.ts +311 -0
  57. package/package.json +4 -3
@@ -0,0 +1,311 @@
1
+ /**
2
+ * WhatsApp Integration
3
+ *
4
+ * Messaging platform via WhatsApp Business API.
5
+ * API Docs: https://developers.facebook.com/docs/whatsapp/cloud-api
6
+ */
7
+ import { SDKInitializer } from '@marktoflow/core';
8
+ export interface WhatsAppMessage {
9
+ messagingProduct: 'whatsapp';
10
+ to: string;
11
+ type: 'text' | 'template' | 'image' | 'video' | 'document' | 'audio' | 'location' | 'contacts' | 'interactive';
12
+ text?: {
13
+ body: string;
14
+ previewUrl?: boolean;
15
+ };
16
+ template?: WhatsAppTemplate;
17
+ image?: {
18
+ link?: string;
19
+ id?: string;
20
+ caption?: string;
21
+ };
22
+ video?: {
23
+ link?: string;
24
+ id?: string;
25
+ caption?: string;
26
+ };
27
+ document?: {
28
+ link?: string;
29
+ id?: string;
30
+ caption?: string;
31
+ filename?: string;
32
+ };
33
+ audio?: {
34
+ link?: string;
35
+ id?: string;
36
+ };
37
+ location?: {
38
+ longitude: number;
39
+ latitude: number;
40
+ name?: string;
41
+ address?: string;
42
+ };
43
+ interactive?: WhatsAppInteractive;
44
+ }
45
+ export interface WhatsAppTemplate {
46
+ name: string;
47
+ language: {
48
+ code: string;
49
+ };
50
+ components?: WhatsAppTemplateComponent[];
51
+ }
52
+ export interface WhatsAppTemplateComponent {
53
+ type: 'header' | 'body' | 'button';
54
+ parameters: WhatsAppTemplateParameter[];
55
+ }
56
+ export interface WhatsAppTemplateParameter {
57
+ type: 'text' | 'currency' | 'date_time' | 'image' | 'document' | 'video';
58
+ text?: string;
59
+ currency?: {
60
+ fallbackValue: string;
61
+ code: string;
62
+ amount1000: number;
63
+ };
64
+ dateTime?: {
65
+ fallbackValue: string;
66
+ };
67
+ image?: {
68
+ link: string;
69
+ };
70
+ document?: {
71
+ link: string;
72
+ filename?: string;
73
+ };
74
+ video?: {
75
+ link: string;
76
+ };
77
+ }
78
+ export interface WhatsAppInteractive {
79
+ type: 'button' | 'list' | 'product' | 'product_list';
80
+ header?: {
81
+ type: 'text' | 'image' | 'video' | 'document';
82
+ text?: string;
83
+ image?: {
84
+ link: string;
85
+ };
86
+ video?: {
87
+ link: string;
88
+ };
89
+ document?: {
90
+ link: string;
91
+ };
92
+ };
93
+ body: {
94
+ text: string;
95
+ };
96
+ footer?: {
97
+ text: string;
98
+ };
99
+ action: WhatsAppAction;
100
+ }
101
+ export interface WhatsAppAction {
102
+ buttons?: WhatsAppButton[];
103
+ button?: string;
104
+ sections?: WhatsAppSection[];
105
+ }
106
+ export interface WhatsAppButton {
107
+ type: 'reply';
108
+ reply: {
109
+ id: string;
110
+ title: string;
111
+ };
112
+ }
113
+ export interface WhatsAppSection {
114
+ title?: string;
115
+ rows: WhatsAppRow[];
116
+ }
117
+ export interface WhatsAppRow {
118
+ id: string;
119
+ title: string;
120
+ description?: string;
121
+ }
122
+ export interface SendTextOptions {
123
+ to: string;
124
+ text: string;
125
+ previewUrl?: boolean;
126
+ }
127
+ export interface SendTemplateOptions {
128
+ to: string;
129
+ templateName: string;
130
+ languageCode: string;
131
+ components?: WhatsAppTemplateComponent[];
132
+ }
133
+ export interface SendMediaOptions {
134
+ to: string;
135
+ mediaUrl?: string;
136
+ mediaId?: string;
137
+ caption?: string;
138
+ filename?: string;
139
+ }
140
+ export interface SendLocationOptions {
141
+ to: string;
142
+ longitude: number;
143
+ latitude: number;
144
+ name?: string;
145
+ address?: string;
146
+ }
147
+ export interface SendInteractiveOptions {
148
+ to: string;
149
+ type: 'button' | 'list';
150
+ bodyText: string;
151
+ headerText?: string;
152
+ footerText?: string;
153
+ buttons?: {
154
+ id: string;
155
+ title: string;
156
+ }[];
157
+ listButton?: string;
158
+ sections?: WhatsAppSection[];
159
+ }
160
+ export interface WhatsAppWebhookMessage {
161
+ from: string;
162
+ id: string;
163
+ timestamp: string;
164
+ type: string;
165
+ text?: {
166
+ body: string;
167
+ };
168
+ image?: {
169
+ id: string;
170
+ mimeType: string;
171
+ sha256: string;
172
+ };
173
+ video?: {
174
+ id: string;
175
+ mimeType: string;
176
+ sha256: string;
177
+ };
178
+ document?: {
179
+ id: string;
180
+ mimeType: string;
181
+ sha256: string;
182
+ filename: string;
183
+ };
184
+ audio?: {
185
+ id: string;
186
+ mimeType: string;
187
+ sha256: string;
188
+ };
189
+ location?: {
190
+ longitude: number;
191
+ latitude: number;
192
+ name?: string;
193
+ address?: string;
194
+ };
195
+ }
196
+ /**
197
+ * WhatsApp Business API client for workflow integration
198
+ */
199
+ export declare class WhatsAppClient {
200
+ private accessToken;
201
+ private apiUrl;
202
+ constructor(phoneNumberId: string, accessToken: string);
203
+ private request;
204
+ /**
205
+ * Send a text message
206
+ */
207
+ sendText(options: SendTextOptions): Promise<{
208
+ messagingProduct: string;
209
+ contacts: unknown[];
210
+ messages: {
211
+ id: string;
212
+ }[];
213
+ }>;
214
+ /**
215
+ * Send a template message
216
+ */
217
+ sendTemplate(options: SendTemplateOptions): Promise<{
218
+ messagingProduct: string;
219
+ contacts: unknown[];
220
+ messages: {
221
+ id: string;
222
+ }[];
223
+ }>;
224
+ /**
225
+ * Send an image
226
+ */
227
+ sendImage(options: SendMediaOptions): Promise<{
228
+ messagingProduct: string;
229
+ contacts: unknown[];
230
+ messages: {
231
+ id: string;
232
+ }[];
233
+ }>;
234
+ /**
235
+ * Send a video
236
+ */
237
+ sendVideo(options: SendMediaOptions): Promise<{
238
+ messagingProduct: string;
239
+ contacts: unknown[];
240
+ messages: {
241
+ id: string;
242
+ }[];
243
+ }>;
244
+ /**
245
+ * Send a document
246
+ */
247
+ sendDocument(options: SendMediaOptions): Promise<{
248
+ messagingProduct: string;
249
+ contacts: unknown[];
250
+ messages: {
251
+ id: string;
252
+ }[];
253
+ }>;
254
+ /**
255
+ * Send an audio
256
+ */
257
+ sendAudio(options: Omit<SendMediaOptions, 'caption' | 'filename'>): Promise<{
258
+ messagingProduct: string;
259
+ contacts: unknown[];
260
+ messages: {
261
+ id: string;
262
+ }[];
263
+ }>;
264
+ /**
265
+ * Send a location
266
+ */
267
+ sendLocation(options: SendLocationOptions): Promise<{
268
+ messagingProduct: string;
269
+ contacts: unknown[];
270
+ messages: {
271
+ id: string;
272
+ }[];
273
+ }>;
274
+ /**
275
+ * Send an interactive message (buttons or list)
276
+ */
277
+ sendInteractive(options: SendInteractiveOptions): Promise<{
278
+ messagingProduct: string;
279
+ contacts: unknown[];
280
+ messages: {
281
+ id: string;
282
+ }[];
283
+ }>;
284
+ /**
285
+ * Mark a message as read
286
+ */
287
+ markAsRead(messageId: string): Promise<{
288
+ success: boolean;
289
+ }>;
290
+ /**
291
+ * Get media URL
292
+ */
293
+ getMediaUrl(mediaId: string): Promise<{
294
+ url: string;
295
+ mimeType: string;
296
+ sha256: string;
297
+ fileSize: number;
298
+ }>;
299
+ /**
300
+ * Download media
301
+ */
302
+ downloadMedia(mediaId: string): Promise<Buffer>;
303
+ /**
304
+ * Upload media
305
+ */
306
+ uploadMedia(file: Buffer, mimeType: string): Promise<{
307
+ id: string;
308
+ }>;
309
+ }
310
+ export declare const WhatsAppInitializer: SDKInitializer;
311
+ //# sourceMappingURL=whatsapp.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marktoflow/integrations",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Standard integrations for marktoflow",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,11 +30,12 @@
30
30
  "@aws-sdk/client-s3": "^3.712.0",
31
31
  "@github/copilot-sdk": "^0.1.18",
32
32
  "@mailchimp/mailchimp_marketing": "^3.0.80",
33
- "@marktoflow/core": "2.0.1",
33
+ "@marktoflow/core": "2.0.3",
34
34
  "@microsoft/microsoft-graph-client": "^3.0.7",
35
35
  "@octokit/rest": "^22.0.1",
36
36
  "@openai/codex-sdk": "^0.91.0",
37
- "@opencode-ai/sdk": "^1.1.34",
37
+ "@opencode-ai/sdk": "^1.1.53",
38
+ "openai": "^4.73.0",
38
39
  "@sendgrid/mail": "^8.1.4",
39
40
  "@shopify/shopify-api": "^11.7.1",
40
41
  "@slack/bolt": "^4.0.0",