runline 0.33.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 +19 -55
- package/dist/plugins/_shared/shiftCredentials.js +83 -0
- 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/index.js +4 -2
- package/dist/plugins/shiftBwm/src/shared.js +41 -16
- 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 -2
- package/dist/plugins/shiftOcr/src/credentials.js +8 -0
- package/dist/plugins/shiftOcr/src/index.js +6 -5
- 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 +4 -4
- 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 +1 -1
- package/dist/plugins/_shared/authedFetch.js +0 -33
- package/dist/plugins/_shared/tokenRefresh.js +0 -41
|
@@ -1,44 +1,21 @@
|
|
|
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 { boxCredential } from "./credentials.js";
|
|
3
|
+
function apiRequest(ctx, method, path, body, query) {
|
|
4
|
+
return credentialJson(ctx, boxCredential, "box", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path,
|
|
11
7
|
method,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
if (body &&
|
|
18
|
-
Object.keys(body).length > 0 &&
|
|
19
|
-
method !== "GET" &&
|
|
20
|
-
method !== "DELETE") {
|
|
21
|
-
opts.body = JSON.stringify(body);
|
|
22
|
-
}
|
|
23
|
-
const res = await fetch(url.toString(), opts);
|
|
24
|
-
if (!res.ok) {
|
|
25
|
-
const text = await res.text();
|
|
26
|
-
throw new Error(`Box API error ${res.status}: ${text}`);
|
|
27
|
-
}
|
|
28
|
-
if (res.status === 204)
|
|
29
|
-
return { success: true };
|
|
30
|
-
const ct = res.headers.get("content-type") ?? "";
|
|
31
|
-
if (ct.includes("application/json"))
|
|
32
|
-
return res.json();
|
|
33
|
-
return { success: true };
|
|
8
|
+
query,
|
|
9
|
+
...(body && Object.keys(body).length > 0 ? { json: body } : {}),
|
|
10
|
+
});
|
|
34
11
|
}
|
|
35
|
-
async function paginateAll(
|
|
12
|
+
async function paginateAll(ctx, path, property, query, limit) {
|
|
36
13
|
const results = [];
|
|
37
14
|
let offset = 0;
|
|
38
15
|
const size = 100;
|
|
39
16
|
while (true) {
|
|
40
|
-
const data = (await apiRequest(
|
|
41
|
-
...
|
|
17
|
+
const data = (await apiRequest(ctx, "GET", path, undefined, {
|
|
18
|
+
...query,
|
|
42
19
|
limit: size,
|
|
43
20
|
offset,
|
|
44
21
|
}));
|
|
@@ -52,12 +29,10 @@ async function paginateAll(token, endpoint, property, qs, limit) {
|
|
|
52
29
|
}
|
|
53
30
|
return results;
|
|
54
31
|
}
|
|
55
|
-
function getToken(ctx) {
|
|
56
|
-
return ctx.connection.config.accessToken;
|
|
57
|
-
}
|
|
58
32
|
export default function box(rl) {
|
|
59
33
|
rl.setName("box");
|
|
60
34
|
rl.setVersion("0.1.0");
|
|
35
|
+
rl.setCredential(boxCredential);
|
|
61
36
|
rl.setConnectionSchema({
|
|
62
37
|
accessToken: {
|
|
63
38
|
type: "string",
|
|
@@ -103,7 +78,7 @@ export default function box(rl) {
|
|
|
103
78
|
const qs = {};
|
|
104
79
|
if (fields)
|
|
105
80
|
qs.fields = fields;
|
|
106
|
-
return apiRequest(
|
|
81
|
+
return apiRequest(ctx, "POST", `files/${pathSegment(fileId)}/copy`, body, qs);
|
|
107
82
|
},
|
|
108
83
|
});
|
|
109
84
|
rl.registerAction("file.delete", {
|
|
@@ -114,7 +89,7 @@ export default function box(rl) {
|
|
|
114
89
|
},
|
|
115
90
|
async execute(input, ctx) {
|
|
116
91
|
const { fileId } = input;
|
|
117
|
-
await apiRequest(
|
|
92
|
+
await apiRequest(ctx, "DELETE", `files/${pathSegment(fileId)}`);
|
|
118
93
|
return { success: true };
|
|
119
94
|
},
|
|
120
95
|
});
|
|
@@ -134,7 +109,7 @@ export default function box(rl) {
|
|
|
134
109
|
const qs = {};
|
|
135
110
|
if (fields)
|
|
136
111
|
qs.fields = fields;
|
|
137
|
-
return apiRequest(
|
|
112
|
+
return apiRequest(ctx, "GET", `files/${pathSegment(fileId)}`, undefined, qs);
|
|
138
113
|
},
|
|
139
114
|
});
|
|
140
115
|
rl.registerAction("file.search", {
|
|
@@ -175,7 +150,7 @@ export default function box(rl) {
|
|
|
175
150
|
qs.updated_at_range = updatedAtRange;
|
|
176
151
|
if (ancestorFolderIds)
|
|
177
152
|
qs.ancestor_folder_ids = ancestorFolderIds;
|
|
178
|
-
return paginateAll(
|
|
153
|
+
return paginateAll(ctx, "search", "entries", qs, limit);
|
|
179
154
|
},
|
|
180
155
|
});
|
|
181
156
|
rl.registerAction("file.share", {
|
|
@@ -239,7 +214,7 @@ export default function box(rl) {
|
|
|
239
214
|
const qs = {};
|
|
240
215
|
if (notify !== undefined)
|
|
241
216
|
qs.notify = notify;
|
|
242
|
-
return apiRequest(
|
|
217
|
+
return apiRequest(ctx, "POST", "collaborations", body, qs);
|
|
243
218
|
},
|
|
244
219
|
});
|
|
245
220
|
// ── Folder ──────────────────────────────────────────
|
|
@@ -268,7 +243,7 @@ export default function box(rl) {
|
|
|
268
243
|
const qs = {};
|
|
269
244
|
if (fields)
|
|
270
245
|
qs.fields = fields;
|
|
271
|
-
return apiRequest(
|
|
246
|
+
return apiRequest(ctx, "POST", "folders", body, qs);
|
|
272
247
|
},
|
|
273
248
|
});
|
|
274
249
|
rl.registerAction("folder.delete", {
|
|
@@ -284,7 +259,7 @@ export default function box(rl) {
|
|
|
284
259
|
},
|
|
285
260
|
async execute(input, ctx) {
|
|
286
261
|
const { folderId, recursive } = input;
|
|
287
|
-
await apiRequest(
|
|
262
|
+
await apiRequest(ctx, "DELETE", `folders/${pathSegment(folderId)}`, undefined, {
|
|
288
263
|
recursive: recursive ?? false,
|
|
289
264
|
});
|
|
290
265
|
return { success: true };
|
|
@@ -298,7 +273,7 @@ export default function box(rl) {
|
|
|
298
273
|
},
|
|
299
274
|
async execute(input, ctx) {
|
|
300
275
|
const { folderId } = input;
|
|
301
|
-
return apiRequest(
|
|
276
|
+
return apiRequest(ctx, "GET", `folders/${pathSegment(folderId)}`);
|
|
302
277
|
},
|
|
303
278
|
});
|
|
304
279
|
rl.registerAction("folder.search", {
|
|
@@ -332,7 +307,7 @@ export default function box(rl) {
|
|
|
332
307
|
qs.created_at_range = createdAtRange;
|
|
333
308
|
if (updatedAtRange)
|
|
334
309
|
qs.updated_at_range = updatedAtRange;
|
|
335
|
-
return paginateAll(
|
|
310
|
+
return paginateAll(ctx, "search", "entries", qs, limit);
|
|
336
311
|
},
|
|
337
312
|
});
|
|
338
313
|
rl.registerAction("folder.share", {
|
|
@@ -396,7 +371,7 @@ export default function box(rl) {
|
|
|
396
371
|
const qs = {};
|
|
397
372
|
if (notify !== undefined)
|
|
398
373
|
qs.notify = notify;
|
|
399
|
-
return apiRequest(
|
|
374
|
+
return apiRequest(ctx, "POST", "collaborations", body, qs);
|
|
400
375
|
},
|
|
401
376
|
});
|
|
402
377
|
rl.registerAction("folder.update", {
|
|
@@ -440,7 +415,7 @@ export default function box(rl) {
|
|
|
440
415
|
const qs = {};
|
|
441
416
|
if (fields)
|
|
442
417
|
qs.fields = fields;
|
|
443
|
-
return apiRequest(
|
|
418
|
+
return apiRequest(ctx, "PUT", `folders/${pathSegment(folderId)}`, body, qs);
|
|
444
419
|
},
|
|
445
420
|
});
|
|
446
421
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** An API key, sent as a bearer to Brandfetch's one API origin. */
|
|
3
|
+
export const brandfetchCredential = staticCredential({
|
|
4
|
+
id: "brandfetch",
|
|
5
|
+
auth: { kind: "bearer" },
|
|
6
|
+
local: { secret: "apiKey" },
|
|
7
|
+
targets: {
|
|
8
|
+
api: {
|
|
9
|
+
baseUrl: "https://api.brandfetch.io/v2/",
|
|
10
|
+
methods: ["GET"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { credentialJson, pathSegment } from "../../_shared/credentials.js";
|
|
2
|
+
import { brandfetchCredential } from "./credentials.js";
|
|
3
|
+
function apiRequest(ctx, domain) {
|
|
4
|
+
return credentialJson(ctx, brandfetchCredential, "brandfetch", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path: `brands/${pathSegment(domain)}`,
|
|
5
7
|
});
|
|
6
|
-
if (!res.ok) {
|
|
7
|
-
const text = await res.text();
|
|
8
|
-
throw new Error(`Brandfetch API error ${res.status}: ${text}`);
|
|
9
|
-
}
|
|
10
|
-
return res.json();
|
|
11
|
-
}
|
|
12
|
-
function getKey(ctx) {
|
|
13
|
-
return ctx.connection.config.apiKey;
|
|
14
8
|
}
|
|
15
9
|
export default function brandfetch(rl) {
|
|
16
10
|
rl.setName("brandfetch");
|
|
17
11
|
rl.setVersion("0.1.0");
|
|
12
|
+
rl.setCredential(brandfetchCredential);
|
|
18
13
|
rl.setConnectionSchema({
|
|
19
14
|
apiKey: {
|
|
20
15
|
type: "string",
|
|
@@ -35,7 +30,7 @@ export default function brandfetch(rl) {
|
|
|
35
30
|
},
|
|
36
31
|
async execute(input, ctx) {
|
|
37
32
|
const { domain } = input;
|
|
38
|
-
const data = await apiRequest(
|
|
33
|
+
const data = await apiRequest(ctx, domain);
|
|
39
34
|
return data.logos;
|
|
40
35
|
},
|
|
41
36
|
});
|
|
@@ -47,7 +42,7 @@ export default function brandfetch(rl) {
|
|
|
47
42
|
},
|
|
48
43
|
async execute(input, ctx) {
|
|
49
44
|
const { domain } = input;
|
|
50
|
-
const data = await apiRequest(
|
|
45
|
+
const data = await apiRequest(ctx, domain);
|
|
51
46
|
return data.colors;
|
|
52
47
|
},
|
|
53
48
|
});
|
|
@@ -59,7 +54,7 @@ export default function brandfetch(rl) {
|
|
|
59
54
|
},
|
|
60
55
|
async execute(input, ctx) {
|
|
61
56
|
const { domain } = input;
|
|
62
|
-
const data = await apiRequest(
|
|
57
|
+
const data = await apiRequest(ctx, domain);
|
|
63
58
|
return data.fonts;
|
|
64
59
|
},
|
|
65
60
|
});
|
|
@@ -71,7 +66,7 @@ export default function brandfetch(rl) {
|
|
|
71
66
|
},
|
|
72
67
|
async execute(input, ctx) {
|
|
73
68
|
const { domain } = input;
|
|
74
|
-
const data = await apiRequest(
|
|
69
|
+
const data = await apiRequest(ctx, domain);
|
|
75
70
|
return data.company;
|
|
76
71
|
},
|
|
77
72
|
});
|
|
@@ -83,7 +78,7 @@ export default function brandfetch(rl) {
|
|
|
83
78
|
},
|
|
84
79
|
async execute(input, ctx) {
|
|
85
80
|
const { domain } = input;
|
|
86
|
-
return apiRequest(
|
|
81
|
+
return apiRequest(ctx, domain);
|
|
87
82
|
},
|
|
88
83
|
});
|
|
89
84
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** An API key, sent as the api-key header to Brevo's v3 API base. */
|
|
3
|
+
export const brevoCredential = staticCredential({
|
|
4
|
+
id: "brevo",
|
|
5
|
+
auth: { kind: "apiKey", header: "api-key" },
|
|
6
|
+
local: { secret: "apiKey" },
|
|
7
|
+
targets: {
|
|
8
|
+
api: {
|
|
9
|
+
baseUrl: "https://api.brevo.com/v3/",
|
|
10
|
+
methods: ["GET", "POST", "PUT", "DELETE"],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
probe: {
|
|
14
|
+
target: "api",
|
|
15
|
+
path: "account",
|
|
16
|
+
method: "GET",
|
|
17
|
+
acceptedStatuses: [200],
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -1,44 +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 { brevoCredential } from "./credentials.js";
|
|
3
|
+
function apiRequest(ctx, method, path, body, qs) {
|
|
4
|
+
return credentialJson(ctx, brevoCredential, "brevo", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path,
|
|
11
7
|
method,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
const text = await res.text();
|
|
27
|
-
throw new Error(`Brevo API error ${res.status}: ${text}`);
|
|
28
|
-
}
|
|
29
|
-
if (res.status === 204 || res.headers.get("content-length") === "0")
|
|
30
|
-
return { success: true };
|
|
31
|
-
const ct = res.headers.get("content-type") ?? "";
|
|
32
|
-
if (ct.includes("application/json"))
|
|
33
|
-
return res.json();
|
|
34
|
-
return { success: true };
|
|
35
|
-
}
|
|
36
|
-
function getKey(ctx) {
|
|
37
|
-
return ctx.connection.config.apiKey;
|
|
8
|
+
query: qs,
|
|
9
|
+
...(body &&
|
|
10
|
+
Object.keys(body).length > 0 &&
|
|
11
|
+
method !== "GET" &&
|
|
12
|
+
method !== "DELETE"
|
|
13
|
+
? { json: body }
|
|
14
|
+
: {}),
|
|
15
|
+
});
|
|
38
16
|
}
|
|
39
17
|
export default function brevo(rl) {
|
|
40
18
|
rl.setName("brevo");
|
|
41
19
|
rl.setVersion("0.1.0");
|
|
20
|
+
rl.setCredential(brevoCredential);
|
|
42
21
|
rl.setConnectionSchema({
|
|
43
22
|
apiKey: {
|
|
44
23
|
type: "string",
|
|
@@ -71,7 +50,7 @@ export default function brevo(rl) {
|
|
|
71
50
|
body.attributes = attributes;
|
|
72
51
|
if (listIds)
|
|
73
52
|
body.listIds = listIds;
|
|
74
|
-
return apiRequest(
|
|
53
|
+
return apiRequest(ctx, "POST", "contacts", body);
|
|
75
54
|
},
|
|
76
55
|
});
|
|
77
56
|
rl.registerAction("contact.upsert", {
|
|
@@ -93,7 +72,7 @@ export default function brevo(rl) {
|
|
|
93
72
|
body.attributes = attributes;
|
|
94
73
|
if (listIds)
|
|
95
74
|
body.listIds = listIds;
|
|
96
|
-
return apiRequest(
|
|
75
|
+
return apiRequest(ctx, "POST", "contacts", body);
|
|
97
76
|
},
|
|
98
77
|
});
|
|
99
78
|
rl.registerAction("contact.get", {
|
|
@@ -108,7 +87,7 @@ export default function brevo(rl) {
|
|
|
108
87
|
},
|
|
109
88
|
async execute(input, ctx) {
|
|
110
89
|
const { identifier } = input;
|
|
111
|
-
return apiRequest(
|
|
90
|
+
return apiRequest(ctx, "GET", `contacts/${pathSegment(identifier)}`);
|
|
112
91
|
},
|
|
113
92
|
});
|
|
114
93
|
rl.registerAction("contact.list", {
|
|
@@ -147,7 +126,7 @@ export default function brevo(rl) {
|
|
|
147
126
|
qs.sort = sort;
|
|
148
127
|
if (modifiedSince)
|
|
149
128
|
qs.modifiedSince = modifiedSince;
|
|
150
|
-
const data = (await apiRequest(
|
|
129
|
+
const data = (await apiRequest(ctx, "GET", "contacts", undefined, qs));
|
|
151
130
|
return data.contacts ?? [];
|
|
152
131
|
},
|
|
153
132
|
});
|
|
@@ -185,7 +164,7 @@ export default function brevo(rl) {
|
|
|
185
164
|
body.listIds = listIds;
|
|
186
165
|
if (unlinkListIds)
|
|
187
166
|
body.unlinkListIds = unlinkListIds;
|
|
188
|
-
await apiRequest(
|
|
167
|
+
await apiRequest(ctx, "PUT", `contacts/${pathSegment(identifier)}`, body);
|
|
189
168
|
return { success: true };
|
|
190
169
|
},
|
|
191
170
|
});
|
|
@@ -201,7 +180,7 @@ export default function brevo(rl) {
|
|
|
201
180
|
},
|
|
202
181
|
async execute(input, ctx) {
|
|
203
182
|
const { identifier } = input;
|
|
204
|
-
await apiRequest(
|
|
183
|
+
await apiRequest(ctx, "DELETE", `contacts/${pathSegment(identifier)}`);
|
|
205
184
|
return { success: true };
|
|
206
185
|
},
|
|
207
186
|
});
|
|
@@ -241,7 +220,7 @@ export default function brevo(rl) {
|
|
|
241
220
|
body.value = value;
|
|
242
221
|
if (enumeration)
|
|
243
222
|
body.enumeration = enumeration;
|
|
244
|
-
await apiRequest(
|
|
223
|
+
await apiRequest(ctx, "POST", `contacts/attributes/${pathSegment(category)}/${pathSegment(name)}`, body);
|
|
245
224
|
return { success: true };
|
|
246
225
|
},
|
|
247
226
|
});
|
|
@@ -269,7 +248,7 @@ export default function brevo(rl) {
|
|
|
269
248
|
body.value = value;
|
|
270
249
|
if (enumeration)
|
|
271
250
|
body.enumeration = enumeration;
|
|
272
|
-
return apiRequest(
|
|
251
|
+
return apiRequest(ctx, "PUT", `contacts/attributes/${pathSegment(category)}/${pathSegment(name)}`, body);
|
|
273
252
|
},
|
|
274
253
|
});
|
|
275
254
|
rl.registerAction("attribute.delete", {
|
|
@@ -281,7 +260,7 @@ export default function brevo(rl) {
|
|
|
281
260
|
},
|
|
282
261
|
async execute(input, ctx) {
|
|
283
262
|
const { category, name } = input;
|
|
284
|
-
await apiRequest(
|
|
263
|
+
await apiRequest(ctx, "DELETE", `contacts/attributes/${pathSegment(category)}/${pathSegment(name)}`);
|
|
285
264
|
return { success: true };
|
|
286
265
|
},
|
|
287
266
|
});
|
|
@@ -293,7 +272,7 @@ export default function brevo(rl) {
|
|
|
293
272
|
},
|
|
294
273
|
async execute(input, ctx) {
|
|
295
274
|
const { limit } = (input ?? {});
|
|
296
|
-
const data = (await apiRequest(
|
|
275
|
+
const data = (await apiRequest(ctx, "GET", "contacts/attributes"));
|
|
297
276
|
const attrs = data.attributes ?? [];
|
|
298
277
|
if (limit)
|
|
299
278
|
return attrs.slice(0, limit);
|
|
@@ -349,7 +328,7 @@ export default function brevo(rl) {
|
|
|
349
328
|
body.bcc = bcc.map((r) => typeof r === "string" ? { email: r } : r);
|
|
350
329
|
if (tags)
|
|
351
330
|
body.tags = tags;
|
|
352
|
-
return apiRequest(
|
|
331
|
+
return apiRequest(ctx, "POST", "smtp/email", body);
|
|
353
332
|
},
|
|
354
333
|
});
|
|
355
334
|
rl.registerAction("email.sendTemplate", {
|
|
@@ -381,7 +360,7 @@ export default function brevo(rl) {
|
|
|
381
360
|
body.params = params;
|
|
382
361
|
if (tags)
|
|
383
362
|
body.tags = tags;
|
|
384
|
-
return apiRequest(
|
|
363
|
+
return apiRequest(ctx, "POST", "smtp/email", body);
|
|
385
364
|
},
|
|
386
365
|
});
|
|
387
366
|
// ── Sender ──────────────────────────────────────────
|
|
@@ -394,7 +373,7 @@ export default function brevo(rl) {
|
|
|
394
373
|
},
|
|
395
374
|
async execute(input, ctx) {
|
|
396
375
|
const { name, email } = input;
|
|
397
|
-
return apiRequest(
|
|
376
|
+
return apiRequest(ctx, "POST", "senders", { name, email });
|
|
398
377
|
},
|
|
399
378
|
});
|
|
400
379
|
rl.registerAction("sender.delete", {
|
|
@@ -405,7 +384,7 @@ export default function brevo(rl) {
|
|
|
405
384
|
},
|
|
406
385
|
async execute(input, ctx) {
|
|
407
386
|
const { id } = input;
|
|
408
|
-
await apiRequest(
|
|
387
|
+
await apiRequest(ctx, "DELETE", `senders/${pathSegment(id)}`);
|
|
409
388
|
return { success: true };
|
|
410
389
|
},
|
|
411
390
|
});
|
|
@@ -417,7 +396,7 @@ export default function brevo(rl) {
|
|
|
417
396
|
},
|
|
418
397
|
async execute(input, ctx) {
|
|
419
398
|
const { limit } = (input ?? {});
|
|
420
|
-
const data = (await apiRequest(
|
|
399
|
+
const data = (await apiRequest(ctx, "GET", "senders"));
|
|
421
400
|
const senders = data.senders ?? [];
|
|
422
401
|
if (limit)
|
|
423
402
|
return senders.slice(0, limit);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { configChoice, hostLabel, httpsBase, staticCredential, } from "../../_shared/credentials.js";
|
|
2
|
+
/**
|
|
3
|
+
* A Data API token, sent as a bearer to the app's own base: the app's
|
|
4
|
+
* bubbleapps.io host, or the self-hosted domain, with the version-test
|
|
5
|
+
* path prefix when the connection targets the development environment.
|
|
6
|
+
* A self-hosted connection must name its HTTPS domain; it is never sent
|
|
7
|
+
* to bubbleapps.io instead.
|
|
8
|
+
*/
|
|
9
|
+
export const bubbleCredential = staticCredential({
|
|
10
|
+
id: "bubble",
|
|
11
|
+
auth: { kind: "bearer" },
|
|
12
|
+
local: { secret: "apiToken" },
|
|
13
|
+
targets: (config) => {
|
|
14
|
+
const path = configChoice(config.environment, ["live", "development"], "live") ===
|
|
15
|
+
"development"
|
|
16
|
+
? "version-test/api/1.1/"
|
|
17
|
+
: "api/1.1/";
|
|
18
|
+
const baseUrl = configChoice(config.hosting, ["bubbleHosted", "selfHosted"], "bubbleHosted") === "selfHosted"
|
|
19
|
+
? httpsBase(config.domain, path)
|
|
20
|
+
: `https://${hostLabel(config.appName)}.bubbleapps.io/${path}`;
|
|
21
|
+
return {
|
|
22
|
+
api: {
|
|
23
|
+
baseUrl,
|
|
24
|
+
methods: ["GET", "POST", "PATCH", "DELETE"],
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -1,60 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
? domain
|
|
8
|
-
: `https://${appName}.bubbleapps.io`;
|
|
9
|
-
const urlSegment = environment === "development" ? "/version-test/api/1.1" : "/api/1.1";
|
|
10
|
-
return `${rootUrl}${urlSegment}`;
|
|
11
|
-
}
|
|
12
|
-
async function apiRequest(baseUrl, token, method, endpoint, body, qs) {
|
|
13
|
-
const url = new URL(`${baseUrl}${endpoint}`);
|
|
14
|
-
if (qs) {
|
|
15
|
-
for (const [k, v] of Object.entries(qs)) {
|
|
16
|
-
if (v !== undefined && v !== null)
|
|
17
|
-
url.searchParams.set(k, String(v));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const opts = {
|
|
1
|
+
import { credentialJson, pathSegment } from "../../_shared/credentials.js";
|
|
2
|
+
import { bubbleCredential } from "./credentials.js";
|
|
3
|
+
function api(ctx, method, path, body, qs) {
|
|
4
|
+
return credentialJson(ctx, bubbleCredential, "bubble", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path,
|
|
21
7
|
method,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
method !== "DELETE") {
|
|
31
|
-
opts.body = JSON.stringify(body);
|
|
32
|
-
}
|
|
33
|
-
const res = await fetch(url.toString(), opts);
|
|
34
|
-
if (!res.ok) {
|
|
35
|
-
const text = await res.text();
|
|
36
|
-
throw new Error(`Bubble API error ${res.status}: ${text}`);
|
|
37
|
-
}
|
|
38
|
-
if (res.status === 204)
|
|
39
|
-
return { success: true };
|
|
40
|
-
const ct = res.headers.get("content-type") ?? "";
|
|
41
|
-
if (ct.includes("application/json"))
|
|
42
|
-
return res.json();
|
|
43
|
-
return { success: true };
|
|
44
|
-
}
|
|
45
|
-
function getConn(ctx) {
|
|
46
|
-
const cfg = ctx.connection.config;
|
|
47
|
-
return {
|
|
48
|
-
baseUrl: buildBaseUrl(cfg),
|
|
49
|
-
token: cfg.apiToken,
|
|
50
|
-
};
|
|
8
|
+
query: qs,
|
|
9
|
+
...(body &&
|
|
10
|
+
Object.keys(body).length > 0 &&
|
|
11
|
+
method !== "GET" &&
|
|
12
|
+
method !== "DELETE"
|
|
13
|
+
? { json: body }
|
|
14
|
+
: {}),
|
|
15
|
+
});
|
|
51
16
|
}
|
|
52
|
-
|
|
53
|
-
|
|
17
|
+
/** A data type name as Bubble expects it — no whitespace, lowercase — encoded as one path segment. */
|
|
18
|
+
function typeSegment(name) {
|
|
19
|
+
return pathSegment(name.replace(/\s/g, "").toLowerCase());
|
|
54
20
|
}
|
|
55
21
|
export default function bubble(rl) {
|
|
56
22
|
rl.setName("bubble");
|
|
57
23
|
rl.setVersion("0.1.0");
|
|
24
|
+
rl.setCredential(bubbleCredential);
|
|
58
25
|
rl.setConnectionSchema({
|
|
59
26
|
apiToken: {
|
|
60
27
|
type: "string",
|
|
@@ -106,8 +73,7 @@ export default function bubble(rl) {
|
|
|
106
73
|
},
|
|
107
74
|
async execute(input, ctx) {
|
|
108
75
|
const { typeName, properties } = input;
|
|
109
|
-
|
|
110
|
-
return apiRequest(baseUrl, token, "POST", `/obj/${normalizeTypeName(typeName)}`, properties);
|
|
76
|
+
return api(ctx, "POST", `obj/${typeSegment(typeName)}`, properties);
|
|
111
77
|
},
|
|
112
78
|
});
|
|
113
79
|
rl.registerAction("object.get", {
|
|
@@ -127,8 +93,7 @@ export default function bubble(rl) {
|
|
|
127
93
|
},
|
|
128
94
|
async execute(input, ctx) {
|
|
129
95
|
const { typeName, objectId } = input;
|
|
130
|
-
const
|
|
131
|
-
const data = (await apiRequest(baseUrl, token, "GET", `/obj/${normalizeTypeName(typeName)}/${objectId}`));
|
|
96
|
+
const data = (await api(ctx, "GET", `obj/${typeSegment(typeName)}/${pathSegment(objectId)}`));
|
|
132
97
|
return data.response;
|
|
133
98
|
},
|
|
134
99
|
});
|
|
@@ -161,7 +126,6 @@ export default function bubble(rl) {
|
|
|
161
126
|
async execute(input, ctx) {
|
|
162
127
|
const { typeName, constraints, sortField, descending, limit } = (input ??
|
|
163
128
|
{});
|
|
164
|
-
const { baseUrl, token } = getConn(ctx);
|
|
165
129
|
const qs = {};
|
|
166
130
|
if (constraints)
|
|
167
131
|
qs.constraints = JSON.stringify(constraints);
|
|
@@ -170,10 +134,10 @@ export default function bubble(rl) {
|
|
|
170
134
|
if (descending)
|
|
171
135
|
qs.descending = "true";
|
|
172
136
|
}
|
|
173
|
-
const endpoint =
|
|
137
|
+
const endpoint = `obj/${typeSegment(typeName)}`;
|
|
174
138
|
if (limit) {
|
|
175
139
|
qs.limit = limit;
|
|
176
|
-
const data = (await
|
|
140
|
+
const data = (await api(ctx, "GET", endpoint, undefined, qs));
|
|
177
141
|
return (data.response?.results ??
|
|
178
142
|
[]);
|
|
179
143
|
}
|
|
@@ -182,11 +146,13 @@ export default function bubble(rl) {
|
|
|
182
146
|
qs.limit = 100;
|
|
183
147
|
qs.cursor = 0;
|
|
184
148
|
while (true) {
|
|
185
|
-
const data = (await
|
|
186
|
-
const resp = data.response;
|
|
149
|
+
const data = (await api(ctx, "GET", endpoint, undefined, qs));
|
|
150
|
+
const resp = (data.response ?? {});
|
|
187
151
|
const items = resp.results ?? [];
|
|
188
152
|
results.push(...items);
|
|
189
|
-
|
|
153
|
+
// Only a positive remaining count asks for another page.
|
|
154
|
+
const remaining = resp.remaining;
|
|
155
|
+
if (!items.length || typeof remaining !== "number" || remaining <= 0)
|
|
190
156
|
break;
|
|
191
157
|
qs.cursor = qs.cursor + qs.limit;
|
|
192
158
|
}
|
|
@@ -215,8 +181,7 @@ export default function bubble(rl) {
|
|
|
215
181
|
},
|
|
216
182
|
async execute(input, ctx) {
|
|
217
183
|
const { typeName, objectId, properties } = input;
|
|
218
|
-
|
|
219
|
-
await apiRequest(baseUrl, token, "PATCH", `/obj/${normalizeTypeName(typeName)}/${objectId}`, properties);
|
|
184
|
+
await api(ctx, "PATCH", `obj/${typeSegment(typeName)}/${pathSegment(objectId)}`, properties);
|
|
220
185
|
return { success: true };
|
|
221
186
|
},
|
|
222
187
|
});
|
|
@@ -237,8 +202,7 @@ export default function bubble(rl) {
|
|
|
237
202
|
},
|
|
238
203
|
async execute(input, ctx) {
|
|
239
204
|
const { typeName, objectId } = input;
|
|
240
|
-
|
|
241
|
-
await apiRequest(baseUrl, token, "DELETE", `/obj/${normalizeTypeName(typeName)}/${objectId}`);
|
|
205
|
+
await api(ctx, "DELETE", `obj/${typeSegment(typeName)}/${pathSegment(objectId)}`);
|
|
242
206
|
return { success: true };
|
|
243
207
|
},
|
|
244
208
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { hostLabel, staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/**
|
|
3
|
+
* A site API key as the Basic username with an empty password, to the
|
|
4
|
+
* account's own Chargebee site beneath /api/v2/.
|
|
5
|
+
*/
|
|
6
|
+
export const chargebeeCredential = staticCredential({
|
|
7
|
+
id: "chargebee",
|
|
8
|
+
auth: { kind: "basic" },
|
|
9
|
+
local: { username: "apiKey", password: { value: "" } },
|
|
10
|
+
targets: (config) => ({
|
|
11
|
+
api: {
|
|
12
|
+
baseUrl: `https://${hostLabel(config.accountName)}.chargebee.com/api/v2/`,
|
|
13
|
+
methods: ["GET", "POST"],
|
|
14
|
+
},
|
|
15
|
+
}),
|
|
16
|
+
});
|