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,6 +1,7 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
2
|
import { cursorSchema, enumSchema, idSchema, timestampSchema, } from "../../_shared/shiftCloud.js";
|
|
3
|
-
export { enumSchema, idSchema,
|
|
3
|
+
export { enumSchema, idSchema, pathSegment, STRICT_OBJECT, STRICT_UPDATE_OBJECT, timestampSchema, } from "../../_shared/shiftCloud.js";
|
|
4
|
+
export { request } from "./credentials.js";
|
|
4
5
|
export const CRM_BASE = "/v1/crm";
|
|
5
6
|
export const CRM_ACCESS_ROLE = ["user", "admin"];
|
|
6
7
|
export const CRM_RECORD_TYPE = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
-
import { CRM_BASE, CRM_TASK_PRIORITY, CRM_TASK_STATUS, createRecordFields, enumSchema, idSchema,
|
|
2
|
+
import { CRM_BASE, CRM_TASK_PRIORITY, CRM_TASK_STATUS, createRecordFields, enumSchema, idSchema, nullableTimestamp, paginationFields, pathSegment, request, STRICT_OBJECT, STRICT_UPDATE_OBJECT, timestampSchema, updateRecordFields, } from "./shared.js";
|
|
3
3
|
const taskListFields = {
|
|
4
4
|
linkedRecordId: t.Optional(idSchema("Filter by linked CRM record ID")),
|
|
5
5
|
status: t.Optional(enumSchema("Task status", CRM_TASK_STATUS)),
|
|
@@ -12,7 +12,7 @@ export function registerTaskActions(rl) {
|
|
|
12
12
|
description: "List the first page of CRM tasks.",
|
|
13
13
|
inputSchema: t.Object(taskListFields, STRICT_OBJECT),
|
|
14
14
|
async execute(input, ctx) {
|
|
15
|
-
const body = await request(ctx,
|
|
15
|
+
const body = await request(ctx, `${CRM_BASE}/tasks`, { query: input });
|
|
16
16
|
return body.tasks;
|
|
17
17
|
},
|
|
18
18
|
});
|
|
@@ -21,7 +21,7 @@ export function registerTaskActions(rl) {
|
|
|
21
21
|
description: "List a cursor-paginated page of CRM tasks.",
|
|
22
22
|
inputSchema: t.Object(taskListFields, STRICT_OBJECT),
|
|
23
23
|
async execute(input, ctx) {
|
|
24
|
-
return request(ctx,
|
|
24
|
+
return request(ctx, `${CRM_BASE}/tasks`, { query: input });
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
rl.registerAction("task.get", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
+
import { shiftObjectsCredential } from "./credentials.js";
|
|
2
3
|
import { registerObjectActions } from "./objects.js";
|
|
3
4
|
/**
|
|
4
5
|
* Shift Objects — the organization's durable object bucket in the
|
|
@@ -10,6 +11,7 @@ import { registerObjectActions } from "./objects.js";
|
|
|
10
11
|
export default function shiftObjects(rl) {
|
|
11
12
|
rl.setName("shiftObjects");
|
|
12
13
|
rl.setVersion("0.1.0");
|
|
14
|
+
rl.setCredential(shiftObjectsCredential);
|
|
13
15
|
rl.setConnectionSchema(t.Object({
|
|
14
16
|
apiKey: t.String({
|
|
15
17
|
description: "Shift Labs API key",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { writeFile } from "node:fs/promises";
|
|
2
2
|
import { basename } from "node:path";
|
|
3
3
|
import * as t from "typebox";
|
|
4
|
-
import { enumSchema,
|
|
4
|
+
import { enumSchema, pathSegment, STRICT_OBJECT, } from "../../_shared/shiftCloud.js";
|
|
5
5
|
import { GENERAL_MEDIA_TYPES, mediaTypeFromPath, putThroughGrant, SIGNED_UPLOAD_MAX_BYTES, statUploadFile, } from "../../_shared/shiftUpload.js";
|
|
6
|
+
import { request } from "./credentials.js";
|
|
6
7
|
const OBJECTS_BASE = "/v1/services/objects";
|
|
7
8
|
export const OBJECT_STATUS = ["pending_upload", "ready", "archived"];
|
|
8
9
|
export const OBJECT_LINK_TARGET = [
|
|
@@ -11,7 +12,6 @@ export const OBJECT_LINK_TARGET = [
|
|
|
11
12
|
"eval_case",
|
|
12
13
|
"db_record",
|
|
13
14
|
];
|
|
14
|
-
const STRICT_OBJECT = { additionalProperties: false };
|
|
15
15
|
const Id = t.String({ minLength: 1, pattern: "\\S" });
|
|
16
16
|
function linkSchema() {
|
|
17
17
|
return t.Object({
|
|
@@ -98,7 +98,7 @@ export function registerObjectActions(rl) {
|
|
|
98
98
|
...provenanceFields,
|
|
99
99
|
}, STRICT_OBJECT),
|
|
100
100
|
async execute(input, ctx) {
|
|
101
|
-
const body = await request(ctx,
|
|
101
|
+
const body = await request(ctx, `${OBJECTS_BASE}/objects`, { query: input });
|
|
102
102
|
return body.objects;
|
|
103
103
|
},
|
|
104
104
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { shiftClient } from "../../_shared/shiftCredentials.js";
|
|
2
|
+
/**
|
|
3
|
+
* Extraction runs synchronously; a long multi-page PDF takes minutes, not
|
|
4
|
+
* seconds. The target declares that deadline so the transport holds the
|
|
5
|
+
* request open for the whole extraction.
|
|
6
|
+
*/
|
|
7
|
+
export const EXTRACT_TIMEOUT_MS = 5 * 60_000;
|
|
8
|
+
export const { credential: shiftOcrCredential, request } = shiftClient("shiftOcr", { timeoutMs: EXTRACT_TIMEOUT_MS });
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { basename, extname } from "node:path";
|
|
3
3
|
import * as t from "typebox";
|
|
4
|
-
import {
|
|
4
|
+
import { pathSegment, STRICT_OBJECT, } from "../../_shared/shiftCloud.js";
|
|
5
5
|
import { putThroughGrant, SIGNED_UPLOAD_MAX_BYTES, statUploadFile, } from "../../_shared/shiftUpload.js";
|
|
6
|
+
import { request, shiftOcrCredential } from "./credentials.js";
|
|
6
7
|
/**
|
|
7
8
|
* Shift OCR — text and structured-field extraction from images and
|
|
8
9
|
* PDFs through the Shift cloud OCR service. The API key is the tenant
|
|
@@ -59,7 +60,7 @@ async function documentFromPath(ctx, path) {
|
|
|
59
60
|
}),
|
|
60
61
|
});
|
|
61
62
|
await putThroughGrant(created.upload, path, mediaType, sizeBytes);
|
|
62
|
-
await request(ctx, `/v1/services/objects/objects/${created.object.id}/complete`, { method: "POST" });
|
|
63
|
+
await request(ctx, `/v1/services/objects/objects/${pathSegment(created.object.id)}/complete`, { method: "POST" });
|
|
63
64
|
return { type: "object", objectId: created.object.id };
|
|
64
65
|
}
|
|
65
66
|
function documentFromUrl(url, kind) {
|
|
@@ -79,6 +80,7 @@ function documentFromUrl(url, kind) {
|
|
|
79
80
|
export default function shiftOcr(rl) {
|
|
80
81
|
rl.setName("shiftOcr");
|
|
81
82
|
rl.setVersion("0.1.0");
|
|
83
|
+
rl.setCredential(shiftOcrCredential);
|
|
82
84
|
rl.setConnectionSchema(t.Object({
|
|
83
85
|
// Same Shift Labs API key as the shiftLabs plugin; the cloud
|
|
84
86
|
// derives the organization from it, so no org ID is needed.
|
|
@@ -158,6 +160,7 @@ export default function shiftOcr(rl) {
|
|
|
158
160
|
: fields.path
|
|
159
161
|
? await documentFromPath(ctx, fields.path)
|
|
160
162
|
: documentFromUrl(fields.url, fields.kind);
|
|
163
|
+
// The target's declared EXTRACT_TIMEOUT_MS covers the synchronous run.
|
|
161
164
|
return await request(ctx, "/v1/services/ocr/extract", {
|
|
162
165
|
method: "POST",
|
|
163
166
|
body: JSON.stringify({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
2
|
import { registerPageActions } from "./pages.js";
|
|
3
|
+
import { shiftPagesCredential } from "./shared.js";
|
|
3
4
|
/**
|
|
4
5
|
* Shift Pages — hosted HTML pages in the Shift cloud: draft, publish,
|
|
5
6
|
* archive, share with invited viewers, and resolve authenticated
|
|
@@ -9,6 +10,7 @@ import { registerPageActions } from "./pages.js";
|
|
|
9
10
|
export default function shiftPages(rl) {
|
|
10
11
|
rl.setName("shiftPages");
|
|
11
12
|
rl.setVersion("0.1.0");
|
|
13
|
+
rl.setCredential(shiftPagesCredential);
|
|
12
14
|
rl.setConnectionSchema(t.Object({
|
|
13
15
|
apiKey: t.String({
|
|
14
16
|
description: "Shift Labs API key",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
-
import { enumSchema, idSchema,
|
|
2
|
+
import { enumSchema, idSchema, PAGE_STATUS, PAGE_TYPE, PAGE_VISIBILITY, pageRenderUrl, pathSegment, request, STRICT_OBJECT, timestampSchema, } from "./shared.js";
|
|
3
3
|
const PageSlug = t.String({
|
|
4
4
|
minLength: 1,
|
|
5
5
|
maxLength: 120,
|
|
@@ -26,7 +26,9 @@ export function registerPageActions(rl) {
|
|
|
26
26
|
})),
|
|
27
27
|
}, STRICT_OBJECT),
|
|
28
28
|
async execute(input, ctx) {
|
|
29
|
-
const body = await request(ctx,
|
|
29
|
+
const body = await request(ctx, "/v1/pages", {
|
|
30
|
+
query: input,
|
|
31
|
+
});
|
|
30
32
|
return body.pages;
|
|
31
33
|
},
|
|
32
34
|
});
|
|
@@ -48,7 +50,7 @@ export function registerPageActions(rl) {
|
|
|
48
50
|
"deployment must belong to the API key's organization.",
|
|
49
51
|
inputSchema: t.Object({ deploymentId: idSchema("Managed Vex deployment ID") }, STRICT_OBJECT),
|
|
50
52
|
async execute(input, ctx) {
|
|
51
|
-
const body = await request(ctx,
|
|
53
|
+
const body = await request(ctx, "/v1/pages/vex-artifacts", { query: input });
|
|
52
54
|
return body.artifacts;
|
|
53
55
|
},
|
|
54
56
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { baseUrl, pathSegment } from "../../_shared/shiftCloud.js";
|
|
2
|
-
|
|
2
|
+
import { shiftClient } from "../../_shared/shiftCredentials.js";
|
|
3
|
+
export { enumSchema, idSchema, pathSegment, STRICT_OBJECT, timestampSchema, } from "../../_shared/shiftCloud.js";
|
|
4
|
+
export const { credential: shiftPagesCredential, request } = shiftClient("shiftPages");
|
|
3
5
|
export const PAGE_STATUS = ["draft", "published", "archived"];
|
|
4
6
|
export const PAGE_TYPE = [
|
|
5
7
|
"hosted_html",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
+
import { shiftTranscriptionCredential } from "./shared.js";
|
|
2
3
|
import { registerTranscriptionActions } from "./transcription.js";
|
|
3
4
|
/**
|
|
4
5
|
* Shift Transcription — audio and video transcription through the
|
|
@@ -10,6 +11,7 @@ import { registerTranscriptionActions } from "./transcription.js";
|
|
|
10
11
|
export default function shiftTranscription(rl) {
|
|
11
12
|
rl.setName("shiftTranscription");
|
|
12
13
|
rl.setVersion("0.2.0");
|
|
14
|
+
rl.setCredential(shiftTranscriptionCredential);
|
|
13
15
|
rl.setConnectionSchema(t.Object({
|
|
14
16
|
apiKey: t.String({
|
|
15
17
|
description: "Shift Labs API key",
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { shiftClient } from "../../_shared/shiftCredentials.js";
|
|
2
|
+
export { enumSchema, pathSegment, STRICT_OBJECT, } from "../../_shared/shiftCloud.js";
|
|
3
|
+
/** The longest server-held wait /await accepts: waitSeconds is capped at 120. */
|
|
4
|
+
export const MAX_AWAIT_WAIT_MS = 120_000;
|
|
5
|
+
/**
|
|
6
|
+
* The target's deadline: the /await endpoint holds the request open for up
|
|
7
|
+
* to MAX_AWAIT_WAIT_MS, so the transport allows that wait plus 60 s for the
|
|
8
|
+
* exchange itself. Every other transcription route answers well within it.
|
|
9
|
+
*/
|
|
10
|
+
export const AWAIT_DEADLINE_MS = MAX_AWAIT_WAIT_MS + 60_000;
|
|
11
|
+
export const { credential: shiftTranscriptionCredential, request } = shiftClient("shiftTranscription", { timeoutMs: AWAIT_DEADLINE_MS });
|
|
2
12
|
export const TRANSCRIPTION_LANGUAGE = ["auto", "en", "he"];
|
|
3
13
|
export const TRANSCRIPT_FORMAT = ["txt", "srt", "vtt", "json"];
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
2
|
import { AUDIO_VIDEO_MEDIA_TYPES, putThroughGrant, requireMediaType, SIGNED_UPLOAD_MAX_BYTES, statUploadFile, } from "../../_shared/shiftUpload.js";
|
|
3
|
-
import { enumSchema, pathSegment, request, TRANSCRIPT_FORMAT, TRANSCRIPTION_LANGUAGE, } from "./shared.js";
|
|
3
|
+
import { enumSchema, pathSegment, request, STRICT_OBJECT, TRANSCRIPT_FORMAT, TRANSCRIPTION_LANGUAGE, } from "./shared.js";
|
|
4
4
|
/** Transcript previews returned into the sandbox are capped, not truncated silently. */
|
|
5
5
|
const MAX_TRANSCRIPT_BYTES = 2 * 1024 * 1024;
|
|
6
|
-
const STRICT_OBJECT = { additionalProperties: false };
|
|
7
6
|
const Id = t.String({ minLength: 1, pattern: "\\S" });
|
|
8
7
|
export function registerTranscriptionActions(rl) {
|
|
9
8
|
rl.registerAction("transcription.transcribe", {
|
|
@@ -64,6 +63,8 @@ export function registerTranscriptionActions(rl) {
|
|
|
64
63
|
if (!fields.waitSeconds)
|
|
65
64
|
return job;
|
|
66
65
|
const timeoutMs = Math.min(Math.max(fields.waitSeconds, 1), 120) * 1000;
|
|
66
|
+
// The server holds the request open for up to timeoutMs; the
|
|
67
|
+
// target's declared AWAIT_DEADLINE_MS covers that wait.
|
|
67
68
|
return request(ctx, `/v1/services/transcription/jobs/${pathSegment(job.id)}/await?timeoutMs=${timeoutMs}`, { method: "POST" });
|
|
68
69
|
},
|
|
69
70
|
});
|
|
@@ -2,6 +2,7 @@ import * as t from "typebox";
|
|
|
2
2
|
import { registerIssueViewActions } from "./issue-views.js";
|
|
3
3
|
import { registerIssueActions } from "./issues.js";
|
|
4
4
|
import { registerProjectActions } from "./projects.js";
|
|
5
|
+
import { shiftWorkCredential } from "./shared.js";
|
|
5
6
|
/**
|
|
6
7
|
* Shift Work — the work-tracking domain of the Shift cloud: Projects,
|
|
7
8
|
* Issues (with dependencies and comments), and saved Issue Views.
|
|
@@ -11,6 +12,7 @@ import { registerProjectActions } from "./projects.js";
|
|
|
11
12
|
export default function shiftWork(rl) {
|
|
12
13
|
rl.setName("shiftWork");
|
|
13
14
|
rl.setVersion("0.1.0");
|
|
15
|
+
rl.setCredential(shiftWorkCredential);
|
|
14
16
|
rl.setConnectionSchema(t.Object({
|
|
15
17
|
apiKey: t.String({
|
|
16
18
|
description: "Shift Labs API key",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
-
import { cursorSchema, enumSchema, ISSUE_PRIORITY, ISSUE_STATUS, ISSUE_VIEW_GROUP, ISSUE_VIEW_LAYOUT, ISSUE_VIEW_SORT, ISSUE_VIEW_VISIBILITY, idSchema,
|
|
2
|
+
import { cursorSchema, enumSchema, ISSUE_PRIORITY, ISSUE_STATUS, ISSUE_VIEW_GROUP, ISSUE_VIEW_LAYOUT, ISSUE_VIEW_SORT, ISSUE_VIEW_VISIBILITY, idSchema, pathSegment, request, STRICT_OBJECT, STRICT_UPDATE_OBJECT, timestampSchema, } from "./shared.js";
|
|
3
3
|
const viewFields = {
|
|
4
4
|
name: t.String({
|
|
5
5
|
minLength: 1,
|
|
@@ -38,7 +38,7 @@ export function registerIssueViewActions(rl) {
|
|
|
38
38
|
description: "List the first page of personal and organization Issue Views.",
|
|
39
39
|
inputSchema: t.Object(listFields, STRICT_OBJECT),
|
|
40
40
|
async execute(input, ctx) {
|
|
41
|
-
const body = await request(ctx,
|
|
41
|
+
const body = await request(ctx, "/v1/issue-views", { query: input });
|
|
42
42
|
return body.views;
|
|
43
43
|
},
|
|
44
44
|
});
|
|
@@ -47,7 +47,7 @@ export function registerIssueViewActions(rl) {
|
|
|
47
47
|
description: "List a cursor-paginated page of Issue Views.",
|
|
48
48
|
inputSchema: t.Object(listFields, STRICT_OBJECT),
|
|
49
49
|
async execute(input, ctx) {
|
|
50
|
-
return request(ctx,
|
|
50
|
+
return request(ctx, "/v1/issue-views", { query: input });
|
|
51
51
|
},
|
|
52
52
|
});
|
|
53
53
|
rl.registerAction("issueView.get", {
|
|
@@ -69,7 +69,7 @@ export function registerIssueViewActions(rl) {
|
|
|
69
69
|
}, STRICT_OBJECT),
|
|
70
70
|
async execute(input, ctx) {
|
|
71
71
|
const { id, ...pagination } = input;
|
|
72
|
-
const body = await request(ctx,
|
|
72
|
+
const body = await request(ctx, `/v1/issue-views/${pathSegment(id)}/issues`, { query: pagination });
|
|
73
73
|
return body.issues;
|
|
74
74
|
},
|
|
75
75
|
});
|
|
@@ -83,7 +83,7 @@ export function registerIssueViewActions(rl) {
|
|
|
83
83
|
}, STRICT_OBJECT),
|
|
84
84
|
async execute(input, ctx) {
|
|
85
85
|
const { id, ...pagination } = input;
|
|
86
|
-
return request(ctx,
|
|
86
|
+
return request(ctx, `/v1/issue-views/${pathSegment(id)}/issues`, { query: pagination });
|
|
87
87
|
},
|
|
88
88
|
});
|
|
89
89
|
rl.registerAction("issueView.create", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
-
import { cursorSchema, enumSchema, ISSUE_PRIORITY, ISSUE_SOURCE, ISSUE_STATUS, idSchema,
|
|
2
|
+
import { cursorSchema, enumSchema, ISSUE_PRIORITY, ISSUE_SOURCE, ISSUE_STATUS, idSchema, pathSegment, request, STRICT_OBJECT, STRICT_UPDATE_OBJECT, timestampSchema, } from "./shared.js";
|
|
3
3
|
const issueFields = {
|
|
4
4
|
title: t.String({
|
|
5
5
|
minLength: 1,
|
|
@@ -54,7 +54,9 @@ export function registerIssueActions(rl) {
|
|
|
54
54
|
description: "List the first page of Shift Labs Issues for the API key's organization.",
|
|
55
55
|
inputSchema: t.Object(issueListFields, STRICT_OBJECT),
|
|
56
56
|
async execute(input, ctx) {
|
|
57
|
-
const body = await request(ctx,
|
|
57
|
+
const body = await request(ctx, "/v1/issues", {
|
|
58
|
+
query: input,
|
|
59
|
+
});
|
|
58
60
|
return body.issues;
|
|
59
61
|
},
|
|
60
62
|
});
|
|
@@ -63,7 +65,7 @@ export function registerIssueActions(rl) {
|
|
|
63
65
|
description: "List a cursor-paginated page of Shift Labs Issues.",
|
|
64
66
|
inputSchema: t.Object(issueListFields, STRICT_OBJECT),
|
|
65
67
|
async execute(input, ctx) {
|
|
66
|
-
return request(ctx,
|
|
68
|
+
return request(ctx, "/v1/issues", { query: input });
|
|
67
69
|
},
|
|
68
70
|
});
|
|
69
71
|
rl.registerAction("issue.get", {
|
|
@@ -193,7 +195,7 @@ export function registerIssueActions(rl) {
|
|
|
193
195
|
inputSchema: t.Object(eventListFields, STRICT_OBJECT),
|
|
194
196
|
async execute(input, ctx) {
|
|
195
197
|
const { id, ...pagination } = input;
|
|
196
|
-
const body = await request(ctx,
|
|
198
|
+
const body = await request(ctx, `/v1/issues/${pathSegment(id)}/events`, { query: pagination });
|
|
197
199
|
return body.events;
|
|
198
200
|
},
|
|
199
201
|
});
|
|
@@ -203,7 +205,7 @@ export function registerIssueActions(rl) {
|
|
|
203
205
|
inputSchema: t.Object(eventListFields, STRICT_OBJECT),
|
|
204
206
|
async execute(input, ctx) {
|
|
205
207
|
const { id, ...pagination } = input;
|
|
206
|
-
return request(ctx,
|
|
208
|
+
return request(ctx, `/v1/issues/${pathSegment(id)}/events`, { query: pagination });
|
|
207
209
|
},
|
|
208
210
|
});
|
|
209
211
|
rl.registerAction("issue.dependency.list", {
|
|
@@ -215,7 +217,7 @@ export function registerIssueActions(rl) {
|
|
|
215
217
|
}, STRICT_OBJECT),
|
|
216
218
|
async execute(input, ctx) {
|
|
217
219
|
const { id, ...pagination } = input;
|
|
218
|
-
const body = await request(ctx,
|
|
220
|
+
const body = await request(ctx, `/v1/issues/${pathSegment(id)}/dependencies`, { query: pagination });
|
|
219
221
|
return body.dependencies;
|
|
220
222
|
},
|
|
221
223
|
});
|
|
@@ -229,7 +231,9 @@ export function registerIssueActions(rl) {
|
|
|
229
231
|
}, STRICT_OBJECT),
|
|
230
232
|
async execute(input, ctx) {
|
|
231
233
|
const { id, ...pagination } = input;
|
|
232
|
-
return request(ctx,
|
|
234
|
+
return request(ctx, `/v1/issues/${pathSegment(id)}/dependencies`, {
|
|
235
|
+
query: pagination,
|
|
236
|
+
});
|
|
233
237
|
},
|
|
234
238
|
});
|
|
235
239
|
rl.registerAction("issue.dependency.add", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from "typebox";
|
|
2
|
-
import { cursorSchema, enumSchema, idSchema,
|
|
2
|
+
import { cursorSchema, enumSchema, idSchema, PROJECT_STATUS, pathSegment, request, STRICT_OBJECT, STRICT_UPDATE_OBJECT, timestampSchema, } from "./shared.js";
|
|
3
3
|
const projectListFields = {
|
|
4
4
|
status: t.Optional(enumSchema("Project status", PROJECT_STATUS)),
|
|
5
5
|
leadUserId: t.Optional(idSchema("Lead user ID")),
|
|
@@ -13,7 +13,7 @@ export function registerProjectActions(rl) {
|
|
|
13
13
|
description: "List the first page of concrete Shift Labs Projects.",
|
|
14
14
|
inputSchema: t.Object(projectListFields, STRICT_OBJECT),
|
|
15
15
|
async execute(input, ctx) {
|
|
16
|
-
const body = await request(ctx,
|
|
16
|
+
const body = await request(ctx, "/v1/projects", { query: input });
|
|
17
17
|
return body.projects;
|
|
18
18
|
},
|
|
19
19
|
});
|
|
@@ -22,7 +22,7 @@ export function registerProjectActions(rl) {
|
|
|
22
22
|
description: "List a cursor-paginated page of concrete Projects.",
|
|
23
23
|
inputSchema: t.Object(projectListFields, STRICT_OBJECT),
|
|
24
24
|
async execute(input, ctx) {
|
|
25
|
-
return request(ctx,
|
|
25
|
+
return request(ctx, "/v1/projects", { query: input });
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
28
|
rl.registerAction("project.get", {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { shiftClient } from "../../_shared/shiftCredentials.js";
|
|
2
|
+
export { cursorSchema, enumDescription, enumSchema, idSchema, pathSegment, STRICT_OBJECT, STRICT_UPDATE_OBJECT, timestampSchema, } from "../../_shared/shiftCloud.js";
|
|
3
|
+
export const { credential: shiftWorkCredential, request } = shiftClient("shiftWork");
|
|
2
4
|
export const ISSUE_STATUS = [
|
|
3
5
|
"backlog",
|
|
4
6
|
"todo",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { hostLabel, staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/**
|
|
3
|
+
* An Admin API access token, sent as the X-Shopify-Access-Token header to
|
|
4
|
+
* the store's own myshopify.com host beneath /admin/api/2024-07/.
|
|
5
|
+
*/
|
|
6
|
+
export const shopifyCredential = staticCredential({
|
|
7
|
+
id: "shopify",
|
|
8
|
+
auth: { kind: "apiKey", header: "X-Shopify-Access-Token" },
|
|
9
|
+
local: { secret: "accessToken" },
|
|
10
|
+
targets: (config) => ({
|
|
11
|
+
api: {
|
|
12
|
+
baseUrl: `https://${hostLabel(config.shopSubdomain)}.myshopify.com/admin/api/2024-07/`,
|
|
13
|
+
methods: ["GET", "POST", "PUT", "DELETE"],
|
|
14
|
+
},
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
@@ -1,64 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
async function apiRequest(conn, method, endpoint, body, qs) {
|
|
8
|
-
const url = new URL(`${conn.base}${endpoint}`);
|
|
9
|
-
if (qs) {
|
|
10
|
-
for (const [k, v] of Object.entries(qs)) {
|
|
11
|
-
if (v !== undefined && v !== null)
|
|
12
|
-
url.searchParams.set(k, String(v));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
const init = {
|
|
1
|
+
import { credentialJson, credentialOk, jsonAnswer, pathSegment, pathWithin, } from "../../_shared/credentials.js";
|
|
2
|
+
import { shopifyCredential } from "./credentials.js";
|
|
3
|
+
function apiRequest(ctx, method, path, body, qs) {
|
|
4
|
+
return credentialJson(ctx, shopifyCredential, "shopify", {
|
|
5
|
+
target: "api",
|
|
6
|
+
path,
|
|
16
7
|
method,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
if (body !== undefined)
|
|
23
|
-
init.body = JSON.stringify(body);
|
|
24
|
-
const res = await fetch(url.toString(), init);
|
|
25
|
-
if (!res.ok)
|
|
26
|
-
throw new Error(`Shopify error ${res.status}: ${await res.text()}`);
|
|
27
|
-
const text = await res.text();
|
|
28
|
-
return text ? JSON.parse(text) : {};
|
|
8
|
+
query: qs,
|
|
9
|
+
...(body !== undefined ? { json: body } : {}),
|
|
10
|
+
});
|
|
29
11
|
}
|
|
30
|
-
async function paginate(
|
|
12
|
+
async function paginate(ctx, propertyName, path, qs = {}) {
|
|
31
13
|
const all = [];
|
|
32
|
-
let
|
|
14
|
+
let nextPath;
|
|
33
15
|
do {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (v !== undefined && v !== null)
|
|
39
|
-
u.searchParams.set(k, String(v));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
const res = await fetch(u.toString(), {
|
|
43
|
-
headers: { "X-Shopify-Access-Token": conn.accessToken },
|
|
16
|
+
const res = await credentialOk(ctx, shopifyCredential, "shopify", {
|
|
17
|
+
target: "api",
|
|
18
|
+
path: nextPath ?? path,
|
|
19
|
+
...(nextPath === undefined ? { query: qs } : {}),
|
|
44
20
|
});
|
|
45
|
-
|
|
46
|
-
throw new Error(`Shopify error ${res.status}: ${await res.text()}`);
|
|
47
|
-
const data = (await res.json());
|
|
21
|
+
const data = (await jsonAnswer(res));
|
|
48
22
|
all.push(...(data[propertyName] ?? []));
|
|
49
|
-
|
|
23
|
+
nextPath = undefined;
|
|
50
24
|
const link = res.headers.get("link") ?? "";
|
|
51
25
|
if (link.includes('rel="next"')) {
|
|
52
26
|
const match = link.match(/<([^>]+)>;\s*rel="next"/);
|
|
53
27
|
if (match)
|
|
54
|
-
|
|
28
|
+
nextPath = pathWithin(ctx, shopifyCredential, "api", match[1]);
|
|
55
29
|
}
|
|
56
|
-
} while (
|
|
30
|
+
} while (nextPath);
|
|
57
31
|
return all;
|
|
58
32
|
}
|
|
59
33
|
export default function shopify(rl) {
|
|
60
34
|
rl.setName("shopify");
|
|
61
35
|
rl.setVersion("0.1.0");
|
|
36
|
+
rl.setCredential(shopifyCredential);
|
|
62
37
|
rl.setConnectionSchema({
|
|
63
38
|
shopSubdomain: {
|
|
64
39
|
type: "string",
|
|
@@ -104,7 +79,7 @@ export default function shopify(rl) {
|
|
|
104
79
|
order.note = p.note;
|
|
105
80
|
if (p.tags)
|
|
106
81
|
order.tags = p.tags;
|
|
107
|
-
const data = (await apiRequest(
|
|
82
|
+
const data = (await apiRequest(ctx, "POST", "orders.json", {
|
|
108
83
|
order,
|
|
109
84
|
}));
|
|
110
85
|
return data.order;
|
|
@@ -122,7 +97,7 @@ export default function shopify(rl) {
|
|
|
122
97
|
const qs = {};
|
|
123
98
|
if (p.fields)
|
|
124
99
|
qs.fields = p.fields;
|
|
125
|
-
const data = (await apiRequest(
|
|
100
|
+
const data = (await apiRequest(ctx, "GET", `orders/${pathSegment(p.orderId)}.json`, undefined, qs));
|
|
126
101
|
return data.order;
|
|
127
102
|
},
|
|
128
103
|
});
|
|
@@ -141,7 +116,6 @@ export default function shopify(rl) {
|
|
|
141
116
|
},
|
|
142
117
|
async execute(input, ctx) {
|
|
143
118
|
const p = (input ?? {});
|
|
144
|
-
const conn = getConn(ctx);
|
|
145
119
|
const qs = {};
|
|
146
120
|
if (p.status)
|
|
147
121
|
qs.status = p.status;
|
|
@@ -151,10 +125,10 @@ export default function shopify(rl) {
|
|
|
151
125
|
qs.created_at_max = p.createdAtMax;
|
|
152
126
|
if (p.limit) {
|
|
153
127
|
qs.limit = p.limit;
|
|
154
|
-
const d = (await apiRequest(
|
|
128
|
+
const d = (await apiRequest(ctx, "GET", "orders.json", undefined, qs));
|
|
155
129
|
return d.orders;
|
|
156
130
|
}
|
|
157
|
-
return paginate(
|
|
131
|
+
return paginate(ctx, "orders", "orders.json", qs);
|
|
158
132
|
},
|
|
159
133
|
});
|
|
160
134
|
rl.registerAction("order.update", {
|
|
@@ -175,7 +149,7 @@ export default function shopify(rl) {
|
|
|
175
149
|
order.tags = p.tags;
|
|
176
150
|
if (p.email)
|
|
177
151
|
order.email = p.email;
|
|
178
|
-
const data = (await apiRequest(
|
|
152
|
+
const data = (await apiRequest(ctx, "PUT", `orders/${pathSegment(p.orderId)}.json`, { order }));
|
|
179
153
|
return data.order;
|
|
180
154
|
},
|
|
181
155
|
});
|
|
@@ -184,7 +158,7 @@ export default function shopify(rl) {
|
|
|
184
158
|
description: "Delete an order",
|
|
185
159
|
inputSchema: { orderId: { type: "string", required: true } },
|
|
186
160
|
async execute(input, ctx) {
|
|
187
|
-
await apiRequest(
|
|
161
|
+
await apiRequest(ctx, "DELETE", `orders/${pathSegment(input.orderId)}.json`);
|
|
188
162
|
return { success: true };
|
|
189
163
|
},
|
|
190
164
|
});
|
|
@@ -201,7 +175,7 @@ export default function shopify(rl) {
|
|
|
201
175
|
},
|
|
202
176
|
async execute(input, ctx) {
|
|
203
177
|
const p = input;
|
|
204
|
-
const data = (await apiRequest(
|
|
178
|
+
const data = (await apiRequest(ctx, "POST", "products.json", {
|
|
205
179
|
product: p,
|
|
206
180
|
}));
|
|
207
181
|
return data.product;
|
|
@@ -219,7 +193,7 @@ export default function shopify(rl) {
|
|
|
219
193
|
const qs = {};
|
|
220
194
|
if (p.fields)
|
|
221
195
|
qs.fields = p.fields;
|
|
222
|
-
const data = (await apiRequest(
|
|
196
|
+
const data = (await apiRequest(ctx, "GET", `products/${pathSegment(p.productId)}.json`, undefined, qs));
|
|
223
197
|
return data.product;
|
|
224
198
|
},
|
|
225
199
|
});
|
|
@@ -232,16 +206,15 @@ export default function shopify(rl) {
|
|
|
232
206
|
},
|
|
233
207
|
async execute(input, ctx) {
|
|
234
208
|
const p = (input ?? {});
|
|
235
|
-
const conn = getConn(ctx);
|
|
236
209
|
const qs = {};
|
|
237
210
|
if (p.title)
|
|
238
211
|
qs.title = p.title;
|
|
239
212
|
if (p.limit) {
|
|
240
213
|
qs.limit = p.limit;
|
|
241
|
-
const d = (await apiRequest(
|
|
214
|
+
const d = (await apiRequest(ctx, "GET", "products.json", undefined, qs));
|
|
242
215
|
return d.products;
|
|
243
216
|
}
|
|
244
|
-
return paginate(
|
|
217
|
+
return paginate(ctx, "products", "products.json", qs);
|
|
245
218
|
},
|
|
246
219
|
});
|
|
247
220
|
rl.registerAction("product.update", {
|
|
@@ -257,7 +230,7 @@ export default function shopify(rl) {
|
|
|
257
230
|
async execute(input, ctx) {
|
|
258
231
|
const p = input;
|
|
259
232
|
const { productId, ...fields } = p;
|
|
260
|
-
const data = (await apiRequest(
|
|
233
|
+
const data = (await apiRequest(ctx, "PUT", `products/${pathSegment(productId)}.json`, { product: fields }));
|
|
261
234
|
return data.product;
|
|
262
235
|
},
|
|
263
236
|
});
|
|
@@ -266,7 +239,7 @@ export default function shopify(rl) {
|
|
|
266
239
|
description: "Delete a product",
|
|
267
240
|
inputSchema: { productId: { type: "string", required: true } },
|
|
268
241
|
async execute(input, ctx) {
|
|
269
|
-
await apiRequest(
|
|
242
|
+
await apiRequest(ctx, "DELETE", `products/${pathSegment(input.productId)}.json`);
|
|
270
243
|
return { success: true };
|
|
271
244
|
},
|
|
272
245
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { staticCredential } from "../../_shared/credentials.js";
|
|
2
|
+
/** The team secret, which SIGNL4 takes as the webhook's path segment. */
|
|
3
|
+
export const signl4Credential = staticCredential({
|
|
4
|
+
id: "signl4",
|
|
5
|
+
auth: {
|
|
6
|
+
kind: "static",
|
|
7
|
+
parts: ["teamSecret"],
|
|
8
|
+
placements: [{ in: "path", part: "teamSecret" }],
|
|
9
|
+
},
|
|
10
|
+
local: { teamSecret: "teamSecret" },
|
|
11
|
+
targets: {
|
|
12
|
+
webhook: {
|
|
13
|
+
baseUrl: "https://connect.signl4.com/webhook/",
|
|
14
|
+
methods: ["POST"],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|