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
@@ -26,24 +26,53 @@ async function apiRequest(token, method, endpoint, body) {
26
26
  }
27
27
  // LinkedIn "little text" format escaping
28
28
  function escapeText(text) {
29
- return text.replace(/[(*)\[\]{}<>@|~_]/g, (char) => "\\" + char);
29
+ return text.replace(/[(*)[\]{}<>@|~_]/g, (char) => "\\" + char);
30
30
  }
31
31
  export default function linkedin(rl) {
32
32
  rl.setName("linkedin");
33
33
  rl.setVersion("0.1.0");
34
34
  rl.setConnectionSchema({
35
- accessToken: { type: "string", required: true, description: "LinkedIn OAuth2 access token", env: "LINKEDIN_ACCESS_TOKEN" },
35
+ accessToken: {
36
+ type: "string",
37
+ required: true,
38
+ description: "LinkedIn OAuth2 access token",
39
+ env: "LINKEDIN_ACCESS_TOKEN",
40
+ },
36
41
  });
37
42
  const tok = (ctx) => ctx.connection.config.accessToken;
38
43
  rl.registerAction("post.create", {
39
44
  description: "Create a post on LinkedIn. Supports text-only, article shares, and text with commentary. Image uploads require binary data and are not supported in this plugin.",
40
45
  inputSchema: {
41
- postAs: { type: "string", required: true, description: "'person' or 'organization'" },
42
- personOrOrgId: { type: "string", required: true, description: "Person ID or Organization ID (without URN prefix)" },
43
- text: { type: "string", required: true, description: "Post text/commentary" },
44
- shareMediaCategory: { type: "string", required: false, description: "'NONE' (default, text only), 'ARTICLE' (link share)" },
45
- visibility: { type: "string", required: false, description: "PUBLIC (default) or CONNECTIONS. Only applies when posting as person." },
46
- articleUrl: { type: "string", required: false, description: "URL for article share (required when shareMediaCategory is ARTICLE)" },
46
+ postAs: {
47
+ type: "string",
48
+ required: true,
49
+ description: "'person' or 'organization'",
50
+ },
51
+ personOrOrgId: {
52
+ type: "string",
53
+ required: true,
54
+ description: "Person ID or Organization ID (without URN prefix)",
55
+ },
56
+ text: {
57
+ type: "string",
58
+ required: true,
59
+ description: "Post text/commentary",
60
+ },
61
+ shareMediaCategory: {
62
+ type: "string",
63
+ required: false,
64
+ description: "'NONE' (default, text only), 'ARTICLE' (link share)",
65
+ },
66
+ visibility: {
67
+ type: "string",
68
+ required: false,
69
+ description: "PUBLIC (default) or CONNECTIONS. Only applies when posting as person.",
70
+ },
71
+ articleUrl: {
72
+ type: "string",
73
+ required: false,
74
+ description: "URL for article share (required when shareMediaCategory is ARTICLE)",
75
+ },
47
76
  articleTitle: { type: "string", required: false },
48
77
  articleDescription: { type: "string", required: false },
49
78
  },
@@ -11,7 +11,10 @@ async function apiRequest(apiKey, method, endpoint, body, qs) {
11
11
  method,
12
12
  headers: { "X-API-KEY": apiKey, "Content-Type": "application/json" },
13
13
  };
14
- if (body && Object.keys(body).length > 0 && method !== "GET" && method !== "DELETE")
14
+ if (body &&
15
+ Object.keys(body).length > 0 &&
16
+ method !== "GET" &&
17
+ method !== "DELETE")
15
18
  opts.body = JSON.stringify(body);
16
19
  const res = await fetch(url.toString(), opts);
17
20
  if (!res.ok)
@@ -22,14 +25,23 @@ export default function lonescale(rl) {
22
25
  rl.setName("lonescale");
23
26
  rl.setVersion("0.1.0");
24
27
  rl.setConnectionSchema({
25
- apiKey: { type: "string", required: true, description: "LoneScale API key", env: "LONESCALE_API_KEY" },
28
+ apiKey: {
29
+ type: "string",
30
+ required: true,
31
+ description: "LoneScale API key",
32
+ env: "LONESCALE_API_KEY",
33
+ },
26
34
  });
27
35
  const key = (ctx) => ctx.connection.config.apiKey;
28
36
  rl.registerAction("list.create", {
29
37
  description: "Create a new list",
30
38
  inputSchema: {
31
39
  name: { type: "string", required: true, description: "List name" },
32
- entity: { type: "string", required: true, description: "PEOPLE or COMPANY" },
40
+ entity: {
41
+ type: "string",
42
+ required: true,
43
+ description: "PEOPLE or COMPANY",
44
+ },
33
45
  },
34
46
  async execute(input, ctx) {
35
47
  const { name, entity } = input;
@@ -39,7 +51,11 @@ export default function lonescale(rl) {
39
51
  rl.registerAction("list.list", {
40
52
  description: "List all lists, optionally filtered by entity type",
41
53
  inputSchema: {
42
- entity: { type: "string", required: false, description: "PEOPLE or COMPANY" },
54
+ entity: {
55
+ type: "string",
56
+ required: false,
57
+ description: "PEOPLE or COMPANY",
58
+ },
43
59
  },
44
60
  async execute(input, ctx) {
45
61
  const { entity } = (input ?? {});
@@ -59,13 +75,21 @@ export default function lonescale(rl) {
59
75
  email: { type: "string", required: false },
60
76
  companyName: { type: "string", required: false },
61
77
  currentPosition: { type: "string", required: false },
62
- domain: { type: "string", required: false, description: "Company domain" },
78
+ domain: {
79
+ type: "string",
80
+ required: false,
81
+ description: "Company domain",
82
+ },
63
83
  linkedinUrl: { type: "string", required: false },
64
84
  location: { type: "string", required: false },
65
- contactId: { type: "string", required: false, description: "Contact ID from your source" },
85
+ contactId: {
86
+ type: "string",
87
+ required: false,
88
+ description: "Contact ID from your source",
89
+ },
66
90
  },
67
91
  async execute(input, ctx) {
68
- const { listId, firstName, lastName, fullName, email, companyName, currentPosition, domain, linkedinUrl, location, contactId } = input;
92
+ const { listId, firstName, lastName, fullName, email, companyName, currentPosition, domain, linkedinUrl, location, contactId, } = input;
69
93
  const body = {};
70
94
  if (firstName)
71
95
  body.first_name = firstName;
@@ -96,9 +120,17 @@ export default function lonescale(rl) {
96
120
  listId: { type: "string", required: true, description: "List ID" },
97
121
  companyName: { type: "string", required: true },
98
122
  linkedinUrl: { type: "string", required: false },
99
- domain: { type: "string", required: false, description: "Company domain" },
123
+ domain: {
124
+ type: "string",
125
+ required: false,
126
+ description: "Company domain",
127
+ },
100
128
  location: { type: "string", required: false },
101
- contactId: { type: "string", required: false, description: "Contact ID from your source" },
129
+ contactId: {
130
+ type: "string",
131
+ required: false,
132
+ description: "Contact ID from your source",
133
+ },
102
134
  },
103
135
  async execute(input, ctx) {
104
136
  const { listId, companyName, linkedinUrl, domain, location, contactId } = input;
@@ -21,9 +21,15 @@ async function apiRequest(host, token, method, endpoint, body, qs) {
21
21
  }
22
22
  const opts = {
23
23
  method,
24
- headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
24
+ headers: {
25
+ Authorization: `Bearer ${token}`,
26
+ "Content-Type": "application/json",
27
+ },
25
28
  };
26
- if (body && Object.keys(body).length > 0 && method !== "GET" && method !== "DELETE")
29
+ if (body &&
30
+ Object.keys(body).length > 0 &&
31
+ method !== "GET" &&
32
+ method !== "DELETE")
27
33
  opts.body = JSON.stringify(body);
28
34
  const res = await fetch(url.toString(), opts);
29
35
  if (!res.ok)
@@ -45,7 +51,9 @@ async function searchAll(host, token, endpoint, searchCriteria = {}) {
45
51
  let totalCount = Infinity;
46
52
  while (all.length < totalCount) {
47
53
  searchCriteria.current_page = currentPage;
48
- const data = (await apiRequest(host, token, "GET", endpoint, undefined, { search_criteria: searchCriteria }));
54
+ const data = (await apiRequest(host, token, "GET", endpoint, undefined, {
55
+ search_criteria: searchCriteria,
56
+ }));
49
57
  totalCount = data.total_count ?? 0;
50
58
  const items = data.items;
51
59
  if (items)
@@ -60,8 +68,18 @@ export default function magento(rl) {
60
68
  rl.setName("magento");
61
69
  rl.setVersion("0.1.0");
62
70
  rl.setConnectionSchema({
63
- host: { type: "string", required: true, description: "Magento store URL (e.g. https://mystore.com)", env: "MAGENTO_HOST" },
64
- accessToken: { type: "string", required: true, description: "Integration access token", env: "MAGENTO_ACCESS_TOKEN" },
71
+ host: {
72
+ type: "string",
73
+ required: true,
74
+ description: "Magento store URL (e.g. https://mystore.com)",
75
+ env: "MAGENTO_HOST",
76
+ },
77
+ accessToken: {
78
+ type: "string",
79
+ required: true,
80
+ description: "Integration access token",
81
+ env: "MAGENTO_ACCESS_TOKEN",
82
+ },
65
83
  });
66
84
  const conn = (ctx) => ({
67
85
  host: ctx.connection.config.host.replace(/\/$/, ""),
@@ -75,12 +93,24 @@ export default function magento(rl) {
75
93
  firstname: { type: "string", required: true },
76
94
  lastname: { type: "string", required: true },
77
95
  password: { type: "string", required: false },
78
- addresses: { type: "array", required: false, description: "Array of address objects (street as string, city, postcode, country_id, firstname, lastname, telephone required)" },
79
- customAttributes: { type: "array", required: false, description: "Array of {attribute_code, value} objects" },
80
- additionalFields: { type: "object", required: false, description: "middlename, prefix, suffix, dob, gender (1=male,2=female,3=unspecified), group_id, store_id, website_id, etc." },
96
+ addresses: {
97
+ type: "array",
98
+ required: false,
99
+ description: "Array of address objects (street as string, city, postcode, country_id, firstname, lastname, telephone required)",
100
+ },
101
+ customAttributes: {
102
+ type: "array",
103
+ required: false,
104
+ description: "Array of {attribute_code, value} objects",
105
+ },
106
+ additionalFields: {
107
+ type: "object",
108
+ required: false,
109
+ description: "middlename, prefix, suffix, dob, gender (1=male,2=female,3=unspecified), group_id, store_id, website_id, etc.",
110
+ },
81
111
  },
82
112
  async execute(input, ctx) {
83
- const { email, firstname, lastname, password, addresses, customAttributes, additionalFields } = input;
113
+ const { email, firstname, lastname, password, addresses, customAttributes, additionalFields, } = input;
84
114
  const { host, token } = conn(ctx);
85
115
  const customer = { email, firstname, lastname };
86
116
  if (addresses && Array.isArray(addresses)) {
@@ -110,18 +140,26 @@ export default function magento(rl) {
110
140
  rl.registerAction("customer.list", {
111
141
  description: "Search/list customers using Magento search_criteria",
112
142
  inputSchema: {
113
- searchCriteria: { type: "object", required: false, description: "Magento search_criteria object (filter_groups, sort_orders, page_size). Omit for all." },
114
- limit: { type: "number", required: false, description: "Max results (if not using searchCriteria)" },
143
+ searchCriteria: {
144
+ type: "object",
145
+ required: false,
146
+ description: "Magento search_criteria object (filter_groups, sort_orders, page_size). Omit for all.",
147
+ },
148
+ limit: {
149
+ type: "number",
150
+ required: false,
151
+ description: "Max results (if not using searchCriteria)",
152
+ },
115
153
  },
116
154
  async execute(input, ctx) {
117
155
  const { searchCriteria, limit } = (input ?? {});
118
156
  const { host, token } = conn(ctx);
119
157
  if (searchCriteria) {
120
- const data = await apiRequest(host, token, "GET", "/rest/default/V1/customers/search", undefined, { search_criteria: searchCriteria });
158
+ const data = (await apiRequest(host, token, "GET", "/rest/default/V1/customers/search", undefined, { search_criteria: searchCriteria }));
121
159
  return data.items;
122
160
  }
123
161
  if (limit) {
124
- const data = await apiRequest(host, token, "GET", "/rest/default/V1/customers/search", undefined, { search_criteria: { page_size: limit } });
162
+ const data = (await apiRequest(host, token, "GET", "/rest/default/V1/customers/search", undefined, { search_criteria: { page_size: limit } }));
125
163
  return data.items;
126
164
  }
127
165
  return searchAll(host, token, "/rest/default/V1/customers/search");
@@ -134,14 +172,24 @@ export default function magento(rl) {
134
172
  email: { type: "string", required: true },
135
173
  firstname: { type: "string", required: true },
136
174
  lastname: { type: "string", required: true },
137
- updateFields: { type: "object", required: false, description: "Fields to update (middlename, dob, gender, group_id, etc.)" },
175
+ updateFields: {
176
+ type: "object",
177
+ required: false,
178
+ description: "Fields to update (middlename, dob, gender, group_id, etc.)",
179
+ },
138
180
  addresses: { type: "array", required: false },
139
181
  customAttributes: { type: "array", required: false },
140
182
  },
141
183
  async execute(input, ctx) {
142
- const { customerId, email, firstname, lastname, updateFields, addresses, customAttributes } = input;
184
+ const { customerId, email, firstname, lastname, updateFields, addresses, customAttributes, } = input;
143
185
  const { host, token } = conn(ctx);
144
- const customer = { email, firstname, lastname, id: customerId, website_id: 0 };
186
+ const customer = {
187
+ email,
188
+ firstname,
189
+ lastname,
190
+ id: customerId,
191
+ website_id: 0,
192
+ };
145
193
  if (addresses && Array.isArray(addresses)) {
146
194
  customer.addresses = addresses.map((a) => ({
147
195
  ...a,
@@ -186,18 +234,22 @@ export default function magento(rl) {
186
234
  rl.registerAction("order.list", {
187
235
  description: "Search/list orders",
188
236
  inputSchema: {
189
- searchCriteria: { type: "object", required: false, description: "Magento search_criteria object" },
237
+ searchCriteria: {
238
+ type: "object",
239
+ required: false,
240
+ description: "Magento search_criteria object",
241
+ },
190
242
  limit: { type: "number", required: false },
191
243
  },
192
244
  async execute(input, ctx) {
193
245
  const { searchCriteria, limit } = (input ?? {});
194
246
  const { host, token } = conn(ctx);
195
247
  if (searchCriteria) {
196
- const data = await apiRequest(host, token, "GET", "/rest/default/V1/orders", undefined, { search_criteria: searchCriteria });
248
+ const data = (await apiRequest(host, token, "GET", "/rest/default/V1/orders", undefined, { search_criteria: searchCriteria }));
197
249
  return data.items;
198
250
  }
199
251
  if (limit) {
200
- const data = await apiRequest(host, token, "GET", "/rest/default/V1/orders", undefined, { search_criteria: { page_size: limit } });
252
+ const data = (await apiRequest(host, token, "GET", "/rest/default/V1/orders", undefined, { search_criteria: { page_size: limit } }));
201
253
  return data.items;
202
254
  }
203
255
  return searchAll(host, token, "/rest/default/V1/orders");
@@ -229,18 +281,33 @@ export default function magento(rl) {
229
281
  name: { type: "string", required: true },
230
282
  attributeSetId: { type: "number", required: true },
231
283
  price: { type: "number", required: true },
232
- additionalFields: { type: "object", required: false, description: "status (1=enabled,2=disabled), visibility (1-4), weight, type_id, etc." },
233
- customAttributes: { type: "array", required: false, description: "Array of {attribute_code, value}" },
284
+ additionalFields: {
285
+ type: "object",
286
+ required: false,
287
+ description: "status (1=enabled,2=disabled), visibility (1-4), weight, type_id, etc.",
288
+ },
289
+ customAttributes: {
290
+ type: "array",
291
+ required: false,
292
+ description: "Array of {attribute_code, value}",
293
+ },
234
294
  },
235
295
  async execute(input, ctx) {
236
- const { sku, name, attributeSetId, price, additionalFields, customAttributes } = input;
296
+ const { sku, name, attributeSetId, price, additionalFields, customAttributes, } = input;
237
297
  const { host, token } = conn(ctx);
238
- const product = { sku, name, attribute_set_id: attributeSetId, price };
298
+ const product = {
299
+ sku,
300
+ name,
301
+ attribute_set_id: attributeSetId,
302
+ price,
303
+ };
239
304
  if (customAttributes)
240
305
  product.custom_attributes = customAttributes;
241
306
  if (additionalFields)
242
307
  Object.assign(product, additionalFields);
243
- return apiRequest(host, token, "POST", "/rest/default/V1/products", { product });
308
+ return apiRequest(host, token, "POST", "/rest/default/V1/products", {
309
+ product,
310
+ });
244
311
  },
245
312
  });
246
313
  rl.registerAction("product.get", {
@@ -261,11 +328,11 @@ export default function magento(rl) {
261
328
  const { searchCriteria, limit } = (input ?? {});
262
329
  const { host, token } = conn(ctx);
263
330
  if (searchCriteria) {
264
- const data = await apiRequest(host, token, "GET", "/rest/default/V1/products", undefined, { search_criteria: searchCriteria });
331
+ const data = (await apiRequest(host, token, "GET", "/rest/default/V1/products", undefined, { search_criteria: searchCriteria }));
265
332
  return data.items;
266
333
  }
267
334
  if (limit) {
268
- const data = await apiRequest(host, token, "GET", "/rest/default/V1/products", undefined, { search_criteria: { page_size: limit } });
335
+ const data = (await apiRequest(host, token, "GET", "/rest/default/V1/products", undefined, { search_criteria: { page_size: limit } }));
269
336
  return data.items;
270
337
  }
271
338
  return searchAll(host, token, "/rest/default/V1/products");
@@ -275,7 +342,11 @@ export default function magento(rl) {
275
342
  description: "Update a product by SKU",
276
343
  inputSchema: {
277
344
  sku: { type: "string", required: true },
278
- updateFields: { type: "object", required: true, description: "Fields to update (name, price, status, visibility, weight, attribute_set_id, etc.)" },
345
+ updateFields: {
346
+ type: "object",
347
+ required: true,
348
+ description: "Fields to update (name, price, status, visibility, weight, attribute_set_id, etc.)",
349
+ },
279
350
  customAttributes: { type: "array", required: false },
280
351
  },
281
352
  async execute(input, ctx) {
@@ -2,12 +2,21 @@ export default function mailcheck(rl) {
2
2
  rl.setName("mailcheck");
3
3
  rl.setVersion("0.1.0");
4
4
  rl.setConnectionSchema({
5
- apiKey: { type: "string", required: true, description: "Mailcheck API key", env: "MAILCHECK_API_KEY" },
5
+ apiKey: {
6
+ type: "string",
7
+ required: true,
8
+ description: "Mailcheck API key",
9
+ env: "MAILCHECK_API_KEY",
10
+ },
6
11
  });
7
12
  rl.registerAction("email.check", {
8
13
  description: "Verify an email address",
9
14
  inputSchema: {
10
- email: { type: "string", required: true, description: "Email address to check" },
15
+ email: {
16
+ type: "string",
17
+ required: true,
18
+ description: "Email address to check",
19
+ },
11
20
  },
12
21
  async execute(input, ctx) {
13
22
  const { email } = input;