├── .github ├── contributing.md ├── dependabot.yml ├── pull_request_template.md ├── versioning.js └── workflows │ ├── publish-on-prerelease-pr.yml │ ├── release-and-publish-on-merge.yml │ ├── test-on-main.yml │ ├── test-on-pr.yml │ └── verify-version-on-pr.yml ├── .gitignore ├── .npmignore ├── .prettierrc ├── LICENSE.md ├── README.md ├── assets └── images │ └── title-image.png ├── jest.config.js ├── package.json ├── pnpm-lock.yaml ├── src ├── index.ts ├── platforms │ ├── accelo │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ └── box.ts │ ├── active-campaign │ │ ├── actions │ │ │ ├── contacts │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── lists │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ └── users │ │ │ │ └── list.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── icon.ts │ │ ├── index.ts │ │ └── schemas.ts │ ├── adobe │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── affinity │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── aircall │ │ ├── README.md │ │ ├── actions │ │ │ ├── calls │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── contacts │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── mappers.ts │ │ │ ├── user │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── start-call.ts │ │ │ └── validators.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── airtable │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── amazon │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── amplitude │ │ ├── README.md │ │ ├── client.ts │ │ ├── icons │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── index.ts │ ├── apollo │ │ ├── README.md │ │ ├── actions │ │ │ ├── accounts │ │ │ │ ├── create.ts │ │ │ │ ├── search.ts │ │ │ │ └── update.ts │ │ │ ├── activities │ │ │ │ └── list.ts │ │ │ ├── calls │ │ │ │ ├── create.ts │ │ │ │ ├── details.ts │ │ │ │ └── dispositions-list.ts │ │ │ ├── contacts │ │ │ │ ├── check-deployability.ts │ │ │ │ ├── create.ts │ │ │ │ ├── search.ts │ │ │ │ └── update.ts │ │ │ ├── custom-fields │ │ │ │ ├── create.ts │ │ │ │ └── list.ts │ │ │ ├── email-accounts │ │ │ │ └── list.ts │ │ │ ├── emails │ │ │ │ └── search.ts │ │ │ ├── labels │ │ │ │ └── search.ts │ │ │ ├── mappers.ts │ │ │ ├── people │ │ │ │ └── search.ts │ │ │ ├── sequence-steps │ │ │ │ └── create.ts │ │ │ ├── sequence-templates │ │ │ │ └── update.ts │ │ │ ├── sequences │ │ │ │ ├── create.ts │ │ │ │ ├── search.ts │ │ │ │ └── start.ts │ │ │ ├── tasks │ │ │ │ ├── mark-complete.ts │ │ │ │ └── search.ts │ │ │ └── users │ │ │ │ └── search.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ ├── permissions.ts │ │ └── schemas.ts │ ├── asana │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── ashby │ │ ├── README.md │ │ ├── client.ts │ │ ├── icons │ │ │ └── box.ts │ │ └── index.ts │ ├── atlassian │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── bamboohr │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── bitbucket │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── boldsign │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── box │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── brex │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── calendly │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── chorus │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── clickup │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── close │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── confluence │ │ ├── README.md │ │ ├── client.ts │ │ └── index.ts │ ├── contentstack │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── customer.io │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── defaultIcon.ts │ ├── dialpad │ │ ├── README.md │ │ ├── actions │ │ │ ├── calls │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── start.ts │ │ │ ├── contacts │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── mappers.ts │ │ │ └── users │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── dropbox │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── dynamics-sales │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── exact-online │ │ ├── README.md │ │ ├── client.ts │ │ └── index.ts │ ├── facebook │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── factorial │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── freshbooks │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── freshdesk │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── freshsales │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── front │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── github │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── gitlab │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── gong │ │ ├── README.md │ │ ├── client.ts │ │ ├── icons │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── index.ts │ ├── google-calendar │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── google-mail │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── google-sheet │ │ ├── README.md │ │ ├── client.ts │ │ └── index.ts │ ├── google │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── greenhouse │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── gumroad │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── gusto │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── hubspot │ │ ├── README.md │ │ ├── actions │ │ │ ├── associations │ │ │ │ └── create.ts │ │ │ ├── calls │ │ │ │ ├── create.ts │ │ │ │ ├── dispositions.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── companies │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── contact-lists │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── contacts │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── deals │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── emails │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── mappers.ts │ │ │ ├── meetings │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── notes │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── owners │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── properties │ │ │ │ ├── create.ts │ │ │ │ └── list.ts │ │ │ └── tasks │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── index.ts │ ├── intercom │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── intuit │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── jira │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── keap │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── lever │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── linear │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── linkedin │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── mailchimp │ │ ├── README.md │ │ ├── actions │ │ │ ├── lists │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── mappers.ts │ │ │ └── members │ │ │ │ ├── create.ts │ │ │ │ ├── search.ts │ │ │ │ └── update.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── microsoft │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── schemas.ts │ │ └── validators.ts │ ├── miro │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── mixpanel │ │ ├── README.md │ │ ├── client.ts │ │ ├── icons │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── index.ts │ ├── monday │ │ ├── README.md │ │ ├── actions │ │ │ ├── boards │ │ │ │ └── list.ts │ │ │ ├── graphql │ │ │ │ └── query.ts │ │ │ ├── groups │ │ │ │ └── create.ts │ │ │ └── items │ │ │ │ └── create.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ ├── query-builder.ts │ │ └── schemas.ts │ ├── mural │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── netsuite │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── notion │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── one-drive │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ └── box.ts │ ├── outreach │ │ ├── README.md │ │ ├── actions │ │ │ ├── accounts │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── mailboxes │ │ │ │ └── list.ts │ │ │ ├── mailings │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── prospects │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── sequence-states │ │ │ │ └── create.ts │ │ │ ├── sequence-steps │ │ │ │ └── create.ts │ │ │ ├── sequence-templates │ │ │ │ └── create.ts │ │ │ ├── sequences │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── tags │ │ │ │ └── list.ts │ │ │ ├── templates │ │ │ │ └── create.ts │ │ │ ├── users │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ └── validators.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ ├── schemas.ts │ │ └── tests │ │ │ └── action.test.ts │ ├── pagerduty │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ └── full.ts │ ├── pandadoc │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── payfit │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── pipedrive │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── qualtrics │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── ramp │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── ringcentral │ │ ├── README.md │ │ ├── actions │ │ │ ├── call-logs │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── contacts │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ └── extensions │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── ring-out.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── sage │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── salesforce │ │ ├── README.md │ │ ├── actions │ │ │ ├── contacts │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── list-view-results │ │ │ │ └── find.ts │ │ │ ├── list-views │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── mappers.ts │ │ │ ├── pagination.ts │ │ │ ├── query-builder.ts │ │ │ ├── soql │ │ │ │ └── query.ts │ │ │ └── users │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ ├── permissions.ts │ │ └── schemas.ts │ ├── salesloft │ │ ├── README.md │ │ ├── actions │ │ │ ├── cadence-memberships │ │ │ │ └── create.ts │ │ │ ├── cadences │ │ │ │ ├── import.ts │ │ │ │ └── list.ts │ │ │ ├── custom-fields │ │ │ │ ├── create.ts │ │ │ │ └── list.ts │ │ │ ├── email-bodies │ │ │ │ └── find.ts │ │ │ ├── emails │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ │ ├── mappers.ts │ │ │ ├── people │ │ │ │ ├── create.ts │ │ │ │ ├── find.ts │ │ │ │ ├── list.ts │ │ │ │ └── update.ts │ │ │ ├── tags │ │ │ │ └── list.ts │ │ │ └── users │ │ │ │ ├── find.ts │ │ │ │ └── list.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── shopify │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── shortcut │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── slack │ │ ├── README.md │ │ ├── actions │ │ │ ├── conversations │ │ │ │ └── list.ts │ │ │ ├── messages │ │ │ │ ├── create.ts │ │ │ │ └── update.ts │ │ │ └── users │ │ │ │ └── list.ts │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ │ └── schemas.ts │ ├── square │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── stripe │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── icon.ts │ │ └── index.ts │ ├── surveymonkey │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── teams │ │ ├── README.md │ │ ├── actions │ │ │ ├── channels │ │ │ │ └── list.ts │ │ │ ├── members │ │ │ │ └── list.ts │ │ │ ├── messages │ │ │ │ └── create.ts │ │ │ └── teams │ │ │ │ └── list.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── teamwork │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── todoist │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ └── box.ts │ ├── twinfield │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── typeform │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── wave-accounting │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── woocommerce │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── workable │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── xero │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── zendesk │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── zenefits │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ ├── zoho │ │ ├── README.md │ │ ├── client.ts │ │ ├── constants.ts │ │ ├── index.ts │ │ └── logos │ │ │ ├── box.ts │ │ │ └── full.ts │ └── zoom │ │ ├── README.md │ │ ├── client.ts │ │ ├── index.ts │ │ └── logos │ │ ├── box.ts │ │ └── full.ts └── sdk │ ├── action.ts │ ├── auth.ts │ ├── client.ts │ ├── error.ts │ ├── index.ts │ ├── platform.ts │ ├── query-string.ts │ ├── tests │ ├── action.test.ts │ └── query-string.test.ts │ ├── types.ts │ ├── unification.ts │ └── validators.ts ├── tsconfig.json ├── tsup.config.ts └── yarn.lock /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: 'npm' # See documentation for possible values 9 | directory: '/' # Location of package manifests 10 | schedule: 11 | interval: 'monthly' 12 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | _Detailed description of the changes and the intent behind them_ 4 | 5 | ## Checklist 6 | 7 | - [ ] Changes are covered by tests if behavior has been changed or added 8 | - [ ] Tests have 100% coverage 9 | - [ ] If code changes were made, the version in `package.json` has been bumped (matching semver) 10 | 11 | ## Resolves 12 | 13 | If the PR resolves an open issue tag it here. For example: `Resolves #34` 14 | -------------------------------------------------------------------------------- /.github/workflows/test-on-main.yml: -------------------------------------------------------------------------------- 1 | name: Test Main Branch 2 | on: 3 | push: 4 | branches: [main] 5 | jobs: 6 | test-and-build: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | node-version: [18.x] 11 | steps: 12 | - uses: actions/checkout@v3 13 | - name: Use Node.js ${{ matrix.node-version }} 14 | uses: actions/setup-node@v3 15 | with: 16 | node-version: ${{ matrix.node-version }} 17 | - run: yarn 18 | - run: yarn test 19 | -------------------------------------------------------------------------------- /.github/workflows/test-on-pr.yml: -------------------------------------------------------------------------------- 1 | name: Check Pull Request 2 | on: 3 | pull_request: 4 | branches: [main] 5 | jobs: 6 | check: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | node-version: [18.x] 11 | steps: 12 | - uses: actions/checkout@v3 13 | - name: Use Node.js ${{ matrix.node-version }} 14 | uses: actions/setup-node@v3 15 | with: 16 | node-version: ${{ matrix.node-version }} 17 | - run: yarn 18 | - run: yarn test 19 | - run: yarn build 20 | - run: yarn format:check 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | archive.zip 4 | archive.tar.gz 5 | 6 | # nodenv 7 | .node-version 8 | 9 | # .vscode 10 | .vscode -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | tsconfig.json -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": true, 4 | "tabWidth": 2, 5 | "trailingComma": "all" 6 | } 7 | -------------------------------------------------------------------------------- /assets/images/title-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vesselapi/integrations/c2429c30f8f69eca3dcada89a4971985a5f59224/assets/images/title-image.png -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ['/src'], 3 | testMatch: [ 4 | '**/__tests__/**/*.+(ts|tsx|js)', 5 | '**/?(*.)+(spec|test).+(ts|tsx|js)', 6 | ], 7 | transform: { 8 | '^.+\\.(ts|tsx)$': 'ts-jest', 9 | }, 10 | moduleNameMapper: { 11 | '^@/(.*)': '/src/$1', 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './platforms'; 2 | export * from './sdk'; 3 | -------------------------------------------------------------------------------- /src/platforms/accelo/README.md: -------------------------------------------------------------------------------- 1 | # Accelo 2 | 3 | ## Description 4 | 5 | Accelo is a cloud-based software company that provides tools for professional service businesses to manage their operations, including project management, client communication, and billing. Their platform streamlines and automates services, enhancing the productivity and efficiency of businesses. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://api.accelo.com/docs) 10 | - [Website](accelo.com) 11 | -------------------------------------------------------------------------------- /src/platforms/accelo/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | const { answers } = await auth.getMetadata(); 5 | return { 6 | ...options, 7 | url: formatUrl( 8 | `https://${answers.subdomain}.api.accelo.com/api/v0`, 9 | options.url, 10 | ), 11 | headers: { 12 | ...options.headers, 13 | Authorization: `Bearer ${await auth.getToken()}`, 14 | }, 15 | }; 16 | }); 17 | 18 | export const client = { 19 | passthrough: request.passthrough(), 20 | }; 21 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/actions/contacts/create.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/active-campaign/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'create-contact', 7 | { 8 | operation: 'create', 9 | resource: 'contacts', 10 | mutation: true, 11 | schema: z.object({ 12 | email: z.string(), 13 | firstName: z.string().optional(), 14 | lastName: z.string().optional(), 15 | phone: z.string().optional(), 16 | }), 17 | scopes: [], 18 | }, 19 | async ({ input, auth }) => { 20 | return await client.contacts.create(auth, { 21 | email: input.email, 22 | firstName: input.firstName, 23 | lastName: input.lastName, 24 | phone: input.phone, 25 | }); 26 | }, 27 | ); 28 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/actions/contacts/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/active-campaign/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-contact', 7 | { 8 | operation: 'find', 9 | resource: 'contacts', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.string(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.contacts.find(auth, { 18 | id: input.id, 19 | }); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/actions/contacts/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/active-campaign/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-contacts', 7 | { 8 | operation: 'list', 9 | resource: 'contacts', 10 | mutation: false, 11 | schema: z.object({}), 12 | scopes: [], 13 | }, 14 | async ({ auth }) => { 15 | return await client.contacts.list(auth, {}); 16 | }, 17 | ); 18 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/actions/lists/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/active-campaign/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-list', 7 | { 8 | operation: 'find', 9 | resource: 'lists', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.string(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.lists.find(auth, { 18 | id: input.id, 19 | }); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/actions/lists/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/active-campaign/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-lists', 7 | { 8 | operation: 'list', 9 | resource: 'lists', 10 | mutation: false, 11 | schema: z.object({ 12 | limit: z.number().optional(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.lists.list(auth, { 18 | limit: input.limit, 19 | }); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/actions/users/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/active-campaign/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-users', 7 | { 8 | operation: 'list', 9 | resource: 'users', 10 | mutation: false, 11 | schema: z.object({}), 12 | scopes: [], 13 | }, 14 | async ({ auth }) => { 15 | return await client.users.list(auth, {}); 16 | }, 17 | ); 18 | -------------------------------------------------------------------------------- /src/platforms/active-campaign/constants.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_PAGE_SIZE = 100; 2 | -------------------------------------------------------------------------------- /src/platforms/adobe/README.md: -------------------------------------------------------------------------------- 1 | # Adobe 2 | 3 | ## Description 4 | 5 | Adobe is a leading software company known for creating multimedia and creativity software products. It is best recognized for products like Adobe Photoshop, Adobe Illustrator, Adobe Acrobat Reader, and the Portable Document Format (PDF). 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.adobe.com/) 10 | - [Website](adobe.com) 11 | -------------------------------------------------------------------------------- /src/platforms/adobe/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.adobe.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/adobe/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/adobe/client'; 2 | import boxIcon from '@/platforms/adobe/logos/box'; 3 | import fullIcon from '@/platforms/adobe/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('adobe', { 7 | auth: auth.oauth2({ 8 | authUrl: `https://ims-na1.adobelogin.com/ims/authorize/v2`, 9 | tokenUrl: `https://ims-na1.adobelogin.com/ims/token/v3`, 10 | requiredScopes: ['offline_access'], 11 | }), 12 | display: { 13 | name: 'Adobe', 14 | logos: { 15 | defaultURI: fullIcon ?? boxIcon, 16 | fullURI: fullIcon, 17 | boxURI: boxIcon, 18 | }, 19 | colors: { 20 | primary: '#ff0000', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/affinity/README.md: -------------------------------------------------------------------------------- 1 | # Affinity 2 | 3 | ## Description 4 | 5 | Affinity is a cloud-based customer relationship management (CRM) platform that focuses on relationship intelligence and deal management for sales teams. It leverages data analytics and machine learning to provide insights into contacts, interactions, and opportunities, empowering sales professionals to build and maintain stronger business relationships 6 | 7 | ## Resources 8 | 9 | - [Website](affinity.co) 10 | -------------------------------------------------------------------------------- /src/platforms/affinity/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.affinity.co`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Basic ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/affinity/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/affinity/client'; 2 | import boxIcon from '@/platforms/affinity/logos/box'; 3 | import fullIcon from '@/platforms/affinity/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('affinity', { 7 | auth: auth.basic({ 8 | questions: [{ type: 'text', id: 'password', label: 'API Token' }], 9 | }), 10 | display: { 11 | name: 'Affinity', 12 | logos: { 13 | defaultURI: fullIcon ?? boxIcon, 14 | fullURI: fullIcon, 15 | boxURI: boxIcon, 16 | }, 17 | colors: { 18 | primary: '#1050d6', 19 | }, 20 | categories: ['crm'], 21 | }, 22 | client, 23 | constants: {}, 24 | actions: {}, 25 | }); 26 | -------------------------------------------------------------------------------- /src/platforms/aircall/README.md: -------------------------------------------------------------------------------- 1 | # Aircall 2 | 3 | ## Description 4 | 5 | Aircall is a cloud-based phone system and call center software solution that seamlessly integrates with popular productivity and helpdesk tools. It's designed to enable teams to have meaningful and efficient phone conversations with their customers. 6 | 7 | ## Resources 8 | 9 | - [Website](aircall.io) 10 | -------------------------------------------------------------------------------- /src/platforms/aircall/actions/calls/find.ts: -------------------------------------------------------------------------------- 1 | import { transformCall } from '@/platforms/aircall/actions/mappers'; 2 | import { z } from 'zod'; 3 | import { action } from '../../../../sdk'; 4 | import { client } from '../../client'; 5 | 6 | export default action( 7 | 'find-call', 8 | { 9 | operation: 'find', 10 | resource: 'calls', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.number().or(z.string()), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.calls.find(auth, { id: input.id }); 19 | 20 | return { 21 | contact: transformCall(result.data.call), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/aircall/actions/contacts/find.ts: -------------------------------------------------------------------------------- 1 | import { transformContact } from '@/platforms/aircall/actions/mappers'; 2 | import { z } from 'zod'; 3 | import { action } from '../../../../sdk'; 4 | import { client } from '../../client'; 5 | 6 | export default action( 7 | 'find-contact', 8 | { 9 | operation: 'find', 10 | resource: 'contacts', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.number().or(z.string()), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.contacts.find(auth, { id: input.id }); 19 | 20 | return { 21 | contact: transformContact(result.data.contact), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/aircall/actions/user/find.ts: -------------------------------------------------------------------------------- 1 | import { transformUser } from '@/platforms/aircall/actions/mappers'; 2 | import { z } from 'zod'; 3 | import { action } from '../../../../sdk'; 4 | import { client } from '../../client'; 5 | 6 | export default action( 7 | 'find-user', 8 | { 9 | operation: 'find', 10 | resource: 'users', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.number().or(z.string()), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.users.find(auth, { id: input.id }); 19 | 20 | return { 21 | user: transformUser(result.data.user), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/aircall/actions/validators.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { BASE_URL } from '../constants'; 3 | 4 | export const aircallUrl = () => 5 | z 6 | .string() 7 | .refine( 8 | (url) => url.startsWith(BASE_URL + '/'), 9 | 'Aircall urls must use the Aircall domain', 10 | ) 11 | .transform((url) => url as `${typeof BASE_URL}/${string}`); 12 | -------------------------------------------------------------------------------- /src/platforms/aircall/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://api.aircall.io/v1'; 2 | export const DEFAULT_PAGE_SIZE = 100; 3 | -------------------------------------------------------------------------------- /src/platforms/airtable/README.md: -------------------------------------------------------------------------------- 1 | # Airtable 2 | 3 | ## Description 4 | 5 | Airtable is a software platform that combines elements of a spreadsheet with a database to organize, collaborate, and manage data in a flexible and user-friendly way. It provides users with a variety of templates, automation, and integration options to streamline their workflow and project management tasks. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://airtable.com/developers/web/api/introduction) 10 | - [Website](airtable.com) 11 | -------------------------------------------------------------------------------- /src/platforms/airtable/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.airtable.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/airtable/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/airtable/client'; 2 | import boxIcon from '@/platforms/airtable/logos/box'; 3 | import fullIcon from '@/platforms/airtable/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('airtable', { 7 | auth: auth.oauth2({ 8 | authUrl: `https://airtable.com/oauth2/v1/authorize`, 9 | tokenUrl: `https://airtable.com/oauth2/v1/token`, 10 | tokenAuth: 'header', 11 | }), 12 | display: { 13 | name: 'Airtable', 14 | logos: { 15 | defaultURI: fullIcon ?? boxIcon, 16 | fullURI: fullIcon, 17 | boxURI: boxIcon, 18 | }, 19 | colors: { 20 | primary: '#333333', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/amazon/README.md: -------------------------------------------------------------------------------- 1 | # Amazon 2 | 3 | ## Description 4 | 5 | Amazon is a global online marketplace offering a vast range of products including books, electronics, clothing, and household items, as well as streaming services, cloud computing, and artificial intelligence technologies. It also provides digital streaming, web services, and produces consumer electronics— notably, Kindle e-readers, Fire tablets, Fire TV, and Echo devices. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer-docs.amazon.com/sp-api/) 10 | - [Website](amazon.com) 11 | -------------------------------------------------------------------------------- /src/platforms/amazon/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://sellingpartnerapi-na.amazon.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/amplitude/README.md: -------------------------------------------------------------------------------- 1 | # Amplitude 2 | 3 | ## Description 4 | 5 | Amplitude is a tech company that provides advanced analytical tools and software to help businesses optimize their digital products. They use customer data to drive growth, focusing on user behavior to improve overall engagement and conversion rates. 6 | -------------------------------------------------------------------------------- /src/platforms/amplitude/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://amplitude.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Basic ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/amplitude/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/amplitude/client'; 2 | import boxIcon from '@/platforms/amplitude/icons/box'; 3 | import fullIcon from '@/platforms/amplitude/icons/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('amplitude', { 7 | auth: auth.basic(), 8 | display: { 9 | name: 'Amplitude', 10 | logos: { 11 | defaultURI: fullIcon ?? boxIcon, 12 | fullURI: fullIcon, 13 | boxURI: boxIcon, 14 | }, 15 | colors: { 16 | primary: '#1E61F0', 17 | }, 18 | categories: [], 19 | }, 20 | client, 21 | constants: {}, 22 | actions: {}, 23 | }); 24 | -------------------------------------------------------------------------------- /src/platforms/apollo/README.md: -------------------------------------------------------------------------------- 1 | # Apollo 2 | 3 | ## Description 4 | 5 | Apollo is a sales engagement platform that empowers sales teams to automate and personalize their outreach efforts. It offers features such as email automation, multi-channel communication, and advanced analytics to help sales representatives effectively engage with prospects and drive more revenue. 6 | 7 | ## Resources 8 | 9 | - [Website](apollo.io) 10 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/accounts/create.ts: -------------------------------------------------------------------------------- 1 | import { transformAccount } from '@/platforms/apollo/actions/mappers'; 2 | import { client } from '@/platforms/apollo/client'; 3 | import { apolloAccountCreate } from '@/platforms/apollo/schemas'; 4 | import { action } from '@/sdk'; 5 | 6 | export default action( 7 | 'create-account', 8 | { 9 | operation: 'create', 10 | resource: 'accounts', 11 | mutation: true, 12 | schema: apolloAccountCreate, 13 | scopes: [], 14 | }, 15 | async ({ input, auth }) => { 16 | const result = await client.accounts.create(auth, input); 17 | 18 | return { 19 | account: transformAccount(result.data.account), 20 | $native: result.$native, 21 | }; 22 | }, 23 | ); 24 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/accounts/update.ts: -------------------------------------------------------------------------------- 1 | import { transformAccount } from '@/platforms/apollo/actions/mappers'; 2 | import { client } from '@/platforms/apollo/client'; 3 | import { apolloAccountUpdate } from '@/platforms/apollo/schemas'; 4 | import { action } from '@/sdk'; 5 | 6 | export default action( 7 | 'update-account', 8 | { 9 | operation: 'update', 10 | resource: 'accounts', 11 | mutation: true, 12 | schema: apolloAccountUpdate, 13 | scopes: [], 14 | }, 15 | async ({ input, auth }) => { 16 | const result = await client.accounts.update(auth, input); 17 | 18 | return { 19 | account: transformAccount(result.data.account), 20 | $native: result.$native, 21 | }; 22 | }, 23 | ); 24 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/contacts/check-deployability.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/apollo/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'are-contacts-deployable', 7 | { 8 | operation: 'check-deployability', 9 | resource: 'contacts', 10 | mutation: false, 11 | schema: z.object({ 12 | contactIds: z.array(z.string()), 13 | emailerCampaignId: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.contacts.isDeployable(auth, { 19 | contact_ids: input.contactIds, 20 | emailer_campaign_id: input.emailerCampaignId, 21 | }); 22 | 23 | return { 24 | ...result.data, 25 | $native: result.$native, 26 | }; 27 | }, 28 | ); 29 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/custom-fields/create.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/apollo/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'create-custom-fields', 7 | { 8 | operation: 'create', 9 | resource: 'custom-fields', 10 | mutation: true, 11 | schema: z.object({ 12 | modality: z.enum(['contact', 'account']), 13 | name: z.string(), 14 | type: z.string(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | const result = await client.customFields.create(auth, input); 20 | 21 | return { 22 | typedCustomField: result.data.typed_custom_field, 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/custom-fields/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/apollo/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-custom-fields', 7 | { 8 | operation: 'list', 9 | resource: 'custom-fields', 10 | mutation: false, 11 | schema: z.object({ 12 | page: z.number().optional(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | const result = await client.customFields.list(auth, input); 18 | 19 | return { 20 | typedCustomFields: result.data.typed_custom_fields, 21 | $native: result.$native, 22 | }; 23 | }, 24 | ); 25 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/email-accounts/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/apollo/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-email-accounts', 7 | { 8 | operation: 'list', 9 | resource: 'email-accounts', 10 | mutation: false, 11 | schema: z.object({ 12 | page: z.number().optional(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | const result = await client.emailAccounts.list(auth, input); 18 | 19 | return { 20 | emailAccounts: result.data.email_accounts.map((emailAccount) => ({ 21 | id: emailAccount.id, 22 | default: emailAccount.default, 23 | email: emailAccount.email, 24 | userId: emailAccount.user_id, 25 | })), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/emails/search.ts: -------------------------------------------------------------------------------- 1 | import { transformEmailMessage } from '@/platforms/apollo/actions/mappers'; 2 | import { client } from '@/platforms/apollo/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'search-emails', 8 | { 9 | operation: 'search', 10 | resource: 'emails', 11 | mutation: false, 12 | schema: z.object({ 13 | page: z.number().optional(), 14 | emailerCampaignId: z.string().optional(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | const result = await client.emails.search(auth, { 20 | emailer_campaign_id: input.emailerCampaignId, 21 | }); 22 | 23 | return { 24 | emailerMessages: result.data.emailer_messages.map(transformEmailMessage), 25 | $native: result.$native, 26 | }; 27 | }, 28 | ); 29 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/tasks/mark-complete.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/apollo/client'; 2 | import { action } from '@/sdk'; 3 | import { random } from 'radash'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'mark-tasks-complete', 8 | { 9 | operation: 'mark-complete', 10 | resource: 'tasks', 11 | mutation: true, 12 | schema: z.object({ 13 | ids: z.array(z.string()), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.tasks.markComplete(auth, { 19 | ids: input.ids, 20 | async: false, 21 | sync_index_tasks: false, 22 | // Generate a new cache key to force a cache miss. 23 | cacheKey: random(0, 1e12), 24 | }); 25 | 26 | return { 27 | tasks: result.data.tasks, 28 | $native: result.$native, 29 | }; 30 | }, 31 | ); 32 | -------------------------------------------------------------------------------- /src/platforms/apollo/actions/users/search.ts: -------------------------------------------------------------------------------- 1 | import { 2 | transformPagination, 3 | transformUser, 4 | } from '@/platforms/apollo/actions/mappers'; 5 | import { client } from '@/platforms/apollo/client'; 6 | import { action } from '@/sdk'; 7 | import { z } from 'zod'; 8 | 9 | export default action( 10 | 'search-users', 11 | { 12 | operation: 'search', 13 | resource: 'users', 14 | mutation: false, 15 | schema: z.object({ 16 | page: z.number().optional(), 17 | }), 18 | scopes: [], 19 | }, 20 | async ({ input, auth }) => { 21 | const result = await client.users.search(auth, input); 22 | 23 | return { 24 | pagination: transformPagination(result.data.pagination, input.page), 25 | users: result.data.users.map(transformUser), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/apollo/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://api.apollo.io/v1'; 2 | export const DEFAULT_PAGE_SIZE = 200; 3 | -------------------------------------------------------------------------------- /src/platforms/asana/README.md: -------------------------------------------------------------------------------- 1 | # Asana 2 | 3 | ## Description 4 | 5 | Asana is a software company that provides a platform focused on team-based work management and collaboration. It offers solutions for task management, real-time communication, and project tracking to help teams organize, track, and manage their work. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.asana.com/reference) 10 | - [Website](asana.com) 11 | -------------------------------------------------------------------------------- /src/platforms/asana/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://app.asana.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/asana/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/asana/client'; 2 | import boxIcon from '@/platforms/asana/logos/box'; 3 | import fullIcon from '@/platforms/asana/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('asana', { 7 | auth: auth.oauth2({ 8 | authUrl: `https://app.asana.com/-/oauth_authorize`, 9 | tokenUrl: `https://app.asana.com/-/oauth_token`, 10 | }), 11 | display: { 12 | name: 'Asana', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#ff6d92', 20 | }, 21 | categories: ['ticketing'], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/ashby/README.md: -------------------------------------------------------------------------------- 1 | # Ashby 2 | 3 | ## Description 4 | 5 | Ashby is a technology-driven company that offers job seekers a platform to explore potential employers and understand the real working conditions before applying. The platform provides insights into company culture, compensation, and growth opportunities using data analysis and AI technologies. 6 | -------------------------------------------------------------------------------- /src/platforms/ashby/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.ashbyhq.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Basic ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/ashby/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/ashby/client'; 2 | import boxIcon from '@/platforms/ashby/icons/box'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('ashby', { 6 | auth: auth.basic(), 7 | display: { 8 | name: 'Ashby', 9 | logos: { 10 | defaultURI: boxIcon, 11 | boxURI: boxIcon, 12 | }, 13 | colors: { 14 | primary: '#483fac', 15 | }, 16 | categories: [], 17 | }, 18 | client, 19 | constants: {}, 20 | actions: {}, 21 | }); 22 | -------------------------------------------------------------------------------- /src/platforms/atlassian/README.md: -------------------------------------------------------------------------------- 1 | # Atlassian 2 | 3 | ## Description 4 | 5 | Atlassian is a software company that specializes in developing products for project managers and software developers. Its offerings include the popular tools Jira for team planning and project management, Confluence for team content creation and sharing, and Trello for visualizing project tasks. 6 | 7 | ## Resources 8 | 9 | - [Website](atlassian.com) 10 | -------------------------------------------------------------------------------- /src/platforms/atlassian/client.ts: -------------------------------------------------------------------------------- 1 | import { makeRequestFactory } from '@/sdk/client'; 2 | import { HttpsUrl } from '../../sdk'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any atlassian product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/bamboohr/README.md: -------------------------------------------------------------------------------- 1 | # BambooHR 2 | 3 | ## Description 4 | 5 | BambooHR is a technology company that specializes in online human resources software. Their services primarily focus on small and medium-sized businesses, offering tools for hiring, onboarding, compensation, and performance management. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://documentation.bamboohr.com/docs) 10 | - [Website](bamboohr.com) 11 | -------------------------------------------------------------------------------- /src/platforms/bamboohr/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | const { answers } = await auth.getMetadata(); 5 | return { 6 | ...options, 7 | url: formatUrl( 8 | `https://api.bamboohr.com/api/gateway.php/${answers.subdomain}/v1`, 9 | options.url, 10 | ), 11 | headers: { 12 | ...options.headers, 13 | Authorization: `Bearer ${await auth.getToken()}`, 14 | }, 15 | }; 16 | }); 17 | 18 | export const client = { 19 | passthrough: request.passthrough(), 20 | }; 21 | -------------------------------------------------------------------------------- /src/platforms/bitbucket/README.md: -------------------------------------------------------------------------------- 1 | # Bitbucket 2 | 3 | ## Description 4 | 5 | Bitbucket is a web-based platform that provides Git code management for professional teams, enabling them to collaborate on code in real time. The platform also offers features like pull requests, advanced file management, and issue tracking to streamline and optimize the software development process. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.atlassian.com/server/bitbucket/rest/v811/intro) 10 | - [Website](bitbucket.org) 11 | -------------------------------------------------------------------------------- /src/platforms/bitbucket/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | const { answers } = await auth.getMetadata(); 5 | return { 6 | ...options, 7 | url: formatUrl( 8 | `https://bitbucket.${answers.subdomain}.com/rest/api/1.0`, 9 | options.url, 10 | ), 11 | headers: { 12 | ...options.headers, 13 | Authorization: `Bearer ${await auth.getToken()}`, 14 | }, 15 | }; 16 | }); 17 | 18 | export const client = { 19 | passthrough: request.passthrough(), 20 | }; 21 | -------------------------------------------------------------------------------- /src/platforms/boldsign/README.md: -------------------------------------------------------------------------------- 1 | # Boldsign 2 | 3 | ## Description 4 | 5 | Boldsign offers an efficient and comprehensive e-signature solution designed to streamline the process of obtaining secure and legally binding digital signatures. It serves businesses of all sizes, providing document automation, customization tools, and integration with various platforms for smoother workflow. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.boldsign.com/api-overview) 10 | - [Website](boldsign.com) 11 | -------------------------------------------------------------------------------- /src/platforms/boldsign/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.boldsign.com/v1`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/boldsign/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/boldsign/client'; 2 | import boxIcon from '@/platforms/boldsign/logos/box'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('boldsign', { 6 | auth: auth.oauth2({ 7 | authUrl: 'https://account.boldsign.com/connect/authorize', 8 | tokenUrl: 'https://account.boldsign.com/connect/token', 9 | }), 10 | display: { 11 | name: 'Boldsign', 12 | logos: { 13 | defaultURI: boxIcon, 14 | boxURI: boxIcon, 15 | }, 16 | colors: { 17 | primary: '#fe4802', 18 | }, 19 | categories: [], 20 | }, 21 | client, 22 | constants: {}, 23 | actions: {}, 24 | }); 25 | -------------------------------------------------------------------------------- /src/platforms/box/README.md: -------------------------------------------------------------------------------- 1 | # Box 2 | 3 | ## Description 4 | 5 | Box is a cloud content management and file sharing service for businesses. It provides tools for secure collaboration, data privacy, and compliance with industry standards and global regulations. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.box.com/) 10 | - [Website](box.com) 11 | -------------------------------------------------------------------------------- /src/platforms/box/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.box.com/2.0`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/box/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/box/client'; 2 | import boxIcon from '@/platforms/box/logos/box'; 3 | import fullIcon from '@/platforms/box/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('box', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://account.box.com/api/oauth2/authorize', 9 | tokenUrl: 'https://api.box.com/oauth2/token', 10 | }), 11 | display: { 12 | name: 'Box', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#8EA6B2', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/brex/README.md: -------------------------------------------------------------------------------- 1 | # Brex 2 | 3 | ## Description 4 | 5 | Brex is a technology company that provides business credit cards and cash management accounts to technology companies, startups, and other businesses. Their products are designed to simplify and automate expense management and budgeting processes. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.brex.com/docs) 10 | - [Website](brex.com) 11 | -------------------------------------------------------------------------------- /src/platforms/brex/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://platform.brexapis.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/brex/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/brex/client'; 2 | import boxIcon from '@/platforms/brex/logos/box'; 3 | import fullIcon from '@/platforms/brex/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('brex', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://accounts-api.brex.com/oauth2/default/v1/authorize', 9 | tokenUrl: 'https://accounts-api.brex.com/oauth2/default/v1/token', 10 | requiredScopes: ['offline_access'], 11 | }), 12 | display: { 13 | name: 'Brex', 14 | logos: { 15 | defaultURI: fullIcon ?? boxIcon, 16 | fullURI: fullIcon, 17 | boxURI: boxIcon, 18 | }, 19 | colors: { 20 | primary: '#f46a35', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/calendly/README.md: -------------------------------------------------------------------------------- 1 | # Calendly 2 | 3 | ## Description 4 | 5 | Calendly is a digital platform that offers simple, user-friendly scheduling solutions to reduce administrative tasks related to meeting coordination. It allows individuals and businesses to set preferences, share their availability, and seamlessly schedule appointments, interviews, consultations, and more. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.calendly.com/api-docs) 10 | - [Website](calendly.com) 11 | -------------------------------------------------------------------------------- /src/platforms/calendly/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.calendly.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/calendly/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/calendly/client'; 2 | import boxIcon from '@/platforms/calendly/logos/box'; 3 | import fullIcon from '@/platforms/calendly/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('calendly', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://auth.calendly.com/oauth/authorize', 9 | tokenUrl: 'https://auth.calendly.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'Calendly', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#0AE8F0', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/chorus/README.md: -------------------------------------------------------------------------------- 1 | # Chorus 2 | 3 | ## Description 4 | 5 | Chorus is a platform that uses artificial intelligence to analyze sales calls and meetings, providing insights to help teams improve their communication and close deals more effectively. It records, transcribes, and analyzes business conversations in real time, offering actionable feedback and data-driven coaching. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://api-docs.chorus.ai/#intro) 10 | - [Website](chorus.ai) 11 | -------------------------------------------------------------------------------- /src/platforms/chorus/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://chorus.ai/api`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/chorus/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/chorus/client'; 2 | import boxIcon from '@/platforms/chorus/logos/box'; 3 | import fullIcon from '@/platforms/chorus/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('chorus', { 7 | auth: auth.apiToken(), 8 | display: { 9 | name: 'Chorus', 10 | logos: { 11 | defaultURI: fullIcon ?? boxIcon, 12 | fullURI: fullIcon, 13 | boxURI: boxIcon, 14 | }, 15 | colors: { 16 | primary: '#00b5d0', 17 | }, 18 | categories: [], 19 | }, 20 | client, 21 | constants: {}, 22 | actions: {}, 23 | }); 24 | -------------------------------------------------------------------------------- /src/platforms/clickup/README.md: -------------------------------------------------------------------------------- 1 | # Clickup 2 | 3 | ## Description 4 | 5 | ClickUp is a cloud-based productivity platform that provides tools for task management, project management, and team collaboration. It aims to centralize all work-related tasks and documents in one place, improving efficiency and productivity in workspaces. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://clickup.com/api/) 10 | - [Website](clickup.com) 11 | -------------------------------------------------------------------------------- /src/platforms/clickup/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.clickup.com/api/v2`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/clickup/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/clickup/client'; 2 | import boxIcon from '@/platforms/clickup/logos/box'; 3 | import fullIcon from '@/platforms/clickup/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('clickup', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://app.clickup.com/api', 9 | tokenUrl: 'https://api.clickup.com/api/v2/oauth/token', 10 | }), 11 | display: { 12 | name: 'Clickup', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#FD71AF', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/close/README.md: -------------------------------------------------------------------------------- 1 | # Close 2 | 3 | ## Description 4 | 5 | Close CRM is a powerful customer relationship management (CRM) platform designed to streamline sales processes and enhance team collaboration. It offers a range of features such as email automation, task management, and reporting to help businesses effectively manage and grow their customer relationships. 6 | 7 | ## Resources 8 | 9 | - [Website](close.com) 10 | -------------------------------------------------------------------------------- /src/platforms/close/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory, toBase64 } from '@/sdk/client'; 2 | import { HttpsUrl } from '../../sdk'; 3 | import { API_VERSION, BASE_URL } from './constants'; 4 | 5 | const URL = `${BASE_URL}/${API_VERSION}` as HttpsUrl; 6 | const request = makeRequestFactory(async (auth, options) => { 7 | return { 8 | ...options, 9 | url: formatUrl(URL, options.url), 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Basic ${toBase64(await auth.getToken())}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/close/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v1'; 2 | export const BASE_URL = 'https://api.close.com/api'; 3 | -------------------------------------------------------------------------------- /src/platforms/close/index.ts: -------------------------------------------------------------------------------- 1 | import boxIcon from '@/platforms/close/logos/box'; 2 | import fullIcon from '@/platforms/close/logos/full'; 3 | import { auth, platform } from '@/sdk'; 4 | import { client } from './client'; 5 | import * as constants from './constants'; 6 | 7 | export default platform('close', { 8 | auth: auth.apiToken(), 9 | display: { 10 | name: 'Close', 11 | logos: { 12 | defaultURI: fullIcon ?? boxIcon, 13 | fullURI: fullIcon, 14 | boxURI: boxIcon, 15 | }, 16 | colors: { 17 | primary: '#48b178', 18 | }, 19 | categories: ['crm'], 20 | }, 21 | constants, 22 | client, 23 | actions: {}, 24 | }); 25 | -------------------------------------------------------------------------------- /src/platforms/confluence/README.md: -------------------------------------------------------------------------------- 1 | # Confluence 2 | 3 | ## Description 4 | 5 | Confluence is a technology firm that offers innovative solutions for data management, automation, and regulatory reporting to the global investment industry. It aims to streamline and simplify operations management, allowing businesses to focus on their core activities. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://docs.atlassian.com/atlassian-confluence/REST/6.6.0/) 10 | - [Website](confluence.com) 11 | -------------------------------------------------------------------------------- /src/platforms/confluence/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | const { answers } = await auth.getMetadata(); 4 | return { 5 | ...options, 6 | url: formatUrl(`https://${answers.url}/rest/api`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/confluence/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/confluence/client'; 2 | import defaultIcon from '@/platforms/defaultIcon'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('confluence', { 6 | auth: auth.oauth2({ 7 | authUrl: 'https://auth.atlassian.com/authorize', 8 | tokenUrl: 'https://auth.atlassian.com/oauth/token', 9 | questions: [ 10 | { id: 'url', label: "What's your Confluence url?", type: 'text' }, 11 | ], 12 | authParams: { 13 | audience: 'api.atlassian.com', 14 | prompt: 'consent', 15 | }, 16 | }), 17 | display: { 18 | name: 'Confluence', 19 | logos: { 20 | defaultURI: defaultIcon, 21 | }, 22 | colors: { 23 | primary: '#003399', 24 | }, 25 | categories: [], 26 | }, 27 | client, 28 | constants: {}, 29 | actions: {}, 30 | }); 31 | -------------------------------------------------------------------------------- /src/platforms/contentstack/README.md: -------------------------------------------------------------------------------- 1 | # Contentstack 2 | 3 | ## Description 4 | 5 | Contentstack is a digital content management system that provides businesses with the tools to deliver personalized, omnichannel digital experiences. The company offers a headless CMS platform, allowing users to manage and deliver content across any digital channel. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://www.contentstack.com/docs) 10 | - [Website](contentstack.io) 11 | -------------------------------------------------------------------------------- /src/platforms/contentstack/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Contentstack product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/customer.io/README.md: -------------------------------------------------------------------------------- 1 | # Customer.io 2 | 3 | ## Description 4 | 5 | Customer.io is a versatile customer engagement platform that enables businesses to automate and personalize their messaging based on customer behavior data. It provides powerful APIs for developers to create tailored customer experiences across various channels. 6 | 7 | ## Resources 8 | 9 | - [Website](customer.io) 10 | -------------------------------------------------------------------------------- /src/platforms/customer.io/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.customer.io`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/customer.io/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/customer.io/client'; 2 | import boxIcon from '@/platforms/customer.io/logos/box'; 3 | import fullIcon from '@/platforms/customer.io/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('customer.io', { 7 | auth: auth.apiToken(), 8 | display: { 9 | name: 'Customer.io', 10 | logos: { 11 | defaultURI: fullIcon ?? boxIcon, 12 | fullURI: fullIcon, 13 | boxURI: boxIcon, 14 | }, 15 | colors: { 16 | primary: '#5721CC', 17 | }, 18 | categories: ['marketing-automation'], 19 | }, 20 | client, 21 | constants: {}, 22 | actions: {}, 23 | }); 24 | -------------------------------------------------------------------------------- /src/platforms/dialpad/README.md: -------------------------------------------------------------------------------- 1 | # Dialpad 2 | 3 | ## Description 4 | 5 | Dialpad is a cloud-based communication platform that provides businesses with a unified system for voice, video, messaging, and meetings, enhancing team collaboration and customer engagement. It's designed to integrate seamlessly with other popular business tools, making communication more efficient and streamlined. 6 | 7 | ## Resources 8 | 9 | - [Website](dialpad.com) 10 | -------------------------------------------------------------------------------- /src/platforms/dialpad/actions/calls/find.ts: -------------------------------------------------------------------------------- 1 | import { transformCall } from '@/platforms/dialpad/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'find-call', 8 | { 9 | operation: 'find', 10 | resource: 'calls', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.calls.find(auth, { 19 | id: input.id, 20 | }); 21 | 22 | return { 23 | ...transformCall(result.data), 24 | $native: result.$native, 25 | }; 26 | }, 27 | ); 28 | -------------------------------------------------------------------------------- /src/platforms/dialpad/actions/calls/list.ts: -------------------------------------------------------------------------------- 1 | import { transformCall } from '@/platforms/dialpad/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'list-calls', 8 | { 9 | operation: 'list', 10 | resource: 'calls', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: z.string().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.calls.list(auth, input); 19 | 20 | return { 21 | cursor: result.data.cursor, 22 | items: result.data.items?.map(transformCall), 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/dialpad/actions/contacts/find.ts: -------------------------------------------------------------------------------- 1 | import { transformContact } from '@/platforms/dialpad/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'find-contact', 8 | { 9 | operation: 'find', 10 | resource: 'contacts', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.contacts.find(auth, { 19 | id: input.id, 20 | }); 21 | 22 | return { 23 | ...transformContact(result.data), 24 | $native: result.$native, 25 | }; 26 | }, 27 | ); 28 | -------------------------------------------------------------------------------- /src/platforms/dialpad/actions/contacts/list.ts: -------------------------------------------------------------------------------- 1 | import { transformContact } from '@/platforms/dialpad/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'list-contacts', 8 | { 9 | operation: 'list', 10 | resource: 'contacts', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: z.string().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.contacts.list(auth, input); 19 | 20 | return { 21 | cursor: result.data.cursor, 22 | items: result.data.items?.map(transformContact), 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/dialpad/actions/users/find.ts: -------------------------------------------------------------------------------- 1 | import { transformUser } from '@/platforms/dialpad/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'find-user', 8 | { 9 | operation: 'find', 10 | resource: 'users', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.users.find(auth, { 19 | id: input.id, 20 | }); 21 | 22 | return { 23 | ...transformUser(result.data), 24 | $native: result.$native, 25 | }; 26 | }, 27 | ); 28 | -------------------------------------------------------------------------------- /src/platforms/dialpad/actions/users/list.ts: -------------------------------------------------------------------------------- 1 | import { transformUser } from '@/platforms/dialpad/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'list-users', 8 | { 9 | operation: 'list', 10 | resource: 'users', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: z.string().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.users.list(auth, input); 19 | 20 | return { 21 | cursor: result.data.cursor, 22 | items: result.data.items?.map(transformUser), 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/dialpad/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v2'; 2 | -------------------------------------------------------------------------------- /src/platforms/dropbox/README.md: -------------------------------------------------------------------------------- 1 | # Dropbox 2 | 3 | ## Description 4 | 5 | Dropbox is a company that provides a cloud-based platform for individuals and businesses to store, share, and access data and files from anywhere. It offers solutions like personal cloud, file synchronization, cloud storage, and client software to enhance productivity and collaboration. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://www.dropbox.com/developers/documentation) 10 | - [Website](dropbox.com) 11 | -------------------------------------------------------------------------------- /src/platforms/dropbox/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.dropboxapi.com/2`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/dropbox/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/dropbox/client'; 2 | import boxIcon from '@/platforms/dropbox/logos/box'; 3 | import fullIcon from '@/platforms/dropbox/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('dropbox', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://www.dropbox.com/oauth2/authorize', 9 | tokenUrl: 'https://api.dropboxapi.com/oauth2/token', 10 | authParams: { 11 | token_access_type: 'offline', 12 | }, 13 | }), 14 | display: { 15 | name: 'Dropbox', 16 | logos: { 17 | defaultURI: fullIcon ?? boxIcon, 18 | fullURI: fullIcon, 19 | boxURI: boxIcon, 20 | }, 21 | colors: { 22 | primary: '#0061ff', 23 | }, 24 | categories: [], 25 | }, 26 | client, 27 | constants: {}, 28 | actions: {}, 29 | }); 30 | -------------------------------------------------------------------------------- /src/platforms/dynamics-sales/README.md: -------------------------------------------------------------------------------- 1 | # Microsoft Dynamics Sales 2 | 3 | ## Description 4 | 5 | Microsoft Dynamics Sales is a comprehensive sales solution that empowers businesses to drive personalized engagements and make data-driven decisions. It offers tools for sales forecasting, relationship management, and performance tracking. 6 | 7 | ## Resources 8 | 9 | - [Website](microsoft.com) 10 | -------------------------------------------------------------------------------- /src/platforms/dynamics-sales/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v9.0'; 2 | export const MAX_PAGE_SIZE = 5000; 3 | -------------------------------------------------------------------------------- /src/platforms/exact-online/README.md: -------------------------------------------------------------------------------- 1 | # Exact Online 2 | 3 | ## Description 4 | 5 | Exact Online is a cloud-based software provider that offers business solutions in areas such as accounting, ERP, HRM, CRM, and industry-specific solutions. It caters to small and medium-sized businesses, helping them streamline their processes and improve efficiency. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://start.exactonline.nl/docs/HlpRestAPIResources.aspx) 10 | - [Website](exactonlinevereniging.nl) 11 | -------------------------------------------------------------------------------- /src/platforms/exact-online/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | const { answers } = await auth.getMetadata(); 4 | return { 5 | ...options, 6 | url: formatUrl( 7 | `https://start.exactonline.${answers.extension}/api`, 8 | options.url, 9 | ), 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/facebook/README.md: -------------------------------------------------------------------------------- 1 | # Facebook 2 | 3 | ## Description 4 | 5 | Facebook is a social networking service that allows users to connect with friends, family, and other individuals worldwide by sharing status updates, photos, and other types of content. The platform also provides various features such as groups, marketplace, and virtual reality environments, enhancing online communication and interaction. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.facebook.com/docs/) 10 | - [Website](facebook.com) 11 | -------------------------------------------------------------------------------- /src/platforms/facebook/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Facebook product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/facebook/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/facebook/client'; 2 | import boxIcon from '@/platforms/facebook/logos/box'; 3 | import fullIcon from '@/platforms/facebook/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('facebook', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://www.facebook.com/v15.0/dialog/oauth', 9 | tokenUrl: 'https://graph.facebook.com/v15.0/oauth/access_token', 10 | }), 11 | display: { 12 | name: 'Facebook', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#1877f2', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/factorial/README.md: -------------------------------------------------------------------------------- 1 | # Factorial 2 | 3 | ## Description 4 | 5 | Factorial is a tech company that specializes in human resources software, offering a comprehensive solution for HR tasks including time tracking, time-off management, onboarding, and performance reviews. Their platform is designed to simplify HR processes, improve internal communication, and make data-driven decisions. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://apidoc.factorialhr.com/docs) 10 | - [Website](factorialhr.com) 11 | -------------------------------------------------------------------------------- /src/platforms/factorial/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.factorialhr.com/api/v1`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/factorial/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/factorial/client'; 2 | import boxIcon from '@/platforms/factorial/logos/box'; 3 | import fullIcon from '@/platforms/factorial/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('factorial', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://api.factorialhr.com/oauth/authorize', 9 | tokenUrl: 'https://api.factorialhr.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'Factorial', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#007C85', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/freshbooks/README.md: -------------------------------------------------------------------------------- 1 | # Freshbooks 2 | 3 | ## Description 4 | 5 | Freshbooks is a cloud-based accounting software designed to assist small businesses and self-employed professionals with their invoicing and billing needs. The platform provides features such as expense tracking, time tracking, and financial reporting to streamline financial management tasks. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://www.freshbooks.com/api/start) 10 | - [Website](freshbooks.com) 11 | -------------------------------------------------------------------------------- /src/platforms/freshbooks/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.freshbooks.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/freshbooks/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/freshbooks/client'; 2 | import boxIcon from '@/platforms/freshbooks/logos/box'; 3 | import fullIcon from '@/platforms/freshbooks/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('freshbooks', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://auth.freshbooks.com/oauth/authorize', 9 | tokenUrl: 'https://api.freshbooks.com/auth/oauth/token', 10 | }), 11 | display: { 12 | name: 'Freshbooks', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#0075DD', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/freshdesk/README.md: -------------------------------------------------------------------------------- 1 | # Freshdesk 2 | 3 | ## Description 4 | 5 | Freshdesk is a cloud-based customer support software that offers comprehensive solutions for customer service, including ticketing, multi-channel support, and automation tools. It's designed to streamline customer communication and enhance customer satisfaction. 6 | 7 | ## Resources 8 | 9 | - [Website](freshdesk.com) 10 | -------------------------------------------------------------------------------- /src/platforms/freshdesk/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 3 | import { API_VERSION } from './constants'; 4 | 5 | const request = makeRequestFactory(async (auth, options) => { 6 | const { answers } = await auth.getMetadata(); 7 | const url = 8 | `https://${answers.subdomain}.freshdesk.com/api/${API_VERSION}` as HttpsUrl; 9 | return { 10 | ...options, 11 | url: formatUrl(url, options.url), 12 | headers: { 13 | ...options.headers, 14 | Authorization: `Basic ${await auth.getToken()}`, 15 | }, 16 | }; 17 | }); 18 | 19 | export const client = { 20 | passthrough: request.passthrough(), 21 | }; 22 | -------------------------------------------------------------------------------- /src/platforms/freshdesk/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v2'; 2 | -------------------------------------------------------------------------------- /src/platforms/freshsales/README.md: -------------------------------------------------------------------------------- 1 | # Freshsales 2 | 3 | ## Description 4 | 5 | Freshsales is a dynamic CRM platform designed to streamline customer management, offering features like lead scoring, built-in phone and email, and AI-based analytics. It's a comprehensive solution for businesses looking to optimize their sales process and improve customer relationships. 6 | 7 | ## Resources 8 | 9 | - [Website](freshsales.io) 10 | -------------------------------------------------------------------------------- /src/platforms/freshsales/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | const { answers } = await auth.getMetadata(); 6 | const url = `https://${answers.subdomain}.freshsales.io/api` as HttpsUrl; 7 | return { 8 | ...options, 9 | url: formatUrl(url, options.url), 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Token token=${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/front/README.md: -------------------------------------------------------------------------------- 1 | # Front 2 | 3 | ## Description 4 | 5 | Front is a technology company that offers a shared inbox platform for teams to manage, send, receive, and organize their emails. The company's platform also integrates with other software tools, making it an effective solution for improving team collaboration and workflow efficiency. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://dev.frontapp.com/docs) 10 | - [Website](frontapp.com) 11 | -------------------------------------------------------------------------------- /src/platforms/front/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api2.frontapp.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/front/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/front/client'; 2 | import boxIcon from '@/platforms/front/logos/box'; 3 | import fullIcon from '@/platforms/front/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('front', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://app.frontapp.com/oauth/authorize', 9 | tokenUrl: 'https://app.frontapp.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'Front', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#ffeaf3', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/github/README.md: -------------------------------------------------------------------------------- 1 | # GitHub 2 | 3 | ## Description 4 | 5 | GitHub is a platform that provides hosting for software development version control using Git. It offers distributed version control and source code management (SCM) functionality of Git, along with its own features such as access control and several collaboration features like bug tracking, feature requests, task management, and wikis for every project. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://docs.github.com/en/rest) 10 | - [Website](github.com) 11 | -------------------------------------------------------------------------------- /src/platforms/github/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.github.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/github/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/github/client'; 2 | import boxIcon from '@/platforms/github/logos/box'; 3 | import fullIcon from '@/platforms/github/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('github', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://github.com/login/oauth/authorize', 9 | tokenUrl: 'https://github.com/login/oauth/access_token', 10 | }), 11 | display: { 12 | name: 'GitHub', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#28a745', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/gitlab/README.md: -------------------------------------------------------------------------------- 1 | # Gitlab 2 | 3 | ## Description 4 | 5 | GitLab is a web-based platform that provides a complete DevOps lifecycle tool, offering solutions for source code management, continuous integration and deployment, and project planning and monitoring. It is designed to help teams collaborate on projects, increase efficiency and speed up the software development process. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://docs.gitlab.com/) 10 | - [Website](gitlab.com) 11 | -------------------------------------------------------------------------------- /src/platforms/gitlab/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | const { answers } = await auth.getMetadata(); 4 | return { 5 | ...options, 6 | url: formatUrl( 7 | `https://gitlab.${answers.subdomain}.com/api/v4`, 8 | options.url, 9 | ), 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/gong/README.md: -------------------------------------------------------------------------------- 1 | # Gong 2 | 3 | ## Description 4 | 5 | Gong is a technology company that provides a conversation analytics and salesforce training platform powered by artificial intelligence. The software helps sales teams refine their strategies and techniques by analyzing their communication with customers and providing insights and coaching. 6 | -------------------------------------------------------------------------------- /src/platforms/gong/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.gong.io`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Basic ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/google-calendar/README.md: -------------------------------------------------------------------------------- 1 | # Google Calendar 2 | 3 | ## Description 4 | 5 | Google Calendar is a digital tool that facilitates time management and scheduling. It allows users to create and edit events, share calendars, set reminders, and synchronize with other devices. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.google.com/calendar/api/v3/reference) 10 | - [Website](google.com) 11 | -------------------------------------------------------------------------------- /src/platforms/google-calendar/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://www.googleapis.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/google-mail/README.md: -------------------------------------------------------------------------------- 1 | # Gmail 2 | 3 | ## Description 4 | 5 | Gmail is a free, web-based email service that provides users with gigabytes of storage for messages and the ability to search for specific messages. The service is known for its superior spam protection, integration with other Google services, and features such as smart replies and nudges. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.google.com/gmail/api/reference/rest) 10 | - [Website](gmail.com) 11 | -------------------------------------------------------------------------------- /src/platforms/google-mail/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://gmail.googleapis.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/google-sheet/README.md: -------------------------------------------------------------------------------- 1 | # GSheet 2 | 3 | ## Description 4 | 5 | Google Sheets is a cloud-based spreadsheet program that allows users to create, edit, and share spreadsheets online. It supports real-time collaboration, features charting tools, pivot tables, and a variety of data analysis functions. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.google.com/sheets/api/reference/rest) 10 | - [Website](gsheets.com) 11 | -------------------------------------------------------------------------------- /src/platforms/google-sheet/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://sheets.googleapis.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/google-sheet/index.ts: -------------------------------------------------------------------------------- 1 | import defaultIcon from '@/platforms/defaultIcon'; 2 | import { client } from '@/platforms/google-sheet/client'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('google-sheet', { 6 | auth: auth.oauth2({ 7 | authUrl: 'https://accounts.google.com/o/oauth2/v2/auth', 8 | tokenUrl: 'https://oauth2.googleapis.com/token', 9 | authParams: { 10 | access_type: 'offline', 11 | prompt: 'consent', 12 | }, 13 | }), 14 | display: { 15 | name: 'Google Sheet', 16 | logos: { 17 | defaultURI: defaultIcon, 18 | }, 19 | colors: { 20 | primary: '#28a745', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/google/README.md: -------------------------------------------------------------------------------- 1 | # Google 2 | 3 | ## Description 4 | 5 | Google is a technology company that specializes in internet-related services and products, including search engines, online advertising technologies, cloud computing, software, and hardware. It has revolutionized the digital world with its innovations and is known for its contributions to the development of the internet. 6 | 7 | ## Resources 8 | 9 | - [Website](google.com) 10 | -------------------------------------------------------------------------------- /src/platforms/google/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Google product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/google/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/google/client'; 2 | import boxIcon from '@/platforms/google/logos/box'; 3 | import fullIcon from '@/platforms/google/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('google', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://accounts.google.com/o/oauth2/v2/auth', 9 | tokenUrl: 'https://oauth2.googleapis.com/token', 10 | authParams: { 11 | access_type: 'offline', 12 | prompt: 'consent', 13 | }, 14 | }), 15 | display: { 16 | name: 'Google', 17 | logos: { 18 | defaultURI: fullIcon ?? boxIcon, 19 | fullURI: fullIcon, 20 | boxURI: boxIcon, 21 | }, 22 | colors: { 23 | primary: '#34A853', 24 | }, 25 | categories: [], 26 | }, 27 | client, 28 | constants: {}, 29 | actions: {}, 30 | }); 31 | -------------------------------------------------------------------------------- /src/platforms/greenhouse/README.md: -------------------------------------------------------------------------------- 1 | # Greenhouse 2 | 3 | ## Description 4 | 5 | Greenhouse is a technology company that provides a cloud-based recruitment and talent management software designed to help businesses find, interview, and hire suitable candidates. It offers a comprehensive suite of tools that streamline and simplify the entire hiring process, from job posting and applicant tracking to interview scheduling and performance analysis. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.greenhouse.io/) 10 | - [Website](greenhouse.io) 11 | -------------------------------------------------------------------------------- /src/platforms/greenhouse/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://harvest.greenhouse.io/v1`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/greenhouse/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/greenhouse/client'; 2 | import boxIcon from '@/platforms/greenhouse/logos/box'; 3 | import fullIcon from '@/platforms/greenhouse/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('greenhouse', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://api.greenhouse.io/oauth/authorize', 9 | tokenUrl: 'https://api.greenhouse.io/oauth/token', 10 | }), 11 | display: { 12 | name: 'Greenhouse', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#24A47F', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/gumroad/README.md: -------------------------------------------------------------------------------- 1 | # Gumroad 2 | 3 | ## Description 4 | 5 | Gumroad is an online platform designed to help creators sell their products directly to consumers. It provides tools for managing products, payments, customers, and analytics, enabling artists, writers, designers, educators, and others to monetize their expertise and creative work. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://app.gumroad.com/api) 10 | - [Website](gumroad.com) 11 | -------------------------------------------------------------------------------- /src/platforms/gumroad/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.gumroad.com/v2`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/gumroad/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/gumroad/client'; 2 | import boxIcon from '@/platforms/gumroad/logos/box'; 3 | import fullIcon from '@/platforms/gumroad/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('gumroad', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://gumroad.com/oauth/authorize', 9 | tokenUrl: 'https://api.gumroad.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'Gumroad', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#ff90e8', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/gusto/README.md: -------------------------------------------------------------------------------- 1 | # Gusto 2 | 3 | ## Description 4 | 5 | Gusto is a cloud-based platform that provides extensive tools for businesses to manage payroll, benefits, and human resources. It aims to streamline and simplify these processes, making it easier for companies to handle administrative tasks and compliance. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://docs.gusto.com/) 10 | - [Website](gusto.com) 11 | -------------------------------------------------------------------------------- /src/platforms/gusto/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | const { answers } = await auth.getMetadata(); 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.${answers.subdomain}.com/v1`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/hubspot/README.md: -------------------------------------------------------------------------------- 1 | # HubSpot 2 | 3 | ## Description 4 | 5 | HubSpot is a comprehensive platform offering a suite of software for marketing, sales, and customer service, with a focus on inbound strategies to help businesses attract, engage, and delight customers. It provides tools for social media marketing, content management, web analytics, landing pages, customer support, and SEO. 6 | 7 | ## Resources 8 | 9 | - [Website](hubspot.com) 10 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/calls/dispositions.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'calls-dispositions', 7 | { 8 | operation: 'dispositions', 9 | resource: 'calls', 10 | mutation: false, 11 | schema: z.object({}), 12 | scopes: [], 13 | }, 14 | async ({ auth }) => { 15 | const result = await client.calls.dispositions(auth, {}); 16 | return { 17 | result: { 18 | dispositions: result.data.map((disposition) => ({ 19 | id: disposition.id, 20 | label: disposition.label, 21 | })), 22 | }, 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/calls/find.ts: -------------------------------------------------------------------------------- 1 | import { transformCall } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | import { hubspotCommonAssociationsSchema } from '../../schemas'; 6 | 7 | export default action( 8 | 'find-call', 9 | { 10 | operation: 'find', 11 | resource: 'calls', 12 | mutation: false, 13 | schema: z.object({ 14 | id: z.string(), 15 | associations: z.array(hubspotCommonAssociationsSchema).optional(), 16 | }), 17 | scopes: [], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.calls.find(auth, { 21 | id: input.id, 22 | }); 23 | 24 | return { 25 | ...transformCall(result.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/deals/find.ts: -------------------------------------------------------------------------------- 1 | import { transformDeal } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | import { hubspotCommonAssociationsSchema } from '../../schemas'; 6 | 7 | export default action( 8 | 'find-deal', 9 | { 10 | operation: 'find', 11 | resource: 'deals', 12 | mutation: false, 13 | schema: z.object({ 14 | id: z.string(), 15 | associations: z.array(hubspotCommonAssociationsSchema).optional(), 16 | }), 17 | scopes: ['crm.objects.deals.read'], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.deals.find(auth, { 21 | id: input.id, 22 | }); 23 | 24 | return { 25 | ...transformDeal(result.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/emails/find.ts: -------------------------------------------------------------------------------- 1 | import { transformEmail } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | import { hubspotCommonAssociationsSchema } from '../../schemas'; 6 | 7 | export default action( 8 | 'find-email', 9 | { 10 | operation: 'find', 11 | resource: 'emails', 12 | mutation: false, 13 | schema: z.object({ 14 | id: z.string(), 15 | associations: z.array(hubspotCommonAssociationsSchema).optional(), 16 | }), 17 | scopes: ['sales-email-read'], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.emails.find(auth, { 21 | id: input.id, 22 | }); 23 | 24 | return { 25 | ...transformEmail(result.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/meetings/find.ts: -------------------------------------------------------------------------------- 1 | import { transformMeeting } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | import { hubspotCommonAssociationsSchema } from '../../schemas'; 6 | 7 | export default action( 8 | 'find-meeting', 9 | { 10 | operation: 'find', 11 | resource: 'meetings', 12 | mutation: false, 13 | schema: z.object({ 14 | id: z.string(), 15 | associations: z.array(hubspotCommonAssociationsSchema).optional(), 16 | }), 17 | scopes: [], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.meetings.find(auth, { 21 | id: input.id, 22 | }); 23 | 24 | return { 25 | ...transformMeeting(result.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/notes/create.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | import { transformNote } from '@/platforms/hubspot/actions/mappers'; 6 | 7 | export default action( 8 | 'notes-create', 9 | { 10 | operation: 'create', 11 | resource: 'notes', 12 | mutation: true, 13 | schema: z.object({ 14 | hubspotOwnerId: z.string(), 15 | hsNoteBody: z.string(), 16 | }), 17 | scopes: [], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.notes.create(auth, { 21 | hubspot_owner_id: input.hubspotOwnerId, 22 | hs_note_body: input.hsNoteBody, 23 | }); 24 | 25 | return { 26 | ...transformNote(result.data), 27 | $native: result.$native, 28 | }; 29 | }, 30 | ); 31 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/notes/find.ts: -------------------------------------------------------------------------------- 1 | import { transformNote } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | import { hubspotCommonAssociationsSchema } from '../../schemas'; 6 | 7 | export default action( 8 | 'find-note', 9 | { 10 | operation: 'find', 11 | resource: 'notes', 12 | mutation: false, 13 | schema: z.object({ 14 | id: z.string(), 15 | associations: z.array(hubspotCommonAssociationsSchema).optional(), 16 | }), 17 | scopes: [], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.notes.find(auth, { 21 | id: input.id, 22 | }); 23 | 24 | return { 25 | ...transformNote(result.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/owners/find.ts: -------------------------------------------------------------------------------- 1 | import { transformOwner } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'find-owner', 8 | { 9 | operation: 'find', 10 | resource: 'owners', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: ['crm.objects.owners.read'], 16 | }, 17 | async ({ auth, input }) => { 18 | const result = await client.owners.find(auth, { 19 | id: input.id, 20 | }); 21 | 22 | return { 23 | ...transformOwner(result.data), 24 | $native: result.$native, 25 | }; 26 | }, 27 | ); 28 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/owners/list.ts: -------------------------------------------------------------------------------- 1 | import { transformOwner } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | 6 | export default action( 7 | 'list-owners', 8 | { 9 | operation: 'list', 10 | resource: 'owners', 11 | mutation: false, 12 | schema: z.object({ 13 | after: z.string().optional(), 14 | pageSize: z.number().optional(), 15 | }), 16 | scopes: ['crm.objects.owners.read'], 17 | }, 18 | async ({ auth, input }) => { 19 | const result = await client.owners.list(auth, input); 20 | return { 21 | paging: result.data.paging, 22 | results: result.data.results?.map(transformOwner), 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/hubspot/actions/tasks/find.ts: -------------------------------------------------------------------------------- 1 | import { transformTask } from '@/platforms/hubspot/actions/mappers'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import client from '../../client'; 5 | import { hubspotCommonAssociationsSchema } from '../../schemas'; 6 | 7 | export default action( 8 | 'find-task', 9 | { 10 | operation: 'find', 11 | resource: 'tasks', 12 | mutation: false, 13 | schema: z.object({ 14 | id: z.string(), 15 | associations: z.array(hubspotCommonAssociationsSchema).optional(), 16 | }), 17 | scopes: [], 18 | }, 19 | async ({ auth, input }) => { 20 | const result = await client.tasks.find(auth, { 21 | id: input.id, 22 | }); 23 | 24 | return { 25 | ...transformTask(result.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/intercom/README.md: -------------------------------------------------------------------------------- 1 | # Intercom 2 | 3 | ## Description 4 | 5 | Intercom is a customer messaging platform that enables businesses to communicate with their customers in a personalized and efficient manner, through a suite of integrated products for every team, including sales, marketing, product, and support. It's designed to help companies build better customer relationships through conversational, messenger-based experiences. 6 | 7 | ## Resources 8 | 9 | - [Website](intercom.com) 10 | -------------------------------------------------------------------------------- /src/platforms/intercom/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | import { API_VERSION, BASE_URL } from './constants'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => ({ 5 | ...options, 6 | url: formatUrl(BASE_URL, options.url), 7 | headers: { 8 | ...options.headers, 9 | 'Intercom-Version': API_VERSION, 10 | Authorization: `Bearer ${await auth.getToken()}`, 11 | }, 12 | })); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/intercom/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://api.intercom.io'; 2 | export const API_VERSION = '2.9'; 3 | -------------------------------------------------------------------------------- /src/platforms/intercom/index.ts: -------------------------------------------------------------------------------- 1 | import { auth, platform } from '../../sdk'; 2 | 3 | import boxIcon from '@/platforms/intercom/logos/box'; 4 | import fullIcon from '@/platforms/intercom/logos/full'; 5 | import { client } from './client'; 6 | 7 | export default platform('intercom', { 8 | auth: [ 9 | auth.oauth2({ 10 | authUrl: `https://app.intercom.com/oauth`, 11 | tokenUrl: `https://api.intercom.io/auth/eagle/token`, 12 | }), 13 | ], 14 | display: { 15 | name: 'Intercom', 16 | logos: { 17 | defaultURI: fullIcon ?? boxIcon, 18 | fullURI: fullIcon, 19 | boxURI: boxIcon, 20 | }, 21 | colors: { 22 | primary: '#1f8ded', 23 | }, 24 | categories: ['ticketing'], 25 | }, 26 | client, 27 | constants: {}, 28 | actions: {}, 29 | }); 30 | -------------------------------------------------------------------------------- /src/platforms/intuit/README.md: -------------------------------------------------------------------------------- 1 | # Intuit 2 | 3 | ## Description 4 | 5 | Intuit Inc. is a technology company that develops and sells financial, accounting and tax preparation software and related services for small businesses, accountants and individuals. Some of its most popular products include TurboTax, QuickBooks, and Mint. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.intuit.com/) 10 | - [Website](intuit.com) 11 | -------------------------------------------------------------------------------- /src/platforms/intuit/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Intuit product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/intuit/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/intuit/client'; 2 | import boxIcon from '@/platforms/intuit/logos/box'; 3 | import fullIcon from '@/platforms/intuit/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('intuit', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://appcenter.intuit.com/connect/oauth2', 9 | tokenUrl: 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer', 10 | }), 11 | display: { 12 | name: 'Intuit', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#00254A', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/jira/README.md: -------------------------------------------------------------------------------- 1 | # Jira 2 | 3 | ## Description 4 | 5 | Jira is a project management software developed by Atlassian, designed to help teams plan, track, and release high-quality software. It offers functionalities such as bug tracking, issue tracking, and agile project management. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.atlassian.com/server/jira/platform/rest-apis/) 10 | - [Website](jira.com) 11 | -------------------------------------------------------------------------------- /src/platforms/jira/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://jira.atlassian.com/rest/api`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/jira/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/jira/client'; 2 | import boxIcon from '@/platforms/jira/logos/box'; 3 | import fullIcon from '@/platforms/jira/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('jira', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://auth.atlassian.com/authorize', 9 | tokenUrl: 'https://auth.atlassian.com/oauth/token', 10 | authParams: { 11 | audience: 'api.atlassian.com', 12 | prompt: 'consent', 13 | }, 14 | }), 15 | display: { 16 | name: 'Jira', 17 | logos: { 18 | defaultURI: fullIcon ?? boxIcon, 19 | fullURI: fullIcon, 20 | boxURI: boxIcon, 21 | }, 22 | colors: { 23 | primary: '#2684ff', 24 | }, 25 | categories: ['ticketing'], 26 | }, 27 | client, 28 | constants: {}, 29 | actions: {}, 30 | }); 31 | -------------------------------------------------------------------------------- /src/platforms/keap/README.md: -------------------------------------------------------------------------------- 1 | # Keap 2 | 3 | ## Description 4 | 5 | Keap provides customer relationship management (CRM) software solutions to aid small businesses in managing their sales and marketing activities. The company's platform offers a range of features including client communication automation, appointment scheduling, and sales pipeline management. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.infusionsoft.com/docs) 10 | - [Website](keap.com) 11 | -------------------------------------------------------------------------------- /src/platforms/keap/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.infusionsoft.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/keap/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/keap/client'; 2 | import boxIcon from '@/platforms/keap/logos/box'; 3 | import fullIcon from '@/platforms/keap/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('keap', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://accounts.infusionsoft.com/app/oauth/authorize', 9 | tokenUrl: 'https://api.infusionsoft.com/token', 10 | }), 11 | display: { 12 | name: 'Keap', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#36a635', 20 | }, 21 | categories: ['crm'], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/lever/README.md: -------------------------------------------------------------------------------- 1 | # Lever 2 | 3 | ## Description 4 | 5 | Lever is a technology company that provides a talent acquisition suite to streamline recruitment processes. Its platform offers features such as applicant tracking, interview scheduling, candidate relationship management, and analytics to help businesses hire more effectively. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://hire.lever.co/developer/documentation) 10 | - [Website](lever.co) 11 | -------------------------------------------------------------------------------- /src/platforms/lever/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.lever.co/v1`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/lever/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/lever/client'; 2 | import boxIcon from '@/platforms/lever/logos/box'; 3 | import fullIcon from '@/platforms/lever/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('lever', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://auth.lever.co/authorize', 9 | tokenUrl: 'https://auth.lever.co/oauth/token', 10 | authParams: { 11 | prompt: 'consent', 12 | audience: 'https://api.lever.co/v1', 13 | }, 14 | }), 15 | display: { 16 | name: 'Lever', 17 | logos: { 18 | defaultURI: fullIcon ?? boxIcon, 19 | fullURI: fullIcon, 20 | boxURI: boxIcon, 21 | }, 22 | colors: { 23 | primary: '#464646', 24 | }, 25 | categories: [], 26 | }, 27 | client, 28 | constants: {}, 29 | actions: {}, 30 | }); 31 | -------------------------------------------------------------------------------- /src/platforms/linear/README.md: -------------------------------------------------------------------------------- 1 | # Linear 2 | 3 | ## Description 4 | 5 | Linear is a software company that specializes in providing a streamlined issue tracking tool designed to increase the efficiency and productivity of software development teams. Their platform focuses on speed, simplicity, and integrates with other commonly used tools, enabling teams to manage their workflow more effectively. 6 | 7 | ## Resources 8 | 9 | - [Website](linear.app) 10 | -------------------------------------------------------------------------------- /src/platforms/linear/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.linear.app`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/linear/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/linear/client'; 2 | import boxIcon from '@/platforms/linear/logos/box'; 3 | import fullIcon from '@/platforms/linear/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('linear', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://linear.app/oauth/authorize', 9 | tokenUrl: 'https://api.linear.app/oauth/token', 10 | scopeSeparator: ',', 11 | authParams: { 12 | prompt: 'consent', 13 | }, 14 | }), 15 | display: { 16 | name: 'Linear', 17 | logos: { 18 | defaultURI: fullIcon ?? boxIcon, 19 | fullURI: fullIcon, 20 | boxURI: boxIcon, 21 | }, 22 | colors: { 23 | primary: '#D9DCF8', 24 | }, 25 | categories: ['ticketing'], 26 | }, 27 | client, 28 | constants: {}, 29 | actions: {}, 30 | }); 31 | -------------------------------------------------------------------------------- /src/platforms/linkedin/README.md: -------------------------------------------------------------------------------- 1 | # Linkedin 2 | 3 | ## Description 4 | 5 | LinkedIn is a professional networking platform that enables users to connect with other professionals, share content, and find jobs. It offers services such as personal profiles, company pages, job postings, and networking tools to facilitate career development and professional communication. 6 | 7 | ## Resources 8 | 9 | - [Website](linkedin.com) 10 | -------------------------------------------------------------------------------- /src/platforms/linkedin/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Linkedin product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/linkedin/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/linkedin/client'; 2 | import boxIcon from '@/platforms/linkedin/logos/box'; 3 | import fullIcon from '@/platforms/linkedin/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('linkedin', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://www.linkedin.com/oauth/v2/authorization', 9 | tokenUrl: 'https://www.linkedin.com/oauth/v2/accessToken', 10 | }), 11 | display: { 12 | name: 'Linkedin', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#0073b1', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/mailchimp/README.md: -------------------------------------------------------------------------------- 1 | # Mailchimp 2 | 3 | ## Description 4 | 5 | Mailchimp is a leading all-in-one marketing platform that provides tools for email marketing, ads, landing pages, and CRM to help businesses grow on their terms. It's designed to empower small businesses to market smarter so they can grow faster. 6 | 7 | ## Resources 8 | 9 | - [Website](mailchimp.com) 10 | -------------------------------------------------------------------------------- /src/platforms/mailchimp/actions/lists/find.ts: -------------------------------------------------------------------------------- 1 | import { transformList } from '@/platforms/mailchimp/actions/mappers'; 2 | import { client } from '@/platforms/mailchimp/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-list', 8 | { 9 | operation: 'find', 10 | resource: 'lists', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.lists.find(auth, input); 19 | 20 | return { 21 | ...transformList(result.data), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/mailchimp/actions/lists/list.ts: -------------------------------------------------------------------------------- 1 | import { transformList } from '@/platforms/mailchimp/actions/mappers'; 2 | import { client } from '@/platforms/mailchimp/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-lists', 8 | { 9 | operation: 'list', 10 | resource: 'lists', 11 | mutation: false, 12 | schema: z.object({ 13 | count: z.number().optional(), 14 | offset: z.number().optional(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | const result = await client.lists.list(auth, input); 20 | 21 | return { 22 | lists: result.data.lists.map(transformList), 23 | $native: result.$native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/mailchimp/actions/mappers.ts: -------------------------------------------------------------------------------- 1 | import { MailchimpList, MailchimpMember } from '@/platforms/mailchimp/schemas'; 2 | 3 | export const transformList = (list: MailchimpList) => { 4 | return { 5 | id: list.id, 6 | name: list.name, 7 | dateCreated: list.date_created, 8 | }; 9 | }; 10 | 11 | export const transformMember = (member: MailchimpMember) => { 12 | return { 13 | id: member.id, 14 | emailAddress: member.email_address, 15 | fullName: member.full_name, 16 | status: member.status, 17 | lastChanged: member.last_changed, 18 | timestampSignup: member.timestamp_signup, 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /src/platforms/mailchimp/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_DOMAIN = `api.mailchimp.com`; 2 | export const API_VERSION = '3.0'; 3 | export const DEFAULT_PAGE_SIZE = 100; 4 | -------------------------------------------------------------------------------- /src/platforms/mailchimp/schemas.ts: -------------------------------------------------------------------------------- 1 | import * as custom from '@/sdk/validators'; 2 | import { z } from 'zod'; 3 | 4 | export type WithNative = T & { $native?: Record }; 5 | 6 | export const mailchimpMember = custom.object({ 7 | id: z.string(), 8 | email_address: z.string(), 9 | full_name: z.string(), 10 | status: z.string(), 11 | last_changed: custom.date(), 12 | timestamp_signup: custom.date(), 13 | }); 14 | export type MailchimpMember = z.infer; 15 | 16 | export const mailchimpList = custom.object({ 17 | id: z.string(), 18 | name: z.string(), 19 | date_created: custom.date(), 20 | }); 21 | export type MailchimpList = z.infer; 22 | -------------------------------------------------------------------------------- /src/platforms/microsoft/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://graph.microsoft.com/v1.0'; 2 | export const DEFAULT_PAGE_SIZE = 100; 3 | -------------------------------------------------------------------------------- /src/platforms/microsoft/validators.ts: -------------------------------------------------------------------------------- 1 | import { BASE_URL } from '@/platforms/microsoft/constants'; 2 | import { z } from 'zod'; 3 | 4 | export const microsoftUrl = () => 5 | z 6 | .string() 7 | .refine( 8 | (cursor) => cursor.startsWith(BASE_URL + '/'), 9 | 'Microsoft Graph API cursors must use the Microsoft Graph API domain', 10 | ) 11 | .transform((cursor) => cursor as `${typeof BASE_URL}/${string}`); 12 | -------------------------------------------------------------------------------- /src/platforms/miro/README.md: -------------------------------------------------------------------------------- 1 | # Miro 2 | 3 | ## Description 4 | 5 | Miro is a digital platform that provides an interactive online whiteboard for collaboration and brainstorming. It offers tools for team ideation, visual project management, agile workflows, and design thinking. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.miro.com/docs) 10 | - [Website](miro.com) 11 | -------------------------------------------------------------------------------- /src/platforms/miro/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://miro.com/api/v1`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/miro/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/miro/client'; 2 | import boxIcon from '@/platforms/miro/logos/box'; 3 | import fullIcon from '@/platforms/miro/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('miro', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://miro.com/oauth/authorize', 9 | tokenUrl: 'https://api.miro.com/v1/oauth/token', 10 | }), 11 | display: { 12 | name: 'Miro', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#FFD02F', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/mixpanel/README.md: -------------------------------------------------------------------------------- 1 | # Mixpanel 2 | 3 | ## Description 4 | 5 | Mixpanel is a business analytics service company that provides user behavior analytics for websites and mobile applications. It offers tools for tracking user interactions with web and mobile applications and provides insights based on the results. 6 | -------------------------------------------------------------------------------- /src/platforms/mixpanel/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://mixpanel.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Basic ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/mixpanel/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/mixpanel/client'; 2 | import boxIcon from '@/platforms/mixpanel/icons/box'; 3 | import fullIcon from '@/platforms/mixpanel/icons/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('mixpanel', { 7 | auth: auth.basic(), 8 | display: { 9 | name: 'Mixpanel', 10 | logos: { 11 | defaultURI: fullIcon ?? boxIcon, 12 | fullURI: fullIcon, 13 | boxURI: boxIcon, 14 | }, 15 | colors: { 16 | primary: '#1F1F24', 17 | }, 18 | categories: [], 19 | }, 20 | client, 21 | constants: {}, 22 | actions: {}, 23 | }); 24 | -------------------------------------------------------------------------------- /src/platforms/monday/README.md: -------------------------------------------------------------------------------- 1 | # monday.com 2 | 3 | ## Description 4 | 5 | Monday.com is a versatile project management tool that enables teams to plan, track, and collaborate on projects in a single, visual, and intuitive workspace. It's designed to simplify complex workflows and improve productivity across various team sizes and industries. 6 | 7 | ## Resources 8 | 9 | - [Website](monday.com) 10 | -------------------------------------------------------------------------------- /src/platforms/monday/actions/graphql/query.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'graphql-query', 7 | { 8 | operation: 'query', 9 | resource: 'graphql', 10 | mutation: true, 11 | schema: z.object({ 12 | query: z.string(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ auth, input }) => { 17 | const { data, $native } = await client.query(auth, { 18 | query: input.query, 19 | }); 20 | return { 21 | data: data.data ?? null, 22 | errors: data.errors ?? null, 23 | $native, 24 | }; 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/monday/actions/groups/create.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'groups-create', 7 | { 8 | operation: 'create', 9 | resource: 'groups', 10 | mutation: true, 11 | schema: z.object({ 12 | boardId: z.number(), 13 | groupName: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ auth, input }) => { 18 | const { data, $native } = await client.groups.create(auth, { 19 | board_id: input.boardId, 20 | group_name: input.groupName, 21 | }); 22 | return { 23 | id: data.data?.create_group.id ?? null, 24 | errors: data.errors ?? null, 25 | $native, 26 | }; 27 | }, 28 | ); 29 | -------------------------------------------------------------------------------- /src/platforms/monday/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v2'; 2 | export const BASE_URL = `https://api.monday.com`; 3 | export const MONDAY_MODULES = ['boards', 'items', 'groups', 'users'] as const; 4 | export const MONDAY_MAX_PAGE_SIZE = 100; 5 | -------------------------------------------------------------------------------- /src/platforms/mural/README.md: -------------------------------------------------------------------------------- 1 | # Mural 2 | 3 | ## Description 4 | 5 | Mural is a digital workspace designed to enhance visual collaboration among teams. The platform offers tools for brainstorming, planning, designing and managing projects, facilitating remote and distributed team engagement. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.mural.co/public/docs) 10 | - [Website](mural.co) 11 | -------------------------------------------------------------------------------- /src/platforms/mural/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://app.mural.co/api/public/v1`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/mural/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/mural/client'; 2 | import boxIcon from '@/platforms/mural/logos/box'; 3 | import fullIcon from '@/platforms/mural/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('mural', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://app.mural.co/api/public/v1/authorization/oauth2', 9 | tokenUrl: 'https://app.mural.co/api/public/v1/authorization/oauth2/token', 10 | }), 11 | display: { 12 | name: 'Mural', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#5887FF', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/netsuite/README.md: -------------------------------------------------------------------------------- 1 | # Netsuite 2 | 3 | ## Description 4 | 5 | NetSuite is a cloud-based software company that provides comprehensive business management solutions, including Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), and E-commerce applications. Its services are primarily used by businesses to streamline operations and customer services. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://docs.oracle.com/) 10 | - [Website](netsuite.com) 11 | -------------------------------------------------------------------------------- /src/platforms/netsuite/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | // Since this integration works for any Netsuite product, 7 | // the entire url must be specific by the user 8 | url: options.url as `${HttpsUrl}/${string}`, 9 | headers: { 10 | ...options.headers, 11 | Authorization: `Bearer ${await auth.getToken()}`, 12 | }, 13 | }; 14 | }); 15 | 16 | export const client = { 17 | passthrough: request.passthrough(), 18 | }; 19 | -------------------------------------------------------------------------------- /src/platforms/notion/README.md: -------------------------------------------------------------------------------- 1 | # Notion 2 | 3 | ## Description 4 | 5 | Notion is a software platform that provides users with an all-in-one workspace where they can write, plan, collaborate and organize tasks effectively. It integrates everyday work tools such as databases, wikis, calendars and reminders into one seamless application. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.notion.com/reference) 10 | - [Website](notion.so) 11 | -------------------------------------------------------------------------------- /src/platforms/notion/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.notion.com`, options.url), 6 | headers: { 7 | ...options.headers, 8 | 'Notion-Version': '2022-06-28', 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/one-drive/README.md: -------------------------------------------------------------------------------- 1 | # OneDrive 2 | 3 | ## Description 4 | 5 | OneDrive is a cloud storage service that enables users to store files online and access them from any device with an internet connection. The platform also offers file sharing capabilities and the ability to collaborate on documents in real time. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.microsoft.com/) 10 | - [Website](onedrive.com) 11 | -------------------------------------------------------------------------------- /src/platforms/one-drive/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | // Since this integration works for any OneDrive product, 7 | // the entire url must be specific by the user 8 | url: options.url as `${HttpsUrl}/${string}`, 9 | headers: { 10 | ...options.headers, 11 | Authorization: `Bearer ${await auth.getToken()}`, 12 | }, 13 | }; 14 | }); 15 | 16 | export const client = { 17 | passthrough: request.passthrough(), 18 | }; 19 | -------------------------------------------------------------------------------- /src/platforms/one-drive/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/one-drive/client'; 2 | import boxIcon from '@/platforms/one-drive/logos/box'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('one-drive', { 6 | auth: auth.oauth2({ 7 | authUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 8 | tokenUrl: 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 9 | requiredScopes: ['offline_access'], 10 | }), 11 | display: { 12 | name: 'OneDrive', 13 | logos: { 14 | defaultURI: boxIcon, 15 | boxURI: boxIcon, 16 | }, 17 | colors: { 18 | primary: '#0364b8', 19 | }, 20 | categories: [], 21 | }, 22 | client, 23 | constants: {}, 24 | actions: {}, 25 | }); 26 | -------------------------------------------------------------------------------- /src/platforms/outreach/README.md: -------------------------------------------------------------------------------- 1 | # Outreach 2 | 3 | ## Description 4 | 5 | Outreach is a comprehensive sales engagement platform designed to help sales teams automate and optimize their outreach efforts. It offers a suite of tools for email sequencing, call tracking, task management, and analytics to enhance sales productivity and improve customer engagement 6 | 7 | ## Resources 8 | 9 | - [Website](outreach.io) 10 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/accounts/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-account', 7 | { 8 | operation: 'find', 9 | resource: 'accounts', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.number(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.accounts.find(auth, { id: input.id }); 18 | }, 19 | ); 20 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/accounts/list.ts: -------------------------------------------------------------------------------- 1 | import { outreachUrl } from '@/platforms/outreach/actions/validators'; 2 | import { client } from '@/platforms/outreach/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-accounts', 8 | { 9 | operation: 'list', 10 | resource: 'accounts', 11 | mutation: false, 12 | schema: z.object({ 13 | filters: z 14 | .object({ 15 | name: z.string().optional(), 16 | domain: z.string().optional(), 17 | }) 18 | .optional(), 19 | cursor: outreachUrl().optional(), 20 | }), 21 | scopes: [], 22 | }, 23 | async ({ input, auth }) => { 24 | return await client.accounts.list(auth, { 25 | cursor: input.cursor, 26 | filters: input.filters, 27 | }); 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/mailboxes/list.ts: -------------------------------------------------------------------------------- 1 | import { outreachUrl } from '@/platforms/outreach/actions/validators'; 2 | import { client } from '@/platforms/outreach/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-mailboxes', 8 | { 9 | operation: 'list', 10 | resource: 'mailboxes', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: outreachUrl().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | return await client.mailboxes.list(auth, { 19 | cursor: input.cursor, 20 | }); 21 | }, 22 | ); 23 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/mailings/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-mailing', 7 | { 8 | operation: 'find', 9 | resource: 'mailings', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.number(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.mailings.find(auth, { id: input.id }); 18 | }, 19 | ); 20 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/mailings/list.ts: -------------------------------------------------------------------------------- 1 | import { outreachUrl } from '@/platforms/outreach/actions/validators'; 2 | import { client } from '@/platforms/outreach/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-mailings', 8 | { 9 | operation: 'list', 10 | resource: 'mailings', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: outreachUrl().optional(), 14 | filters: z 15 | .object({ 16 | prospectId: z.number().optional(), 17 | sequenceId: z.number().optional(), 18 | }) 19 | .optional(), 20 | }), 21 | scopes: [], 22 | }, 23 | async ({ input, auth }) => { 24 | return await client.mailings.list(auth, input); 25 | }, 26 | ); 27 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/prospects/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-prospect', 7 | { 8 | operation: 'find', 9 | resource: 'prospects', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.number(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.prospects.find(auth, { id: input.id }); 18 | }, 19 | ); 20 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/sequences/create.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'create-sequence', 7 | { 8 | operation: 'create', 9 | resource: 'sequences', 10 | mutation: true, 11 | schema: z.object({ 12 | attributes: z.object({ 13 | name: z.string(), 14 | sequenceType: z.enum(['date', 'interval']), 15 | shareType: z.enum(['private', 'read_only', 'shared']), 16 | }), 17 | }), 18 | scopes: [], 19 | }, 20 | async ({ input, auth }) => { 21 | return await client.sequences.create(auth, input); 22 | }, 23 | ); 24 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/sequences/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-sequence', 7 | { 8 | operation: 'find', 9 | resource: 'sequences', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.number(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.sequences.find(auth, { id: input.id }); 18 | }, 19 | ); 20 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/sequences/list.ts: -------------------------------------------------------------------------------- 1 | import { outreachUrl } from '@/platforms/outreach/actions/validators'; 2 | import { client } from '@/platforms/outreach/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-sequences', 8 | { 9 | operation: 'list', 10 | resource: 'sequences', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: outreachUrl().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | return await client.sequences.list(auth, { 19 | cursor: input.cursor, 20 | }); 21 | }, 22 | ); 23 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/templates/create.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'create-template', 7 | { 8 | operation: 'create', 9 | resource: 'templates', 10 | mutation: true, 11 | schema: z.object({ 12 | attributes: z.object({ 13 | bodyHtml: z.string(), 14 | name: z.string(), 15 | subject: z.string().nullish(), 16 | trackOpens: z.boolean().optional(), 17 | }), 18 | }), 19 | scopes: [], 20 | }, 21 | async ({ input, auth }) => { 22 | return await client.templates.create(auth, input); 23 | }, 24 | ); 25 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/users/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/outreach/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'find-user', 7 | { 8 | operation: 'find', 9 | resource: 'users', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.number(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | return await client.users.find(auth, { id: input.id }); 18 | }, 19 | ); 20 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/users/list.ts: -------------------------------------------------------------------------------- 1 | import { outreachUrl } from '@/platforms/outreach/actions/validators'; 2 | import { client } from '@/platforms/outreach/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-users', 8 | { 9 | operation: 'list', 10 | resource: 'users', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: outreachUrl().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | return await client.users.list(auth, { cursor: input.cursor }); 19 | }, 20 | ); 21 | -------------------------------------------------------------------------------- /src/platforms/outreach/actions/validators.ts: -------------------------------------------------------------------------------- 1 | import { BASE_URL } from '@/platforms/outreach/constants'; 2 | import { z } from 'zod'; 3 | 4 | export const outreachUrl = () => 5 | z 6 | .string() 7 | .refine( 8 | (cursor) => cursor.startsWith(BASE_URL + '/'), 9 | 'Outreach cursors must use the Outreach domain', 10 | ) 11 | .transform((cursor) => cursor as `${typeof BASE_URL}/${string}`); 12 | -------------------------------------------------------------------------------- /src/platforms/outreach/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://api.outreach.io/api/v2'; 2 | export const DEFAULT_PAGE_SIZE = 100; 3 | -------------------------------------------------------------------------------- /src/platforms/outreach/tests/action.test.ts: -------------------------------------------------------------------------------- 1 | import { OAuth2AuthConfig } from '@/sdk'; 2 | import { describe, it } from '@jest/globals'; 3 | import outreach from '..'; 4 | 5 | describe('outreach platform oauth', () => { 6 | describe('url function', () => { 7 | it('should return scopes space separated and encoded', () => { 8 | const auth = outreach.auth.find( 9 | (x) => x.type === 'oauth2', 10 | ) as OAuth2AuthConfig; 11 | const url = auth.url({ 12 | answers: {}, 13 | scopes: ['alpha', 'omega'], 14 | clientId: 'clientid', 15 | redirectUrl: 'https://localhost:20000', 16 | state: 'state', 17 | appMetadata: {}, 18 | }); 19 | expect(url).toMatch(/scope=alpha%20omega/g); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /src/platforms/pagerduty/README.md: -------------------------------------------------------------------------------- 1 | # Pagerduty 2 | 3 | ## Description 4 | 5 | PagerDuty is a digital operations management platform that empowers businesses to take real-time action on critical opportunities and incidents. It integrates machine data and human intelligence to improve visibility and agility across organizations, thereby increasing efficiency and reducing costs. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.pagerduty.com/api-reference) 10 | - [Website](pagerduty.com) 11 | -------------------------------------------------------------------------------- /src/platforms/pagerduty/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Pagerduty product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/pagerduty/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/pagerduty/client'; 2 | import fullIcon from '@/platforms/pagerduty/logos/full'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('pagerduty', { 6 | auth: auth.oauth2({ 7 | authUrl: 'https://app.pagerduty.com/oauth/authorize', 8 | tokenUrl: 'https://app.pagerduty.com/oauth/token', 9 | }), 10 | display: { 11 | name: 'Pagerduty', 12 | logos: { 13 | defaultURI: fullIcon, 14 | fullURI: fullIcon, 15 | }, 16 | colors: { 17 | primary: '#038a24', 18 | }, 19 | categories: [], 20 | }, 21 | client, 22 | constants: {}, 23 | actions: {}, 24 | }); 25 | -------------------------------------------------------------------------------- /src/platforms/pandadoc/README.md: -------------------------------------------------------------------------------- 1 | # Pandadoc 2 | 3 | ## Description 4 | 5 | PandaDoc is a software company that specializes in automating the process of creating, approving, and eSigning proposals, quotes, and contracts. The platform also provides capabilities to track document analytics, collaboration tools, and CRM integrations. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.pandadoc.com/) 10 | - [Website](pandadoc.com) 11 | -------------------------------------------------------------------------------- /src/platforms/pandadoc/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.pandadoc.com/public/v1`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/pandadoc/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/pandadoc/client'; 2 | import boxIcon from '@/platforms/pandadoc/logos/box'; 3 | import fullIcon from '@/platforms/pandadoc/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('pandadoc', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://app.pandadoc.com/oauth2/authorize', 9 | tokenUrl: 'https://api.pandadoc.com/oauth2/access_token', 10 | }), 11 | display: { 12 | name: 'Pandadoc', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#47b972', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/payfit/README.md: -------------------------------------------------------------------------------- 1 | # Payfit 2 | 3 | ## Description 4 | 5 | Payfit is a cloud-based payroll management and HR software provider that simplifies and automates payroll and HR processes for small and medium-sized businesses. The company offers a range of services including payroll management, leave and absence tracking, expense management, and employee onboarding. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.payfit.io/) 10 | - [Website](payfit.com) 11 | -------------------------------------------------------------------------------- /src/platforms/payfit/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://partner-api.payfit.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/payfit/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/payfit/client'; 2 | import boxIcon from '@/platforms/payfit/logos/box'; 3 | import fullIcon from '@/platforms/payfit/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('payfit', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://oauth.payfit.com/authorize', 9 | tokenUrl: 'https://app.pagerduty.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'Payfit', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#01C195', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/pipedrive/README.md: -------------------------------------------------------------------------------- 1 | # Pipedrive 2 | 3 | ## Description 4 | 5 | Pipedrive is a powerful sales-focused customer relationship management (CRM) tool that helps businesses manage leads, track communications, and automate sales processes. It's designed to give teams clear visibility into their sales pipeline and increase deal closure rates. 6 | 7 | ## Resources 8 | 9 | - [Website](pipedrive.com) 10 | -------------------------------------------------------------------------------- /src/platforms/pipedrive/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v1'; 2 | export const BASE_URL = `https://api.pipedrive.com`; 3 | export const PIPEDRIVE_MAX_PAGE_SIZE = 100; 4 | export const PIPEDRIVE_MODULES = [ 5 | 'persons', 6 | 'users', 7 | 'deals', 8 | 'organizations', 9 | 'activities', 10 | 'leads', 11 | 'notes', 12 | 'mail_messages', 13 | ] as const; 14 | export const PHONE_TYPES = ['mobile', 'work', 'other', 'home'] as const; 15 | export const EMAIL_TYPES = ['work'] as const; 16 | -------------------------------------------------------------------------------- /src/platforms/qualtrics/README.md: -------------------------------------------------------------------------------- 1 | # Qualtrics 2 | 3 | ## Description 4 | 5 | Qualtrics is a software company that provides a platform for experience management, helping businesses collect and analyze data for market research, customer satisfaction and loyalty, product and concept testing, employee evaluations, and website feedback. Its services enable companies to make data-driven decisions by identifying trends and discovering areas for improvement. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://api.qualtrics.com) 10 | - [Website](qualtrics.com) 11 | -------------------------------------------------------------------------------- /src/platforms/qualtrics/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | const { answers } = await auth.getMetadata(); 5 | return { 6 | ...options, 7 | url: formatUrl(`https://${answers.dc}.qualtrics.com/API/v3`, options.url), 8 | headers: { 9 | ...options.headers, 10 | Authorization: `Bearer ${await auth.getToken()}`, 11 | }, 12 | }; 13 | }); 14 | 15 | export const client = { 16 | passthrough: request.passthrough(), 17 | }; 18 | -------------------------------------------------------------------------------- /src/platforms/ramp/README.md: -------------------------------------------------------------------------------- 1 | # Ramp 2 | 3 | ## Description 4 | 5 | Ramp is a technology company that provides a corporate card designed to help businesses save money. It offers features such as automated expense management and real-time reporting to provide insights on company spend and opportunities for savings. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://docs.ramp.com) 10 | - [Website](ramp.com) 11 | -------------------------------------------------------------------------------- /src/platforms/ramp/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.ramp.com/developer`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/ramp/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/ramp/client'; 2 | import boxIcon from '@/platforms/ramp/logos/box'; 3 | import fullIcon from '@/platforms/ramp/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('ramp', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://app.ramp.com/v1/authorize', 9 | tokenUrl: 'https://api.ramp.com/developer/v1/token', 10 | tokenAuth: 'header', 11 | }), 12 | display: { 13 | name: 'Ramp', 14 | logos: { 15 | defaultURI: fullIcon ?? boxIcon, 16 | fullURI: fullIcon, 17 | boxURI: boxIcon, 18 | }, 19 | colors: { 20 | primary: '#787868', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/README.md: -------------------------------------------------------------------------------- 1 | # Ringcentral 2 | 3 | ## Description 4 | 5 | RingCentral is a leading provider of global enterprise cloud communications and collaboration solutions, offering a comprehensive suite of services including voice, video conferencing, team messaging, and contact center solutions. It empowers modern workplaces with seamless, reliable, and secure communication tools for effective business connectivity and collaboration. 6 | 7 | ## Resources 8 | 9 | - [Website](ringcentral.com) 10 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/call-logs/find.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'find-call-log', 7 | { 8 | operation: 'find', 9 | resource: 'call-logs', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.string(), 13 | }), 14 | scopes: ['ReadCallLog'], 15 | }, 16 | ({ auth, input }) => client.callLogs.find(auth, input), 17 | ); 18 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/call-logs/list.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'list-call-logs', 7 | { 8 | operation: 'list', 9 | resource: 'call-logs', 10 | mutation: false, 11 | schema: z.object({ 12 | page: z.number().optional(), 13 | perPage: z.number().optional(), 14 | }), 15 | scopes: ['ReadCallLog'], 16 | }, 17 | ({ auth, input }) => client.callLogs.list(auth, input), 18 | ); 19 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/contacts/create.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import client from '../../client'; 3 | import { ringcentralContactCreateSchema } from '../../schemas'; 4 | 5 | export default action( 6 | 'create-contact', 7 | { 8 | operation: 'create', 9 | resource: 'contacts', 10 | mutation: true, 11 | schema: ringcentralContactCreateSchema, 12 | scopes: ['Contacts'], 13 | }, 14 | ({ auth, input }) => client.contacts.create(auth, input), 15 | ); 16 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/contacts/find.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'find-contact', 7 | { 8 | operation: 'find', 9 | resource: 'contacts', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.string(), 13 | }), 14 | scopes: ['ReadContacts'], 15 | }, 16 | ({ auth, input }) => client.contacts.find(auth, input), 17 | ); 18 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/contacts/list.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'list-contacts', 7 | { 8 | operation: 'list', 9 | resource: 'contacts', 10 | mutation: false, 11 | schema: z.object({ 12 | page: z.number().optional(), 13 | perPage: z.number().optional(), 14 | }), 15 | scopes: ['ReadContacts'], 16 | }, 17 | ({ auth, input }) => client.contacts.list(auth, input), 18 | ); 19 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/contacts/update.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import client from '../../client'; 3 | import { ringcentralContactUpdateSchema } from '../../schemas'; 4 | 5 | export default action( 6 | 'update-contact', 7 | { 8 | operation: 'update', 9 | resource: 'contacts', 10 | mutation: true, 11 | schema: ringcentralContactUpdateSchema, 12 | scopes: ['Contacts'], 13 | }, 14 | ({ auth, input }) => client.contacts.update(auth, input), 15 | ); 16 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/extensions/find.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'find-extension', 7 | { 8 | operation: 'find', 9 | resource: 'extensions', 10 | mutation: false, 11 | schema: z.object({ 12 | id: z.string(), 13 | }), 14 | scopes: ['ReadAccounts'], 15 | }, 16 | ({ auth, input }) => client.extensions.find(auth, input), 17 | ); 18 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/extensions/list.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import { z } from 'zod'; 3 | import client from '../../client'; 4 | 5 | export default action( 6 | 'list-extensions', 7 | { 8 | operation: 'list', 9 | resource: 'extensions', 10 | mutation: false, 11 | schema: z.object({ 12 | page: z.number().optional(), 13 | perPage: z.number().optional(), 14 | }), 15 | scopes: ['ReadAccounts'], 16 | }, 17 | ({ auth, input }) => client.extensions.list(auth, input), 18 | ); 19 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/actions/extensions/ring-out.ts: -------------------------------------------------------------------------------- 1 | import { action } from '@/sdk'; 2 | import client from '../../client'; 3 | import { ringcentralRingOutStartSchema } from '../../schemas'; 4 | 5 | export default action( 6 | 'extension-ring-out', 7 | { 8 | operation: 'ring-out', 9 | resource: 'extensions', 10 | mutation: true, 11 | schema: ringcentralRingOutStartSchema, 12 | scopes: ['RingOut'], 13 | }, 14 | ({ auth, input }) => client.extensions.ringOut(auth, input), 15 | ); 16 | -------------------------------------------------------------------------------- /src/platforms/ringcentral/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v1.0'; 2 | -------------------------------------------------------------------------------- /src/platforms/sage/README.md: -------------------------------------------------------------------------------- 1 | # Sage 2 | 3 | ## Description 4 | 5 | Sage is a technology company that specializes in creating business management software and services for businesses of all sizes. Their product portfolio includes solutions for accounting, payroll, customer relationship management (CRM), and human resource management. 6 | 7 | ## Resources 8 | 9 | - [Website](sage.com) 10 | -------------------------------------------------------------------------------- /src/platforms/sage/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.accounting.sage.com/v3.1`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/sage/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/sage/client'; 2 | import boxIcon from '@/platforms/sage/logos/box'; 3 | import fullIcon from '@/platforms/sage/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('sage', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://www.sageone.com/oauth2/auth/central', 9 | tokenUrl: 'https://oauth.accounting.sage.com/token', 10 | authParams: { 11 | filter: 'apiv3.1', 12 | }, 13 | }), 14 | display: { 15 | name: 'Sage', 16 | logos: { 17 | defaultURI: fullIcon ?? boxIcon, 18 | fullURI: fullIcon, 19 | boxURI: boxIcon, 20 | }, 21 | colors: { 22 | primary: '#00D639', 23 | }, 24 | categories: [], 25 | }, 26 | client, 27 | constants: {}, 28 | actions: {}, 29 | }); 30 | -------------------------------------------------------------------------------- /src/platforms/salesforce/README.md: -------------------------------------------------------------------------------- 1 | # Salesforce 2 | 3 | ## Description 4 | 5 | Salesforce is a comprehensive customer relationship management (CRM) platform that provides a suite of services including sales, marketing, and customer service tools to help businesses grow and manage their customer relationships more effectively. It's renowned for its cloud-based, user-friendly interface and extensive customization options. 6 | 7 | ## Resources 8 | 9 | - [Website](salesforce.com) 10 | -------------------------------------------------------------------------------- /src/platforms/salesforce/actions/list-view-results/find.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/salesforce/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import { salesforceSupportedObjectType } from '../../schemas'; 5 | 6 | export default action( 7 | 'find-list-view-results', 8 | { 9 | operation: 'find', 10 | resource: 'list-view-results', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | objectType: salesforceSupportedObjectType, 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | return await client.listViewResults.find(auth, { 20 | Id: input.id, 21 | objectType: input.objectType, 22 | }); 23 | }, 24 | ); 25 | -------------------------------------------------------------------------------- /src/platforms/salesforce/actions/list-views/find.ts: -------------------------------------------------------------------------------- 1 | import { transformListView } from '@/platforms/salesforce/actions/mappers'; 2 | import { client } from '@/platforms/salesforce/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-list-view', 8 | { 9 | operation: 'find', 10 | resource: 'list-views', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.listViews.find(auth, { 19 | Id: input.id, 20 | }); 21 | 22 | return { 23 | ...transformListView(result.data), 24 | $native: result.$native, 25 | }; 26 | }, 27 | ); 28 | -------------------------------------------------------------------------------- /src/platforms/salesforce/actions/pagination.ts: -------------------------------------------------------------------------------- 1 | import { last } from 'radash'; 2 | 3 | export const getNextCursor = ({ 4 | records, 5 | limit, 6 | }: { 7 | records: { Id: string }[]; 8 | limit: number; 9 | }) => { 10 | if (records.length < limit) { 11 | return null; 12 | } 13 | return last(records)?.Id; 14 | }; 15 | -------------------------------------------------------------------------------- /src/platforms/salesforce/actions/soql/query.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/salesforce/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | import { transformRecord } from '../mappers'; 5 | 6 | export default action( 7 | 'soql-query', 8 | { 9 | operation: 'query', 10 | resource: 'soql', 11 | mutation: true, 12 | schema: z.object({ 13 | query: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const { 19 | data: { records, totalSize }, 20 | $native, 21 | } = await client.query(auth, { 22 | query: input.query, 23 | }); 24 | return { 25 | records: records.map(transformRecord), 26 | totalSize, 27 | $native, 28 | }; 29 | }, 30 | ); 31 | -------------------------------------------------------------------------------- /src/platforms/salesforce/actions/users/find.ts: -------------------------------------------------------------------------------- 1 | import { transformUser } from '@/platforms/salesforce/actions/mappers'; 2 | import { client } from '@/platforms/salesforce/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-user', 8 | { 9 | operation: 'find', 10 | resource: 'users', 11 | mutation: false, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.users.find(auth, { Id: input.id }); 19 | 20 | return { 21 | ...transformUser(result.data), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/salesloft/README.md: -------------------------------------------------------------------------------- 1 | # Salesloft 2 | 3 | ## Description 4 | 5 | Salesloft is a leading sales engagement platform that equips sales teams with the tools and insights they need to enhance their customer interactions and drive more effective and efficient sales processes. It provides a suite of features including email tracking, call recording, and analytics to help businesses improve their sales performance. 6 | 7 | ## Resources 8 | 9 | - [Website](salesloft.com) 10 | -------------------------------------------------------------------------------- /src/platforms/salesloft/actions/custom-fields/create.ts: -------------------------------------------------------------------------------- 1 | import { transformCustomField } from '@/platforms/salesloft/actions/mappers'; 2 | import { client } from '@/platforms/salesloft/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'create-custom-field', 8 | { 9 | operation: 'create', 10 | resource: 'custom-fields', 11 | mutation: true, 12 | schema: z.object({ 13 | name: z.string(), 14 | fieldType: z.string(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | const result = await client.customFields.create(auth, { 20 | name: input.name, 21 | field_type: input.fieldType, 22 | }); 23 | 24 | return { 25 | data: transformCustomField(result.data.data), 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/salesloft/actions/email-bodies/find.ts: -------------------------------------------------------------------------------- 1 | import { transformEmailBody } from '@/platforms/salesloft/actions/mappers'; 2 | import { client } from '@/platforms/salesloft/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-email-body', 8 | { 9 | operation: 'find', 10 | resource: 'email-bodies', 11 | mutation: true, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.emailBodies.find(auth, input); 19 | 20 | return { 21 | data: transformEmailBody(result.data.data), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/salesloft/actions/emails/find.ts: -------------------------------------------------------------------------------- 1 | import { transformEmail } from '@/platforms/salesloft/actions/mappers'; 2 | import { client } from '@/platforms/salesloft/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-email', 8 | { 9 | operation: 'find', 10 | resource: 'emails', 11 | mutation: true, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.emails.find(auth, input); 19 | 20 | return { 21 | data: transformEmail(result.data.data), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/salesloft/actions/people/find.ts: -------------------------------------------------------------------------------- 1 | import { transformPerson } from '@/platforms/salesloft/actions/mappers'; 2 | import { client } from '@/platforms/salesloft/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-people', 8 | { 9 | operation: 'find', 10 | resource: 'people', 11 | mutation: true, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.people.find(auth, input); 19 | 20 | return { 21 | data: transformPerson(result.data.data), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/salesloft/actions/users/find.ts: -------------------------------------------------------------------------------- 1 | import { transformUser } from '@/platforms/salesloft/actions/mappers'; 2 | import { client } from '@/platforms/salesloft/client'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'find-user', 8 | { 9 | operation: 'find', 10 | resource: 'users', 11 | mutation: true, 12 | schema: z.object({ 13 | id: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | const result = await client.users.find(auth, input); 19 | 20 | return { 21 | data: transformUser(result.data.data), 22 | $native: result.$native, 23 | }; 24 | }, 25 | ); 26 | -------------------------------------------------------------------------------- /src/platforms/salesloft/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://api.salesloft.com/v2'; 2 | export const DEFAULT_PAGE_SIZE = 100; 3 | -------------------------------------------------------------------------------- /src/platforms/shopify/README.md: -------------------------------------------------------------------------------- 1 | # Shopify 2 | 3 | ## Description 4 | 5 | Shopify is a leading e-commerce platform that allows businesses to create online stores and sell products in a user-friendly environment. It provides a range of customizable templates to design your store, along with features for inventory management, payment processing, and customer service. 6 | 7 | ## Resources 8 | 9 | - [Website](shopify.com) 10 | -------------------------------------------------------------------------------- /src/platforms/shopify/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | import * as constants from './constants'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | const { answers } = await auth.getMetadata(); 6 | return { 7 | ...options, 8 | url: formatUrl( 9 | `https://${answers.shop}.myshopify.com/admin/api/${constants.API_VERSION}`, 10 | options.url, 11 | ), 12 | headers: { 13 | ...options.headers, 14 | Authorization: `Bearer ${await auth.getToken()}`, 15 | }, 16 | }; 17 | }); 18 | 19 | export const client = { 20 | passthrough: request.passthrough(), 21 | }; 22 | -------------------------------------------------------------------------------- /src/platforms/shopify/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = '2021-07'; 2 | -------------------------------------------------------------------------------- /src/platforms/shortcut/README.md: -------------------------------------------------------------------------------- 1 | # Shortcut 2 | 3 | ## Description 4 | 5 | Shortcut, formerly known as Clubhouse, is a dynamic productivity company that empowers individuals and teams to streamline their workflows and achieve optimal efficiency. With its innovative tools and intuitive interface, Shortcut revolutionizes the way people collaborate, enabling them to effortlessly navigate complex projects and accomplish their goals with ease. 6 | 7 | ## Resources 8 | 9 | - [Website](shortcut.com) 10 | -------------------------------------------------------------------------------- /src/platforms/shortcut/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.app.shortcut.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | 'Shortcut-Token': `${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/shortcut/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/shortcut/client'; 2 | import boxIcon from '@/platforms/shortcut/logos/box'; 3 | import fullIcon from '@/platforms/shortcut/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('shortcut', { 7 | auth: auth.apiToken(), 8 | display: { 9 | name: 'Shortcut', 10 | logos: { 11 | defaultURI: fullIcon ?? boxIcon, 12 | fullURI: fullIcon, 13 | boxURI: boxIcon, 14 | }, 15 | colors: { 16 | primary: '#452B5B', 17 | }, 18 | categories: [], 19 | }, 20 | client, 21 | constants: {}, 22 | actions: {}, 23 | }); 24 | -------------------------------------------------------------------------------- /src/platforms/slack/README.md: -------------------------------------------------------------------------------- 1 | # Slack 2 | 3 | ## Description 4 | 5 | Slack is a digital hub that connects teams with the apps, services, and resources they need to get work done. It's a platform for team communication and collaboration, offering real-time messaging, file sharing, and integrations with other popular business tools. 6 | 7 | ## Resources 8 | 9 | - [Website](slack.com) 10 | -------------------------------------------------------------------------------- /src/platforms/slack/actions/conversations/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/slack/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-conversations', 7 | { 8 | operation: 'list', 9 | resource: 'conversations', 10 | mutation: true, 11 | schema: z.object({ 12 | cursor: z.string().optional(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | const result = await client.conversations.list(auth, { 18 | cursor: input.cursor, 19 | }); 20 | 21 | return { 22 | channels: result.data.channels, 23 | responseMetadata: { 24 | nextCursor: result.data.response_metadata.next_cursor, 25 | }, 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/slack/actions/messages/create.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/slack/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'create-message', 7 | { 8 | operation: 'create', 9 | resource: 'messages', 10 | mutation: true, 11 | schema: z.object({ 12 | text: z.string(), 13 | channel: z.string(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | return await client.messages.create(auth, input); 19 | }, 20 | ); 21 | -------------------------------------------------------------------------------- /src/platforms/slack/actions/messages/update.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/slack/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'update-message', 7 | { 8 | operation: 'update', 9 | resource: 'messages', 10 | mutation: false, 11 | schema: z.object({ 12 | ts: z.string(), 13 | text: z.string(), 14 | channel: z.string(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | return await client.messages.update(auth, input); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/slack/actions/users/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/slack/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'list-users', 7 | { 8 | operation: 'list', 9 | resource: 'users', 10 | mutation: true, 11 | schema: z.object({ 12 | cursor: z.string().optional(), 13 | }), 14 | scopes: [], 15 | }, 16 | async ({ input, auth }) => { 17 | const result = await client.users.list(auth, { 18 | cursor: input.cursor, 19 | }); 20 | 21 | return { 22 | members: result.data.members, 23 | responseMetadata: { 24 | nextCursor: result.data.response_metadata.next_cursor, 25 | }, 26 | $native: result.$native, 27 | }; 28 | }, 29 | ); 30 | -------------------------------------------------------------------------------- /src/platforms/slack/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://slack.com/api'; 2 | export const DEFAULT_PAGE_SIZE = 100; 3 | -------------------------------------------------------------------------------- /src/platforms/square/README.md: -------------------------------------------------------------------------------- 1 | # Square 2 | 3 | ## Description 4 | 5 | Square, Inc. is a financial services and mobile payment company that offers a variety of business software, payment hardware products, and small business services. The company's key offering is a credit card reader that enables transactions on mobile devices. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.squareup.com) 10 | - [Website](squareup.com) 11 | -------------------------------------------------------------------------------- /src/platforms/square/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://connect.squareup.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/square/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/square/client'; 2 | import boxIcon from '@/platforms/square/logos/box'; 3 | import fullIcon from '@/platforms/square/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('square', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://connect.squareup.com/oauth2/authorize', 9 | tokenUrl: 'https://connect.squareup.com/oauth2/token', 10 | scopeSeparator: '+', 11 | authParams: { 12 | session: false, 13 | }, 14 | }), 15 | display: { 16 | name: 'Square', 17 | logos: { 18 | defaultURI: fullIcon ?? boxIcon, 19 | fullURI: fullIcon, 20 | boxURI: boxIcon, 21 | }, 22 | colors: { 23 | primary: '#006AFF', 24 | }, 25 | categories: [], 26 | }, 27 | client, 28 | constants: {}, 29 | actions: {}, 30 | }); 31 | -------------------------------------------------------------------------------- /src/platforms/stripe/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | import { BASE_URL } from './constants'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | url: formatUrl(BASE_URL, options.url), 8 | headers: { 9 | ...options.headers, 10 | Authorization: `Bearer ${await auth.getToken()}`, 11 | }, 12 | }; 13 | }); 14 | 15 | export const client = { 16 | passthrough: request.passthrough(), 17 | }; 18 | -------------------------------------------------------------------------------- /src/platforms/stripe/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_URL = 'https://api.stripe.com'; 2 | -------------------------------------------------------------------------------- /src/platforms/stripe/index.ts: -------------------------------------------------------------------------------- 1 | import { auth, platform } from '@/sdk'; 2 | import { client } from './client'; 3 | import * as constants from './constants'; 4 | import { icon } from './icon'; 5 | 6 | export default platform('stripe', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://connect.stripe.com/oauth/authorize', 9 | tokenUrl: 'https://connect.stripe.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'Stripe', 13 | iconURI: icon, 14 | logos: { 15 | defaultURI: icon, 16 | }, 17 | categories: [], 18 | }, 19 | client, 20 | constants, 21 | actions: {}, 22 | }); 23 | -------------------------------------------------------------------------------- /src/platforms/surveymonkey/README.md: -------------------------------------------------------------------------------- 1 | # Survey Monkey 2 | 3 | ## Description 4 | 5 | SurveyMonkey is an online service that enables customizable survey creation, distribution, and analysis. It serves a wide range of sectors, including education, business, and health, providing tools for market research, customer satisfaction, and employee engagement surveys. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://api.surveymonkey.com) 10 | - [Website](surveymonkey.com) 11 | -------------------------------------------------------------------------------- /src/platforms/surveymonkey/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.surveymonkey.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/surveymonkey/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/surveymonkey/client'; 2 | import boxIcon from '@/platforms/surveymonkey/logos/box'; 3 | import fullIcon from '@/platforms/surveymonkey/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('surveymonkey', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://api.surveymonkey.com/oauth/authorize', 9 | tokenUrl: 'https://api.surveymonkey.com/oauth/token', 10 | }), 11 | display: { 12 | name: 'SurveyMonkey', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#00bf6f', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/teams/README.md: -------------------------------------------------------------------------------- 1 | # Microsoft Teams 2 | 3 | ## Description 4 | 5 | Microsoft Teams is a unified communication and collaboration platform that combines persistent workplace chat, video meetings, file storage, and application integration. It's a hub for teamwork in Office 365, designed to enable seamless collaboration within workgroups. 6 | 7 | ## Resources 8 | 9 | - [Website](microsoftteams.com) 10 | -------------------------------------------------------------------------------- /src/platforms/teams/actions/channels/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/microsoft/client'; 2 | import * as microsoft from '@/platforms/microsoft/validators'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-channels', 8 | { 9 | operation: 'list', 10 | resource: 'channels', 11 | mutation: false, 12 | schema: z.object({ 13 | teamId: z.string(), 14 | cursor: microsoft.microsoftUrl().optional(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | return await client.teams.channels.list(auth, input); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/teams/actions/members/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/microsoft/client'; 2 | import * as microsoft from '@/platforms/microsoft/validators'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-members', 8 | { 9 | operation: 'list', 10 | resource: 'members', 11 | mutation: false, 12 | schema: z.object({ 13 | teamId: z.string(), 14 | cursor: microsoft.microsoftUrl().optional(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | return await client.teams.members.list(auth, input); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/teams/actions/messages/create.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/microsoft/client'; 2 | import { action } from '@/sdk'; 3 | import { z } from 'zod'; 4 | 5 | export default action( 6 | 'create-message', 7 | { 8 | operation: 'create', 9 | resource: 'messages', 10 | mutation: true, 11 | schema: z.object({ 12 | text: z.string(), 13 | channelId: z.string(), 14 | teamId: z.string(), 15 | }), 16 | scopes: [], 17 | }, 18 | async ({ input, auth }) => { 19 | return await client.teams.messages.create(auth, input); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /src/platforms/teams/actions/teams/list.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/microsoft/client'; 2 | import * as microsoft from '@/platforms/microsoft/validators'; 3 | import { action } from '@/sdk'; 4 | import { z } from 'zod'; 5 | 6 | export default action( 7 | 'list-teams', 8 | { 9 | operation: 'list', 10 | resource: 'teams', 11 | mutation: false, 12 | schema: z.object({ 13 | cursor: microsoft.microsoftUrl().optional(), 14 | }), 15 | scopes: [], 16 | }, 17 | async ({ input, auth }) => { 18 | return await client.groups.list(auth, { 19 | cursor: input.cursor, 20 | filter: "resourceProvisioningOptions/Any(x:x eq 'Team')", 21 | }); 22 | }, 23 | ); 24 | -------------------------------------------------------------------------------- /src/platforms/teamwork/README.md: -------------------------------------------------------------------------------- 1 | # Teamwork 2 | 3 | ## Description 4 | 5 | Teamwork is a company that specializes in developing project management and team collaboration software. Their suite of tools are designed to help businesses improve their productivity, communication, and overall project execution. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://apidocs.teamwork.com/) 10 | - [Website](teamwork.com) 11 | -------------------------------------------------------------------------------- /src/platforms/teamwork/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | const { answers } = await auth.getMetadata(); 5 | return { 6 | ...options, 7 | url: formatUrl(`https://${answers.subdomain}.teamwork.com`, options.url), 8 | headers: { 9 | ...options.headers, 10 | Authorization: `Bearer ${await auth.getToken()}`, 11 | }, 12 | }; 13 | }); 14 | 15 | export const client = { 16 | passthrough: request.passthrough(), 17 | }; 18 | -------------------------------------------------------------------------------- /src/platforms/todoist/README.md: -------------------------------------------------------------------------------- 1 | # Todoist 2 | 3 | ## Description 4 | 5 | Todoist is a task management application that helps individuals and teams organize, track, and complete their work. It offers features like project collaboration, scheduling, and reminders, aiming to increase productivity and efficiency. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.todoist.com/) 10 | - [Website](todoist.com) 11 | -------------------------------------------------------------------------------- /src/platforms/todoist/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.todoist.com/rest/v2`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/todoist/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/todoist/client'; 2 | import boxIcon from '@/platforms/todoist/logos/box'; 3 | import { auth, platform } from '@/sdk'; 4 | 5 | export default platform('todoist', { 6 | auth: auth.oauth2({ 7 | authUrl: 'https://todoist.com/oauth/authorize', 8 | tokenUrl: 'https://todoist.com/oauth/access_token', 9 | scopeSeparator: ',', 10 | }), 11 | display: { 12 | name: 'Todoist', 13 | logos: { 14 | defaultURI: boxIcon, 15 | boxURI: boxIcon, 16 | }, 17 | colors: { 18 | primary: '#de483a', 19 | }, 20 | categories: ['ticketing'], 21 | }, 22 | client, 23 | constants: {}, 24 | actions: {}, 25 | }); 26 | -------------------------------------------------------------------------------- /src/platforms/twinfield/README.md: -------------------------------------------------------------------------------- 1 | # Twinfield 2 | 3 | ## Description 4 | 5 | Twinfield is a company that provides online accounting software services, catering to businesses of all sizes. Their cloud-based solutions offer a range of features including invoicing, real-time banking, and financial reporting. 6 | 7 | ## Resources 8 | 9 | - [Website](twinfield.com) 10 | -------------------------------------------------------------------------------- /src/platforms/twinfield/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Twinfield product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/typeform/README.md: -------------------------------------------------------------------------------- 1 | # Typeform 2 | 3 | ## Description 4 | 5 | Typeform is a technology company that specializes in online form building and surveys. It provides an interactive platform that allows businesses and organizations to create customizable and engaging forms for data collection and customer engagement. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://www.typeform.com/developers/) 10 | - [Website](typeform.com) 11 | -------------------------------------------------------------------------------- /src/platforms/typeform/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.typeform.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/typeform/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/typeform/client'; 2 | import boxIcon from '@/platforms/typeform/logos/box'; 3 | import fullIcon from '@/platforms/typeform/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('typeform', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://api.typeform.com/oauth/authorize', 9 | tokenUrl: 'https://api.typeform.com/oauth/token', 10 | requiredScopes: ['offline'], 11 | }), 12 | display: { 13 | name: 'Typeform', 14 | logos: { 15 | defaultURI: fullIcon ?? boxIcon, 16 | fullURI: fullIcon, 17 | boxURI: boxIcon, 18 | }, 19 | colors: { 20 | primary: '#0445AF', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/wave-accounting/README.md: -------------------------------------------------------------------------------- 1 | # Wave Accounting 2 | 3 | ## Description 4 | 5 | Wave Accounting is a software company that provides a suite of financial services and online software for small businesses. Their offerings include tools for invoicing, accounting, payroll, payments processing, and personal finance. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.waveapps.com/hc/en-us) 10 | - [Website](waveapps.com) 11 | -------------------------------------------------------------------------------- /src/platforms/wave-accounting/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { makeRequestFactory } from '@/sdk/client'; 3 | 4 | const request = makeRequestFactory(async (auth, options) => { 5 | return { 6 | ...options, 7 | // Since this integration works for any Wave Accounting product, 8 | // the entire url must be specific by the user 9 | url: options.url as `${HttpsUrl}/${string}`, 10 | headers: { 11 | ...options.headers, 12 | Authorization: `Bearer ${await auth.getToken()}`, 13 | }, 14 | }; 15 | }); 16 | 17 | export const client = { 18 | passthrough: request.passthrough(), 19 | }; 20 | -------------------------------------------------------------------------------- /src/platforms/wave-accounting/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/wave-accounting/client'; 2 | import boxIcon from '@/platforms/wave-accounting/logos/box'; 3 | import fullIcon from '@/platforms/wave-accounting/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('wave-accounting', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://api.waveapps.com/oauth2/authorize', 9 | tokenUrl: 'https://api.waveapps.com/oauth2/token', 10 | }), 11 | display: { 12 | name: 'Wave Accounting', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#E9ABFF', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/woocommerce/README.md: -------------------------------------------------------------------------------- 1 | # WooCommerce 2 | 3 | ## Description 4 | 5 | WooCommerce is a customizable, open-source eCommerce platform built on WordPress, enabling businesses to build their online stores with flexibility and control. It offers a range of features including product pages, shopping carts, and secure payment gateways. 6 | 7 | ## Resources 8 | 9 | - [Website](woocommerce.com) 10 | -------------------------------------------------------------------------------- /src/platforms/woocommerce/client.ts: -------------------------------------------------------------------------------- 1 | import { HttpsUrl } from '@/sdk'; 2 | import { formatUrl, makeRequestFactory, toBase64 } from '@/sdk/client'; 3 | import { API_VERSION } from './constants'; 4 | 5 | const request = makeRequestFactory(async (auth, options) => { 6 | const { answers } = await auth.getMetadata(); 7 | const url = answers.wooCommerceUrl as HttpsUrl; 8 | const creds = toBase64(`${answers.consumerKey}:${answers.consumerSecret}`); 9 | return { 10 | ...options, 11 | url: formatUrl(`${url}/wp-json/wc/${API_VERSION}`, options.url), 12 | headers: { 13 | ...options.headers, 14 | Authorization: `Basic ${creds}`, 15 | }, 16 | }; 17 | }); 18 | 19 | export const client = { 20 | passthrough: request.passthrough(), 21 | }; 22 | -------------------------------------------------------------------------------- /src/platforms/woocommerce/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v3'; 2 | -------------------------------------------------------------------------------- /src/platforms/workable/README.md: -------------------------------------------------------------------------------- 1 | # Workable 2 | 3 | ## Description 4 | 5 | Workable is a cloud-based recruitment platform designed to help businesses streamline their hiring process. It provides tools for job posting, candidate tracking, team collaboration, and reporting, simplifying recruitment tasks and improving hiring efficiency. 6 | 7 | ## Resources 8 | 9 | - [Website](workable.com) 10 | -------------------------------------------------------------------------------- /src/platforms/workable/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | const { answers } = await auth.getMetadata(); 5 | return { 6 | ...options, 7 | url: formatUrl(`https://${answers.subdomain}.workable.com`, options.url), 8 | headers: { 9 | ...options.headers, 10 | Authorization: `Bearer ${await auth.getToken()}`, 11 | }, 12 | }; 13 | }); 14 | 15 | export const client = { 16 | passthrough: request.passthrough(), 17 | }; 18 | -------------------------------------------------------------------------------- /src/platforms/workable/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/workable/client'; 2 | import boxIcon from '@/platforms/workable/logos/box'; 3 | import fullIcon from '@/platforms/workable/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('workable', { 7 | auth: auth.apiToken({ 8 | questions: [ 9 | { 10 | type: 'text', 11 | id: 'subdomain', 12 | label: 'What is your Workable subdomain?', 13 | }, 14 | ], 15 | }), 16 | display: { 17 | name: 'Workable', 18 | logos: { 19 | defaultURI: fullIcon ?? boxIcon, 20 | fullURI: fullIcon, 21 | boxURI: boxIcon, 22 | }, 23 | colors: { 24 | primary: '#00766a', 25 | }, 26 | categories: [], 27 | }, 28 | client, 29 | constants: {}, 30 | actions: {}, 31 | }); 32 | -------------------------------------------------------------------------------- /src/platforms/xero/README.md: -------------------------------------------------------------------------------- 1 | # Xero 2 | 3 | ## Description 4 | 5 | Xero is a cloud-based software company that provides a platform for small to medium-sized businesses to manage their accounting, payroll, bank reconciliation, and bookkeeping. The company's services also include invoicing, expense tracking, inventory management, and purchasing. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developer.xero.com/) 10 | - [Website](xero.com) 11 | -------------------------------------------------------------------------------- /src/platforms/xero/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.xero.com/api.xro/2.0`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/xero/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/xero/client'; 2 | import boxIcon from '@/platforms/xero/logos/box'; 3 | import fullIcon from '@/platforms/xero/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('xero', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://login.xero.com/identity/connect/authorize', 9 | tokenUrl: 'https://identity.xero.com/connect/token', 10 | requiredScopes: ['offline_access'], 11 | }), 12 | display: { 13 | name: 'Xero', 14 | logos: { 15 | defaultURI: fullIcon ?? boxIcon, 16 | fullURI: fullIcon, 17 | boxURI: boxIcon, 18 | }, 19 | colors: { 20 | primary: '#06B3E8', 21 | }, 22 | categories: [], 23 | }, 24 | client, 25 | constants: {}, 26 | actions: {}, 27 | }); 28 | -------------------------------------------------------------------------------- /src/platforms/zendesk/README.md: -------------------------------------------------------------------------------- 1 | # Zendesk 2 | 3 | ## Description 4 | 5 | Zendesk is a customer service software company that provides a suite of tools designed to improve customer relationships through better communication and support. It offers solutions like support ticketing, customer engagement, and analytics to help businesses deliver exceptional customer experiences. 6 | 7 | ## Resources 8 | 9 | - [Website](zendesk.com) 10 | -------------------------------------------------------------------------------- /src/platforms/zendesk/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v2'; 2 | -------------------------------------------------------------------------------- /src/platforms/zenefits/README.md: -------------------------------------------------------------------------------- 1 | # Zenefits 2 | 3 | ## Description 4 | 5 | Zenefits is a cloud-based software company that provides a platform for businesses to manage their human resources. The company offers services for employee benefits, payroll, time tracking, compliance, and more. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.zenefits.com) 10 | - [Website](zenefits.com) 11 | -------------------------------------------------------------------------------- /src/platforms/zenefits/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | 3 | const request = makeRequestFactory(async (auth, options) => { 4 | return { 5 | ...options, 6 | url: formatUrl(`https://api.zenefits.com`, options.url), 7 | headers: { 8 | ...options.headers, 9 | Authorization: `Bearer ${await auth.getToken()}`, 10 | }, 11 | }; 12 | }); 13 | 14 | export const client = { 15 | passthrough: request.passthrough(), 16 | }; 17 | -------------------------------------------------------------------------------- /src/platforms/zenefits/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/zenefits/client'; 2 | import boxIcon from '@/platforms/zenefits/logos/box'; 3 | import fullIcon from '@/platforms/zenefits/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('zenefits', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://secure.zenefits.com/oauth2/platform-authorize', 9 | tokenUrl: 'https://secure.zenefits.com/oauth2/token', 10 | }), 11 | display: { 12 | name: 'Zenefits', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#FF5745', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/platforms/zoho/README.md: -------------------------------------------------------------------------------- 1 | # Zoho 2 | 3 | ## Description 4 | 5 | Zoho is a comprehensive suite of online productivity tools and SaaS applications, including everything from email and project management to customer relationship management (CRM) and document storage. It's designed to help businesses streamline their processes, collaborate, and boost productivity. 6 | 7 | ## Resources 8 | 9 | - [Website](zoho.com) 10 | -------------------------------------------------------------------------------- /src/platforms/zoho/client.ts: -------------------------------------------------------------------------------- 1 | import { makeRequestFactory } from '@/sdk/client'; 2 | import { HttpsUrl } from '../../sdk'; 3 | import { API_VERSION } from './constants'; 4 | 5 | const request = makeRequestFactory(async (auth, options) => { 6 | if (auth.type === 'oauth2') { 7 | const { oauthResponse } = await auth.getMetadata(); 8 | const apiDomain = oauthResponse.api_domain as HttpsUrl; 9 | return { 10 | ...options, 11 | url: `${apiDomain}/crm/${API_VERSION}${options.url}`, 12 | headers: { 13 | ...options.headers, 14 | Authorization: `Zoho-oauthtoken ${await auth.getToken()}`, 15 | }, 16 | }; 17 | } else { 18 | throw new Error('Zoho only supports OAuth2 authentication'); 19 | } 20 | }); 21 | 22 | export const client = { 23 | passthrough: request.passthrough(), 24 | }; 25 | -------------------------------------------------------------------------------- /src/platforms/zoho/constants.ts: -------------------------------------------------------------------------------- 1 | export const API_VERSION = 'v3'; 2 | -------------------------------------------------------------------------------- /src/platforms/zoom/README.md: -------------------------------------------------------------------------------- 1 | # Zoom 2 | 3 | ## Description 4 | 5 | Zoom is a technology company that provides a cloud-based video communications platform, offering services such as video conferencing, online meetings, chat, and mobile collaboration. It is designed to cater to businesses, schools, and organizations, facilitating remote work, distance education, and social relations. 6 | 7 | ## Resources 8 | 9 | - [Docs](https://developers.zoom.us/docs/) 10 | - [Website](zoom.us) 11 | -------------------------------------------------------------------------------- /src/platforms/zoom/client.ts: -------------------------------------------------------------------------------- 1 | import { formatUrl, makeRequestFactory } from '@/sdk/client'; 2 | const request = makeRequestFactory(async (auth, options) => { 3 | return { 4 | ...options, 5 | url: formatUrl(`https://api.zoom.us/v2`, options.url), 6 | headers: { 7 | ...options.headers, 8 | Authorization: `Bearer ${await auth.getToken()}`, 9 | }, 10 | }; 11 | }); 12 | 13 | export const client = { 14 | passthrough: request.passthrough(), 15 | }; 16 | -------------------------------------------------------------------------------- /src/platforms/zoom/index.ts: -------------------------------------------------------------------------------- 1 | import { client } from '@/platforms/zoom/client'; 2 | import boxIcon from '@/platforms/zoom/logos/box'; 3 | import fullIcon from '@/platforms/zoom/logos/full'; 4 | import { auth, platform } from '@/sdk'; 5 | 6 | export default platform('zoom', { 7 | auth: auth.oauth2({ 8 | authUrl: 'https://zoom.us/oauth/authorize', 9 | tokenUrl: 'https://zoom.us/oauth/token', 10 | }), 11 | display: { 12 | name: 'Zoom', 13 | logos: { 14 | defaultURI: fullIcon ?? boxIcon, 15 | fullURI: fullIcon, 16 | boxURI: boxIcon, 17 | }, 18 | colors: { 19 | primary: '#0B5CFF', 20 | }, 21 | categories: [], 22 | }, 23 | client, 24 | constants: {}, 25 | actions: {}, 26 | }); 27 | -------------------------------------------------------------------------------- /src/sdk/action.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { Action, ActionFunction } from './types'; 3 | 4 | export type ActionOptions> = { 5 | schema: TZodSchema; 6 | operation: string; 7 | resource: string; 8 | scopes?: string[]; 9 | mutation?: boolean; 10 | }; 11 | 12 | export const action = < 13 | TName extends string, 14 | TZodSchema extends z.ZodType, 15 | TOutput extends {} | null | void, 16 | >( 17 | name: TName, 18 | options: ActionOptions, 19 | func: ActionFunction, TOutput>, 20 | ): Action, TOutput> => { 21 | return { 22 | name, 23 | schema: options.schema, 24 | operation: options.operation, 25 | resource: options.resource, 26 | mutation: options.mutation, 27 | func, 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /src/sdk/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action'; 2 | export * from './auth'; 3 | export * from './error'; 4 | export * from './platform'; 5 | export * from './types'; 6 | export * from './unification'; 7 | -------------------------------------------------------------------------------- /src/sdk/query-string.ts: -------------------------------------------------------------------------------- 1 | import { isObject, listify, trim } from 'radash'; 2 | 3 | export type List = [string, string][]; 4 | export type Map = Record; 5 | export type Any = List | Map; 6 | 7 | export const parse = (value: string | Record): List => { 8 | if (isObject(value)) { 9 | return listify(value, (k, v) => [k, v]); 10 | } 11 | return trim(value, '?') 12 | .split('&') 13 | .map((pair) => { 14 | const [k, v] = pair.split('='); 15 | return [k, v]; 16 | }); 17 | }; 18 | 19 | export const toArray = (query: Map): List => { 20 | return listify(query, (k, v) => [k, v]); 21 | }; 22 | 23 | export const toString = (query: List): string => { 24 | return query.map((pair) => pair.join('=')).join('&'); 25 | }; 26 | -------------------------------------------------------------------------------- /src/sdk/tests/action.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from '@jest/globals'; 2 | import { z } from 'zod'; 3 | import { action } from '../action'; 4 | 5 | describe('action function', () => { 6 | it('should return an object with the given name', () => { 7 | const result = action( 8 | 'testing', 9 | { 10 | operation: 'find', 11 | resource: 'testing', 12 | schema: z.object({}), 13 | }, 14 | async () => { 15 | return { 16 | $native: { 17 | headers: {}, 18 | body: {}, 19 | url: '', 20 | }, 21 | }; 22 | }, 23 | ); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/sdk/unification.ts: -------------------------------------------------------------------------------- 1 | import { Action, Unification, UnifiedAction } from '../sdk'; 2 | 3 | export const unification = < 4 | TPlatforms extends string, 5 | TUnifiedAction extends Action, 6 | TVertical extends string = string, 7 | >( 8 | vertical: TVertical, 9 | actions: { 10 | [P in TPlatforms]: Record; 11 | }, 12 | ): Unification => { 13 | const keys = Object.keys(actions) as (keyof typeof actions)[]; 14 | return { 15 | vertical, 16 | actions: keys.reduce((acc, integrationId) => { 17 | return [ 18 | ...acc, 19 | ...Object.values(actions[integrationId]).map((a) => ({ 20 | ...a, 21 | integrationId, 22 | vertical, 23 | })), 24 | ]; 25 | }, [] as UnifiedAction[]), 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "moduleResolution": "node", 5 | "target": "es2022", 6 | "esModuleInterop": true, 7 | "strict": true, 8 | "paths": { 9 | "@/*": ["./src/*"] 10 | } 11 | }, 12 | "include": ["src/**/*.ts"], 13 | "exclude": ["node_modules", "dist"] 14 | } 15 | -------------------------------------------------------------------------------- /tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'tsup'; 2 | 3 | export default defineConfig({ 4 | entry: ['src/index.ts', '!*.md', '!*.test.ts'], 5 | sourcemap: true, 6 | clean: true, 7 | dts: true, 8 | format: ['esm', 'cjs'], 9 | }); 10 | --------------------------------------------------------------------------------