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
@@ -1,8 +1,14 @@
1
1
  function getConn(ctx) {
2
2
  const c = ctx.connection.config;
3
3
  const sandbox = c.sandbox;
4
- const base = sandbox ? "https://sandbox-vendors.paddle.com/api" : "https://vendors.paddle.com/api";
5
- return { base, vendorId: c.vendorId, vendorAuthCode: c.vendorAuthCode };
4
+ const base = sandbox
5
+ ? "https://sandbox-vendors.paddle.com/api"
6
+ : "https://vendors.paddle.com/api";
7
+ return {
8
+ base,
9
+ vendorId: c.vendorId,
10
+ vendorAuthCode: c.vendorAuthCode,
11
+ };
6
12
  }
7
13
  async function apiRequest(conn, endpoint, body = {}) {
8
14
  body.vendor_id = conn.vendorId;
@@ -36,23 +42,57 @@ export default function paddle(rl) {
36
42
  rl.setName("paddle");
37
43
  rl.setVersion("0.1.0");
38
44
  rl.setConnectionSchema({
39
- vendorId: { type: "string", required: true, description: "Paddle Vendor ID", env: "PADDLE_VENDOR_ID" },
40
- vendorAuthCode: { type: "string", required: true, description: "Paddle Vendor Auth Code", env: "PADDLE_VENDOR_AUTH_CODE" },
41
- sandbox: { type: "boolean", required: false, description: "Use sandbox environment (default false)" },
45
+ vendorId: {
46
+ type: "string",
47
+ required: true,
48
+ description: "Paddle Vendor ID",
49
+ env: "PADDLE_VENDOR_ID",
50
+ },
51
+ vendorAuthCode: {
52
+ type: "string",
53
+ required: true,
54
+ description: "Paddle Vendor Auth Code",
55
+ env: "PADDLE_VENDOR_AUTH_CODE",
56
+ },
57
+ sandbox: {
58
+ type: "boolean",
59
+ required: false,
60
+ description: "Use sandbox environment (default false)",
61
+ },
42
62
  });
43
63
  // ── Coupon ──────────────────────────────────────────
44
64
  rl.registerAction("coupon.create", {
45
65
  description: "Create a coupon",
46
66
  inputSchema: {
47
- couponType: { type: "string", required: true, description: "product or checkout" },
48
- discountType: { type: "string", required: true, description: "flat or percentage" },
67
+ couponType: {
68
+ type: "string",
69
+ required: true,
70
+ description: "product or checkout",
71
+ },
72
+ discountType: {
73
+ type: "string",
74
+ required: true,
75
+ description: "flat or percentage",
76
+ },
49
77
  discountAmount: { type: "number", required: true },
50
- productIds: { type: "string", required: false, description: "Comma-separated product IDs (for product coupon type)" },
51
- currency: { type: "string", required: false, description: "Currency code (required for flat discount)" },
78
+ productIds: {
79
+ type: "string",
80
+ required: false,
81
+ description: "Comma-separated product IDs (for product coupon type)",
82
+ },
83
+ currency: {
84
+ type: "string",
85
+ required: false,
86
+ description: "Currency code (required for flat discount)",
87
+ },
52
88
  allowedUses: { type: "number", required: false },
53
89
  couponCode: { type: "string", required: false },
54
90
  couponPrefix: { type: "string", required: false },
55
- expires: { type: "string", required: false, description: "Expiry date YYYY-MM-DD" },
91
+ expires: {
92
+ type: "string",
93
+ required: false,
94
+ description: "Expiry date YYYY-MM-DD",
95
+ },
56
96
  group: { type: "string", required: false },
57
97
  recurring: { type: "boolean", required: false },
58
98
  numberOfCoupons: { type: "number", required: false },
@@ -61,7 +101,9 @@ export default function paddle(rl) {
61
101
  async execute(input, ctx) {
62
102
  const p = (input ?? {});
63
103
  const body = {
64
- coupon_type: p.couponType, discount_type: p.discountType, discount_amount: p.discountAmount,
104
+ coupon_type: p.couponType,
105
+ discount_type: p.discountType,
106
+ discount_amount: p.discountAmount,
65
107
  };
66
108
  if (p.productIds)
67
109
  body.product_ids = p.productIds;
@@ -104,8 +146,16 @@ export default function paddle(rl) {
104
146
  rl.registerAction("coupon.update", {
105
147
  description: "Update a coupon by code or group",
106
148
  inputSchema: {
107
- couponCode: { type: "string", required: false, description: "Coupon code to update" },
108
- group: { type: "string", required: false, description: "Group name to update" },
149
+ couponCode: {
150
+ type: "string",
151
+ required: false,
152
+ description: "Coupon code to update",
153
+ },
154
+ group: {
155
+ type: "string",
156
+ required: false,
157
+ description: "Group name to update",
158
+ },
109
159
  newCouponCode: { type: "string", required: false },
110
160
  newGroup: { type: "string", required: false },
111
161
  allowedUses: { type: "number", required: false },
@@ -178,11 +228,18 @@ export default function paddle(rl) {
178
228
  description: "Reschedule a payment",
179
229
  inputSchema: {
180
230
  paymentId: { type: "number", required: true },
181
- date: { type: "string", required: true, description: "New payment date YYYY-MM-DD" },
231
+ date: {
232
+ type: "string",
233
+ required: true,
234
+ description: "New payment date YYYY-MM-DD",
235
+ },
182
236
  },
183
237
  async execute(input, ctx) {
184
238
  const { paymentId, date } = input;
185
- return apiRequest(getConn(ctx), "/2.0/subscription/payments_reschedule", { payment_id: paymentId, date });
239
+ return apiRequest(getConn(ctx), "/2.0/subscription/payments_reschedule", {
240
+ payment_id: paymentId,
241
+ date,
242
+ });
186
243
  },
187
244
  });
188
245
  // ── Plan ────────────────────────────────────────────
@@ -191,7 +248,9 @@ export default function paddle(rl) {
191
248
  inputSchema: { planId: { type: "string", required: true } },
192
249
  async execute(input, ctx) {
193
250
  const { planId } = input;
194
- return apiRequest(getConn(ctx), "/2.0/subscription/plans", { plan: planId });
251
+ return apiRequest(getConn(ctx), "/2.0/subscription/plans", {
252
+ plan: planId,
253
+ });
195
254
  },
196
255
  });
197
256
  rl.registerAction("plan.list", {
@@ -222,7 +281,11 @@ export default function paddle(rl) {
222
281
  rl.registerAction("user.list", {
223
282
  description: "List subscription users",
224
283
  inputSchema: {
225
- state: { type: "string", required: false, description: "active, past_due, trialing, paused, deleted" },
284
+ state: {
285
+ type: "string",
286
+ required: false,
287
+ description: "active, past_due, trialing, paused, deleted",
288
+ },
226
289
  planId: { type: "string", required: false },
227
290
  subscriptionId: { type: "string", required: false },
228
291
  limit: { type: "number", required: false },
@@ -1,5 +1,7 @@
1
1
  const BASE = "https://api.pagerduty.com";
2
- function getToken(ctx) { return ctx.connection.config.apiToken; }
2
+ function getToken(ctx) {
3
+ return ctx.connection.config.apiToken;
4
+ }
3
5
  async function apiRequest(token, method, endpoint, body, qs, extraHeaders) {
4
6
  const url = new URL(`${BASE}${endpoint}`);
5
7
  if (qs) {
@@ -41,7 +43,12 @@ export default function pagerduty(rl) {
41
43
  rl.setName("pagerduty");
42
44
  rl.setVersion("0.1.0");
43
45
  rl.setConnectionSchema({
44
- apiToken: { type: "string", required: true, description: "PagerDuty API token", env: "PAGERDUTY_API_TOKEN" },
46
+ apiToken: {
47
+ type: "string",
48
+ required: true,
49
+ description: "PagerDuty API token",
50
+ env: "PAGERDUTY_API_TOKEN",
51
+ },
45
52
  });
46
53
  // ── Incident ────────────────────────────────────────
47
54
  rl.registerAction("incident.create", {
@@ -49,9 +56,17 @@ export default function pagerduty(rl) {
49
56
  inputSchema: {
50
57
  title: { type: "string", required: true },
51
58
  serviceId: { type: "string", required: true, description: "Service ID" },
52
- from: { type: "string", required: true, description: "Email of the user creating the incident" },
59
+ from: {
60
+ type: "string",
61
+ required: true,
62
+ description: "Email of the user creating the incident",
63
+ },
53
64
  urgency: { type: "string", required: false, description: "high or low" },
54
- details: { type: "string", required: false, description: "Incident body details" },
65
+ details: {
66
+ type: "string",
67
+ required: false,
68
+ description: "Incident body details",
69
+ },
55
70
  priorityId: { type: "string", required: false },
56
71
  escalationPolicyId: { type: "string", required: false },
57
72
  incidentKey: { type: "string", required: false },
@@ -59,7 +74,8 @@ export default function pagerduty(rl) {
59
74
  async execute(input, ctx) {
60
75
  const p = input;
61
76
  const incident = {
62
- type: "incident", title: p.title,
77
+ type: "incident",
78
+ title: p.title,
63
79
  service: { id: p.serviceId, type: "service_reference" },
64
80
  };
65
81
  if (p.urgency)
@@ -69,7 +85,10 @@ export default function pagerduty(rl) {
69
85
  if (p.priorityId)
70
86
  incident.priority = { id: p.priorityId, type: "priority_reference" };
71
87
  if (p.escalationPolicyId)
72
- incident.escalation_policy = { id: p.escalationPolicyId, type: "escalation_policy_reference" };
88
+ incident.escalation_policy = {
89
+ id: p.escalationPolicyId,
90
+ type: "escalation_policy_reference",
91
+ };
73
92
  if (p.incidentKey)
74
93
  incident.incident_key = p.incidentKey;
75
94
  const data = (await apiRequest(getToken(ctx), "POST", "/incidents", { incident }, undefined, { From: p.from }));
@@ -89,7 +108,11 @@ export default function pagerduty(rl) {
89
108
  description: "List incidents",
90
109
  inputSchema: {
91
110
  limit: { type: "number", required: false },
92
- statuses: { type: "string", required: false, description: "Comma-separated: triggered,acknowledged,resolved" },
111
+ statuses: {
112
+ type: "string",
113
+ required: false,
114
+ description: "Comma-separated: triggered,acknowledged,resolved",
115
+ },
93
116
  sortBy: { type: "string", required: false },
94
117
  },
95
118
  async execute(input, ctx) {
@@ -111,9 +134,17 @@ export default function pagerduty(rl) {
111
134
  description: "Update an incident",
112
135
  inputSchema: {
113
136
  incidentId: { type: "string", required: true },
114
- from: { type: "string", required: true, description: "Email of the user updating" },
137
+ from: {
138
+ type: "string",
139
+ required: true,
140
+ description: "Email of the user updating",
141
+ },
115
142
  title: { type: "string", required: false },
116
- status: { type: "string", required: false, description: "acknowledged, resolved" },
143
+ status: {
144
+ type: "string",
145
+ required: false,
146
+ description: "acknowledged, resolved",
147
+ },
117
148
  urgency: { type: "string", required: false },
118
149
  resolution: { type: "string", required: false },
119
150
  escalationLevel: { type: "number", required: false },
@@ -136,7 +167,10 @@ export default function pagerduty(rl) {
136
167
  if (p.priorityId)
137
168
  incident.priority = { id: p.priorityId, type: "priority_reference" };
138
169
  if (p.escalationPolicyId)
139
- incident.escalation_policy = { id: p.escalationPolicyId, type: "escalation_policy_reference" };
170
+ incident.escalation_policy = {
171
+ id: p.escalationPolicyId,
172
+ type: "escalation_policy_reference",
173
+ };
140
174
  const data = (await apiRequest(getToken(ctx), "PUT", `/incidents/${p.incidentId}`, { incident }, undefined, { From: p.from }));
141
175
  return data.incident;
142
176
  },
@@ -146,7 +180,11 @@ export default function pagerduty(rl) {
146
180
  description: "Add a note to an incident",
147
181
  inputSchema: {
148
182
  incidentId: { type: "string", required: true },
149
- from: { type: "string", required: true, description: "Email of the user" },
183
+ from: {
184
+ type: "string",
185
+ required: true,
186
+ description: "Email of the user",
187
+ },
150
188
  content: { type: "string", required: true },
151
189
  },
152
190
  async execute(input, ctx) {
@@ -156,7 +194,10 @@ export default function pagerduty(rl) {
156
194
  });
157
195
  rl.registerAction("incidentNote.list", {
158
196
  description: "List notes for an incident",
159
- inputSchema: { incidentId: { type: "string", required: true }, limit: { type: "number", required: false } },
197
+ inputSchema: {
198
+ incidentId: { type: "string", required: true },
199
+ limit: { type: "number", required: false },
200
+ },
160
201
  async execute(input, ctx) {
161
202
  const p = input;
162
203
  const qs = {};
@@ -2,7 +2,9 @@ let cachedToken = null;
2
2
  function getConn(ctx) {
3
3
  const c = ctx.connection.config;
4
4
  const env = c.env ?? "sandbox";
5
- const base = env === "live" ? "https://api-m.paypal.com" : "https://api-m.sandbox.paypal.com";
5
+ const base = env === "live"
6
+ ? "https://api-m.paypal.com"
7
+ : "https://api-m.sandbox.paypal.com";
6
8
  return { base, clientId: c.clientId, secret: c.secret };
7
9
  }
8
10
  async function getAccessToken(conn) {
@@ -19,7 +21,10 @@ async function getAccessToken(conn) {
19
21
  if (!res.ok)
20
22
  throw new Error(`PayPal auth error ${res.status}: ${await res.text()}`);
21
23
  const data = (await res.json());
22
- cachedToken = { token: data.access_token, expiresAt: Date.now() + (data.expires_in - 60) * 1000 };
24
+ cachedToken = {
25
+ token: data.access_token,
26
+ expiresAt: Date.now() + (data.expires_in - 60) * 1000,
27
+ };
23
28
  return cachedToken.token;
24
29
  }
25
30
  async function apiRequest(conn, method, endpoint, body, qs) {
@@ -33,7 +38,10 @@ async function apiRequest(conn, method, endpoint, body, qs) {
33
38
  }
34
39
  const init = {
35
40
  method,
36
- headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
41
+ headers: {
42
+ Authorization: `Bearer ${token}`,
43
+ "Content-Type": "application/json",
44
+ },
37
45
  };
38
46
  if (body !== undefined)
39
47
  init.body = JSON.stringify(body);
@@ -47,36 +55,68 @@ export default function paypal(rl) {
47
55
  rl.setName("paypal");
48
56
  rl.setVersion("0.1.0");
49
57
  rl.setConnectionSchema({
50
- clientId: { type: "string", required: true, description: "PayPal client ID", env: "PAYPAL_CLIENT_ID" },
51
- secret: { type: "string", required: true, description: "PayPal secret", env: "PAYPAL_SECRET" },
52
- env: { type: "string", required: false, description: "live or sandbox (default sandbox)", env: "PAYPAL_ENV" },
58
+ clientId: {
59
+ type: "string",
60
+ required: true,
61
+ description: "PayPal client ID",
62
+ env: "PAYPAL_CLIENT_ID",
63
+ },
64
+ secret: {
65
+ type: "string",
66
+ required: true,
67
+ description: "PayPal secret",
68
+ env: "PAYPAL_SECRET",
69
+ },
70
+ env: {
71
+ type: "string",
72
+ required: false,
73
+ description: "live or sandbox (default sandbox)",
74
+ env: "PAYPAL_ENV",
75
+ },
53
76
  });
54
77
  rl.registerAction("payout.create", {
55
78
  description: "Create a batch payout",
56
79
  inputSchema: {
57
- senderBatchId: { type: "string", required: true, description: "Unique batch ID" },
58
- items: { type: "object", required: true, description: "Array of payout items [{receiver, amount: {value, currency}, recipient_type, note}]" },
80
+ senderBatchId: {
81
+ type: "string",
82
+ required: true,
83
+ description: "Unique batch ID",
84
+ },
85
+ items: {
86
+ type: "object",
87
+ required: true,
88
+ description: "Array of payout items [{receiver, amount: {value, currency}, recipient_type, note}]",
89
+ },
59
90
  emailSubject: { type: "string", required: false },
60
91
  emailMessage: { type: "string", required: false },
61
92
  note: { type: "string", required: false },
62
93
  },
63
94
  async execute(input, ctx) {
64
95
  const p = input;
65
- const header = { sender_batch_id: p.senderBatchId };
96
+ const header = {
97
+ sender_batch_id: p.senderBatchId,
98
+ };
66
99
  if (p.emailSubject)
67
100
  header.email_subject = p.emailSubject;
68
101
  if (p.emailMessage)
69
102
  header.email_message = p.emailMessage;
70
103
  if (p.note)
71
104
  header.note = p.note;
72
- return apiRequest(getConn(ctx), "POST", "/payments/payouts", { sender_batch_header: header, items: p.items });
105
+ return apiRequest(getConn(ctx), "POST", "/payments/payouts", {
106
+ sender_batch_header: header,
107
+ items: p.items,
108
+ });
73
109
  },
74
110
  });
75
111
  rl.registerAction("payout.get", {
76
112
  description: "Get a batch payout by ID (returns items)",
77
113
  inputSchema: {
78
114
  payoutBatchId: { type: "string", required: true },
79
- limit: { type: "number", required: false, description: "Max items to return" },
115
+ limit: {
116
+ type: "number",
117
+ required: false,
118
+ description: "Max items to return",
119
+ },
80
120
  },
81
121
  async execute(input, ctx) {
82
122
  const p = input;
@@ -13,12 +13,19 @@ export default function peekalink(rl) {
13
13
  rl.setName("peekalink");
14
14
  rl.setVersion("0.1.0");
15
15
  rl.setConnectionSchema({
16
- apiKey: { type: "string", required: true, description: "Peekalink API key", env: "PEEKALINK_API_KEY" },
16
+ apiKey: {
17
+ type: "string",
18
+ required: true,
19
+ description: "Peekalink API key",
20
+ env: "PEEKALINK_API_KEY",
21
+ },
17
22
  });
18
23
  const key = (ctx) => ctx.connection.config.apiKey;
19
24
  rl.registerAction("link.preview", {
20
25
  description: "Get a rich preview for a URL",
21
- inputSchema: { url: { type: "string", required: true, description: "URL to preview" } },
26
+ inputSchema: {
27
+ url: { type: "string", required: true, description: "URL to preview" },
28
+ },
22
29
  async execute(input, ctx) {
23
30
  const { url } = input;
24
31
  return apiRequest(key(ctx), "", { link: url });
@@ -26,7 +33,9 @@ export default function peekalink(rl) {
26
33
  });
27
34
  rl.registerAction("link.isAvailable", {
28
35
  description: "Check whether a preview is available for a URL",
29
- inputSchema: { url: { type: "string", required: true, description: "URL to check" } },
36
+ inputSchema: {
37
+ url: { type: "string", required: true, description: "URL to check" },
38
+ },
30
39
  async execute(input, ctx) {
31
40
  const { url } = input;
32
41
  return apiRequest(key(ctx), "/is-available/", { link: url });
@@ -7,7 +7,13 @@ async function apiRequest(apiKey, method, path, body, qs) {
7
7
  url.searchParams.set(k, String(v));
8
8
  }
9
9
  }
10
- const init = { method, headers: { "X-Phantombuster-Key": apiKey, "Content-Type": "application/json" } };
10
+ const init = {
11
+ method,
12
+ headers: {
13
+ "X-Phantombuster-Key": apiKey,
14
+ "Content-Type": "application/json",
15
+ },
16
+ };
11
17
  if (body && Object.keys(body).length > 0)
12
18
  init.body = JSON.stringify(body);
13
19
  const res = await fetch(url.toString(), init);
@@ -20,7 +26,12 @@ export default function phantombuster(rl) {
20
26
  rl.setName("phantombuster");
21
27
  rl.setVersion("0.1.0");
22
28
  rl.setConnectionSchema({
23
- apiKey: { type: "string", required: true, description: "Phantombuster API key", env: "PHANTOMBUSTER_API_KEY" },
29
+ apiKey: {
30
+ type: "string",
31
+ required: true,
32
+ description: "Phantombuster API key",
33
+ env: "PHANTOMBUSTER_API_KEY",
34
+ },
24
35
  });
25
36
  const key = (ctx) => ctx.connection.config.apiKey;
26
37
  rl.registerAction("agent.delete", {
@@ -37,14 +48,20 @@ export default function phantombuster(rl) {
37
48
  inputSchema: { agentId: { type: "string", required: true } },
38
49
  async execute(input, ctx) {
39
50
  const { agentId } = input;
40
- return apiRequest(key(ctx), "GET", "/agents/fetch", undefined, { id: agentId });
51
+ return apiRequest(key(ctx), "GET", "/agents/fetch", undefined, {
52
+ id: agentId,
53
+ });
41
54
  },
42
55
  });
43
56
  rl.registerAction("agent.getOutput", {
44
57
  description: "Get the output of the last agent run",
45
58
  inputSchema: {
46
59
  agentId: { type: "string", required: true },
47
- resolveData: { type: "boolean", required: false, description: "Resolve the result object (default false)" },
60
+ resolveData: {
61
+ type: "boolean",
62
+ required: false,
63
+ description: "Resolve the result object (default false)",
64
+ },
48
65
  },
49
66
  async execute(input, ctx) {
50
67
  const p = input;
@@ -73,9 +90,21 @@ export default function phantombuster(rl) {
73
90
  description: "Launch an agent",
74
91
  inputSchema: {
75
92
  agentId: { type: "string", required: true },
76
- arguments: { type: "object", required: false, description: "Arguments object to pass to the agent" },
77
- bonusArgument: { type: "object", required: false, description: "Bonus argument object" },
78
- resolveData: { type: "boolean", required: false, description: "Wait and return the container data (default false)" },
93
+ arguments: {
94
+ type: "object",
95
+ required: false,
96
+ description: "Arguments object to pass to the agent",
97
+ },
98
+ bonusArgument: {
99
+ type: "object",
100
+ required: false,
101
+ description: "Bonus argument object",
102
+ },
103
+ resolveData: {
104
+ type: "boolean",
105
+ required: false,
106
+ description: "Wait and return the container data (default false)",
107
+ },
79
108
  },
80
109
  async execute(input, ctx) {
81
110
  const p = input;
@@ -86,7 +115,9 @@ export default function phantombuster(rl) {
86
115
  body.bonusArgument = p.bonusArgument;
87
116
  const data = (await apiRequest(key(ctx), "POST", "/agents/launch", body));
88
117
  if (p.resolveData) {
89
- return apiRequest(key(ctx), "GET", "/containers/fetch", undefined, { id: data.containerId });
118
+ return apiRequest(key(ctx), "GET", "/containers/fetch", undefined, {
119
+ id: data.containerId,
120
+ });
90
121
  }
91
122
  return data;
92
123
  },
@@ -2,7 +2,10 @@ const BASE = "https://api.meethue.com/route";
2
2
  async function apiRequest(accessToken, method, path, body) {
3
3
  const init = {
4
4
  method,
5
- headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" },
5
+ headers: {
6
+ Authorization: `Bearer ${accessToken}`,
7
+ "Content-Type": "application/json",
8
+ },
6
9
  };
7
10
  if (body && Object.keys(body).length > 0)
8
11
  init.body = JSON.stringify(body);
@@ -15,11 +18,24 @@ export default function philipsHue(rl) {
15
18
  rl.setName("philipsHue");
16
19
  rl.setVersion("0.1.0");
17
20
  rl.setConnectionSchema({
18
- accessToken: { type: "string", required: true, description: "Philips Hue OAuth2 access token", env: "PHILIPS_HUE_ACCESS_TOKEN" },
19
- username: { type: "string", required: true, description: "Bridge username (whitelisted user ID)", env: "PHILIPS_HUE_USERNAME" },
21
+ accessToken: {
22
+ type: "string",
23
+ required: true,
24
+ description: "Philips Hue OAuth2 access token",
25
+ env: "PHILIPS_HUE_ACCESS_TOKEN",
26
+ },
27
+ username: {
28
+ type: "string",
29
+ required: true,
30
+ description: "Bridge username (whitelisted user ID)",
31
+ env: "PHILIPS_HUE_USERNAME",
32
+ },
20
33
  });
21
34
  function conn(ctx) {
22
- return { token: ctx.connection.config.accessToken, user: ctx.connection.config.username };
35
+ return {
36
+ token: ctx.connection.config.accessToken,
37
+ user: ctx.connection.config.username,
38
+ };
23
39
  }
24
40
  rl.registerAction("light.get", {
25
41
  description: "Get a light by ID",
@@ -36,7 +52,10 @@ export default function philipsHue(rl) {
36
52
  async execute(input, ctx) {
37
53
  const c = conn(ctx);
38
54
  const data = (await apiRequest(c.token, "GET", `/api/${c.user}/lights`));
39
- const lights = Object.entries(data).map(([id, v]) => ({ id, ...v }));
55
+ const lights = Object.entries(data).map(([id, v]) => ({
56
+ id,
57
+ ...v,
58
+ }));
40
59
  const limit = input?.limit;
41
60
  if (limit)
42
61
  return lights.slice(0, limit);
@@ -47,15 +66,47 @@ export default function philipsHue(rl) {
47
66
  description: "Update a light's state (on/off, brightness, color, etc.)",
48
67
  inputSchema: {
49
68
  lightId: { type: "string", required: true },
50
- on: { type: "boolean", required: true, description: "Turn light on or off" },
51
- bri: { type: "number", required: false, description: "Brightness (1-254)" },
69
+ on: {
70
+ type: "boolean",
71
+ required: true,
72
+ description: "Turn light on or off",
73
+ },
74
+ bri: {
75
+ type: "number",
76
+ required: false,
77
+ description: "Brightness (1-254)",
78
+ },
52
79
  hue: { type: "number", required: false, description: "Hue (0-65535)" },
53
- sat: { type: "number", required: false, description: "Saturation (0-254)" },
54
- ct: { type: "number", required: false, description: "Color temperature (153-500 mirek)" },
55
- xy: { type: "string", required: false, description: "CIE color as 'x,y' (e.g. 0.5,0.5)" },
56
- transitiontime: { type: "number", required: false, description: "Transition time in seconds" },
57
- alert: { type: "string", required: false, description: "none, select, or lselect" },
58
- effect: { type: "string", required: false, description: "none or colorloop" },
80
+ sat: {
81
+ type: "number",
82
+ required: false,
83
+ description: "Saturation (0-254)",
84
+ },
85
+ ct: {
86
+ type: "number",
87
+ required: false,
88
+ description: "Color temperature (153-500 mirek)",
89
+ },
90
+ xy: {
91
+ type: "string",
92
+ required: false,
93
+ description: "CIE color as 'x,y' (e.g. 0.5,0.5)",
94
+ },
95
+ transitiontime: {
96
+ type: "number",
97
+ required: false,
98
+ description: "Transition time in seconds",
99
+ },
100
+ alert: {
101
+ type: "string",
102
+ required: false,
103
+ description: "none, select, or lselect",
104
+ },
105
+ effect: {
106
+ type: "string",
107
+ required: false,
108
+ description: "none or colorloop",
109
+ },
59
110
  },
60
111
  async execute(input, ctx) {
61
112
  const p = input;