runline 0.2.0 → 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.
- package/README.md +1 -1
- package/dist/plugins/actionNetwork/src/index.js +118 -25
- package/dist/plugins/activeCampaign/src/index.js +184 -38
- package/dist/plugins/adalo/src/index.js +40 -8
- package/dist/plugins/affinity/src/index.js +100 -20
- package/dist/plugins/agileCrm/src/index.js +115 -27
- package/dist/plugins/airtable/src/index.js +94 -19
- package/dist/plugins/airtop/src/index.js +266 -62
- package/dist/plugins/apiTemplateIo/src/index.js +25 -5
- package/dist/plugins/asana/src/index.js +195 -41
- package/dist/plugins/autopilot/src/index.js +39 -8
- package/dist/plugins/bambooHr/src/index.js +109 -22
- package/dist/plugins/bannerbear/src/index.js +36 -8
- package/dist/plugins/baserow/src/index.js +35 -7
- package/dist/plugins/beeminder/src/index.js +198 -40
- package/dist/plugins/bitly/src/index.js +46 -10
- package/dist/plugins/bitwarden/src/index.js +167 -36
- package/dist/plugins/box/src/index.js +172 -37
- package/dist/plugins/brandfetch/src/index.js +5 -1
- package/dist/plugins/brevo/src/index.js +136 -29
- package/dist/plugins/bubble/src/index.js +76 -17
- package/dist/plugins/chargebee/src/index.js +35 -7
- package/dist/plugins/circleci/src/index.js +50 -10
- package/dist/plugins/ciscoWebex/src/index.js +131 -27
- package/dist/plugins/clearbit/src/index.js +76 -17
- package/dist/plugins/clickup/src/index.js +500 -107
- package/dist/plugins/clockify/src/index.js +229 -47
- package/dist/plugins/cloudflare/src/index.js +28 -6
- package/dist/plugins/cockpit/src/index.js +54 -12
- package/dist/plugins/coda/src/index.js +81 -19
- package/dist/plugins/coingecko/src/index.js +157 -33
- package/dist/plugins/contentful/src/index.js +85 -17
- package/dist/plugins/convertkit/src/index.js +74 -18
- package/dist/plugins/copper/src/index.js +59 -11
- package/dist/plugins/cortex/src/index.js +55 -13
- package/dist/plugins/currents/src/index.js +310 -71
- package/dist/plugins/customerIo/src/index.js +112 -23
- package/dist/plugins/databricks/src/index.js +549 -115
- package/dist/plugins/deepl/src/index.js +26 -6
- package/dist/plugins/demio/src/index.js +56 -11
- package/dist/plugins/dhl/src/index.js +16 -3
- package/dist/plugins/discord/src/index.js +141 -31
- package/dist/plugins/discourse/src/index.js +136 -31
- package/dist/plugins/disqus/src/index.js +96 -20
- package/dist/plugins/docker/src/index.js +20 -4
- package/dist/plugins/drift/src/index.js +19 -5
- package/dist/plugins/dropbox/src/index.js +139 -30
- package/dist/plugins/dropcontact/src/index.js +21 -4
- package/dist/plugins/egoi/src/index.js +61 -15
- package/dist/plugins/elasticsearch/src/index.js +59 -13
- package/dist/plugins/emelia/src/index.js +95 -19
- package/dist/plugins/erpnext/src/index.js +74 -15
- package/dist/plugins/facebookGraph/src/index.js +52 -11
- package/dist/plugins/freshdesk/src/index.js +220 -48
- package/dist/plugins/freshservice/src/index.js +39 -9
- package/dist/plugins/freshworksCrm/src/index.js +58 -12
- package/dist/plugins/getresponse/src/index.js +87 -18
- package/dist/plugins/ghost/src/index.js +114 -26
- package/dist/plugins/github/src/index.js +483 -109
- package/dist/plugins/gitlab/src/index.js +193 -45
- package/dist/plugins/gong/src/index.js +68 -14
- package/dist/plugins/gotify/src/index.js +43 -9
- package/dist/plugins/gotowebinar/src/index.js +233 -47
- package/dist/plugins/grafana/src/index.js +92 -21
- package/dist/plugins/graphql/src/index.js +38 -8
- package/dist/plugins/grist/src/index.js +52 -10
- package/dist/plugins/hackernews/src/index.js +32 -6
- package/dist/plugins/halopsa/src/index.js +131 -26
- package/dist/plugins/harvest/src/index.js +182 -42
- package/dist/plugins/helpscout/src/index.js +153 -31
- package/dist/plugins/highlevel/src/index.js +291 -58
- package/dist/plugins/homeAssistant/src/index.js +124 -26
- package/dist/plugins/hubspot/src/index.js +163 -29
- package/dist/plugins/humanticAi/src/index.js +54 -5
- package/dist/plugins/hunter/src/index.js +21 -4
- package/dist/plugins/intercom/src/index.js +95 -20
- package/dist/plugins/iterable/src/index.js +96 -20
- package/dist/plugins/jenkins/src/index.js +75 -17
- package/dist/plugins/jira/src/index.js +193 -43
- package/dist/plugins/keap/src/index.js +222 -56
- package/dist/plugins/kobotoolbox/src/index.js +113 -25
- package/dist/plugins/lemlist/src/index.js +79 -18
- package/dist/plugins/linear/src/index.js +86 -19
- package/dist/plugins/lingvanex/src/index.js +38 -8
- package/dist/plugins/linkedin/src/index.js +37 -8
- package/dist/plugins/lonescale/src/index.js +41 -9
- package/dist/plugins/magento/src/index.js +98 -27
- package/dist/plugins/mailcheck/src/index.js +11 -2
- package/dist/plugins/mailchimp/src/index.js +193 -42
- package/dist/plugins/mailerlite/src/index.js +61 -12
- package/dist/plugins/mailgun/src/index.js +39 -7
- package/dist/plugins/mailjet/src/index.js +141 -30
- package/dist/plugins/mandrill/src/index.js +67 -14
- package/dist/plugins/marketstack/src/index.js +56 -10
- package/dist/plugins/matrix/src/index.js +97 -20
- package/dist/plugins/mattermost/src/index.js +124 -26
- package/dist/plugins/mautic/src/index.js +129 -26
- package/dist/plugins/medium/src/index.js +64 -13
- package/dist/plugins/messagebird/src/index.js +80 -15
- package/dist/plugins/metabase/src/index.js +57 -12
- package/dist/plugins/misp/src/index.js +135 -33
- package/dist/plugins/mocean/src/index.js +33 -7
- package/dist/plugins/monday/src/index.js +97 -23
- package/dist/plugins/monicaCrm/src/index.js +112 -23
- package/dist/plugins/msg91/src/index.js +11 -2
- package/dist/plugins/nasa/src/index.js +108 -21
- package/dist/plugins/netlify/src/index.js +28 -6
- package/dist/plugins/netscalerAdc/src/index.js +144 -29
- package/dist/plugins/nextcloud/src/index.js +103 -20
- package/dist/plugins/nocodb/src/index.js +57 -11
- package/dist/plugins/notion/src/index.js +148 -37
- package/dist/plugins/npm/src/index.js +59 -12
- package/dist/plugins/odoo/src/index.js +102 -20
- package/dist/plugins/okta/src/index.js +50 -10
- package/dist/plugins/oneSimpleApi/src/index.js +84 -17
- package/dist/plugins/onfleet/src/index.js +139 -32
- package/dist/plugins/openThesaurus/src/index.js +46 -9
- package/dist/plugins/openweathermap/src/index.js +31 -6
- package/dist/plugins/oura/src/index.js +36 -7
- package/dist/plugins/paddle/src/index.js +80 -17
- package/dist/plugins/pagerduty/src/index.js +53 -12
- package/dist/plugins/paypal/src/index.js +51 -11
- package/dist/plugins/peekalink/src/index.js +12 -3
- package/dist/plugins/phantombuster/src/index.js +39 -8
- package/dist/plugins/philipsHue/src/index.js +64 -13
- package/dist/plugins/pipedrive/src/index.js +167 -45
- package/dist/plugins/plivo/src/index.js +43 -8
- package/dist/plugins/postbin/src/index.js +9 -2
- package/dist/plugins/posthog/src/index.js +50 -13
- package/dist/plugins/profitwell/src/index.js +24 -5
- package/dist/plugins/pushbullet/src/index.js +45 -9
- package/dist/plugins/pushcut/src/index.js +31 -6
- package/dist/plugins/pushover/src/index.js +51 -10
- package/dist/plugins/quickbase/src/index.js +66 -13
- package/dist/plugins/quickbooks/src/index.js +86 -19
- package/dist/plugins/quickchart/src/index.js +35 -7
- package/dist/plugins/raindrop/src/index.js +54 -13
- package/dist/plugins/reddit/src/index.js +73 -18
- package/dist/plugins/rocketchat/src/index.js +47 -9
- package/dist/plugins/rundeck/src/index.js +26 -5
- package/dist/plugins/salesforce/src/index.js +161 -31
- package/dist/plugins/salesmate/src/index.js +75 -16
- package/dist/plugins/securityScorecard/src/index.js +73 -15
- package/dist/plugins/segment/src/index.js +21 -4
- package/dist/plugins/sendgrid/src/index.js +102 -24
- package/dist/plugins/sendy/src/index.js +54 -11
- package/dist/plugins/sentry/src/index.js +174 -34
- package/dist/plugins/servicenow/src/index.js +120 -27
- package/dist/plugins/shopify/src/index.js +53 -12
- package/dist/plugins/signl4/src/index.js +16 -3
- package/dist/plugins/slack/src/index.js +407 -105
- package/dist/plugins/sms77/src/index.js +26 -5
- package/dist/plugins/splunk/src/index.js +186 -45
- package/dist/plugins/spotify/src/index.js +265 -66
- package/dist/plugins/stackby/src/index.js +18 -6
- package/dist/plugins/storyblok/src/index.js +57 -11
- package/dist/plugins/strapi/src/index.js +63 -12
- package/dist/plugins/strava/src/index.js +58 -13
- package/dist/plugins/stripe/src/index.js +143 -30
- package/dist/plugins/supabase/src/index.js +49 -10
- package/dist/plugins/syncromsp/src/index.js +245 -67
- package/dist/plugins/tapfiliate/src/index.js +57 -14
- package/dist/plugins/telegram/src/index.js +202 -39
- package/dist/plugins/thehive/src/index.js +271 -66
- package/dist/plugins/thehiveProject/src/index.js +457 -89
- package/dist/plugins/todoist/src/index.js +326 -77
- package/dist/plugins/travisci/src/index.js +35 -8
- package/dist/plugins/trello/src/index.js +204 -46
- package/dist/plugins/twake/src/index.js +10 -2
- package/dist/plugins/twilio/src/index.js +56 -11
- package/dist/plugins/twist/src/index.js +241 -48
- package/dist/plugins/twitter/src/index.js +128 -30
- package/dist/plugins/unleashedSoftware/src/index.js +30 -6
- package/dist/plugins/uplead/src/index.js +9 -2
- package/dist/plugins/uproc/src/index.js +31 -6
- package/dist/plugins/uptimerobot/src/index.js +119 -25
- package/dist/plugins/urlscanio/src/index.js +25 -6
- package/dist/plugins/vero/src/index.js +68 -13
- package/dist/plugins/vonage/src/index.js +32 -6
- package/dist/plugins/wekan/src/index.js +297 -52
- package/dist/plugins/woocommerce/src/index.js +57 -12
- package/dist/plugins/wordpress/src/index.js +94 -18
- package/dist/plugins/xero/src/index.js +79 -13
- package/dist/plugins/yourls/src/index.js +33 -6
- package/dist/plugins/zammad/src/index.js +139 -36
- package/dist/plugins/zendesk/src/index.js +201 -48
- package/dist/plugins/zoho/src/index.js +88 -21
- package/dist/plugins/zoom/src/index.js +41 -7
- package/dist/plugins/zulip/src/index.js +101 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# runline
|
|
2
2
|
|
|
3
|
-
The runline library and CLI. See the [monorepo README](../../README.md) for the full story, quickstart, and plugin catalog.
|
|
3
|
+
The runline library and CLI. Published on npm as [`runline`](https://www.npmjs.com/package/runline). See the [monorepo README](../../README.md) for the full story, quickstart, and plugin catalog.
|
|
4
4
|
|
|
5
5
|
## What lives here
|
|
6
6
|
|
|
@@ -75,7 +75,11 @@ export default function actionNetwork(rl) {
|
|
|
75
75
|
description: "Get a specific attendance record",
|
|
76
76
|
inputSchema: {
|
|
77
77
|
eventId: { type: "string", required: true, description: "Event ID" },
|
|
78
|
-
attendanceId: {
|
|
78
|
+
attendanceId: {
|
|
79
|
+
type: "string",
|
|
80
|
+
required: true,
|
|
81
|
+
description: "Attendance ID",
|
|
82
|
+
},
|
|
79
83
|
},
|
|
80
84
|
async execute(input, ctx) {
|
|
81
85
|
const { eventId, attendanceId } = input;
|
|
@@ -86,7 +90,11 @@ export default function actionNetwork(rl) {
|
|
|
86
90
|
description: "List attendances for an event",
|
|
87
91
|
inputSchema: {
|
|
88
92
|
eventId: { type: "string", required: true, description: "Event ID" },
|
|
89
|
-
limit: {
|
|
93
|
+
limit: {
|
|
94
|
+
type: "number",
|
|
95
|
+
required: false,
|
|
96
|
+
description: "Max results to return",
|
|
97
|
+
},
|
|
90
98
|
},
|
|
91
99
|
async execute(input, ctx) {
|
|
92
100
|
const { eventId, limit } = input;
|
|
@@ -98,12 +106,23 @@ export default function actionNetwork(rl) {
|
|
|
98
106
|
description: "Create a new event",
|
|
99
107
|
inputSchema: {
|
|
100
108
|
title: { type: "string", required: true, description: "Event title" },
|
|
101
|
-
originSystem: {
|
|
102
|
-
|
|
109
|
+
originSystem: {
|
|
110
|
+
type: "string",
|
|
111
|
+
required: true,
|
|
112
|
+
description: "Origin system identifier",
|
|
113
|
+
},
|
|
114
|
+
description: {
|
|
115
|
+
type: "string",
|
|
116
|
+
required: false,
|
|
117
|
+
description: "Event description",
|
|
118
|
+
},
|
|
103
119
|
},
|
|
104
120
|
async execute(input, ctx) {
|
|
105
121
|
const { title, originSystem, description, ...rest } = input;
|
|
106
|
-
const body = {
|
|
122
|
+
const body = {
|
|
123
|
+
title,
|
|
124
|
+
origin_system: originSystem,
|
|
125
|
+
};
|
|
107
126
|
if (description)
|
|
108
127
|
body.description = description;
|
|
109
128
|
Object.assign(body, rest);
|
|
@@ -123,7 +142,11 @@ export default function actionNetwork(rl) {
|
|
|
123
142
|
rl.registerAction("event.list", {
|
|
124
143
|
description: "List all events",
|
|
125
144
|
inputSchema: {
|
|
126
|
-
limit: {
|
|
145
|
+
limit: {
|
|
146
|
+
type: "number",
|
|
147
|
+
required: false,
|
|
148
|
+
description: "Max results to return",
|
|
149
|
+
},
|
|
127
150
|
},
|
|
128
151
|
async execute(input, ctx) {
|
|
129
152
|
const { limit } = input ?? {};
|
|
@@ -142,7 +165,9 @@ export default function actionNetwork(rl) {
|
|
|
142
165
|
const { email, givenName, familyName, ...rest } = input;
|
|
143
166
|
const body = {
|
|
144
167
|
person: {
|
|
145
|
-
email_addresses: [
|
|
168
|
+
email_addresses: [
|
|
169
|
+
{ address: email, primary: true, status: "subscribed" },
|
|
170
|
+
],
|
|
146
171
|
...(givenName ? { given_name: givenName } : {}),
|
|
147
172
|
...(familyName ? { family_name: familyName } : {}),
|
|
148
173
|
...rest,
|
|
@@ -164,7 +189,11 @@ export default function actionNetwork(rl) {
|
|
|
164
189
|
rl.registerAction("person.list", {
|
|
165
190
|
description: "List all people",
|
|
166
191
|
inputSchema: {
|
|
167
|
-
limit: {
|
|
192
|
+
limit: {
|
|
193
|
+
type: "number",
|
|
194
|
+
required: false,
|
|
195
|
+
description: "Max results to return",
|
|
196
|
+
},
|
|
168
197
|
},
|
|
169
198
|
async execute(input, ctx) {
|
|
170
199
|
const { limit } = input ?? {};
|
|
@@ -193,14 +222,28 @@ export default function actionNetwork(rl) {
|
|
|
193
222
|
description: "Create a new petition",
|
|
194
223
|
inputSchema: {
|
|
195
224
|
title: { type: "string", required: true, description: "Petition title" },
|
|
196
|
-
originSystem: {
|
|
197
|
-
|
|
225
|
+
originSystem: {
|
|
226
|
+
type: "string",
|
|
227
|
+
required: true,
|
|
228
|
+
description: "Origin system identifier",
|
|
229
|
+
},
|
|
230
|
+
target: {
|
|
231
|
+
type: "string",
|
|
232
|
+
required: false,
|
|
233
|
+
description: "Comma-separated list of targets",
|
|
234
|
+
},
|
|
198
235
|
},
|
|
199
236
|
async execute(input, ctx) {
|
|
200
237
|
const { title, originSystem, target, ...rest } = input;
|
|
201
|
-
const body = {
|
|
238
|
+
const body = {
|
|
239
|
+
title,
|
|
240
|
+
origin_system: originSystem,
|
|
241
|
+
...rest,
|
|
242
|
+
};
|
|
202
243
|
if (target) {
|
|
203
|
-
body.target = target
|
|
244
|
+
body.target = target
|
|
245
|
+
.split(",")
|
|
246
|
+
.map((t) => ({ name: t.trim() }));
|
|
204
247
|
}
|
|
205
248
|
return apiRequest(ctx.connection.config.apiKey, "POST", "/petitions", body);
|
|
206
249
|
},
|
|
@@ -208,7 +251,11 @@ export default function actionNetwork(rl) {
|
|
|
208
251
|
rl.registerAction("petition.get", {
|
|
209
252
|
description: "Get a specific petition",
|
|
210
253
|
inputSchema: {
|
|
211
|
-
petitionId: {
|
|
254
|
+
petitionId: {
|
|
255
|
+
type: "string",
|
|
256
|
+
required: true,
|
|
257
|
+
description: "Petition ID",
|
|
258
|
+
},
|
|
212
259
|
},
|
|
213
260
|
async execute(input, ctx) {
|
|
214
261
|
const { petitionId } = input;
|
|
@@ -218,7 +265,11 @@ export default function actionNetwork(rl) {
|
|
|
218
265
|
rl.registerAction("petition.list", {
|
|
219
266
|
description: "List all petitions",
|
|
220
267
|
inputSchema: {
|
|
221
|
-
limit: {
|
|
268
|
+
limit: {
|
|
269
|
+
type: "number",
|
|
270
|
+
required: false,
|
|
271
|
+
description: "Max results to return",
|
|
272
|
+
},
|
|
222
273
|
},
|
|
223
274
|
async execute(input, ctx) {
|
|
224
275
|
const { limit } = input ?? {};
|
|
@@ -228,15 +279,25 @@ export default function actionNetwork(rl) {
|
|
|
228
279
|
rl.registerAction("petition.update", {
|
|
229
280
|
description: "Update a petition",
|
|
230
281
|
inputSchema: {
|
|
231
|
-
petitionId: {
|
|
282
|
+
petitionId: {
|
|
283
|
+
type: "string",
|
|
284
|
+
required: true,
|
|
285
|
+
description: "Petition ID",
|
|
286
|
+
},
|
|
232
287
|
title: { type: "string", required: false, description: "Petition title" },
|
|
233
|
-
target: {
|
|
288
|
+
target: {
|
|
289
|
+
type: "string",
|
|
290
|
+
required: false,
|
|
291
|
+
description: "Comma-separated list of targets",
|
|
292
|
+
},
|
|
234
293
|
},
|
|
235
294
|
async execute(input, ctx) {
|
|
236
295
|
const { petitionId, target, ...rest } = input;
|
|
237
296
|
const body = { ...rest };
|
|
238
297
|
if (target) {
|
|
239
|
-
body.target = target
|
|
298
|
+
body.target = target
|
|
299
|
+
.split(",")
|
|
300
|
+
.map((t) => ({ name: t.trim() }));
|
|
240
301
|
}
|
|
241
302
|
return apiRequest(ctx.connection.config.apiKey, "PUT", `/petitions/${petitionId}`, body);
|
|
242
303
|
},
|
|
@@ -245,7 +306,11 @@ export default function actionNetwork(rl) {
|
|
|
245
306
|
rl.registerAction("signature.create", {
|
|
246
307
|
description: "Add a signature to a petition",
|
|
247
308
|
inputSchema: {
|
|
248
|
-
petitionId: {
|
|
309
|
+
petitionId: {
|
|
310
|
+
type: "string",
|
|
311
|
+
required: true,
|
|
312
|
+
description: "Petition ID",
|
|
313
|
+
},
|
|
249
314
|
personId: { type: "string", required: true, description: "Person ID" },
|
|
250
315
|
},
|
|
251
316
|
async execute(input, ctx) {
|
|
@@ -261,8 +326,16 @@ export default function actionNetwork(rl) {
|
|
|
261
326
|
rl.registerAction("signature.get", {
|
|
262
327
|
description: "Get a specific signature",
|
|
263
328
|
inputSchema: {
|
|
264
|
-
petitionId: {
|
|
265
|
-
|
|
329
|
+
petitionId: {
|
|
330
|
+
type: "string",
|
|
331
|
+
required: true,
|
|
332
|
+
description: "Petition ID",
|
|
333
|
+
},
|
|
334
|
+
signatureId: {
|
|
335
|
+
type: "string",
|
|
336
|
+
required: true,
|
|
337
|
+
description: "Signature ID",
|
|
338
|
+
},
|
|
266
339
|
},
|
|
267
340
|
async execute(input, ctx) {
|
|
268
341
|
const { petitionId, signatureId } = input;
|
|
@@ -272,8 +345,16 @@ export default function actionNetwork(rl) {
|
|
|
272
345
|
rl.registerAction("signature.list", {
|
|
273
346
|
description: "List signatures on a petition",
|
|
274
347
|
inputSchema: {
|
|
275
|
-
petitionId: {
|
|
276
|
-
|
|
348
|
+
petitionId: {
|
|
349
|
+
type: "string",
|
|
350
|
+
required: true,
|
|
351
|
+
description: "Petition ID",
|
|
352
|
+
},
|
|
353
|
+
limit: {
|
|
354
|
+
type: "number",
|
|
355
|
+
required: false,
|
|
356
|
+
description: "Max results to return",
|
|
357
|
+
},
|
|
277
358
|
},
|
|
278
359
|
async execute(input, ctx) {
|
|
279
360
|
const { petitionId, limit } = input;
|
|
@@ -283,8 +364,16 @@ export default function actionNetwork(rl) {
|
|
|
283
364
|
rl.registerAction("signature.update", {
|
|
284
365
|
description: "Update a signature",
|
|
285
366
|
inputSchema: {
|
|
286
|
-
petitionId: {
|
|
287
|
-
|
|
367
|
+
petitionId: {
|
|
368
|
+
type: "string",
|
|
369
|
+
required: true,
|
|
370
|
+
description: "Petition ID",
|
|
371
|
+
},
|
|
372
|
+
signatureId: {
|
|
373
|
+
type: "string",
|
|
374
|
+
required: true,
|
|
375
|
+
description: "Signature ID",
|
|
376
|
+
},
|
|
288
377
|
},
|
|
289
378
|
async execute(input, ctx) {
|
|
290
379
|
const { petitionId, signatureId, ...rest } = input;
|
|
@@ -315,7 +404,11 @@ export default function actionNetwork(rl) {
|
|
|
315
404
|
rl.registerAction("tag.list", {
|
|
316
405
|
description: "List all tags",
|
|
317
406
|
inputSchema: {
|
|
318
|
-
limit: {
|
|
407
|
+
limit: {
|
|
408
|
+
type: "number",
|
|
409
|
+
required: false,
|
|
410
|
+
description: "Max results to return",
|
|
411
|
+
},
|
|
319
412
|
},
|
|
320
413
|
async execute(input, ctx) {
|
|
321
414
|
const { limit } = input ?? {};
|
|
@@ -76,7 +76,11 @@ export default function activeCampaign(rl) {
|
|
|
76
76
|
firstName: { type: "string", required: false, description: "First name" },
|
|
77
77
|
lastName: { type: "string", required: false, description: "Last name" },
|
|
78
78
|
phone: { type: "string", required: false, description: "Phone number" },
|
|
79
|
-
updateIfExists: {
|
|
79
|
+
updateIfExists: {
|
|
80
|
+
type: "boolean",
|
|
81
|
+
required: false,
|
|
82
|
+
description: "Update if contact exists",
|
|
83
|
+
},
|
|
80
84
|
},
|
|
81
85
|
async execute(input, ctx) {
|
|
82
86
|
const { email, firstName, lastName, phone, updateIfExists, ...rest } = input;
|
|
@@ -88,7 +92,9 @@ export default function activeCampaign(rl) {
|
|
|
88
92
|
contact.lastName = lastName;
|
|
89
93
|
if (phone)
|
|
90
94
|
contact.phone = phone;
|
|
91
|
-
const endpoint = updateIfExists
|
|
95
|
+
const endpoint = updateIfExists
|
|
96
|
+
? "/api/3/contact/sync"
|
|
97
|
+
: "/api/3/contacts";
|
|
92
98
|
return apiRequest(baseUrl, apiKey, "POST", endpoint, { contact });
|
|
93
99
|
},
|
|
94
100
|
});
|
|
@@ -106,7 +112,11 @@ export default function activeCampaign(rl) {
|
|
|
106
112
|
rl.registerAction("contact.list", {
|
|
107
113
|
description: "List all contacts",
|
|
108
114
|
inputSchema: {
|
|
109
|
-
limit: {
|
|
115
|
+
limit: {
|
|
116
|
+
type: "number",
|
|
117
|
+
required: false,
|
|
118
|
+
description: "Max results to return",
|
|
119
|
+
},
|
|
110
120
|
},
|
|
111
121
|
async execute(input, ctx) {
|
|
112
122
|
const { limit } = input ?? {};
|
|
@@ -170,7 +180,11 @@ export default function activeCampaign(rl) {
|
|
|
170
180
|
rl.registerAction("account.list", {
|
|
171
181
|
description: "List all accounts",
|
|
172
182
|
inputSchema: {
|
|
173
|
-
limit: {
|
|
183
|
+
limit: {
|
|
184
|
+
type: "number",
|
|
185
|
+
required: false,
|
|
186
|
+
description: "Max results to return",
|
|
187
|
+
},
|
|
174
188
|
},
|
|
175
189
|
async execute(input, ctx) {
|
|
176
190
|
const { limit } = input ?? {};
|
|
@@ -222,7 +236,11 @@ export default function activeCampaign(rl) {
|
|
|
222
236
|
rl.registerAction("accountContact.update", {
|
|
223
237
|
description: "Update an account-contact association",
|
|
224
238
|
inputSchema: {
|
|
225
|
-
accountContactId: {
|
|
239
|
+
accountContactId: {
|
|
240
|
+
type: "string",
|
|
241
|
+
required: true,
|
|
242
|
+
description: "Account Contact ID",
|
|
243
|
+
},
|
|
226
244
|
jobTitle: { type: "string", required: false, description: "Job title" },
|
|
227
245
|
},
|
|
228
246
|
async execute(input, ctx) {
|
|
@@ -236,7 +254,11 @@ export default function activeCampaign(rl) {
|
|
|
236
254
|
rl.registerAction("accountContact.delete", {
|
|
237
255
|
description: "Remove a contact from an account",
|
|
238
256
|
inputSchema: {
|
|
239
|
-
accountContactId: {
|
|
257
|
+
accountContactId: {
|
|
258
|
+
type: "string",
|
|
259
|
+
required: true,
|
|
260
|
+
description: "Account Contact ID",
|
|
261
|
+
},
|
|
240
262
|
},
|
|
241
263
|
async execute(input, ctx) {
|
|
242
264
|
const { accountContactId } = input;
|
|
@@ -262,7 +284,11 @@ export default function activeCampaign(rl) {
|
|
|
262
284
|
rl.registerAction("contactTag.remove", {
|
|
263
285
|
description: "Remove a tag from a contact",
|
|
264
286
|
inputSchema: {
|
|
265
|
-
contactTagId: {
|
|
287
|
+
contactTagId: {
|
|
288
|
+
type: "string",
|
|
289
|
+
required: true,
|
|
290
|
+
description: "Contact Tag ID",
|
|
291
|
+
},
|
|
266
292
|
},
|
|
267
293
|
async execute(input, ctx) {
|
|
268
294
|
const { contactTagId } = input;
|
|
@@ -303,7 +329,11 @@ export default function activeCampaign(rl) {
|
|
|
303
329
|
rl.registerAction("list.list", {
|
|
304
330
|
description: "List all lists",
|
|
305
331
|
inputSchema: {
|
|
306
|
-
limit: {
|
|
332
|
+
limit: {
|
|
333
|
+
type: "number",
|
|
334
|
+
required: false,
|
|
335
|
+
description: "Max results to return",
|
|
336
|
+
},
|
|
307
337
|
},
|
|
308
338
|
async execute(input, ctx) {
|
|
309
339
|
const { limit } = input ?? {};
|
|
@@ -316,7 +346,11 @@ export default function activeCampaign(rl) {
|
|
|
316
346
|
description: "Create a new tag",
|
|
317
347
|
inputSchema: {
|
|
318
348
|
name: { type: "string", required: true, description: "Tag name" },
|
|
319
|
-
tagType: {
|
|
349
|
+
tagType: {
|
|
350
|
+
type: "string",
|
|
351
|
+
required: true,
|
|
352
|
+
description: "Tag type (contact, template, etc)",
|
|
353
|
+
},
|
|
320
354
|
},
|
|
321
355
|
async execute(input, ctx) {
|
|
322
356
|
const { name, tagType, ...rest } = input;
|
|
@@ -340,7 +374,11 @@ export default function activeCampaign(rl) {
|
|
|
340
374
|
rl.registerAction("tag.list", {
|
|
341
375
|
description: "List all tags",
|
|
342
376
|
inputSchema: {
|
|
343
|
-
limit: {
|
|
377
|
+
limit: {
|
|
378
|
+
type: "number",
|
|
379
|
+
required: false,
|
|
380
|
+
description: "Max results to return",
|
|
381
|
+
},
|
|
344
382
|
},
|
|
345
383
|
async execute(input, ctx) {
|
|
346
384
|
const { limit } = input ?? {};
|
|
@@ -363,7 +401,9 @@ export default function activeCampaign(rl) {
|
|
|
363
401
|
tag.tag = name;
|
|
364
402
|
if (tagType)
|
|
365
403
|
tag.tagType = tagType;
|
|
366
|
-
return apiRequest(baseUrl, apiKey, "PUT", `/api/3/tags/${tagId}`, {
|
|
404
|
+
return apiRequest(baseUrl, apiKey, "PUT", `/api/3/tags/${tagId}`, {
|
|
405
|
+
tag,
|
|
406
|
+
});
|
|
367
407
|
},
|
|
368
408
|
});
|
|
369
409
|
rl.registerAction("tag.delete", {
|
|
@@ -383,9 +423,21 @@ export default function activeCampaign(rl) {
|
|
|
383
423
|
inputSchema: {
|
|
384
424
|
title: { type: "string", required: true, description: "Deal title" },
|
|
385
425
|
contact: { type: "string", required: true, description: "Contact ID" },
|
|
386
|
-
value: {
|
|
387
|
-
|
|
388
|
-
|
|
426
|
+
value: {
|
|
427
|
+
type: "number",
|
|
428
|
+
required: true,
|
|
429
|
+
description: "Deal value in cents",
|
|
430
|
+
},
|
|
431
|
+
currency: {
|
|
432
|
+
type: "string",
|
|
433
|
+
required: true,
|
|
434
|
+
description: "Currency code (e.g. USD)",
|
|
435
|
+
},
|
|
436
|
+
group: {
|
|
437
|
+
type: "string",
|
|
438
|
+
required: false,
|
|
439
|
+
description: "Pipeline/group ID",
|
|
440
|
+
},
|
|
389
441
|
stage: { type: "string", required: false, description: "Stage ID" },
|
|
390
442
|
owner: { type: "string", required: false, description: "Owner ID" },
|
|
391
443
|
},
|
|
@@ -411,7 +463,11 @@ export default function activeCampaign(rl) {
|
|
|
411
463
|
rl.registerAction("deal.list", {
|
|
412
464
|
description: "List all deals",
|
|
413
465
|
inputSchema: {
|
|
414
|
-
limit: {
|
|
466
|
+
limit: {
|
|
467
|
+
type: "number",
|
|
468
|
+
required: false,
|
|
469
|
+
description: "Max results to return",
|
|
470
|
+
},
|
|
415
471
|
},
|
|
416
472
|
async execute(input, ctx) {
|
|
417
473
|
const { limit } = input ?? {};
|
|
@@ -424,12 +480,18 @@ export default function activeCampaign(rl) {
|
|
|
424
480
|
inputSchema: {
|
|
425
481
|
dealId: { type: "string", required: true, description: "Deal ID" },
|
|
426
482
|
title: { type: "string", required: false, description: "Deal title" },
|
|
427
|
-
value: {
|
|
483
|
+
value: {
|
|
484
|
+
type: "number",
|
|
485
|
+
required: false,
|
|
486
|
+
description: "Deal value in cents",
|
|
487
|
+
},
|
|
428
488
|
},
|
|
429
489
|
async execute(input, ctx) {
|
|
430
490
|
const { dealId, ...fields } = input;
|
|
431
491
|
const { baseUrl, apiKey } = getConn(ctx);
|
|
432
|
-
return apiRequest(baseUrl, apiKey, "PUT", `/api/3/deals/${dealId}`, {
|
|
492
|
+
return apiRequest(baseUrl, apiKey, "PUT", `/api/3/deals/${dealId}`, {
|
|
493
|
+
deal: fields,
|
|
494
|
+
});
|
|
433
495
|
},
|
|
434
496
|
});
|
|
435
497
|
rl.registerAction("deal.delete", {
|
|
@@ -477,7 +539,11 @@ export default function activeCampaign(rl) {
|
|
|
477
539
|
description: "Create a new connection (e-commerce integration)",
|
|
478
540
|
inputSchema: {
|
|
479
541
|
service: { type: "string", required: true, description: "Service name" },
|
|
480
|
-
externalid: {
|
|
542
|
+
externalid: {
|
|
543
|
+
type: "string",
|
|
544
|
+
required: true,
|
|
545
|
+
description: "External ID",
|
|
546
|
+
},
|
|
481
547
|
name: { type: "string", required: true, description: "Connection name" },
|
|
482
548
|
logoUrl: { type: "string", required: true, description: "Logo URL" },
|
|
483
549
|
linkUrl: { type: "string", required: true, description: "Link URL" },
|
|
@@ -492,7 +558,11 @@ export default function activeCampaign(rl) {
|
|
|
492
558
|
rl.registerAction("connection.get", {
|
|
493
559
|
description: "Get a connection by ID",
|
|
494
560
|
inputSchema: {
|
|
495
|
-
connectionId: {
|
|
561
|
+
connectionId: {
|
|
562
|
+
type: "string",
|
|
563
|
+
required: true,
|
|
564
|
+
description: "Connection ID",
|
|
565
|
+
},
|
|
496
566
|
},
|
|
497
567
|
async execute(input, ctx) {
|
|
498
568
|
const { connectionId } = input;
|
|
@@ -503,7 +573,11 @@ export default function activeCampaign(rl) {
|
|
|
503
573
|
rl.registerAction("connection.list", {
|
|
504
574
|
description: "List all connections",
|
|
505
575
|
inputSchema: {
|
|
506
|
-
limit: {
|
|
576
|
+
limit: {
|
|
577
|
+
type: "number",
|
|
578
|
+
required: false,
|
|
579
|
+
description: "Max results to return",
|
|
580
|
+
},
|
|
507
581
|
},
|
|
508
582
|
async execute(input, ctx) {
|
|
509
583
|
const { limit } = input ?? {};
|
|
@@ -514,7 +588,11 @@ export default function activeCampaign(rl) {
|
|
|
514
588
|
rl.registerAction("connection.update", {
|
|
515
589
|
description: "Update a connection",
|
|
516
590
|
inputSchema: {
|
|
517
|
-
connectionId: {
|
|
591
|
+
connectionId: {
|
|
592
|
+
type: "string",
|
|
593
|
+
required: true,
|
|
594
|
+
description: "Connection ID",
|
|
595
|
+
},
|
|
518
596
|
},
|
|
519
597
|
async execute(input, ctx) {
|
|
520
598
|
const { connectionId, ...fields } = input;
|
|
@@ -527,7 +605,11 @@ export default function activeCampaign(rl) {
|
|
|
527
605
|
rl.registerAction("connection.delete", {
|
|
528
606
|
description: "Delete a connection",
|
|
529
607
|
inputSchema: {
|
|
530
|
-
connectionId: {
|
|
608
|
+
connectionId: {
|
|
609
|
+
type: "string",
|
|
610
|
+
required: true,
|
|
611
|
+
description: "Connection ID",
|
|
612
|
+
},
|
|
531
613
|
},
|
|
532
614
|
async execute(input, ctx) {
|
|
533
615
|
const { connectionId } = input;
|
|
@@ -539,10 +621,22 @@ export default function activeCampaign(rl) {
|
|
|
539
621
|
rl.registerAction("ecomCustomer.create", {
|
|
540
622
|
description: "Create an e-commerce customer",
|
|
541
623
|
inputSchema: {
|
|
542
|
-
connectionid: {
|
|
543
|
-
|
|
624
|
+
connectionid: {
|
|
625
|
+
type: "string",
|
|
626
|
+
required: true,
|
|
627
|
+
description: "Connection ID",
|
|
628
|
+
},
|
|
629
|
+
externalid: {
|
|
630
|
+
type: "string",
|
|
631
|
+
required: true,
|
|
632
|
+
description: "External customer ID",
|
|
633
|
+
},
|
|
544
634
|
email: { type: "string", required: true, description: "Customer email" },
|
|
545
|
-
acceptsMarketing: {
|
|
635
|
+
acceptsMarketing: {
|
|
636
|
+
type: "boolean",
|
|
637
|
+
required: false,
|
|
638
|
+
description: "Accepts marketing",
|
|
639
|
+
},
|
|
546
640
|
},
|
|
547
641
|
async execute(input, ctx) {
|
|
548
642
|
const { acceptsMarketing, ...rest } = input;
|
|
@@ -559,7 +653,11 @@ export default function activeCampaign(rl) {
|
|
|
559
653
|
rl.registerAction("ecomCustomer.get", {
|
|
560
654
|
description: "Get an e-commerce customer by ID",
|
|
561
655
|
inputSchema: {
|
|
562
|
-
customerId: {
|
|
656
|
+
customerId: {
|
|
657
|
+
type: "string",
|
|
658
|
+
required: true,
|
|
659
|
+
description: "Customer ID",
|
|
660
|
+
},
|
|
563
661
|
},
|
|
564
662
|
async execute(input, ctx) {
|
|
565
663
|
const { customerId } = input;
|
|
@@ -570,7 +668,11 @@ export default function activeCampaign(rl) {
|
|
|
570
668
|
rl.registerAction("ecomCustomer.list", {
|
|
571
669
|
description: "List all e-commerce customers",
|
|
572
670
|
inputSchema: {
|
|
573
|
-
limit: {
|
|
671
|
+
limit: {
|
|
672
|
+
type: "number",
|
|
673
|
+
required: false,
|
|
674
|
+
description: "Max results to return",
|
|
675
|
+
},
|
|
574
676
|
},
|
|
575
677
|
async execute(input, ctx) {
|
|
576
678
|
const { limit } = input ?? {};
|
|
@@ -581,8 +683,16 @@ export default function activeCampaign(rl) {
|
|
|
581
683
|
rl.registerAction("ecomCustomer.update", {
|
|
582
684
|
description: "Update an e-commerce customer",
|
|
583
685
|
inputSchema: {
|
|
584
|
-
customerId: {
|
|
585
|
-
|
|
686
|
+
customerId: {
|
|
687
|
+
type: "string",
|
|
688
|
+
required: true,
|
|
689
|
+
description: "Customer ID",
|
|
690
|
+
},
|
|
691
|
+
acceptsMarketing: {
|
|
692
|
+
type: "boolean",
|
|
693
|
+
required: false,
|
|
694
|
+
description: "Accepts marketing",
|
|
695
|
+
},
|
|
586
696
|
},
|
|
587
697
|
async execute(input, ctx) {
|
|
588
698
|
const { customerId, acceptsMarketing, ...rest } = input;
|
|
@@ -599,7 +709,11 @@ export default function activeCampaign(rl) {
|
|
|
599
709
|
rl.registerAction("ecomCustomer.delete", {
|
|
600
710
|
description: "Delete an e-commerce customer",
|
|
601
711
|
inputSchema: {
|
|
602
|
-
customerId: {
|
|
712
|
+
customerId: {
|
|
713
|
+
type: "string",
|
|
714
|
+
required: true,
|
|
715
|
+
description: "Customer ID",
|
|
716
|
+
},
|
|
603
717
|
},
|
|
604
718
|
async execute(input, ctx) {
|
|
605
719
|
const { customerId } = input;
|
|
@@ -613,12 +727,36 @@ export default function activeCampaign(rl) {
|
|
|
613
727
|
inputSchema: {
|
|
614
728
|
source: { type: "string", required: true, description: "Order source" },
|
|
615
729
|
email: { type: "string", required: true, description: "Customer email" },
|
|
616
|
-
totalPrice: {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
730
|
+
totalPrice: {
|
|
731
|
+
type: "number",
|
|
732
|
+
required: true,
|
|
733
|
+
description: "Total price in cents",
|
|
734
|
+
},
|
|
735
|
+
currency: {
|
|
736
|
+
type: "string",
|
|
737
|
+
required: true,
|
|
738
|
+
description: "Currency code (e.g. USD)",
|
|
739
|
+
},
|
|
740
|
+
externalCreatedDate: {
|
|
741
|
+
type: "string",
|
|
742
|
+
required: true,
|
|
743
|
+
description: "ISO date string",
|
|
744
|
+
},
|
|
745
|
+
connectionid: {
|
|
746
|
+
type: "string",
|
|
747
|
+
required: true,
|
|
748
|
+
description: "Connection ID",
|
|
749
|
+
},
|
|
750
|
+
customerid: {
|
|
751
|
+
type: "string",
|
|
752
|
+
required: true,
|
|
753
|
+
description: "Customer ID",
|
|
754
|
+
},
|
|
755
|
+
orderProducts: {
|
|
756
|
+
type: "array",
|
|
757
|
+
required: false,
|
|
758
|
+
description: "Array of order products",
|
|
759
|
+
},
|
|
622
760
|
},
|
|
623
761
|
async execute(input, ctx) {
|
|
624
762
|
const { currency, ...rest } = input;
|
|
@@ -642,7 +780,11 @@ export default function activeCampaign(rl) {
|
|
|
642
780
|
rl.registerAction("ecomOrder.list", {
|
|
643
781
|
description: "List all e-commerce orders",
|
|
644
782
|
inputSchema: {
|
|
645
|
-
limit: {
|
|
783
|
+
limit: {
|
|
784
|
+
type: "number",
|
|
785
|
+
required: false,
|
|
786
|
+
description: "Max results to return",
|
|
787
|
+
},
|
|
646
788
|
},
|
|
647
789
|
async execute(input, ctx) {
|
|
648
790
|
const { limit } = input ?? {};
|
|
@@ -700,7 +842,11 @@ export default function activeCampaign(rl) {
|
|
|
700
842
|
rl.registerAction("ecomOrderProduct.list", {
|
|
701
843
|
description: "List all e-commerce order products",
|
|
702
844
|
inputSchema: {
|
|
703
|
-
limit: {
|
|
845
|
+
limit: {
|
|
846
|
+
type: "number",
|
|
847
|
+
required: false,
|
|
848
|
+
description: "Max results to return",
|
|
849
|
+
},
|
|
704
850
|
},
|
|
705
851
|
async execute(input, ctx) {
|
|
706
852
|
const { limit } = input ?? {};
|