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
|
@@ -18,7 +18,10 @@ async function getAccessToken(clientId, clientSecret, tokenUrl) {
|
|
|
18
18
|
if (!res.ok)
|
|
19
19
|
throw new Error(`Bitwarden token error ${res.status}: ${await res.text()}`);
|
|
20
20
|
const data = (await res.json());
|
|
21
|
-
cachedToken = {
|
|
21
|
+
cachedToken = {
|
|
22
|
+
value: data.access_token,
|
|
23
|
+
expiresAt: Date.now() + (data.expires_in - 60) * 1000,
|
|
24
|
+
};
|
|
22
25
|
return cachedToken.value;
|
|
23
26
|
}
|
|
24
27
|
async function apiRequest(token, baseUrl, method, endpoint, body, qs) {
|
|
@@ -36,7 +39,10 @@ async function apiRequest(token, baseUrl, method, endpoint, body, qs) {
|
|
|
36
39
|
Authorization: `Bearer ${token}`,
|
|
37
40
|
},
|
|
38
41
|
};
|
|
39
|
-
if (body &&
|
|
42
|
+
if (body &&
|
|
43
|
+
Object.keys(body).length > 0 &&
|
|
44
|
+
method !== "GET" &&
|
|
45
|
+
method !== "DELETE") {
|
|
40
46
|
opts.body = JSON.stringify(body);
|
|
41
47
|
}
|
|
42
48
|
const res = await fetch(url.toString(), opts);
|
|
@@ -55,7 +61,9 @@ function getConn(ctx) {
|
|
|
55
61
|
const cfg = ctx.connection.config;
|
|
56
62
|
const domain = cfg.domain?.replace(/\/$/, "");
|
|
57
63
|
const env = cfg.environment;
|
|
58
|
-
const baseUrl = env === "selfHosted" && domain
|
|
64
|
+
const baseUrl = env === "selfHosted" && domain
|
|
65
|
+
? `${domain}/api`
|
|
66
|
+
: "https://api.bitwarden.com";
|
|
59
67
|
const tokenUrl = env === "selfHosted" && domain
|
|
60
68
|
? `${domain}/identity/connect/token`
|
|
61
69
|
: "https://identity.bitwarden.com/connect/token";
|
|
@@ -105,7 +113,11 @@ export default function bitwarden(rl) {
|
|
|
105
113
|
rl.registerAction("collection.get", {
|
|
106
114
|
description: "Get a collection by ID",
|
|
107
115
|
inputSchema: {
|
|
108
|
-
collectionId: {
|
|
116
|
+
collectionId: {
|
|
117
|
+
type: "string",
|
|
118
|
+
required: true,
|
|
119
|
+
description: "Collection ID",
|
|
120
|
+
},
|
|
109
121
|
},
|
|
110
122
|
async execute(input, ctx) {
|
|
111
123
|
const { collectionId } = input;
|
|
@@ -128,15 +140,30 @@ export default function bitwarden(rl) {
|
|
|
128
140
|
rl.registerAction("collection.update", {
|
|
129
141
|
description: "Update a collection",
|
|
130
142
|
inputSchema: {
|
|
131
|
-
collectionId: {
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
collectionId: {
|
|
144
|
+
type: "string",
|
|
145
|
+
required: true,
|
|
146
|
+
description: "Collection ID",
|
|
147
|
+
},
|
|
148
|
+
groups: {
|
|
149
|
+
type: "array",
|
|
150
|
+
required: false,
|
|
151
|
+
description: "Array of group IDs to assign",
|
|
152
|
+
},
|
|
153
|
+
externalId: {
|
|
154
|
+
type: "string",
|
|
155
|
+
required: false,
|
|
156
|
+
description: "External ID",
|
|
157
|
+
},
|
|
134
158
|
},
|
|
135
159
|
async execute(input, ctx) {
|
|
136
160
|
const { collectionId, groups, externalId } = input;
|
|
137
161
|
const body = {};
|
|
138
162
|
if (groups) {
|
|
139
|
-
body.groups = groups.map((id) => ({
|
|
163
|
+
body.groups = groups.map((id) => ({
|
|
164
|
+
id,
|
|
165
|
+
ReadOnly: false,
|
|
166
|
+
}));
|
|
140
167
|
}
|
|
141
168
|
if (externalId)
|
|
142
169
|
body.externalId = externalId;
|
|
@@ -146,7 +173,11 @@ export default function bitwarden(rl) {
|
|
|
146
173
|
rl.registerAction("collection.delete", {
|
|
147
174
|
description: "Delete a collection",
|
|
148
175
|
inputSchema: {
|
|
149
|
-
collectionId: {
|
|
176
|
+
collectionId: {
|
|
177
|
+
type: "string",
|
|
178
|
+
required: true,
|
|
179
|
+
description: "Collection ID",
|
|
180
|
+
},
|
|
150
181
|
},
|
|
151
182
|
async execute(input, ctx) {
|
|
152
183
|
const { collectionId } = input;
|
|
@@ -158,10 +189,26 @@ export default function bitwarden(rl) {
|
|
|
158
189
|
rl.registerAction("event.list", {
|
|
159
190
|
description: "List organization events",
|
|
160
191
|
inputSchema: {
|
|
161
|
-
start: {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
192
|
+
start: {
|
|
193
|
+
type: "string",
|
|
194
|
+
required: false,
|
|
195
|
+
description: "Start date (ISO 8601)",
|
|
196
|
+
},
|
|
197
|
+
end: {
|
|
198
|
+
type: "string",
|
|
199
|
+
required: false,
|
|
200
|
+
description: "End date (ISO 8601)",
|
|
201
|
+
},
|
|
202
|
+
actingUserId: {
|
|
203
|
+
type: "string",
|
|
204
|
+
required: false,
|
|
205
|
+
description: "Filter by acting user ID",
|
|
206
|
+
},
|
|
207
|
+
itemId: {
|
|
208
|
+
type: "string",
|
|
209
|
+
required: false,
|
|
210
|
+
description: "Filter by item ID",
|
|
211
|
+
},
|
|
165
212
|
limit: { type: "number", required: false, description: "Max results" },
|
|
166
213
|
},
|
|
167
214
|
async execute(input, ctx) {
|
|
@@ -177,15 +224,30 @@ export default function bitwarden(rl) {
|
|
|
177
224
|
description: "Create a group",
|
|
178
225
|
inputSchema: {
|
|
179
226
|
name: { type: "string", required: true, description: "Group name" },
|
|
180
|
-
accessAll: {
|
|
181
|
-
|
|
182
|
-
|
|
227
|
+
accessAll: {
|
|
228
|
+
type: "boolean",
|
|
229
|
+
required: true,
|
|
230
|
+
description: "Grant access to all collections",
|
|
231
|
+
},
|
|
232
|
+
collections: {
|
|
233
|
+
type: "array",
|
|
234
|
+
required: false,
|
|
235
|
+
description: "Array of collection IDs",
|
|
236
|
+
},
|
|
237
|
+
externalId: {
|
|
238
|
+
type: "string",
|
|
239
|
+
required: false,
|
|
240
|
+
description: "External ID",
|
|
241
|
+
},
|
|
183
242
|
},
|
|
184
243
|
async execute(input, ctx) {
|
|
185
244
|
const { name, accessAll, collections, externalId } = input;
|
|
186
245
|
const body = { name, AccessAll: accessAll };
|
|
187
246
|
if (collections) {
|
|
188
|
-
body.collections = collections.map((id) => ({
|
|
247
|
+
body.collections = collections.map((id) => ({
|
|
248
|
+
id,
|
|
249
|
+
ReadOnly: false,
|
|
250
|
+
}));
|
|
189
251
|
}
|
|
190
252
|
if (externalId)
|
|
191
253
|
body.externalId = externalId;
|
|
@@ -231,9 +293,21 @@ export default function bitwarden(rl) {
|
|
|
231
293
|
inputSchema: {
|
|
232
294
|
groupId: { type: "string", required: true, description: "Group ID" },
|
|
233
295
|
name: { type: "string", required: false, description: "Group name" },
|
|
234
|
-
accessAll: {
|
|
235
|
-
|
|
236
|
-
|
|
296
|
+
accessAll: {
|
|
297
|
+
type: "boolean",
|
|
298
|
+
required: false,
|
|
299
|
+
description: "Access all collections",
|
|
300
|
+
},
|
|
301
|
+
collections: {
|
|
302
|
+
type: "array",
|
|
303
|
+
required: false,
|
|
304
|
+
description: "Array of collection IDs",
|
|
305
|
+
},
|
|
306
|
+
externalId: {
|
|
307
|
+
type: "string",
|
|
308
|
+
required: false,
|
|
309
|
+
description: "External ID",
|
|
310
|
+
},
|
|
237
311
|
},
|
|
238
312
|
async execute(input, ctx) {
|
|
239
313
|
const { groupId, name, accessAll, collections, externalId } = input;
|
|
@@ -248,7 +322,10 @@ export default function bitwarden(rl) {
|
|
|
248
322
|
}
|
|
249
323
|
body.AccessAll = accessAll ?? false;
|
|
250
324
|
if (collections) {
|
|
251
|
-
body.collections = collections.map((id) => ({
|
|
325
|
+
body.collections = collections.map((id) => ({
|
|
326
|
+
id,
|
|
327
|
+
ReadOnly: false,
|
|
328
|
+
}));
|
|
252
329
|
}
|
|
253
330
|
if (externalId)
|
|
254
331
|
body.externalId = externalId;
|
|
@@ -259,11 +336,17 @@ export default function bitwarden(rl) {
|
|
|
259
336
|
description: "Set the member IDs for a group",
|
|
260
337
|
inputSchema: {
|
|
261
338
|
groupId: { type: "string", required: true, description: "Group ID" },
|
|
262
|
-
memberIds: {
|
|
339
|
+
memberIds: {
|
|
340
|
+
type: "array",
|
|
341
|
+
required: true,
|
|
342
|
+
description: "Array of member IDs",
|
|
343
|
+
},
|
|
263
344
|
},
|
|
264
345
|
async execute(input, ctx) {
|
|
265
346
|
const { groupId, memberIds } = input;
|
|
266
|
-
await authedRequest(ctx, "PUT", `/public/groups/${groupId}/member-ids`, {
|
|
347
|
+
await authedRequest(ctx, "PUT", `/public/groups/${groupId}/member-ids`, {
|
|
348
|
+
memberIds,
|
|
349
|
+
});
|
|
267
350
|
return { success: true };
|
|
268
351
|
},
|
|
269
352
|
});
|
|
@@ -283,16 +366,39 @@ export default function bitwarden(rl) {
|
|
|
283
366
|
description: "Invite a member to the organization",
|
|
284
367
|
inputSchema: {
|
|
285
368
|
email: { type: "string", required: true, description: "Email address" },
|
|
286
|
-
type: {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
369
|
+
type: {
|
|
370
|
+
type: "number",
|
|
371
|
+
required: true,
|
|
372
|
+
description: "Member type (0=Owner, 1=Admin, 2=User, 3=Manager)",
|
|
373
|
+
},
|
|
374
|
+
accessAll: {
|
|
375
|
+
type: "boolean",
|
|
376
|
+
required: true,
|
|
377
|
+
description: "Access all collections",
|
|
378
|
+
},
|
|
379
|
+
collections: {
|
|
380
|
+
type: "array",
|
|
381
|
+
required: false,
|
|
382
|
+
description: "Array of collection IDs",
|
|
383
|
+
},
|
|
384
|
+
externalId: {
|
|
385
|
+
type: "string",
|
|
386
|
+
required: false,
|
|
387
|
+
description: "External ID",
|
|
388
|
+
},
|
|
290
389
|
},
|
|
291
390
|
async execute(input, ctx) {
|
|
292
391
|
const { email, type, accessAll, collections, externalId } = input;
|
|
293
|
-
const body = {
|
|
392
|
+
const body = {
|
|
393
|
+
email,
|
|
394
|
+
type,
|
|
395
|
+
AccessAll: accessAll,
|
|
396
|
+
};
|
|
294
397
|
if (collections) {
|
|
295
|
-
body.collections = collections.map((id) => ({
|
|
398
|
+
body.collections = collections.map((id) => ({
|
|
399
|
+
id,
|
|
400
|
+
ReadOnly: false,
|
|
401
|
+
}));
|
|
296
402
|
}
|
|
297
403
|
if (externalId)
|
|
298
404
|
body.externalId = externalId;
|
|
@@ -337,10 +443,26 @@ export default function bitwarden(rl) {
|
|
|
337
443
|
description: "Update a member",
|
|
338
444
|
inputSchema: {
|
|
339
445
|
memberId: { type: "string", required: true, description: "Member ID" },
|
|
340
|
-
type: {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
446
|
+
type: {
|
|
447
|
+
type: "number",
|
|
448
|
+
required: false,
|
|
449
|
+
description: "Member type (0=Owner, 1=Admin, 2=User, 3=Manager)",
|
|
450
|
+
},
|
|
451
|
+
accessAll: {
|
|
452
|
+
type: "boolean",
|
|
453
|
+
required: false,
|
|
454
|
+
description: "Access all collections",
|
|
455
|
+
},
|
|
456
|
+
collections: {
|
|
457
|
+
type: "array",
|
|
458
|
+
required: false,
|
|
459
|
+
description: "Array of collection IDs",
|
|
460
|
+
},
|
|
461
|
+
externalId: {
|
|
462
|
+
type: "string",
|
|
463
|
+
required: false,
|
|
464
|
+
description: "External ID",
|
|
465
|
+
},
|
|
344
466
|
},
|
|
345
467
|
async execute(input, ctx) {
|
|
346
468
|
const { memberId, type, accessAll, collections, externalId } = input;
|
|
@@ -350,7 +472,10 @@ export default function bitwarden(rl) {
|
|
|
350
472
|
if (type !== undefined)
|
|
351
473
|
body.Type = type;
|
|
352
474
|
if (collections) {
|
|
353
|
-
body.collections = collections.map((id) => ({
|
|
475
|
+
body.collections = collections.map((id) => ({
|
|
476
|
+
id,
|
|
477
|
+
ReadOnly: false,
|
|
478
|
+
}));
|
|
354
479
|
}
|
|
355
480
|
if (externalId)
|
|
356
481
|
body.externalId = externalId;
|
|
@@ -361,11 +486,17 @@ export default function bitwarden(rl) {
|
|
|
361
486
|
description: "Set the group IDs for a member",
|
|
362
487
|
inputSchema: {
|
|
363
488
|
memberId: { type: "string", required: true, description: "Member ID" },
|
|
364
|
-
groupIds: {
|
|
489
|
+
groupIds: {
|
|
490
|
+
type: "array",
|
|
491
|
+
required: true,
|
|
492
|
+
description: "Array of group IDs",
|
|
493
|
+
},
|
|
365
494
|
},
|
|
366
495
|
async execute(input, ctx) {
|
|
367
496
|
const { memberId, groupIds } = input;
|
|
368
|
-
await authedRequest(ctx, "PUT", `/public/members/${memberId}/group-ids`, {
|
|
497
|
+
await authedRequest(ctx, "PUT", `/public/members/${memberId}/group-ids`, {
|
|
498
|
+
groupIds,
|
|
499
|
+
});
|
|
369
500
|
return { success: true };
|
|
370
501
|
},
|
|
371
502
|
});
|
|
@@ -14,7 +14,10 @@ async function apiRequest(token, method, endpoint, body, qs) {
|
|
|
14
14
|
Authorization: `Bearer ${token}`,
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
|
-
if (body &&
|
|
17
|
+
if (body &&
|
|
18
|
+
Object.keys(body).length > 0 &&
|
|
19
|
+
method !== "GET" &&
|
|
20
|
+
method !== "DELETE") {
|
|
18
21
|
opts.body = JSON.stringify(body);
|
|
19
22
|
}
|
|
20
23
|
const res = await fetch(url.toString(), opts);
|
|
@@ -68,10 +71,26 @@ export default function box(rl) {
|
|
|
68
71
|
description: "Copy a file to a folder",
|
|
69
72
|
inputSchema: {
|
|
70
73
|
fileId: { type: "string", required: true, description: "File ID" },
|
|
71
|
-
parentId: {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
parentId: {
|
|
75
|
+
type: "string",
|
|
76
|
+
required: true,
|
|
77
|
+
description: "Destination folder ID (0 for root)",
|
|
78
|
+
},
|
|
79
|
+
name: {
|
|
80
|
+
type: "string",
|
|
81
|
+
required: false,
|
|
82
|
+
description: "New name for the copy",
|
|
83
|
+
},
|
|
84
|
+
version: {
|
|
85
|
+
type: "string",
|
|
86
|
+
required: false,
|
|
87
|
+
description: "Specific version to copy",
|
|
88
|
+
},
|
|
89
|
+
fields: {
|
|
90
|
+
type: "string",
|
|
91
|
+
required: false,
|
|
92
|
+
description: "Comma-separated fields to return",
|
|
93
|
+
},
|
|
75
94
|
},
|
|
76
95
|
async execute(input, ctx) {
|
|
77
96
|
const { fileId, parentId, name, version, fields } = input;
|
|
@@ -101,7 +120,11 @@ export default function box(rl) {
|
|
|
101
120
|
description: "Get file metadata",
|
|
102
121
|
inputSchema: {
|
|
103
122
|
fileId: { type: "string", required: true, description: "File ID" },
|
|
104
|
-
fields: {
|
|
123
|
+
fields: {
|
|
124
|
+
type: "string",
|
|
125
|
+
required: false,
|
|
126
|
+
description: "Comma-separated fields to return",
|
|
127
|
+
},
|
|
105
128
|
},
|
|
106
129
|
async execute(input, ctx) {
|
|
107
130
|
const { fileId, fields } = input;
|
|
@@ -116,13 +139,29 @@ export default function box(rl) {
|
|
|
116
139
|
inputSchema: {
|
|
117
140
|
query: { type: "string", required: true, description: "Search query" },
|
|
118
141
|
limit: { type: "number", required: false, description: "Max results" },
|
|
119
|
-
contentTypes: {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
142
|
+
contentTypes: {
|
|
143
|
+
type: "string",
|
|
144
|
+
required: false,
|
|
145
|
+
description: "Comma-separated content types (name, description, file_content, comments, tags)",
|
|
146
|
+
},
|
|
147
|
+
createdAtRange: {
|
|
148
|
+
type: "string",
|
|
149
|
+
required: false,
|
|
150
|
+
description: "Date range: from,to (ISO 8601)",
|
|
151
|
+
},
|
|
152
|
+
updatedAtRange: {
|
|
153
|
+
type: "string",
|
|
154
|
+
required: false,
|
|
155
|
+
description: "Date range: from,to (ISO 8601)",
|
|
156
|
+
},
|
|
157
|
+
ancestorFolderIds: {
|
|
158
|
+
type: "string",
|
|
159
|
+
required: false,
|
|
160
|
+
description: "Comma-separated folder IDs to search within",
|
|
161
|
+
},
|
|
123
162
|
},
|
|
124
163
|
async execute(input, ctx) {
|
|
125
|
-
const { query, limit, contentTypes, createdAtRange, updatedAtRange, ancestorFolderIds } = (input ?? {});
|
|
164
|
+
const { query, limit, contentTypes, createdAtRange, updatedAtRange, ancestorFolderIds, } = (input ?? {});
|
|
126
165
|
const qs = { type: "file", query };
|
|
127
166
|
if (contentTypes)
|
|
128
167
|
qs.content_types = contentTypes;
|
|
@@ -139,16 +178,44 @@ export default function box(rl) {
|
|
|
139
178
|
description: "Share a file (create a collaboration)",
|
|
140
179
|
inputSchema: {
|
|
141
180
|
fileId: { type: "string", required: true, description: "File ID" },
|
|
142
|
-
role: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
181
|
+
role: {
|
|
182
|
+
type: "string",
|
|
183
|
+
required: true,
|
|
184
|
+
description: "Role: editor, viewer, previewer, uploader, previewer_uploader, viewer_uploader, co-owner",
|
|
185
|
+
},
|
|
186
|
+
accessibleByType: {
|
|
187
|
+
type: "string",
|
|
188
|
+
required: true,
|
|
189
|
+
description: "'user' or 'group'",
|
|
190
|
+
},
|
|
191
|
+
accessibleById: {
|
|
192
|
+
type: "string",
|
|
193
|
+
required: false,
|
|
194
|
+
description: "User/group ID (use this or email)",
|
|
195
|
+
},
|
|
196
|
+
email: {
|
|
197
|
+
type: "string",
|
|
198
|
+
required: false,
|
|
199
|
+
description: "User email (alternative to ID, only for user type)",
|
|
200
|
+
},
|
|
201
|
+
canViewPath: {
|
|
202
|
+
type: "boolean",
|
|
203
|
+
required: false,
|
|
204
|
+
description: "Can view path to this item",
|
|
205
|
+
},
|
|
206
|
+
expiresAt: {
|
|
207
|
+
type: "string",
|
|
208
|
+
required: false,
|
|
209
|
+
description: "Expiration date (ISO 8601)",
|
|
210
|
+
},
|
|
211
|
+
notify: {
|
|
212
|
+
type: "boolean",
|
|
213
|
+
required: false,
|
|
214
|
+
description: "Send notification email",
|
|
215
|
+
},
|
|
149
216
|
},
|
|
150
217
|
async execute(input, ctx) {
|
|
151
|
-
const { fileId, role, accessibleByType, accessibleById, email, canViewPath, expiresAt, notify } = input;
|
|
218
|
+
const { fileId, role, accessibleByType, accessibleById, email, canViewPath, expiresAt, notify, } = input;
|
|
152
219
|
const body = {
|
|
153
220
|
item: { id: fileId, type: "file" },
|
|
154
221
|
role,
|
|
@@ -175,8 +242,16 @@ export default function box(rl) {
|
|
|
175
242
|
description: "Create a folder",
|
|
176
243
|
inputSchema: {
|
|
177
244
|
name: { type: "string", required: true, description: "Folder name" },
|
|
178
|
-
parentId: {
|
|
179
|
-
|
|
245
|
+
parentId: {
|
|
246
|
+
type: "string",
|
|
247
|
+
required: false,
|
|
248
|
+
description: "Parent folder ID (0 for root)",
|
|
249
|
+
},
|
|
250
|
+
fields: {
|
|
251
|
+
type: "string",
|
|
252
|
+
required: false,
|
|
253
|
+
description: "Comma-separated fields to return",
|
|
254
|
+
},
|
|
180
255
|
},
|
|
181
256
|
async execute(input, ctx) {
|
|
182
257
|
const { name, parentId, fields } = input;
|
|
@@ -194,7 +269,11 @@ export default function box(rl) {
|
|
|
194
269
|
description: "Delete a folder",
|
|
195
270
|
inputSchema: {
|
|
196
271
|
folderId: { type: "string", required: true, description: "Folder ID" },
|
|
197
|
-
recursive: {
|
|
272
|
+
recursive: {
|
|
273
|
+
type: "boolean",
|
|
274
|
+
required: false,
|
|
275
|
+
description: "Delete non-empty folder recursively",
|
|
276
|
+
},
|
|
198
277
|
},
|
|
199
278
|
async execute(input, ctx) {
|
|
200
279
|
const { folderId, recursive } = input;
|
|
@@ -219,9 +298,21 @@ export default function box(rl) {
|
|
|
219
298
|
inputSchema: {
|
|
220
299
|
query: { type: "string", required: true, description: "Search query" },
|
|
221
300
|
limit: { type: "number", required: false, description: "Max results" },
|
|
222
|
-
contentTypes: {
|
|
223
|
-
|
|
224
|
-
|
|
301
|
+
contentTypes: {
|
|
302
|
+
type: "string",
|
|
303
|
+
required: false,
|
|
304
|
+
description: "Comma-separated content types",
|
|
305
|
+
},
|
|
306
|
+
createdAtRange: {
|
|
307
|
+
type: "string",
|
|
308
|
+
required: false,
|
|
309
|
+
description: "Date range: from,to (ISO 8601)",
|
|
310
|
+
},
|
|
311
|
+
updatedAtRange: {
|
|
312
|
+
type: "string",
|
|
313
|
+
required: false,
|
|
314
|
+
description: "Date range: from,to (ISO 8601)",
|
|
315
|
+
},
|
|
225
316
|
},
|
|
226
317
|
async execute(input, ctx) {
|
|
227
318
|
const { query, limit, contentTypes, createdAtRange, updatedAtRange } = (input ?? {});
|
|
@@ -239,16 +330,44 @@ export default function box(rl) {
|
|
|
239
330
|
description: "Share a folder (create a collaboration)",
|
|
240
331
|
inputSchema: {
|
|
241
332
|
folderId: { type: "string", required: true, description: "Folder ID" },
|
|
242
|
-
role: {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
333
|
+
role: {
|
|
334
|
+
type: "string",
|
|
335
|
+
required: true,
|
|
336
|
+
description: "Role: editor, viewer, previewer, uploader, previewer_uploader, viewer_uploader, co-owner",
|
|
337
|
+
},
|
|
338
|
+
accessibleByType: {
|
|
339
|
+
type: "string",
|
|
340
|
+
required: true,
|
|
341
|
+
description: "'user' or 'group'",
|
|
342
|
+
},
|
|
343
|
+
accessibleById: {
|
|
344
|
+
type: "string",
|
|
345
|
+
required: false,
|
|
346
|
+
description: "User/group ID",
|
|
347
|
+
},
|
|
348
|
+
email: {
|
|
349
|
+
type: "string",
|
|
350
|
+
required: false,
|
|
351
|
+
description: "User email (alternative to ID)",
|
|
352
|
+
},
|
|
353
|
+
canViewPath: {
|
|
354
|
+
type: "boolean",
|
|
355
|
+
required: false,
|
|
356
|
+
description: "Can view path",
|
|
357
|
+
},
|
|
358
|
+
expiresAt: {
|
|
359
|
+
type: "string",
|
|
360
|
+
required: false,
|
|
361
|
+
description: "Expiration (ISO 8601)",
|
|
362
|
+
},
|
|
363
|
+
notify: {
|
|
364
|
+
type: "boolean",
|
|
365
|
+
required: false,
|
|
366
|
+
description: "Send notification",
|
|
367
|
+
},
|
|
249
368
|
},
|
|
250
369
|
async execute(input, ctx) {
|
|
251
|
-
const { folderId, role, accessibleByType, accessibleById, email, canViewPath, expiresAt, notify } = input;
|
|
370
|
+
const { folderId, role, accessibleByType, accessibleById, email, canViewPath, expiresAt, notify, } = input;
|
|
252
371
|
const body = {
|
|
253
372
|
item: { id: folderId, type: "folder" },
|
|
254
373
|
role,
|
|
@@ -275,10 +394,26 @@ export default function box(rl) {
|
|
|
275
394
|
inputSchema: {
|
|
276
395
|
folderId: { type: "string", required: true, description: "Folder ID" },
|
|
277
396
|
name: { type: "string", required: false, description: "New name" },
|
|
278
|
-
parentId: {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
397
|
+
parentId: {
|
|
398
|
+
type: "string",
|
|
399
|
+
required: false,
|
|
400
|
+
description: "Move to this parent folder ID",
|
|
401
|
+
},
|
|
402
|
+
description: {
|
|
403
|
+
type: "string",
|
|
404
|
+
required: false,
|
|
405
|
+
description: "Description",
|
|
406
|
+
},
|
|
407
|
+
tags: {
|
|
408
|
+
type: "string",
|
|
409
|
+
required: false,
|
|
410
|
+
description: "Comma-separated tags",
|
|
411
|
+
},
|
|
412
|
+
fields: {
|
|
413
|
+
type: "string",
|
|
414
|
+
required: false,
|
|
415
|
+
description: "Fields to return",
|
|
416
|
+
},
|
|
282
417
|
},
|
|
283
418
|
async execute(input, ctx) {
|
|
284
419
|
const { folderId, name, parentId, description, tags, fields } = input;
|
|
@@ -26,7 +26,11 @@ export default function brandfetch(rl) {
|
|
|
26
26
|
rl.registerAction("brand.getLogos", {
|
|
27
27
|
description: "Get a company's logos and icons",
|
|
28
28
|
inputSchema: {
|
|
29
|
-
domain: {
|
|
29
|
+
domain: {
|
|
30
|
+
type: "string",
|
|
31
|
+
required: true,
|
|
32
|
+
description: "Company domain (e.g. nike.com)",
|
|
33
|
+
},
|
|
30
34
|
},
|
|
31
35
|
async execute(input, ctx) {
|
|
32
36
|
const { domain } = input;
|