runline 0.2.1 → 0.2.2

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 (189) hide show
  1. package/dist/plugins/actionNetwork/src/index.js +118 -25
  2. package/dist/plugins/activeCampaign/src/index.js +184 -38
  3. package/dist/plugins/adalo/src/index.js +40 -8
  4. package/dist/plugins/affinity/src/index.js +100 -20
  5. package/dist/plugins/agileCrm/src/index.js +115 -27
  6. package/dist/plugins/airtable/src/index.js +94 -19
  7. package/dist/plugins/airtop/src/index.js +266 -62
  8. package/dist/plugins/apiTemplateIo/src/index.js +25 -5
  9. package/dist/plugins/asana/src/index.js +195 -41
  10. package/dist/plugins/autopilot/src/index.js +39 -8
  11. package/dist/plugins/bambooHr/src/index.js +109 -22
  12. package/dist/plugins/bannerbear/src/index.js +36 -8
  13. package/dist/plugins/baserow/src/index.js +35 -7
  14. package/dist/plugins/beeminder/src/index.js +198 -40
  15. package/dist/plugins/bitly/src/index.js +46 -10
  16. package/dist/plugins/bitwarden/src/index.js +167 -36
  17. package/dist/plugins/box/src/index.js +172 -37
  18. package/dist/plugins/brandfetch/src/index.js +5 -1
  19. package/dist/plugins/brevo/src/index.js +136 -29
  20. package/dist/plugins/bubble/src/index.js +76 -17
  21. package/dist/plugins/chargebee/src/index.js +35 -7
  22. package/dist/plugins/circleci/src/index.js +50 -10
  23. package/dist/plugins/ciscoWebex/src/index.js +131 -27
  24. package/dist/plugins/clearbit/src/index.js +76 -17
  25. package/dist/plugins/clickup/src/index.js +500 -107
  26. package/dist/plugins/clockify/src/index.js +229 -47
  27. package/dist/plugins/cloudflare/src/index.js +28 -6
  28. package/dist/plugins/cockpit/src/index.js +54 -12
  29. package/dist/plugins/coda/src/index.js +81 -19
  30. package/dist/plugins/coingecko/src/index.js +157 -33
  31. package/dist/plugins/contentful/src/index.js +85 -17
  32. package/dist/plugins/convertkit/src/index.js +74 -18
  33. package/dist/plugins/copper/src/index.js +59 -11
  34. package/dist/plugins/cortex/src/index.js +55 -13
  35. package/dist/plugins/currents/src/index.js +310 -71
  36. package/dist/plugins/customerIo/src/index.js +112 -23
  37. package/dist/plugins/databricks/src/index.js +549 -115
  38. package/dist/plugins/deepl/src/index.js +26 -6
  39. package/dist/plugins/demio/src/index.js +56 -11
  40. package/dist/plugins/dhl/src/index.js +16 -3
  41. package/dist/plugins/discord/src/index.js +141 -31
  42. package/dist/plugins/discourse/src/index.js +136 -31
  43. package/dist/plugins/disqus/src/index.js +96 -20
  44. package/dist/plugins/docker/src/index.js +20 -4
  45. package/dist/plugins/drift/src/index.js +19 -5
  46. package/dist/plugins/dropbox/src/index.js +139 -30
  47. package/dist/plugins/dropcontact/src/index.js +21 -4
  48. package/dist/plugins/egoi/src/index.js +61 -15
  49. package/dist/plugins/elasticsearch/src/index.js +59 -13
  50. package/dist/plugins/emelia/src/index.js +95 -19
  51. package/dist/plugins/erpnext/src/index.js +74 -15
  52. package/dist/plugins/facebookGraph/src/index.js +52 -11
  53. package/dist/plugins/freshdesk/src/index.js +220 -48
  54. package/dist/plugins/freshservice/src/index.js +39 -9
  55. package/dist/plugins/freshworksCrm/src/index.js +58 -12
  56. package/dist/plugins/getresponse/src/index.js +87 -18
  57. package/dist/plugins/ghost/src/index.js +114 -26
  58. package/dist/plugins/github/src/index.js +483 -109
  59. package/dist/plugins/gitlab/src/index.js +193 -45
  60. package/dist/plugins/gong/src/index.js +68 -14
  61. package/dist/plugins/gotify/src/index.js +43 -9
  62. package/dist/plugins/gotowebinar/src/index.js +233 -47
  63. package/dist/plugins/grafana/src/index.js +92 -21
  64. package/dist/plugins/graphql/src/index.js +38 -8
  65. package/dist/plugins/grist/src/index.js +52 -10
  66. package/dist/plugins/hackernews/src/index.js +32 -6
  67. package/dist/plugins/halopsa/src/index.js +131 -26
  68. package/dist/plugins/harvest/src/index.js +182 -42
  69. package/dist/plugins/helpscout/src/index.js +153 -31
  70. package/dist/plugins/highlevel/src/index.js +291 -58
  71. package/dist/plugins/homeAssistant/src/index.js +124 -26
  72. package/dist/plugins/hubspot/src/index.js +163 -29
  73. package/dist/plugins/humanticAi/src/index.js +54 -5
  74. package/dist/plugins/hunter/src/index.js +21 -4
  75. package/dist/plugins/intercom/src/index.js +95 -20
  76. package/dist/plugins/iterable/src/index.js +96 -20
  77. package/dist/plugins/jenkins/src/index.js +75 -17
  78. package/dist/plugins/jira/src/index.js +193 -43
  79. package/dist/plugins/keap/src/index.js +222 -56
  80. package/dist/plugins/kobotoolbox/src/index.js +113 -25
  81. package/dist/plugins/lemlist/src/index.js +79 -18
  82. package/dist/plugins/linear/src/index.js +86 -19
  83. package/dist/plugins/lingvanex/src/index.js +38 -8
  84. package/dist/plugins/linkedin/src/index.js +37 -8
  85. package/dist/plugins/lonescale/src/index.js +41 -9
  86. package/dist/plugins/magento/src/index.js +98 -27
  87. package/dist/plugins/mailcheck/src/index.js +11 -2
  88. package/dist/plugins/mailchimp/src/index.js +193 -42
  89. package/dist/plugins/mailerlite/src/index.js +61 -12
  90. package/dist/plugins/mailgun/src/index.js +39 -7
  91. package/dist/plugins/mailjet/src/index.js +141 -30
  92. package/dist/plugins/mandrill/src/index.js +67 -14
  93. package/dist/plugins/marketstack/src/index.js +56 -10
  94. package/dist/plugins/matrix/src/index.js +97 -20
  95. package/dist/plugins/mattermost/src/index.js +124 -26
  96. package/dist/plugins/mautic/src/index.js +129 -26
  97. package/dist/plugins/medium/src/index.js +64 -13
  98. package/dist/plugins/messagebird/src/index.js +80 -15
  99. package/dist/plugins/metabase/src/index.js +57 -12
  100. package/dist/plugins/misp/src/index.js +135 -33
  101. package/dist/plugins/mocean/src/index.js +33 -7
  102. package/dist/plugins/monday/src/index.js +97 -23
  103. package/dist/plugins/monicaCrm/src/index.js +112 -23
  104. package/dist/plugins/msg91/src/index.js +11 -2
  105. package/dist/plugins/nasa/src/index.js +108 -21
  106. package/dist/plugins/netlify/src/index.js +28 -6
  107. package/dist/plugins/netscalerAdc/src/index.js +144 -29
  108. package/dist/plugins/nextcloud/src/index.js +103 -20
  109. package/dist/plugins/nocodb/src/index.js +57 -11
  110. package/dist/plugins/notion/src/index.js +148 -37
  111. package/dist/plugins/npm/src/index.js +59 -12
  112. package/dist/plugins/odoo/src/index.js +102 -20
  113. package/dist/plugins/okta/src/index.js +50 -10
  114. package/dist/plugins/oneSimpleApi/src/index.js +84 -17
  115. package/dist/plugins/onfleet/src/index.js +139 -32
  116. package/dist/plugins/openThesaurus/src/index.js +46 -9
  117. package/dist/plugins/openweathermap/src/index.js +31 -6
  118. package/dist/plugins/oura/src/index.js +36 -7
  119. package/dist/plugins/paddle/src/index.js +80 -17
  120. package/dist/plugins/pagerduty/src/index.js +53 -12
  121. package/dist/plugins/paypal/src/index.js +51 -11
  122. package/dist/plugins/peekalink/src/index.js +12 -3
  123. package/dist/plugins/phantombuster/src/index.js +39 -8
  124. package/dist/plugins/philipsHue/src/index.js +64 -13
  125. package/dist/plugins/pipedrive/src/index.js +167 -45
  126. package/dist/plugins/plivo/src/index.js +43 -8
  127. package/dist/plugins/postbin/src/index.js +9 -2
  128. package/dist/plugins/posthog/src/index.js +50 -13
  129. package/dist/plugins/profitwell/src/index.js +24 -5
  130. package/dist/plugins/pushbullet/src/index.js +45 -9
  131. package/dist/plugins/pushcut/src/index.js +31 -6
  132. package/dist/plugins/pushover/src/index.js +51 -10
  133. package/dist/plugins/quickbase/src/index.js +66 -13
  134. package/dist/plugins/quickbooks/src/index.js +86 -19
  135. package/dist/plugins/quickchart/src/index.js +35 -7
  136. package/dist/plugins/raindrop/src/index.js +54 -13
  137. package/dist/plugins/reddit/src/index.js +73 -18
  138. package/dist/plugins/rocketchat/src/index.js +47 -9
  139. package/dist/plugins/rundeck/src/index.js +26 -5
  140. package/dist/plugins/salesforce/src/index.js +161 -31
  141. package/dist/plugins/salesmate/src/index.js +75 -16
  142. package/dist/plugins/securityScorecard/src/index.js +73 -15
  143. package/dist/plugins/segment/src/index.js +21 -4
  144. package/dist/plugins/sendgrid/src/index.js +102 -24
  145. package/dist/plugins/sendy/src/index.js +54 -11
  146. package/dist/plugins/sentry/src/index.js +174 -34
  147. package/dist/plugins/servicenow/src/index.js +120 -27
  148. package/dist/plugins/shopify/src/index.js +53 -12
  149. package/dist/plugins/signl4/src/index.js +16 -3
  150. package/dist/plugins/slack/src/index.js +407 -105
  151. package/dist/plugins/sms77/src/index.js +26 -5
  152. package/dist/plugins/splunk/src/index.js +186 -45
  153. package/dist/plugins/spotify/src/index.js +265 -66
  154. package/dist/plugins/stackby/src/index.js +18 -6
  155. package/dist/plugins/storyblok/src/index.js +57 -11
  156. package/dist/plugins/strapi/src/index.js +63 -12
  157. package/dist/plugins/strava/src/index.js +58 -13
  158. package/dist/plugins/stripe/src/index.js +143 -30
  159. package/dist/plugins/supabase/src/index.js +49 -10
  160. package/dist/plugins/syncromsp/src/index.js +245 -67
  161. package/dist/plugins/tapfiliate/src/index.js +57 -14
  162. package/dist/plugins/telegram/src/index.js +202 -39
  163. package/dist/plugins/thehive/src/index.js +271 -66
  164. package/dist/plugins/thehiveProject/src/index.js +457 -89
  165. package/dist/plugins/todoist/src/index.js +326 -77
  166. package/dist/plugins/travisci/src/index.js +35 -8
  167. package/dist/plugins/trello/src/index.js +204 -46
  168. package/dist/plugins/twake/src/index.js +10 -2
  169. package/dist/plugins/twilio/src/index.js +56 -11
  170. package/dist/plugins/twist/src/index.js +241 -48
  171. package/dist/plugins/twitter/src/index.js +128 -30
  172. package/dist/plugins/unleashedSoftware/src/index.js +30 -6
  173. package/dist/plugins/uplead/src/index.js +9 -2
  174. package/dist/plugins/uproc/src/index.js +31 -6
  175. package/dist/plugins/uptimerobot/src/index.js +119 -25
  176. package/dist/plugins/urlscanio/src/index.js +25 -6
  177. package/dist/plugins/vero/src/index.js +68 -13
  178. package/dist/plugins/vonage/src/index.js +32 -6
  179. package/dist/plugins/wekan/src/index.js +297 -52
  180. package/dist/plugins/woocommerce/src/index.js +57 -12
  181. package/dist/plugins/wordpress/src/index.js +94 -18
  182. package/dist/plugins/xero/src/index.js +79 -13
  183. package/dist/plugins/yourls/src/index.js +33 -6
  184. package/dist/plugins/zammad/src/index.js +139 -36
  185. package/dist/plugins/zendesk/src/index.js +201 -48
  186. package/dist/plugins/zoho/src/index.js +88 -21
  187. package/dist/plugins/zoom/src/index.js +41 -7
  188. package/dist/plugins/zulip/src/index.js +101 -20
  189. package/package.json +1 -1
@@ -21,20 +21,27 @@ async function paginateFolder(token, path, opts, limit) {
21
21
  let data = (await apiRequest(token, "/files/list_folder", body));
22
22
  results.push(...data.entries);
23
23
  while (data.has_more && (!limit || results.length < limit)) {
24
- data = (await apiRequest(token, "/files/list_folder/continue", { cursor: data.cursor }));
24
+ data = (await apiRequest(token, "/files/list_folder/continue", {
25
+ cursor: data.cursor,
26
+ }));
25
27
  results.push(...data.entries);
26
28
  }
27
29
  return limit ? results.slice(0, limit) : results;
28
30
  }
29
31
  async function paginateSearch(token, query, opts, limit) {
30
32
  const results = [];
31
- const body = { query, options: { filename_only: true, ...opts } };
33
+ const body = {
34
+ query,
35
+ options: { filename_only: true, ...opts },
36
+ };
32
37
  if (limit)
33
38
  body.options.max_results = Math.min(limit, 1000);
34
39
  let data = (await apiRequest(token, "/files/search_v2", body));
35
40
  results.push(...data.matches);
36
41
  while (data.has_more && (!limit || results.length < limit)) {
37
- data = (await apiRequest(token, "/files/search/continue_v2", { cursor: data.cursor }));
42
+ data = (await apiRequest(token, "/files/search/continue_v2", {
43
+ cursor: data.cursor,
44
+ }));
38
45
  results.push(...data.matches);
39
46
  }
40
47
  return limit ? results.slice(0, limit) : results;
@@ -43,57 +50,113 @@ export default function dropbox(rl) {
43
50
  rl.setName("dropbox");
44
51
  rl.setVersion("0.1.0");
45
52
  rl.setConnectionSchema({
46
- accessToken: { type: "string", required: true, description: "Dropbox access token", env: "DROPBOX_ACCESS_TOKEN" },
53
+ accessToken: {
54
+ type: "string",
55
+ required: true,
56
+ description: "Dropbox access token",
57
+ env: "DROPBOX_ACCESS_TOKEN",
58
+ },
47
59
  });
48
60
  const tok = (ctx) => ctx.connection.config.accessToken;
49
61
  // ── File ────────────────────────────────────────────
50
62
  rl.registerAction("file.copy", {
51
63
  description: "Copy a file",
52
64
  inputSchema: {
53
- fromPath: { type: "string", required: true, description: "Source file path" },
54
- toPath: { type: "string", required: true, description: "Destination file path" },
65
+ fromPath: {
66
+ type: "string",
67
+ required: true,
68
+ description: "Source file path",
69
+ },
70
+ toPath: {
71
+ type: "string",
72
+ required: true,
73
+ description: "Destination file path",
74
+ },
55
75
  },
56
76
  async execute(input, ctx) {
57
77
  const { fromPath, toPath } = input;
58
- return apiRequest(tok(ctx), "/files/copy_v2", { from_path: fromPath, to_path: toPath });
78
+ return apiRequest(tok(ctx), "/files/copy_v2", {
79
+ from_path: fromPath,
80
+ to_path: toPath,
81
+ });
59
82
  },
60
83
  });
61
84
  rl.registerAction("file.move", {
62
85
  description: "Move a file",
63
86
  inputSchema: {
64
- fromPath: { type: "string", required: true, description: "Source file path" },
65
- toPath: { type: "string", required: true, description: "Destination file path" },
87
+ fromPath: {
88
+ type: "string",
89
+ required: true,
90
+ description: "Source file path",
91
+ },
92
+ toPath: {
93
+ type: "string",
94
+ required: true,
95
+ description: "Destination file path",
96
+ },
66
97
  },
67
98
  async execute(input, ctx) {
68
99
  const { fromPath, toPath } = input;
69
- return apiRequest(tok(ctx), "/files/move_v2", { from_path: fromPath, to_path: toPath });
100
+ return apiRequest(tok(ctx), "/files/move_v2", {
101
+ from_path: fromPath,
102
+ to_path: toPath,
103
+ });
70
104
  },
71
105
  });
72
106
  rl.registerAction("file.delete", {
73
107
  description: "Delete a file",
74
- inputSchema: { path: { type: "string", required: true, description: "File path to delete" } },
108
+ inputSchema: {
109
+ path: {
110
+ type: "string",
111
+ required: true,
112
+ description: "File path to delete",
113
+ },
114
+ },
75
115
  async execute(input, ctx) {
76
- return apiRequest(tok(ctx), "/files/delete_v2", { path: input.path });
116
+ return apiRequest(tok(ctx), "/files/delete_v2", {
117
+ path: input.path,
118
+ });
77
119
  },
78
120
  });
79
121
  // ── Folder ──────────────────────────────────────────
80
122
  rl.registerAction("folder.create", {
81
123
  description: "Create a folder",
82
- inputSchema: { path: { type: "string", required: true, description: "Folder path to create" } },
124
+ inputSchema: {
125
+ path: {
126
+ type: "string",
127
+ required: true,
128
+ description: "Folder path to create",
129
+ },
130
+ },
83
131
  async execute(input, ctx) {
84
- return apiRequest(tok(ctx), "/files/create_folder_v2", { path: input.path });
132
+ return apiRequest(tok(ctx), "/files/create_folder_v2", {
133
+ path: input.path,
134
+ });
85
135
  },
86
136
  });
87
137
  rl.registerAction("folder.list", {
88
138
  description: "List contents of a folder",
89
139
  inputSchema: {
90
- path: { type: "string", required: true, description: "Folder path (empty string for root)" },
140
+ path: {
141
+ type: "string",
142
+ required: true,
143
+ description: "Folder path (empty string for root)",
144
+ },
91
145
  limit: { type: "number", required: false, description: "Max results" },
92
- recursive: { type: "boolean", required: false, description: "Include subfolders recursively" },
93
- includeDeleted: { type: "boolean", required: false, description: "Include deleted entries" },
146
+ recursive: {
147
+ type: "boolean",
148
+ required: false,
149
+ description: "Include subfolders recursively",
150
+ },
151
+ includeDeleted: {
152
+ type: "boolean",
153
+ required: false,
154
+ description: "Include deleted entries",
155
+ },
94
156
  },
95
157
  async execute(input, ctx) {
96
- const { path, limit, recursive, includeDeleted } = (input ?? {});
158
+ const { path, limit, recursive, includeDeleted } = (input ??
159
+ {});
97
160
  const opts = {};
98
161
  if (recursive)
99
162
  opts.recursive = true;
@@ -105,30 +168,60 @@ export default function dropbox(rl) {
105
168
  rl.registerAction("folder.copy", {
106
169
  description: "Copy a folder",
107
170
  inputSchema: {
108
- fromPath: { type: "string", required: true, description: "Source folder path" },
109
- toPath: { type: "string", required: true, description: "Destination folder path" },
171
+ fromPath: {
172
+ type: "string",
173
+ required: true,
174
+ description: "Source folder path",
175
+ },
176
+ toPath: {
177
+ type: "string",
178
+ required: true,
179
+ description: "Destination folder path",
180
+ },
110
181
  },
111
182
  async execute(input, ctx) {
112
183
  const { fromPath, toPath } = input;
113
- return apiRequest(tok(ctx), "/files/copy_v2", { from_path: fromPath, to_path: toPath });
184
+ return apiRequest(tok(ctx), "/files/copy_v2", {
185
+ from_path: fromPath,
186
+ to_path: toPath,
187
+ });
114
188
  },
115
189
  });
116
190
  rl.registerAction("folder.move", {
117
191
  description: "Move a folder",
118
192
  inputSchema: {
119
- fromPath: { type: "string", required: true, description: "Source folder path" },
120
- toPath: { type: "string", required: true, description: "Destination folder path" },
193
+ fromPath: {
194
+ type: "string",
195
+ required: true,
196
+ description: "Source folder path",
197
+ },
198
+ toPath: {
199
+ type: "string",
200
+ required: true,
201
+ description: "Destination folder path",
202
+ },
121
203
  },
122
204
  async execute(input, ctx) {
123
205
  const { fromPath, toPath } = input;
124
- return apiRequest(tok(ctx), "/files/move_v2", { from_path: fromPath, to_path: toPath });
206
+ return apiRequest(tok(ctx), "/files/move_v2", {
207
+ from_path: fromPath,
208
+ to_path: toPath,
209
+ });
125
210
  },
126
211
  });
127
212
  rl.registerAction("folder.delete", {
128
213
  description: "Delete a folder",
129
- inputSchema: { path: { type: "string", required: true, description: "Folder path to delete" } },
214
+ inputSchema: {
215
+ path: {
216
+ type: "string",
217
+ required: true,
218
+ description: "Folder path to delete",
219
+ },
220
+ },
130
221
  async execute(input, ctx) {
131
- return apiRequest(tok(ctx), "/files/delete_v2", { path: input.path });
222
+ return apiRequest(tok(ctx), "/files/delete_v2", {
223
+ path: input.path,
224
+ });
132
225
  },
133
226
  });
134
227
  // ── Search ──────────────────────────────────────────
@@ -137,10 +230,26 @@ export default function dropbox(rl) {
137
230
  inputSchema: {
138
231
  query: { type: "string", required: true, description: "Search query" },
139
232
  limit: { type: "number", required: false, description: "Max results" },
140
- path: { type: "string", required: false, description: "Limit search to this folder path" },
141
- fileCategories: { type: "array", required: false, description: "Filter by categories: image, document, pdf, spreadsheet, presentation, audio, video, folder, paper, other" },
142
- fileExtensions: { type: "array", required: false, description: "Filter by file extensions (e.g. ['jpg', 'pdf'])" },
143
- fileStatus: { type: "string", required: false, description: "active (default) or deleted" },
233
+ path: {
234
+ type: "string",
235
+ required: false,
236
+ description: "Limit search to this folder path",
237
+ },
238
+ fileCategories: {
239
+ type: "array",
240
+ required: false,
241
+ description: "Filter by categories: image, document, pdf, spreadsheet, presentation, audio, video, folder, paper, other",
242
+ },
243
+ fileExtensions: {
244
+ type: "array",
245
+ required: false,
246
+ description: "Filter by file extensions (e.g. ['jpg', 'pdf'])",
247
+ },
248
+ fileStatus: {
249
+ type: "string",
250
+ required: false,
251
+ description: "active (default) or deleted",
252
+ },
144
253
  },
145
254
  async execute(input, ctx) {
146
255
  const { query, limit, path, fileCategories, fileExtensions, fileStatus } = (input ?? {});
@@ -19,7 +19,12 @@ export default function dropcontact(rl) {
19
19
  rl.setName("dropcontact");
20
20
  rl.setVersion("0.1.0");
21
21
  rl.setConnectionSchema({
22
- apiKey: { type: "string", required: true, description: "Dropcontact API key", env: "DROPCONTACT_API_KEY" },
22
+ apiKey: {
23
+ type: "string",
24
+ required: true,
25
+ description: "Dropcontact API key",
26
+ env: "DROPCONTACT_API_KEY",
27
+ },
23
28
  });
24
29
  const key = (ctx) => ctx.connection.config.apiKey;
25
30
  rl.registerAction("contact.enrich", {
@@ -30,8 +35,16 @@ export default function dropcontact(rl) {
30
35
  required: true,
31
36
  description: "Array of contact objects with fields: email, first_name, last_name, full_name, company, website, phone, linkedin, country, num_siren, siret",
32
37
  },
33
- siren: { type: "boolean", required: false, description: "Include French company SIREN data" },
34
- language: { type: "string", required: false, description: "Response language: en (default) or fr" },
38
+ siren: {
39
+ type: "boolean",
40
+ required: false,
41
+ description: "Include French company SIREN data",
42
+ },
43
+ language: {
44
+ type: "string",
45
+ required: false,
46
+ description: "Response language: en (default) or fr",
47
+ },
35
48
  },
36
49
  async execute(input, ctx) {
37
50
  const { contacts, siren, language } = input;
@@ -46,7 +59,11 @@ export default function dropcontact(rl) {
46
59
  rl.registerAction("contact.fetchRequest", {
47
60
  description: "Fetch results of a previous enrich request by ID",
48
61
  inputSchema: {
49
- requestId: { type: "string", required: true, description: "Request ID from a previous enrich call" },
62
+ requestId: {
63
+ type: "string",
64
+ required: true,
65
+ description: "Request ID from a previous enrich call",
66
+ },
50
67
  },
51
68
  async execute(input, ctx) {
52
69
  const { requestId } = input;
@@ -9,9 +9,16 @@ async function apiRequest(apiKey, method, endpoint, body, qs) {
9
9
  }
10
10
  const opts = {
11
11
  method,
12
- headers: { Apikey: apiKey, "Content-Type": "application/json", Accept: "application/json" },
12
+ headers: {
13
+ Apikey: apiKey,
14
+ "Content-Type": "application/json",
15
+ Accept: "application/json",
16
+ },
13
17
  };
14
- if (body && Object.keys(body).length > 0 && method !== "GET" && method !== "DELETE") {
18
+ if (body &&
19
+ Object.keys(body).length > 0 &&
20
+ method !== "GET" &&
21
+ method !== "DELETE") {
15
22
  opts.body = JSON.stringify(body);
16
23
  }
17
24
  const res = await fetch(url.toString(), opts);
@@ -38,7 +45,12 @@ export default function egoi(rl) {
38
45
  rl.setName("egoi");
39
46
  rl.setVersion("0.1.0");
40
47
  rl.setConnectionSchema({
41
- apiKey: { type: "string", required: true, description: "E-goi API key", env: "EGOI_API_KEY" },
48
+ apiKey: {
49
+ type: "string",
50
+ required: true,
51
+ description: "E-goi API key",
52
+ env: "EGOI_API_KEY",
53
+ },
42
54
  });
43
55
  const key = (ctx) => ctx.connection.config.apiKey;
44
56
  rl.registerAction("contact.create", {
@@ -49,13 +61,29 @@ export default function egoi(rl) {
49
61
  firstName: { type: "string", required: false, description: "First name" },
50
62
  lastName: { type: "string", required: false, description: "Last name" },
51
63
  cellphone: { type: "string", required: false, description: "Cellphone" },
52
- birthDate: { type: "string", required: false, description: "Birth date (YYYY-MM-DD)" },
53
- status: { type: "string", required: false, description: "Status: active, inactive, unconfirmed, removed" },
54
- tagIds: { type: "array", required: false, description: "Tag IDs to attach" },
55
- extraFields: { type: "array", required: false, description: "Extra fields as [{field_id, value}]" },
64
+ birthDate: {
65
+ type: "string",
66
+ required: false,
67
+ description: "Birth date (YYYY-MM-DD)",
68
+ },
69
+ status: {
70
+ type: "string",
71
+ required: false,
72
+ description: "Status: active, inactive, unconfirmed, removed",
73
+ },
74
+ tagIds: {
75
+ type: "array",
76
+ required: false,
77
+ description: "Tag IDs to attach",
78
+ },
79
+ extraFields: {
80
+ type: "array",
81
+ required: false,
82
+ description: "Extra fields as [{field_id, value}]",
83
+ },
56
84
  },
57
85
  async execute(input, ctx) {
58
- const { listId, email, firstName, lastName, cellphone, birthDate, status, tagIds, extraFields } = input;
86
+ const { listId, email, firstName, lastName, cellphone, birthDate, status, tagIds, extraFields, } = input;
59
87
  const base = { email };
60
88
  if (firstName)
61
89
  base.first_name = firstName;
@@ -73,7 +101,8 @@ export default function egoi(rl) {
73
101
  if (tagIds && Array.isArray(tagIds)) {
74
102
  for (const tag of tagIds) {
75
103
  await apiRequest(key(ctx), "POST", `/lists/${listId}/contacts/actions/attach-tag`, {
76
- tag_id: tag, contacts: [contactId],
104
+ tag_id: tag,
105
+ contacts: [contactId],
77
106
  });
78
107
  }
79
108
  }
@@ -85,7 +114,11 @@ export default function egoi(rl) {
85
114
  inputSchema: {
86
115
  listId: { type: "string", required: true, description: "List ID" },
87
116
  contactId: { type: "string", required: false, description: "Contact ID" },
88
- email: { type: "string", required: false, description: "Email (alternative to contactId)" },
117
+ email: {
118
+ type: "string",
119
+ required: false,
120
+ description: "Email (alternative to contactId)",
121
+ },
89
122
  },
90
123
  async execute(input, ctx) {
91
124
  const { listId, contactId, email } = (input ?? {});
@@ -116,13 +149,25 @@ export default function egoi(rl) {
116
149
  firstName: { type: "string", required: false, description: "First name" },
117
150
  lastName: { type: "string", required: false, description: "Last name" },
118
151
  cellphone: { type: "string", required: false, description: "Cellphone" },
119
- birthDate: { type: "string", required: false, description: "Birth date (YYYY-MM-DD)" },
152
+ birthDate: {
153
+ type: "string",
154
+ required: false,
155
+ description: "Birth date (YYYY-MM-DD)",
156
+ },
120
157
  status: { type: "string", required: false, description: "Status" },
121
- tagIds: { type: "array", required: false, description: "Tag IDs to attach" },
122
- extraFields: { type: "array", required: false, description: "Extra fields as [{field_id, value}]" },
158
+ tagIds: {
159
+ type: "array",
160
+ required: false,
161
+ description: "Tag IDs to attach",
162
+ },
163
+ extraFields: {
164
+ type: "array",
165
+ required: false,
166
+ description: "Extra fields as [{field_id, value}]",
167
+ },
123
168
  },
124
169
  async execute(input, ctx) {
125
- const { listId, contactId, email, firstName, lastName, cellphone, birthDate, status, tagIds, extraFields } = input;
170
+ const { listId, contactId, email, firstName, lastName, cellphone, birthDate, status, tagIds, extraFields, } = input;
126
171
  const base = {};
127
172
  if (email)
128
173
  base.email = email;
@@ -141,7 +186,8 @@ export default function egoi(rl) {
141
186
  if (tagIds && Array.isArray(tagIds)) {
142
187
  for (const tag of tagIds) {
143
188
  await apiRequest(key(ctx), "POST", `/lists/${listId}/contacts/actions/attach-tag`, {
144
- tag_id: tag, contacts: [contactId],
189
+ tag_id: tag,
190
+ contacts: [contactId],
145
191
  });
146
192
  }
147
193
  }
@@ -13,7 +13,10 @@ async function apiRequest(baseUrl, username, password, method, endpoint, body, q
13
13
  "Content-Type": "application/json",
14
14
  },
15
15
  };
16
- if (body && Object.keys(body).length > 0 && method !== "GET" && method !== "DELETE") {
16
+ if (body &&
17
+ Object.keys(body).length > 0 &&
18
+ method !== "GET" &&
19
+ method !== "DELETE") {
17
20
  opts.body = JSON.stringify(body);
18
21
  }
19
22
  const res = await fetch(url.toString(), opts);
@@ -40,16 +43,35 @@ export default function elasticsearch(rl) {
40
43
  rl.setName("elasticsearch");
41
44
  rl.setVersion("0.1.0");
42
45
  rl.setConnectionSchema({
43
- baseUrl: { type: "string", required: true, description: "Elasticsearch base URL (e.g. https://localhost:9200)", env: "ELASTICSEARCH_URL" },
44
- username: { type: "string", required: false, description: "Username for basic auth", env: "ELASTICSEARCH_USERNAME" },
45
- password: { type: "string", required: false, description: "Password for basic auth", env: "ELASTICSEARCH_PASSWORD" },
46
+ baseUrl: {
47
+ type: "string",
48
+ required: true,
49
+ description: "Elasticsearch base URL (e.g. https://localhost:9200)",
50
+ env: "ELASTICSEARCH_URL",
51
+ },
52
+ username: {
53
+ type: "string",
54
+ required: false,
55
+ description: "Username for basic auth",
56
+ env: "ELASTICSEARCH_USERNAME",
57
+ },
58
+ password: {
59
+ type: "string",
60
+ required: false,
61
+ description: "Password for basic auth",
62
+ env: "ELASTICSEARCH_PASSWORD",
63
+ },
46
64
  });
47
65
  // ── Document ────────────────────────────────────────
48
66
  rl.registerAction("document.create", {
49
67
  description: "Index (create) a document",
50
68
  inputSchema: {
51
69
  index: { type: "string", required: true, description: "Index name" },
52
- id: { type: "string", required: false, description: "Document ID (auto-generated if omitted)" },
70
+ id: {
71
+ type: "string",
72
+ required: false,
73
+ description: "Document ID (auto-generated if omitted)",
74
+ },
53
75
  body: { type: "object", required: true, description: "Document body" },
54
76
  },
55
77
  async execute(input, ctx) {
@@ -74,7 +96,11 @@ export default function elasticsearch(rl) {
74
96
  inputSchema: {
75
97
  index: { type: "string", required: true, description: "Index name" },
76
98
  id: { type: "string", required: true, description: "Document ID" },
77
- body: { type: "object", required: true, description: "Partial document to merge" },
99
+ body: {
100
+ type: "object",
101
+ required: true,
102
+ description: "Partial document to merge",
103
+ },
78
104
  },
79
105
  async execute(input, ctx) {
80
106
  const { index, id, body } = input;
@@ -96,13 +122,21 @@ export default function elasticsearch(rl) {
96
122
  description: "Search documents in an index",
97
123
  inputSchema: {
98
124
  index: { type: "string", required: true, description: "Index name" },
99
- query: { type: "object", required: false, description: "Elasticsearch query DSL" },
100
- size: { type: "number", required: false, description: "Max results (default: 10)" },
125
+ query: {
126
+ type: "object",
127
+ required: false,
128
+ description: "Elasticsearch query DSL",
129
+ },
130
+ size: {
131
+ type: "number",
132
+ required: false,
133
+ description: "Max results (default: 10)",
134
+ },
101
135
  from: { type: "number", required: false, description: "Offset" },
102
136
  sort: { type: "array", required: false, description: "Sort criteria" },
103
137
  },
104
138
  async execute(input, ctx) {
105
- const { index, query, size, from: offset, sort } = (input ?? {});
139
+ const { index, query, size, from: offset, sort, } = (input ?? {});
106
140
  const body = {};
107
141
  if (query)
108
142
  body.query = query;
@@ -121,8 +155,16 @@ export default function elasticsearch(rl) {
121
155
  description: "Create an index",
122
156
  inputSchema: {
123
157
  index: { type: "string", required: true, description: "Index name" },
124
- settings: { type: "object", required: false, description: "Index settings" },
125
- mappings: { type: "object", required: false, description: "Index mappings" },
158
+ settings: {
159
+ type: "object",
160
+ required: false,
161
+ description: "Index settings",
162
+ },
163
+ mappings: {
164
+ type: "object",
165
+ required: false,
166
+ description: "Index mappings",
167
+ },
126
168
  },
127
169
  async execute(input, ctx) {
128
170
  const { index, settings, mappings } = (input ?? {});
@@ -136,7 +178,9 @@ export default function elasticsearch(rl) {
136
178
  });
137
179
  rl.registerAction("index.get", {
138
180
  description: "Get index details",
139
- inputSchema: { index: { type: "string", required: true, description: "Index name" } },
181
+ inputSchema: {
182
+ index: { type: "string", required: true, description: "Index name" },
183
+ },
140
184
  async execute(input, ctx) {
141
185
  return req(ctx, "GET", `/${input.index}`);
142
186
  },
@@ -149,7 +193,9 @@ export default function elasticsearch(rl) {
149
193
  });
150
194
  rl.registerAction("index.delete", {
151
195
  description: "Delete an index",
152
- inputSchema: { index: { type: "string", required: true, description: "Index name" } },
196
+ inputSchema: {
197
+ index: { type: "string", required: true, description: "Index name" },
198
+ },
153
199
  async execute(input, ctx) {
154
200
  return req(ctx, "DELETE", `/${input.index}`);
155
201
  },