runline 0.32.0 → 0.34.0
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/dist/auth/oauth2.d.ts +7 -1
- package/dist/auth/oauth2.js +10 -0
- package/dist/auth/token.d.ts +1 -0
- package/dist/auth/token.js +19 -1
- package/dist/auth/types.d.ts +22 -1
- package/dist/core/engine.d.ts +7 -0
- package/dist/core/engine.js +9 -0
- package/dist/credentials/policy.d.ts +53 -1
- package/dist/credentials/policy.js +146 -6
- package/dist/credentials/registry.d.ts +9 -0
- package/dist/credentials/registry.js +179 -22
- package/dist/credentials/transport.d.ts +48 -2
- package/dist/credentials/transport.js +248 -70
- package/dist/credentials/types.d.ts +167 -10
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/plugin/api.d.ts +7 -0
- package/dist/plugin/api.js +7 -0
- package/dist/plugin/types.d.ts +12 -0
- package/dist/plugins/_shared/credentialAdapter.js +79 -15
- package/dist/plugins/_shared/credentials.js +389 -0
- package/dist/plugins/_shared/googleAuth.js +9 -40
- package/dist/plugins/_shared/googleCredentials.js +28 -7
- package/dist/plugins/_shared/microsoftAuth.js +13 -44
- package/dist/plugins/_shared/microsoftCredentials.js +30 -8
- package/dist/plugins/_shared/provider.js +2 -14
- package/dist/plugins/_shared/shiftCloud.js +22 -34
- package/dist/plugins/_shared/shiftCredentials.js +83 -0
- package/dist/plugins/_shared/shiftUpload.js +1 -1
- package/dist/plugins/actionNetwork/src/credentials.js +14 -0
- package/dist/plugins/actionNetwork/src/index.js +39 -50
- package/dist/plugins/activeCampaign/src/credentials.js +22 -0
- package/dist/plugins/activeCampaign/src/index.js +61 -132
- package/dist/plugins/adalo/src/credentials.js +16 -0
- package/dist/plugins/adalo/src/index.js +19 -43
- package/dist/plugins/affinity/src/credentials.js +19 -0
- package/dist/plugins/affinity/src/index.js +29 -54
- package/dist/plugins/agileCrm/src/credentials.js +16 -0
- package/dist/plugins/agileCrm/src/index.js +46 -112
- package/dist/plugins/airtable/src/credentials.js +19 -0
- package/dist/plugins/airtable/src/index.js +37 -50
- package/dist/plugins/airtop/src/credentials.js +20 -0
- package/dist/plugins/airtop/src/index.js +51 -75
- package/dist/plugins/apiTemplateIo/src/credentials.js +19 -0
- package/dist/plugins/apiTemplateIo/src/index.js +14 -31
- package/dist/plugins/asana/src/credentials.js +19 -0
- package/dist/plugins/asana/src/index.js +51 -72
- package/dist/plugins/autopilot/src/credentials.js +19 -0
- package/dist/plugins/autopilot/src/index.js +38 -45
- package/dist/plugins/bambooHr/src/credentials.js +16 -0
- package/dist/plugins/bambooHr/src/index.js +41 -67
- package/dist/plugins/bannerbear/src/credentials.js +19 -0
- package/dist/plugins/bannerbear/src/index.js +15 -27
- package/dist/plugins/baserow/src/credentials.js +17 -0
- package/dist/plugins/baserow/src/index.js +23 -49
- package/dist/plugins/beeminder/src/credentials.js +19 -0
- package/dist/plugins/beeminder/src/index.js +32 -54
- package/dist/plugins/bitly/src/credentials.js +19 -0
- package/dist/plugins/bitly/src/index.js +12 -26
- package/dist/plugins/bitwarden/src/credentials.js +62 -0
- package/dist/plugins/bitwarden/src/index.js +34 -80
- package/dist/plugins/box/src/credentials.js +19 -0
- package/dist/plugins/box/src/index.js +24 -49
- package/dist/plugins/brandfetch/src/credentials.js +13 -0
- package/dist/plugins/brandfetch/src/index.js +12 -17
- package/dist/plugins/brevo/src/credentials.js +19 -0
- package/dist/plugins/brevo/src/index.js +30 -51
- package/dist/plugins/bubble/src/credentials.js +28 -0
- package/dist/plugins/bubble/src/index.js +29 -65
- package/dist/plugins/chargebee/src/credentials.js +16 -0
- package/dist/plugins/chargebee/src/index.js +15 -45
- package/dist/plugins/circleci/src/credentials.js +19 -0
- package/dist/plugins/circleci/src/index.js +19 -39
- package/dist/plugins/ciscoWebex/src/credentials.js +19 -0
- package/dist/plugins/ciscoWebex/src/index.js +43 -61
- package/dist/plugins/clearbit/src/credentials.js +22 -0
- package/dist/plugins/clearbit/src/index.js +11 -21
- package/dist/plugins/clickup/src/credentials.js +19 -0
- package/dist/plugins/clickup/src/index.js +85 -117
- package/dist/plugins/clockify/src/credentials.js +19 -0
- package/dist/plugins/clockify/src/index.js +46 -61
- package/dist/plugins/cloudflare/src/credentials.js +19 -0
- package/dist/plugins/cloudflare/src/index.js +19 -34
- package/dist/plugins/cockpit/src/credentials.js +17 -0
- package/dist/plugins/cockpit/src/index.js +18 -31
- package/dist/plugins/coda/src/credentials.js +19 -0
- package/dist/plugins/coda/src/index.js +33 -50
- package/dist/plugins/coingecko/src/credentials.js +20 -0
- package/dist/plugins/coingecko/src/index.js +24 -34
- package/dist/plugins/contentful/src/credentials.js +26 -0
- package/dist/plugins/contentful/src/index.js +19 -40
- package/dist/plugins/convertkit/src/credentials.js +26 -0
- package/dist/plugins/convertkit/src/index.js +27 -45
- package/dist/plugins/copper/src/credentials.js +17 -0
- package/dist/plugins/copper/src/index.js +25 -47
- package/dist/plugins/cortex/src/credentials.js +28 -0
- package/dist/plugins/cortex/src/index.js +26 -49
- package/dist/plugins/currents/src/credentials.js +19 -0
- package/dist/plugins/currents/src/index.js +46 -59
- package/dist/plugins/customerIo/src/credentials.js +52 -0
- package/dist/plugins/customerIo/src/index.js +30 -58
- package/dist/plugins/databricks/src/credentials.js +13 -0
- package/dist/plugins/databricks/src/index.js +51 -103
- package/dist/plugins/deepl/src/credentials.js +19 -0
- package/dist/plugins/deepl/src/index.js +13 -39
- package/dist/plugins/demio/src/credentials.js +26 -0
- package/dist/plugins/demio/src/index.js +17 -41
- package/dist/plugins/dhl/src/credentials.js +13 -0
- package/dist/plugins/dhl/src/index.js +8 -19
- package/dist/plugins/discord/src/credentials.js +19 -0
- package/dist/plugins/discord/src/index.js +30 -58
- package/dist/plugins/discourse/src/credentials.js +18 -0
- package/dist/plugins/discourse/src/index.js +36 -53
- package/dist/plugins/disqus/src/credentials.js +13 -0
- package/dist/plugins/disqus/src/index.js +14 -32
- package/dist/plugins/drift/src/credentials.js +13 -0
- package/dist/plugins/drift/src/index.js +16 -26
- package/dist/plugins/dropbox/src/credentials.js +13 -0
- package/dist/plugins/dropbox/src/index.js +23 -30
- package/dist/plugins/dropcontact/src/credentials.js +13 -0
- package/dist/plugins/dropcontact/src/index.js +13 -18
- package/dist/plugins/egoi/src/credentials.js +19 -0
- package/dist/plugins/egoi/src/index.js +23 -38
- package/dist/plugins/elasticsearch/src/credentials.js +18 -0
- package/dist/plugins/elasticsearch/src/index.js +27 -48
- package/dist/plugins/elevenlabs/src/credentials.js +30 -0
- package/dist/plugins/elevenlabs/src/index.js +4 -1
- package/dist/plugins/elevenlabs/src/schemas.js +2 -1
- package/dist/plugins/elevenlabs/src/shared.js +74 -35
- package/dist/plugins/elevenlabs/src/workflows.js +2 -2
- package/dist/plugins/emelia/src/credentials.js +14 -0
- package/dist/plugins/emelia/src/index.js +19 -23
- package/dist/plugins/erpnext/src/credentials.js +27 -0
- package/dist/plugins/erpnext/src/index.js +21 -42
- package/dist/plugins/facebookGraph/src/credentials.js +20 -0
- package/dist/plugins/facebookGraph/src/index.js +39 -37
- package/dist/plugins/fal/src/credentials.js +14 -0
- package/dist/plugins/fal/src/index.js +4 -2
- package/dist/plugins/fal/src/shared.js +58 -63
- package/dist/plugins/freshdesk/src/credentials.js +20 -0
- package/dist/plugins/freshdesk/src/index.js +25 -46
- package/dist/plugins/freshservice/src/credentials.js +16 -0
- package/dist/plugins/freshservice/src/index.js +37 -58
- package/dist/plugins/freshworksCrm/src/credentials.js +16 -0
- package/dist/plugins/freshworksCrm/src/index.js +20 -39
- package/dist/plugins/getresponse/src/credentials.js +22 -0
- package/dist/plugins/getresponse/src/index.js +20 -32
- package/dist/plugins/gett/src/credentials.js +64 -0
- package/dist/plugins/gett/src/index.js +11 -6
- package/dist/plugins/gett/src/login.js +24 -0
- package/dist/plugins/gett/src/session.js +15 -38
- package/dist/plugins/gett/src/shared.js +41 -84
- package/dist/plugins/ghost/src/credentials.js +36 -0
- package/dist/plugins/ghost/src/index.js +18 -59
- package/dist/plugins/github/src/credentials.js +18 -0
- package/dist/plugins/github/src/index.js +55 -78
- package/dist/plugins/gitlab/src/credentials.js +24 -0
- package/dist/plugins/gitlab/src/index.js +29 -48
- package/dist/plugins/gmail/src/index.js +26 -24
- package/dist/plugins/gong/src/credentials.js +16 -0
- package/dist/plugins/gong/src/index.js +16 -32
- package/dist/plugins/googleAppsScript/src/index.js +108 -42
- package/dist/plugins/googleCalendar/src/index.js +15 -13
- package/dist/plugins/googleContacts/src/index.js +12 -9
- package/dist/plugins/googleDocs/src/index.js +2 -0
- package/dist/plugins/googleDocs/src/shared.js +2 -1
- package/dist/plugins/googleDrive/src/index.js +50 -53
- package/dist/plugins/googleImage/src/credentials.js +14 -0
- package/dist/plugins/googleImage/src/index.js +14 -25
- package/dist/plugins/googleSheets/src/index.js +26 -27
- package/dist/plugins/googleSlides/src/index.js +6 -4
- package/dist/plugins/googleTasks/src/index.js +13 -11
- package/dist/plugins/gotify/src/credentials.js +32 -0
- package/dist/plugins/gotify/src/index.js +14 -36
- package/dist/plugins/gotowebinar/src/credentials.js +13 -0
- package/dist/plugins/gotowebinar/src/index.js +52 -69
- package/dist/plugins/grafana/src/credentials.js +16 -0
- package/dist/plugins/grafana/src/index.js +34 -53
- package/dist/plugins/graphql/src/credentials.js +42 -0
- package/dist/plugins/graphql/src/index.js +21 -46
- package/dist/plugins/grist/src/credentials.js +30 -0
- package/dist/plugins/grist/src/index.js +14 -43
- package/dist/plugins/halopsa/src/credentials.js +56 -0
- package/dist/plugins/halopsa/src/index.js +20 -47
- package/dist/plugins/harvest/src/credentials.js +20 -0
- package/dist/plugins/harvest/src/index.js +24 -43
- package/dist/plugins/helpscout/src/credentials.js +13 -0
- package/dist/plugins/helpscout/src/index.js +26 -38
- package/dist/plugins/highlevel/src/credentials.js +19 -0
- package/dist/plugins/highlevel/src/index.js +34 -63
- package/dist/plugins/homeAssistant/src/credentials.js +27 -0
- package/dist/plugins/homeAssistant/src/index.js +34 -52
- package/dist/plugins/hubspot/src/credentials.js +16 -0
- package/dist/plugins/hubspot/src/index.js +29 -41
- package/dist/plugins/humanticAi/src/credentials.js +13 -0
- package/dist/plugins/humanticAi/src/index.js +15 -22
- package/dist/plugins/hunter/src/credentials.js +13 -0
- package/dist/plugins/hunter/src/index.js +18 -17
- package/dist/plugins/intercom/src/credentials.js +19 -0
- package/dist/plugins/intercom/src/index.js +25 -38
- package/dist/plugins/iterable/src/credentials.js +17 -0
- package/dist/plugins/iterable/src/index.js +26 -40
- package/dist/plugins/jenkins/src/credentials.js +16 -0
- package/dist/plugins/jenkins/src/index.js +22 -36
- package/dist/plugins/jira/src/credentials.js +16 -0
- package/dist/plugins/jira/src/index.js +35 -61
- package/dist/plugins/keap/src/credentials.js +19 -0
- package/dist/plugins/keap/src/index.js +43 -71
- package/dist/plugins/kobotoolbox/src/credentials.js +13 -0
- package/dist/plugins/kobotoolbox/src/index.js +46 -84
- package/dist/plugins/lemlist/src/credentials.js +19 -0
- package/dist/plugins/lemlist/src/index.js +35 -47
- package/dist/plugins/linear/src/attachments.js +7 -7
- package/dist/plugins/linear/src/comments.js +7 -7
- package/dist/plugins/linear/src/credentials.js +17 -0
- package/dist/plugins/linear/src/cycles.js +5 -5
- package/dist/plugins/linear/src/index.js +2 -0
- package/dist/plugins/linear/src/initiatives.js +6 -6
- package/dist/plugins/linear/src/issues.js +14 -14
- package/dist/plugins/linear/src/labels.js +6 -6
- package/dist/plugins/linear/src/organization.js +2 -2
- package/dist/plugins/linear/src/projects.js +12 -12
- package/dist/plugins/linear/src/shared.js +34 -32
- package/dist/plugins/linear/src/states.js +3 -3
- package/dist/plugins/linear/src/teams.js +4 -4
- package/dist/plugins/linear/src/users.js +3 -3
- package/dist/plugins/linear/src/views.js +5 -5
- package/dist/plugins/linear/src/webhooks.js +5 -5
- package/dist/plugins/lingvanex/src/credentials.js +13 -0
- package/dist/plugins/lingvanex/src/index.js +7 -9
- package/dist/plugins/linkedin/src/credentials.js +17 -0
- package/dist/plugins/linkedin/src/index.js +13 -17
- package/dist/plugins/lonescale/src/credentials.js +13 -0
- package/dist/plugins/lonescale/src/index.js +16 -26
- package/dist/plugins/magento/src/credentials.js +16 -0
- package/dist/plugins/magento/src/index.js +67 -84
- package/dist/plugins/mailcheck/src/credentials.js +17 -0
- package/dist/plugins/mailcheck/src/index.js +7 -9
- package/dist/plugins/mailchimp/src/credentials.js +32 -0
- package/dist/plugins/mailchimp/src/index.js +36 -44
- package/dist/plugins/mailerlite/src/credentials.js +13 -0
- package/dist/plugins/mailerlite/src/index.js +19 -32
- package/dist/plugins/mailgun/src/credentials.js +21 -0
- package/dist/plugins/mailgun/src/index.js +15 -21
- package/dist/plugins/mailjet/src/credentials.js +38 -0
- package/dist/plugins/mailjet/src/index.js +60 -115
- package/dist/plugins/mandrill/src/credentials.js +17 -0
- package/dist/plugins/mandrill/src/index.js +11 -12
- package/dist/plugins/marketstack/src/credentials.js +16 -0
- package/dist/plugins/marketstack/src/index.js +18 -28
- package/dist/plugins/matrix/src/credentials.js +19 -0
- package/dist/plugins/matrix/src/index.js +23 -52
- package/dist/plugins/mattermost/src/credentials.js +19 -0
- package/dist/plugins/mattermost/src/index.js +41 -73
- package/dist/plugins/mautic/src/credentials.js +16 -0
- package/dist/plugins/mautic/src/index.js +46 -62
- package/dist/plugins/medium/src/credentials.js +20 -0
- package/dist/plugins/medium/src/index.js +18 -23
- package/dist/plugins/messagebird/src/credentials.js +22 -0
- package/dist/plugins/messagebird/src/index.js +13 -18
- package/dist/plugins/metabase/src/credentials.js +19 -0
- package/dist/plugins/metabase/src/index.js +24 -40
- package/dist/plugins/microsoftCalendar/src/index.js +48 -12
- package/dist/plugins/microsoftFiles/src/index.js +90 -25
- package/dist/plugins/microsoftMail/src/index.js +62 -15
- package/dist/plugins/misp/src/credentials.js +16 -0
- package/dist/plugins/misp/src/index.js +60 -71
- package/dist/plugins/mocean/src/credentials.js +17 -0
- package/dist/plugins/mocean/src/index.js +11 -23
- package/dist/plugins/monday/src/credentials.js +14 -0
- package/dist/plugins/monday/src/index.js +31 -44
- package/dist/plugins/monicaCrm/src/credentials.js +19 -0
- package/dist/plugins/monicaCrm/src/index.js +25 -42
- package/dist/plugins/msg91/src/credentials.js +10 -0
- package/dist/plugins/msg91/src/index.js +15 -11
- package/dist/plugins/nasa/src/credentials.js +22 -0
- package/dist/plugins/nasa/src/index.js +24 -28
- package/dist/plugins/netlify/src/credentials.js +19 -0
- package/dist/plugins/netlify/src/index.js +27 -51
- package/dist/plugins/netscalerAdc/src/credentials.js +18 -0
- package/dist/plugins/netscalerAdc/src/index.js +16 -31
- package/dist/plugins/nextcloud/src/credentials.js +27 -0
- package/dist/plugins/nextcloud/src/index.js +55 -109
- package/dist/plugins/nocodb/src/credentials.js +16 -0
- package/dist/plugins/nocodb/src/index.js +19 -37
- package/dist/plugins/notion/src/credentials.js +21 -0
- package/dist/plugins/notion/src/index.js +25 -38
- package/dist/plugins/npm/src/credentials.js +19 -0
- package/dist/plugins/npm/src/index.js +22 -32
- package/dist/plugins/odoo/src/credentials.js +21 -0
- package/dist/plugins/odoo/src/index.js +53 -69
- package/dist/plugins/okta/src/credentials.js +23 -0
- package/dist/plugins/okta/src/index.js +30 -35
- package/dist/plugins/oneSimpleApi/src/credentials.js +16 -0
- package/dist/plugins/oneSimpleApi/src/index.js +19 -24
- package/dist/plugins/onfleet/src/credentials.js +23 -0
- package/dist/plugins/onfleet/src/index.js +42 -53
- package/dist/plugins/openai/src/credentials.js +13 -0
- package/dist/plugins/openai/src/index.js +15 -23
- package/dist/plugins/openweathermap/src/credentials.js +16 -0
- package/dist/plugins/openweathermap/src/index.js +22 -22
- package/dist/plugins/oura/src/credentials.js +19 -0
- package/dist/plugins/oura/src/index.js +13 -18
- package/dist/plugins/paddle/src/credentials.js +27 -0
- package/dist/plugins/paddle/src/index.js +20 -36
- package/dist/plugins/pagerduty/src/credentials.js +24 -0
- package/dist/plugins/pagerduty/src/index.js +30 -39
- package/dist/plugins/parallel/src/credentials.js +18 -0
- package/dist/plugins/parallel/src/index.js +16 -22
- package/dist/plugins/paypal/src/credentials.js +44 -0
- package/dist/plugins/paypal/src/index.js +14 -40
- package/dist/plugins/peekalink/src/credentials.js +16 -0
- package/dist/plugins/peekalink/src/index.js +10 -11
- package/dist/plugins/phantombuster/src/credentials.js +19 -0
- package/dist/plugins/phantombuster/src/index.js +19 -32
- package/dist/plugins/philipsHue/src/credentials.js +17 -0
- package/dist/plugins/philipsHue/src/index.js +15 -27
- package/dist/plugins/pipedrive/src/credentials.js +26 -0
- package/dist/plugins/pipedrive/src/index.js +43 -73
- package/dist/plugins/plaud/src/index.js +2 -1
- package/dist/plugins/plaud/src/shared.js +23 -19
- package/dist/plugins/plivo/src/credentials.js +20 -0
- package/dist/plugins/plivo/src/index.js +13 -19
- package/dist/plugins/posthog/src/credentials.js +18 -0
- package/dist/plugins/posthog/src/index.js +14 -20
- package/dist/plugins/profitwell/src/credentials.js +22 -0
- package/dist/plugins/profitwell/src/index.js +10 -17
- package/dist/plugins/pushbullet/src/credentials.js +19 -0
- package/dist/plugins/pushbullet/src/index.js +19 -27
- package/dist/plugins/pushcut/src/credentials.js +19 -0
- package/dist/plugins/pushcut/src/index.js +7 -8
- package/dist/plugins/pushover/src/credentials.js +14 -0
- package/dist/plugins/pushover/src/index.js +7 -12
- package/dist/plugins/quickbase/src/credentials.js +15 -0
- package/dist/plugins/quickbase/src/index.js +24 -34
- package/dist/plugins/quickbooks/src/credentials.js +22 -0
- package/dist/plugins/quickbooks/src/index.js +17 -46
- package/dist/plugins/raindrop/src/credentials.js +19 -0
- package/dist/plugins/raindrop/src/index.js +30 -32
- package/dist/plugins/recraft/src/credentials.js +13 -0
- package/dist/plugins/recraft/src/index.js +38 -27
- package/dist/plugins/reddit/src/credentials.js +26 -0
- package/dist/plugins/reddit/src/index.js +30 -34
- package/dist/plugins/replicate/src/credentials.js +23 -0
- package/dist/plugins/replicate/src/index.js +17 -27
- package/dist/plugins/rocketchat/src/credentials.js +17 -0
- package/dist/plugins/rocketchat/src/index.js +8 -19
- package/dist/plugins/rundeck/src/credentials.js +16 -0
- package/dist/plugins/rundeck/src/index.js +12 -28
- package/dist/plugins/salesforce/src/credentials.js +73 -0
- package/dist/plugins/salesforce/src/index.js +6 -0
- package/dist/plugins/salesforce/src/metadata.js +3 -16
- package/dist/plugins/salesforce/src/shared.js +25 -100
- package/dist/plugins/salesforce/src/sobjects.js +10 -9
- package/dist/plugins/salesmate/src/credentials.js +17 -0
- package/dist/plugins/salesmate/src/index.js +20 -37
- package/dist/plugins/securityScorecard/src/credentials.js +22 -0
- package/dist/plugins/securityScorecard/src/index.js +24 -37
- package/dist/plugins/segment/src/credentials.js +16 -0
- package/dist/plugins/segment/src/index.js +12 -16
- package/dist/plugins/sendgrid/src/credentials.js +13 -0
- package/dist/plugins/sendgrid/src/index.js +31 -35
- package/dist/plugins/sendy/src/credentials.js +18 -0
- package/dist/plugins/sendy/src/index.js +18 -24
- package/dist/plugins/sentry/src/credentials.js +16 -0
- package/dist/plugins/sentry/src/index.js +30 -98
- package/dist/plugins/servicenow/src/credentials.js +13 -0
- package/dist/plugins/servicenow/src/index.js +22 -41
- package/dist/plugins/shiftAtlas/src/graph.js +2 -2
- package/dist/plugins/shiftAtlas/src/index.js +2 -0
- package/dist/plugins/shiftAtlas/src/shared.js +3 -1
- package/dist/plugins/shiftBwm/src/collections.js +201 -0
- package/dist/plugins/shiftBwm/src/index.js +35 -0
- package/dist/plugins/shiftBwm/src/records.js +180 -0
- package/dist/plugins/shiftBwm/src/shared.js +168 -0
- package/dist/plugins/shiftBwm/src/vendor/client.js +227 -0
- package/dist/plugins/shiftBwm/src/vendor/contracts.js +59 -0
- package/dist/plugins/shiftBwm/src/vendor/models.js +525 -0
- package/dist/plugins/shiftCrm/src/access.js +2 -2
- package/dist/plugins/shiftCrm/src/accounts.js +3 -3
- package/dist/plugins/shiftCrm/src/activities.js +3 -3
- package/dist/plugins/shiftCrm/src/credentials.js +6 -0
- package/dist/plugins/shiftCrm/src/index.js +2 -0
- package/dist/plugins/shiftCrm/src/opportunities.js +3 -3
- package/dist/plugins/shiftCrm/src/people.js +3 -3
- package/dist/plugins/shiftCrm/src/records.js +2 -2
- package/dist/plugins/shiftCrm/src/shared.js +2 -1
- package/dist/plugins/shiftCrm/src/tasks.js +3 -3
- package/dist/plugins/shiftObjects/src/credentials.js +2 -0
- package/dist/plugins/shiftObjects/src/index.js +2 -0
- package/dist/plugins/shiftObjects/src/objects.js +3 -3
- package/dist/plugins/shiftOcr/src/credentials.js +8 -0
- package/dist/plugins/shiftOcr/src/index.js +5 -2
- package/dist/plugins/shiftPages/src/index.js +2 -0
- package/dist/plugins/shiftPages/src/pages.js +5 -3
- package/dist/plugins/shiftPages/src/shared.js +3 -1
- package/dist/plugins/shiftTranscription/src/index.js +2 -0
- package/dist/plugins/shiftTranscription/src/shared.js +11 -1
- package/dist/plugins/shiftTranscription/src/transcription.js +3 -2
- package/dist/plugins/shiftWork/src/index.js +2 -0
- package/dist/plugins/shiftWork/src/issue-views.js +5 -5
- package/dist/plugins/shiftWork/src/issues.js +11 -7
- package/dist/plugins/shiftWork/src/projects.js +3 -3
- package/dist/plugins/shiftWork/src/shared.js +3 -1
- package/dist/plugins/shopify/src/credentials.js +16 -0
- package/dist/plugins/shopify/src/index.js +32 -59
- package/dist/plugins/signl4/src/credentials.js +17 -0
- package/dist/plugins/signl4/src/index.js +28 -29
- package/dist/plugins/slack/src/credentials.js +19 -0
- package/dist/plugins/slack/src/index.js +51 -60
- package/dist/plugins/sms77/src/credentials.js +17 -0
- package/dist/plugins/sms77/src/index.js +11 -16
- package/dist/plugins/splunk/src/credentials.js +19 -0
- package/dist/plugins/splunk/src/index.js +32 -74
- package/dist/plugins/spotify/src/credentials.js +19 -0
- package/dist/plugins/spotify/src/index.js +40 -55
- package/dist/plugins/stackby/src/credentials.js +13 -0
- package/dist/plugins/stackby/src/index.js +14 -23
- package/dist/plugins/steel/src/auth.js +27 -0
- package/dist/plugins/steel/src/browser.js +4 -3
- package/dist/plugins/steel/src/captchas.js +4 -3
- package/dist/plugins/steel/src/extensions.js +3 -2
- package/dist/plugins/steel/src/files.js +9 -10
- package/dist/plugins/steel/src/index.js +2 -0
- package/dist/plugins/steel/src/page/tools.js +3 -3
- package/dist/plugins/steel/src/profiles.js +4 -3
- package/dist/plugins/steel/src/sessions.js +13 -13
- package/dist/plugins/steel/src/shared.js +21 -51
- package/dist/plugins/storyblok/src/credentials.js +37 -0
- package/dist/plugins/storyblok/src/index.js +22 -66
- package/dist/plugins/strapi/src/credentials.js +71 -0
- package/dist/plugins/strapi/src/index.js +36 -70
- package/dist/plugins/strava/src/credentials.js +19 -0
- package/dist/plugins/strava/src/index.js +16 -33
- package/dist/plugins/stripe/src/credentials.js +19 -0
- package/dist/plugins/stripe/src/index.js +44 -58
- package/dist/plugins/supabase/src/credentials.js +30 -0
- package/dist/plugins/supabase/src/index.js +18 -40
- package/dist/plugins/syncromsp/src/credentials.js +16 -0
- package/dist/plugins/syncromsp/src/index.js +37 -70
- package/dist/plugins/tapfiliate/src/credentials.js +13 -0
- package/dist/plugins/tapfiliate/src/index.js +21 -31
- package/dist/plugins/telegram/src/credentials.js +20 -0
- package/dist/plugins/telegram/src/index.js +31 -39
- package/dist/plugins/thehive/src/credentials.js +14 -0
- package/dist/plugins/thehive/src/index.js +33 -50
- package/dist/plugins/thehiveProject/src/credentials.js +16 -0
- package/dist/plugins/thehiveProject/src/index.js +53 -122
- package/dist/plugins/todoist/src/credentials.js +26 -0
- package/dist/plugins/todoist/src/index.js +49 -79
- package/dist/plugins/together/src/credentials.js +16 -0
- package/dist/plugins/together/src/index.js +30 -32
- package/dist/plugins/travisci/src/credentials.js +24 -0
- package/dist/plugins/travisci/src/index.js +16 -30
- package/dist/plugins/trello/src/credentials.js +29 -0
- package/dist/plugins/trello/src/index.js +49 -64
- package/dist/plugins/twake/src/credentials.js +16 -0
- package/dist/plugins/twake/src/index.js +8 -10
- package/dist/plugins/twilio/src/credentials.js +23 -0
- package/dist/plugins/twilio/src/index.js +12 -26
- package/dist/plugins/twist/src/credentials.js +13 -0
- package/dist/plugins/twist/src/index.js +32 -44
- package/dist/plugins/twitter/src/credentials.js +16 -0
- package/dist/plugins/twitter/src/index.js +25 -37
- package/dist/plugins/typesafe/src/credentials.js +28 -0
- package/dist/plugins/typesafe/src/index.js +3 -1
- package/dist/plugins/typesafe/src/shared.js +23 -35
- package/dist/plugins/unleashedSoftware/src/credentials.js +21 -0
- package/dist/plugins/unleashedSoftware/src/index.js +13 -37
- package/dist/plugins/uplead/src/credentials.js +16 -0
- package/dist/plugins/uplead/src/index.js +11 -16
- package/dist/plugins/uproc/src/credentials.js +14 -0
- package/dist/plugins/uproc/src/index.js +7 -10
- package/dist/plugins/uptimerobot/src/credentials.js +14 -0
- package/dist/plugins/uptimerobot/src/index.js +28 -39
- package/dist/plugins/urlscanio/src/credentials.js +13 -0
- package/dist/plugins/urlscanio/src/index.js +13 -22
- package/dist/plugins/vercel/src/credentials.js +19 -0
- package/dist/plugins/vercel/src/deployments.js +27 -11
- package/dist/plugins/vercel/src/env.js +31 -12
- package/dist/plugins/vercel/src/index.js +2 -0
- package/dist/plugins/vercel/src/projects.js +6 -3
- package/dist/plugins/vercel/src/shared.js +32 -37
- package/dist/plugins/vero/src/credentials.js +17 -0
- package/dist/plugins/vero/src/index.js +18 -21
- package/dist/plugins/vonage/src/credentials.js +17 -0
- package/dist/plugins/vonage/src/index.js +14 -18
- package/dist/plugins/wekan/src/credentials.js +16 -0
- package/dist/plugins/wekan/src/index.js +33 -46
- package/dist/plugins/wolt/src/account.js +6 -0
- package/dist/plugins/wolt/src/catalog.js +2 -2
- package/dist/plugins/wolt/src/credentials.js +64 -0
- package/dist/plugins/wolt/src/index.js +8 -3
- package/dist/plugins/wolt/src/orders.js +2 -2
- package/dist/plugins/wolt/src/public.js +91 -0
- package/dist/plugins/wolt/src/shared.js +49 -158
- package/dist/plugins/woocommerce/src/credentials.js +16 -0
- package/dist/plugins/woocommerce/src/index.js +19 -37
- package/dist/plugins/wordpress/src/credentials.js +16 -0
- package/dist/plugins/wordpress/src/index.js +23 -42
- package/dist/plugins/xai/src/credentials.js +13 -0
- package/dist/plugins/xai/src/index.js +31 -30
- package/dist/plugins/xero/src/credentials.js +17 -0
- package/dist/plugins/xero/src/index.js +19 -36
- package/dist/plugins/yourls/src/credentials.js +17 -0
- package/dist/plugins/yourls/src/index.js +13 -23
- package/dist/plugins/zammad/src/credentials.js +15 -0
- package/dist/plugins/zammad/src/index.js +27 -47
- package/dist/plugins/zendesk/src/credentials.js +26 -0
- package/dist/plugins/zendesk/src/index.js +29 -48
- package/dist/plugins/zoho/src/credentials.js +17 -0
- package/dist/plugins/zoho/src/index.js +18 -38
- package/dist/plugins/zoom/src/credentials.js +19 -0
- package/dist/plugins/zoom/src/index.js +15 -30
- package/dist/plugins/zulip/src/credentials.js +16 -0
- package/dist/plugins/zulip/src/index.js +36 -42
- package/dist/sdk.d.ts +8 -0
- package/dist/sdk.js +3 -0
- package/package.json +3 -2
- package/dist/plugins/_shared/authedFetch.js +0 -33
- package/dist/plugins/_shared/tokenRefresh.js +0 -41
|
@@ -1,35 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
continue;
|
|
9
|
-
if (Array.isArray(v)) {
|
|
10
|
-
for (const item of v)
|
|
11
|
-
url.searchParams.append(k, String(item));
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
url.searchParams.set(k, String(v));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const res = await fetch(url.toString(), {
|
|
19
|
-
headers: { Accept: "application/json" },
|
|
1
|
+
import { credentialJson } from "../../_shared/credentials.js";
|
|
2
|
+
import { disqusCredential } from "./credentials.js";
|
|
3
|
+
function apiRequest(ctx, endpoint, qs) {
|
|
4
|
+
return credentialJson(ctx, disqusCredential, "disqus", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path: endpoint,
|
|
7
|
+
query: qs,
|
|
20
8
|
});
|
|
21
|
-
if (!res.ok)
|
|
22
|
-
throw new Error(`Disqus API error ${res.status}: ${await res.text()}`);
|
|
23
|
-
return res.json();
|
|
24
9
|
}
|
|
25
|
-
async function paginate(
|
|
10
|
+
async function paginate(ctx, endpoint, qs, limit) {
|
|
26
11
|
const results = [];
|
|
27
12
|
let cursor;
|
|
28
13
|
do {
|
|
29
14
|
const q = { ...qs, limit: 100 };
|
|
30
15
|
if (cursor)
|
|
31
16
|
q.cursor = cursor;
|
|
32
|
-
const data = (await apiRequest(
|
|
17
|
+
const data = (await apiRequest(ctx, endpoint, q));
|
|
33
18
|
const items = data.response;
|
|
34
19
|
results.push(...items);
|
|
35
20
|
const c = data.cursor;
|
|
@@ -47,6 +32,7 @@ async function paginate(apiKey, endpoint, qs, limit) {
|
|
|
47
32
|
export default function disqus(rl) {
|
|
48
33
|
rl.setName("disqus");
|
|
49
34
|
rl.setVersion("0.1.0");
|
|
35
|
+
rl.setCredential(disqusCredential);
|
|
50
36
|
rl.setConnectionSchema({
|
|
51
37
|
apiKey: {
|
|
52
38
|
type: "string",
|
|
@@ -77,13 +63,12 @@ export default function disqus(rl) {
|
|
|
77
63
|
},
|
|
78
64
|
async execute(input, ctx) {
|
|
79
65
|
const { forum, related, attach } = input;
|
|
80
|
-
const apiKey = ctx.connection.config.apiKey;
|
|
81
66
|
const qs = { forum };
|
|
82
67
|
if (related)
|
|
83
68
|
qs.related = related;
|
|
84
69
|
if (attach)
|
|
85
70
|
qs.attach = attach;
|
|
86
|
-
const data = (await apiRequest(
|
|
71
|
+
const data = (await apiRequest(ctx, "forums/details.json", qs));
|
|
87
72
|
return data.response;
|
|
88
73
|
},
|
|
89
74
|
});
|
|
@@ -126,7 +111,6 @@ export default function disqus(rl) {
|
|
|
126
111
|
},
|
|
127
112
|
async execute(input, ctx) {
|
|
128
113
|
const { forum, limit, order, query, since, related, include, filters } = (input ?? {});
|
|
129
|
-
const apiKey = ctx.connection.config.apiKey;
|
|
130
114
|
const qs = { forum };
|
|
131
115
|
if (order)
|
|
132
116
|
qs.order = order;
|
|
@@ -140,7 +124,7 @@ export default function disqus(rl) {
|
|
|
140
124
|
qs.include = include;
|
|
141
125
|
if (filters)
|
|
142
126
|
qs.filters = filters;
|
|
143
|
-
return paginate(
|
|
127
|
+
return paginate(ctx, "forums/listPosts.json", qs, limit);
|
|
144
128
|
},
|
|
145
129
|
});
|
|
146
130
|
rl.registerAction("forum.listCategories", {
|
|
@@ -161,11 +145,10 @@ export default function disqus(rl) {
|
|
|
161
145
|
},
|
|
162
146
|
async execute(input, ctx) {
|
|
163
147
|
const { forum, limit, order } = (input ?? {});
|
|
164
|
-
const apiKey = ctx.connection.config.apiKey;
|
|
165
148
|
const qs = { forum };
|
|
166
149
|
if (order)
|
|
167
150
|
qs.order = order;
|
|
168
|
-
return paginate(
|
|
151
|
+
return paginate(ctx, "forums/listCategories.json", qs, limit);
|
|
169
152
|
},
|
|
170
153
|
});
|
|
171
154
|
rl.registerAction("forum.listThreads", {
|
|
@@ -207,7 +190,6 @@ export default function disqus(rl) {
|
|
|
207
190
|
async execute(input, ctx) {
|
|
208
191
|
const { forum, limit, order, since, related, include, thread } = (input ??
|
|
209
192
|
{});
|
|
210
|
-
const apiKey = ctx.connection.config.apiKey;
|
|
211
193
|
const qs = { forum };
|
|
212
194
|
if (order)
|
|
213
195
|
qs.order = order;
|
|
@@ -219,7 +201,7 @@ export default function disqus(rl) {
|
|
|
219
201
|
qs.include = include;
|
|
220
202
|
if (thread)
|
|
221
203
|
qs.thread = thread;
|
|
222
|
-
return paginate(
|
|
204
|
+
return paginate(ctx, "forums/listThreads.json", qs, limit);
|
|
223
205
|
},
|
|
224
206
|
});
|
|
225
207
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** An API access token, sent as a bearer to Drift's one API origin. */
|
|
3
|
+
export const driftCredential = staticCredential({
|
|
4
|
+
id: "drift",
|
|
5
|
+
auth: { kind: "bearer" },
|
|
6
|
+
local: { secret: "accessToken" },
|
|
7
|
+
targets: {
|
|
8
|
+
api: {
|
|
9
|
+
baseUrl: "https://driftapi.com/",
|
|
10
|
+
methods: ["GET", "POST", "PATCH", "DELETE"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { credentialJson, pathSegment } from "../../_shared/credentials.js";
|
|
2
|
+
import { driftCredential } from "./credentials.js";
|
|
3
|
+
async function apiRequest(ctx, method, endpoint, body) {
|
|
4
|
+
return credentialJson(ctx, driftCredential, "drift", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path: endpoint,
|
|
4
7
|
method,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
if (body &&
|
|
11
|
-
Object.keys(body).length > 0 &&
|
|
12
|
-
method !== "GET" &&
|
|
13
|
-
method !== "DELETE") {
|
|
14
|
-
opts.body = JSON.stringify(body);
|
|
15
|
-
}
|
|
16
|
-
const res = await fetch(`${BASE_URL}${endpoint}`, opts);
|
|
17
|
-
if (!res.ok)
|
|
18
|
-
throw new Error(`Drift API error ${res.status}: ${await res.text()}`);
|
|
19
|
-
if (res.status === 204)
|
|
20
|
-
return { success: true };
|
|
21
|
-
return res.json();
|
|
8
|
+
...(body && Object.keys(body).length > 0 && method !== "GET"
|
|
9
|
+
? { json: body }
|
|
10
|
+
: {}),
|
|
11
|
+
});
|
|
22
12
|
}
|
|
23
13
|
export default function drift(rl) {
|
|
24
14
|
rl.setName("drift");
|
|
25
15
|
rl.setVersion("0.1.0");
|
|
16
|
+
rl.setCredential(driftCredential);
|
|
26
17
|
rl.setConnectionSchema({
|
|
27
18
|
accessToken: {
|
|
28
19
|
type: "string",
|
|
@@ -31,7 +22,6 @@ export default function drift(rl) {
|
|
|
31
22
|
env: "DRIFT_ACCESS_TOKEN",
|
|
32
23
|
},
|
|
33
24
|
});
|
|
34
|
-
const tok = (ctx) => ctx.connection.config.accessToken;
|
|
35
25
|
rl.registerAction("contact.create", {
|
|
36
26
|
access: "write",
|
|
37
27
|
description: "Create a contact",
|
|
@@ -47,7 +37,7 @@ export default function drift(rl) {
|
|
|
47
37
|
attrs.name = name;
|
|
48
38
|
if (phone)
|
|
49
39
|
attrs.phone = phone;
|
|
50
|
-
const data = (await apiRequest(
|
|
40
|
+
const data = (await apiRequest(ctx, "POST", "contacts", {
|
|
51
41
|
attributes: attrs,
|
|
52
42
|
}));
|
|
53
43
|
return data.data;
|
|
@@ -60,7 +50,7 @@ export default function drift(rl) {
|
|
|
60
50
|
contactId: { type: "string", required: true, description: "Contact ID" },
|
|
61
51
|
},
|
|
62
52
|
async execute(input, ctx) {
|
|
63
|
-
const data = (await apiRequest(
|
|
53
|
+
const data = (await apiRequest(ctx, "GET", `contacts/${pathSegment(input.contactId)}`));
|
|
64
54
|
return data.data;
|
|
65
55
|
},
|
|
66
56
|
});
|
|
@@ -82,7 +72,7 @@ export default function drift(rl) {
|
|
|
82
72
|
attrs.name = name;
|
|
83
73
|
if (phone)
|
|
84
74
|
attrs.phone = phone;
|
|
85
|
-
const data = (await apiRequest(
|
|
75
|
+
const data = (await apiRequest(ctx, "PATCH", `contacts/${pathSegment(contactId)}`, { attributes: attrs }));
|
|
86
76
|
return data.data;
|
|
87
77
|
},
|
|
88
78
|
});
|
|
@@ -93,7 +83,7 @@ export default function drift(rl) {
|
|
|
93
83
|
contactId: { type: "string", required: true, description: "Contact ID" },
|
|
94
84
|
},
|
|
95
85
|
async execute(input, ctx) {
|
|
96
|
-
await apiRequest(
|
|
86
|
+
await apiRequest(ctx, "DELETE", `contacts/${pathSegment(input.contactId)}`);
|
|
97
87
|
return { success: true };
|
|
98
88
|
},
|
|
99
89
|
});
|
|
@@ -101,7 +91,7 @@ export default function drift(rl) {
|
|
|
101
91
|
access: "read",
|
|
102
92
|
description: "List all custom contact attributes",
|
|
103
93
|
async execute(_input, ctx) {
|
|
104
|
-
const data = (await apiRequest(
|
|
94
|
+
const data = (await apiRequest(ctx, "GET", "contacts/attributes"));
|
|
105
95
|
return data.data.properties;
|
|
106
96
|
},
|
|
107
97
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** An access token, sent as a bearer to Dropbox's RPC API origin. */
|
|
3
|
+
export const dropboxCredential = staticCredential({
|
|
4
|
+
id: "dropbox",
|
|
5
|
+
auth: { kind: "bearer" },
|
|
6
|
+
local: { secret: "accessToken" },
|
|
7
|
+
targets: {
|
|
8
|
+
api: {
|
|
9
|
+
baseUrl: "https://api.dropboxapi.com/2/",
|
|
10
|
+
methods: ["POST"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { credentialJson } from "../../_shared/credentials.js";
|
|
2
|
+
import { dropboxCredential } from "./credentials.js";
|
|
3
|
+
async function apiRequest(ctx, endpoint, body) {
|
|
4
|
+
return credentialJson(ctx, dropboxCredential, "dropbox", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path: endpoint,
|
|
4
7
|
method: "POST",
|
|
5
|
-
|
|
6
|
-
Authorization: `Bearer ${token}`,
|
|
7
|
-
"Content-Type": "application/json",
|
|
8
|
-
},
|
|
9
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
8
|
+
...(body ? { json: body } : {}),
|
|
10
9
|
});
|
|
11
|
-
if (!res.ok)
|
|
12
|
-
throw new Error(`Dropbox API error ${res.status}: ${await res.text()}`);
|
|
13
|
-
const ct = res.headers.get("content-type") ?? "";
|
|
14
|
-
if (ct.includes("application/json"))
|
|
15
|
-
return res.json();
|
|
16
|
-
return { success: true };
|
|
17
10
|
}
|
|
18
|
-
async function paginateFolder(
|
|
11
|
+
async function paginateFolder(ctx, path, opts, limit) {
|
|
19
12
|
const results = [];
|
|
20
13
|
const body = { path, limit: 1000, ...opts };
|
|
21
|
-
let data = (await apiRequest(
|
|
14
|
+
let data = (await apiRequest(ctx, "files/list_folder", body));
|
|
22
15
|
results.push(...data.entries);
|
|
23
16
|
while (data.has_more && (!limit || results.length < limit)) {
|
|
24
|
-
data = (await apiRequest(
|
|
17
|
+
data = (await apiRequest(ctx, "files/list_folder/continue", {
|
|
25
18
|
cursor: data.cursor,
|
|
26
19
|
}));
|
|
27
20
|
results.push(...data.entries);
|
|
28
21
|
}
|
|
29
22
|
return limit ? results.slice(0, limit) : results;
|
|
30
23
|
}
|
|
31
|
-
async function paginateSearch(
|
|
24
|
+
async function paginateSearch(ctx, query, opts, limit) {
|
|
32
25
|
const results = [];
|
|
33
26
|
const body = {
|
|
34
27
|
query,
|
|
@@ -36,10 +29,10 @@ async function paginateSearch(token, query, opts, limit) {
|
|
|
36
29
|
};
|
|
37
30
|
if (limit)
|
|
38
31
|
body.options.max_results = Math.min(limit, 1000);
|
|
39
|
-
let data = (await apiRequest(
|
|
32
|
+
let data = (await apiRequest(ctx, "files/search_v2", body));
|
|
40
33
|
results.push(...data.matches);
|
|
41
34
|
while (data.has_more && (!limit || results.length < limit)) {
|
|
42
|
-
data = (await apiRequest(
|
|
35
|
+
data = (await apiRequest(ctx, "files/search/continue_v2", {
|
|
43
36
|
cursor: data.cursor,
|
|
44
37
|
}));
|
|
45
38
|
results.push(...data.matches);
|
|
@@ -49,6 +42,7 @@ async function paginateSearch(token, query, opts, limit) {
|
|
|
49
42
|
export default function dropbox(rl) {
|
|
50
43
|
rl.setName("dropbox");
|
|
51
44
|
rl.setVersion("0.1.0");
|
|
45
|
+
rl.setCredential(dropboxCredential);
|
|
52
46
|
rl.setConnectionSchema({
|
|
53
47
|
accessToken: {
|
|
54
48
|
type: "string",
|
|
@@ -57,7 +51,6 @@ export default function dropbox(rl) {
|
|
|
57
51
|
env: "DROPBOX_ACCESS_TOKEN",
|
|
58
52
|
},
|
|
59
53
|
});
|
|
60
|
-
const tok = (ctx) => ctx.connection.config.accessToken;
|
|
61
54
|
// ── File ────────────────────────────────────────────
|
|
62
55
|
rl.registerAction("file.copy", {
|
|
63
56
|
access: "write",
|
|
@@ -76,7 +69,7 @@ export default function dropbox(rl) {
|
|
|
76
69
|
},
|
|
77
70
|
async execute(input, ctx) {
|
|
78
71
|
const { fromPath, toPath } = input;
|
|
79
|
-
return apiRequest(
|
|
72
|
+
return apiRequest(ctx, "files/copy_v2", {
|
|
80
73
|
from_path: fromPath,
|
|
81
74
|
to_path: toPath,
|
|
82
75
|
});
|
|
@@ -99,7 +92,7 @@ export default function dropbox(rl) {
|
|
|
99
92
|
},
|
|
100
93
|
async execute(input, ctx) {
|
|
101
94
|
const { fromPath, toPath } = input;
|
|
102
|
-
return apiRequest(
|
|
95
|
+
return apiRequest(ctx, "files/move_v2", {
|
|
103
96
|
from_path: fromPath,
|
|
104
97
|
to_path: toPath,
|
|
105
98
|
});
|
|
@@ -116,7 +109,7 @@ export default function dropbox(rl) {
|
|
|
116
109
|
},
|
|
117
110
|
},
|
|
118
111
|
async execute(input, ctx) {
|
|
119
|
-
return apiRequest(
|
|
112
|
+
return apiRequest(ctx, "files/delete_v2", {
|
|
120
113
|
path: input.path,
|
|
121
114
|
});
|
|
122
115
|
},
|
|
@@ -133,7 +126,7 @@ export default function dropbox(rl) {
|
|
|
133
126
|
},
|
|
134
127
|
},
|
|
135
128
|
async execute(input, ctx) {
|
|
136
|
-
return apiRequest(
|
|
129
|
+
return apiRequest(ctx, "files/create_folder_v2", {
|
|
137
130
|
path: input.path,
|
|
138
131
|
});
|
|
139
132
|
},
|
|
@@ -167,7 +160,7 @@ export default function dropbox(rl) {
|
|
|
167
160
|
opts.recursive = true;
|
|
168
161
|
if (includeDeleted)
|
|
169
162
|
opts.include_deleted = true;
|
|
170
|
-
return paginateFolder(
|
|
163
|
+
return paginateFolder(ctx, path, opts, limit);
|
|
171
164
|
},
|
|
172
165
|
});
|
|
173
166
|
rl.registerAction("folder.copy", {
|
|
@@ -187,7 +180,7 @@ export default function dropbox(rl) {
|
|
|
187
180
|
},
|
|
188
181
|
async execute(input, ctx) {
|
|
189
182
|
const { fromPath, toPath } = input;
|
|
190
|
-
return apiRequest(
|
|
183
|
+
return apiRequest(ctx, "files/copy_v2", {
|
|
191
184
|
from_path: fromPath,
|
|
192
185
|
to_path: toPath,
|
|
193
186
|
});
|
|
@@ -210,7 +203,7 @@ export default function dropbox(rl) {
|
|
|
210
203
|
},
|
|
211
204
|
async execute(input, ctx) {
|
|
212
205
|
const { fromPath, toPath } = input;
|
|
213
|
-
return apiRequest(
|
|
206
|
+
return apiRequest(ctx, "files/move_v2", {
|
|
214
207
|
from_path: fromPath,
|
|
215
208
|
to_path: toPath,
|
|
216
209
|
});
|
|
@@ -227,7 +220,7 @@ export default function dropbox(rl) {
|
|
|
227
220
|
},
|
|
228
221
|
},
|
|
229
222
|
async execute(input, ctx) {
|
|
230
|
-
return apiRequest(
|
|
223
|
+
return apiRequest(ctx, "files/delete_v2", {
|
|
231
224
|
path: input.path,
|
|
232
225
|
});
|
|
233
226
|
},
|
|
@@ -271,7 +264,7 @@ export default function dropbox(rl) {
|
|
|
271
264
|
opts.file_extensions = fileExtensions;
|
|
272
265
|
if (fileStatus)
|
|
273
266
|
opts.file_status = { ".tag": fileStatus };
|
|
274
|
-
return paginateSearch(
|
|
267
|
+
return paginateSearch(ctx, query, opts, limit);
|
|
275
268
|
},
|
|
276
269
|
});
|
|
277
270
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** An API key, sent as the X-Access-Token header to Dropcontact's one API origin. */
|
|
3
|
+
export const dropcontactCredential = staticCredential({
|
|
4
|
+
id: "dropcontact",
|
|
5
|
+
auth: { kind: "apiKey", header: "X-Access-Token" },
|
|
6
|
+
local: { secret: "apiKey" },
|
|
7
|
+
targets: {
|
|
8
|
+
api: {
|
|
9
|
+
baseUrl: "https://api.dropcontact.io/",
|
|
10
|
+
methods: ["GET", "POST"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { credentialJson, pathSegment } from "../../_shared/credentials.js";
|
|
2
|
+
import { dropcontactCredential } from "./credentials.js";
|
|
3
|
+
async function apiRequest(ctx, method, endpoint, body) {
|
|
4
|
+
return credentialJson(ctx, dropcontactCredential, "dropcontact", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path: endpoint,
|
|
4
7
|
method,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
if (body && Object.keys(body).length > 0 && method !== "GET") {
|
|
11
|
-
opts.body = JSON.stringify(body);
|
|
12
|
-
}
|
|
13
|
-
const res = await fetch(`${BASE_URL}${endpoint}`, opts);
|
|
14
|
-
if (!res.ok)
|
|
15
|
-
throw new Error(`Dropcontact API error ${res.status}: ${await res.text()}`);
|
|
16
|
-
return res.json();
|
|
8
|
+
...(body && Object.keys(body).length > 0 && method !== "GET"
|
|
9
|
+
? { json: body }
|
|
10
|
+
: {}),
|
|
11
|
+
});
|
|
17
12
|
}
|
|
18
13
|
export default function dropcontact(rl) {
|
|
19
14
|
rl.setName("dropcontact");
|
|
20
15
|
rl.setVersion("0.1.0");
|
|
16
|
+
rl.setCredential(dropcontactCredential);
|
|
21
17
|
rl.setConnectionSchema({
|
|
22
18
|
apiKey: {
|
|
23
19
|
type: "string",
|
|
@@ -26,7 +22,6 @@ export default function dropcontact(rl) {
|
|
|
26
22
|
env: "DROPCONTACT_API_KEY",
|
|
27
23
|
},
|
|
28
24
|
});
|
|
29
|
-
const key = (ctx) => ctx.connection.config.apiKey;
|
|
30
25
|
rl.registerAction("contact.enrich", {
|
|
31
26
|
access: "write",
|
|
32
27
|
description: "Enrich contacts — find B2B emails from name and website",
|
|
@@ -54,7 +49,7 @@ export default function dropcontact(rl) {
|
|
|
54
49
|
body.siren = true;
|
|
55
50
|
if (language)
|
|
56
51
|
body.language = language;
|
|
57
|
-
return apiRequest(
|
|
52
|
+
return apiRequest(ctx, "POST", "batch", body);
|
|
58
53
|
},
|
|
59
54
|
});
|
|
60
55
|
rl.registerAction("contact.fetchRequest", {
|
|
@@ -69,7 +64,7 @@ export default function dropcontact(rl) {
|
|
|
69
64
|
},
|
|
70
65
|
async execute(input, ctx) {
|
|
71
66
|
const { requestId } = input;
|
|
72
|
-
const data = (await apiRequest(
|
|
67
|
+
const data = (await apiRequest(ctx, "GET", `batch/${pathSegment(requestId)}`));
|
|
73
68
|
if (!data.success)
|
|
74
69
|
throw new Error(`Request not ready or failed: ${data.reason ?? "unknown"}`);
|
|
75
70
|
return data.data;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** An account API key, sent as the Apikey header to E-goi's one API origin. */
|
|
3
|
+
export const egoiCredential = staticCredential({
|
|
4
|
+
id: "egoi",
|
|
5
|
+
auth: { kind: "apiKey", header: "Apikey" },
|
|
6
|
+
local: { secret: "apiKey" },
|
|
7
|
+
targets: {
|
|
8
|
+
api: {
|
|
9
|
+
baseUrl: "https://api.egoiapp.com/",
|
|
10
|
+
methods: ["GET", "POST", "PATCH"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
probe: {
|
|
14
|
+
target: "api",
|
|
15
|
+
path: "my-account",
|
|
16
|
+
method: "GET",
|
|
17
|
+
acceptedStatuses: [200],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -1,38 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
url.searchParams.set(k, String(v));
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
const opts = {
|
|
1
|
+
import { credentialJson, pathSegment } from "../../_shared/credentials.js";
|
|
2
|
+
import { egoiCredential } from "./credentials.js";
|
|
3
|
+
function apiRequest(ctx, method, path, body, qs) {
|
|
4
|
+
return credentialJson(ctx, egoiCredential, "egoi", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path,
|
|
11
7
|
method,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
if (body &&
|
|
19
|
-
Object.keys(body).length > 0 &&
|
|
20
|
-
method !== "GET" &&
|
|
21
|
-
method !== "DELETE") {
|
|
22
|
-
opts.body = JSON.stringify(body);
|
|
23
|
-
}
|
|
24
|
-
const res = await fetch(url.toString(), opts);
|
|
25
|
-
if (!res.ok)
|
|
26
|
-
throw new Error(`E-goi API error ${res.status}: ${await res.text()}`);
|
|
27
|
-
return res.json();
|
|
8
|
+
query: qs,
|
|
9
|
+
...(body && Object.keys(body).length > 0 && method !== "GET"
|
|
10
|
+
? { json: body }
|
|
11
|
+
: {}),
|
|
12
|
+
});
|
|
28
13
|
}
|
|
29
|
-
async function paginate(
|
|
14
|
+
async function paginate(ctx, endpoint, qs = {}, limit) {
|
|
30
15
|
const results = [];
|
|
31
16
|
qs.offset = 0;
|
|
32
17
|
qs.count = 500;
|
|
33
18
|
let data;
|
|
34
19
|
do {
|
|
35
|
-
const res = (await apiRequest(
|
|
20
|
+
const res = (await apiRequest(ctx, "GET", endpoint, undefined, qs));
|
|
36
21
|
data = res.items ?? [];
|
|
37
22
|
results.push(...data);
|
|
38
23
|
qs.offset += qs.count;
|
|
@@ -44,6 +29,7 @@ async function paginate(apiKey, endpoint, qs = {}, limit) {
|
|
|
44
29
|
export default function egoi(rl) {
|
|
45
30
|
rl.setName("egoi");
|
|
46
31
|
rl.setVersion("0.1.0");
|
|
32
|
+
rl.setCredential(egoiCredential);
|
|
47
33
|
rl.setConnectionSchema({
|
|
48
34
|
apiKey: {
|
|
49
35
|
type: "string",
|
|
@@ -52,7 +38,6 @@ export default function egoi(rl) {
|
|
|
52
38
|
env: "EGOI_API_KEY",
|
|
53
39
|
},
|
|
54
40
|
});
|
|
55
|
-
const key = (ctx) => ctx.connection.config.apiKey;
|
|
56
41
|
rl.registerAction("contact.create", {
|
|
57
42
|
access: "write",
|
|
58
43
|
description: "Create a contact in a list",
|
|
@@ -97,17 +82,17 @@ export default function egoi(rl) {
|
|
|
97
82
|
if (status)
|
|
98
83
|
base.status = status;
|
|
99
84
|
const body = { base, extra: extraFields ?? [] };
|
|
100
|
-
const data = (await apiRequest(
|
|
85
|
+
const data = (await apiRequest(ctx, "POST", `lists/${pathSegment(listId)}/contacts`, body));
|
|
101
86
|
const contactId = data.contact_id;
|
|
102
87
|
if (tagIds && Array.isArray(tagIds)) {
|
|
103
88
|
for (const tag of tagIds) {
|
|
104
|
-
await apiRequest(
|
|
89
|
+
await apiRequest(ctx, "POST", `lists/${pathSegment(listId)}/contacts/actions/attach-tag`, {
|
|
105
90
|
tag_id: tag,
|
|
106
91
|
contacts: [contactId],
|
|
107
92
|
});
|
|
108
93
|
}
|
|
109
94
|
}
|
|
110
|
-
return apiRequest(
|
|
95
|
+
return apiRequest(ctx, "GET", `lists/${pathSegment(listId)}/contacts/${pathSegment(contactId)}`);
|
|
111
96
|
},
|
|
112
97
|
});
|
|
113
98
|
rl.registerAction("contact.get", {
|
|
@@ -125,9 +110,9 @@ export default function egoi(rl) {
|
|
|
125
110
|
async execute(input, ctx) {
|
|
126
111
|
const { listId, contactId, email } = (input ?? {});
|
|
127
112
|
if (contactId)
|
|
128
|
-
return apiRequest(
|
|
113
|
+
return apiRequest(ctx, "GET", `lists/${pathSegment(listId)}/contacts/${pathSegment(contactId)}`);
|
|
129
114
|
if (email)
|
|
130
|
-
return apiRequest(
|
|
115
|
+
return apiRequest(ctx, "GET", `lists/${pathSegment(listId)}/contacts`, undefined, { email: email });
|
|
131
116
|
throw new Error("Provide either contactId or email");
|
|
132
117
|
},
|
|
133
118
|
});
|
|
@@ -140,7 +125,7 @@ export default function egoi(rl) {
|
|
|
140
125
|
},
|
|
141
126
|
async execute(input, ctx) {
|
|
142
127
|
const { listId, limit } = (input ?? {});
|
|
143
|
-
return paginate(
|
|
128
|
+
return paginate(ctx, `lists/${pathSegment(listId)}/contacts`, {}, limit);
|
|
144
129
|
},
|
|
145
130
|
});
|
|
146
131
|
rl.registerAction("contact.update", {
|
|
@@ -186,16 +171,16 @@ export default function egoi(rl) {
|
|
|
186
171
|
if (status)
|
|
187
172
|
base.status = status;
|
|
188
173
|
const body = { base, extra: extraFields ?? [] };
|
|
189
|
-
await apiRequest(
|
|
174
|
+
await apiRequest(ctx, "PATCH", `lists/${pathSegment(listId)}/contacts/${pathSegment(contactId)}`, body);
|
|
190
175
|
if (tagIds && Array.isArray(tagIds)) {
|
|
191
176
|
for (const tag of tagIds) {
|
|
192
|
-
await apiRequest(
|
|
177
|
+
await apiRequest(ctx, "POST", `lists/${pathSegment(listId)}/contacts/actions/attach-tag`, {
|
|
193
178
|
tag_id: tag,
|
|
194
179
|
contacts: [contactId],
|
|
195
180
|
});
|
|
196
181
|
}
|
|
197
182
|
}
|
|
198
|
-
return apiRequest(
|
|
183
|
+
return apiRequest(ctx, "GET", `lists/${pathSegment(listId)}/contacts/${pathSegment(contactId)}`);
|
|
199
184
|
},
|
|
200
185
|
});
|
|
201
186
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { httpsBase, staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/**
|
|
3
|
+
* An optional username and password, sent as HTTP Basic to the cluster;
|
|
4
|
+
* without them, requests go unsigned. The cluster URL is public config
|
|
5
|
+
* and must be HTTPS.
|
|
6
|
+
*/
|
|
7
|
+
export const elasticsearchCredential = staticCredential({
|
|
8
|
+
id: "elasticsearch",
|
|
9
|
+
auth: { kind: "basic" },
|
|
10
|
+
local: { username: "username", password: "password" },
|
|
11
|
+
optional: true,
|
|
12
|
+
targets: (config) => ({
|
|
13
|
+
api: {
|
|
14
|
+
baseUrl: httpsBase(config.baseUrl, ""),
|
|
15
|
+
methods: ["GET", "POST", "PUT", "DELETE"],
|
|
16
|
+
},
|
|
17
|
+
}),
|
|
18
|
+
});
|