From 16c5deae8d94feaa768c8048feacf880f8502cb1 Mon Sep 17 00:00:00 2001 From: Lucas Marshall Date: Tue, 11 Apr 2023 16:38:03 -0700 Subject: [PATCH] chore: version 0.7.5 (#611) --- README.md | 2 +- apps/api/package.json | 2 +- apps/mgmt-ui/package.json | 2 +- apps/sync-worker/package.json | 2 +- docker-compose.yml | 8 +- docs/docs/getting-started.mdx | 2 +- docs/docs/quickstart.mdx | 2 +- docs/package.json | 2 +- docs/versioned_docs/version-0.7.5/_privacy.md | 146 + docs/versioned_docs/version-0.7.5/api.md | 6 + .../version-0.7.5/architecture.mdx | 47 + docs/versioned_docs/version-0.7.5/concepts.md | 39 + .../version-0.7.5/connectors/_category_.json | 8 + .../connectors/activecampaign.md | 23 + .../version-0.7.5/connectors/connectors.md | 7 + .../version-0.7.5/connectors/copper.md | 22 + .../version-0.7.5/connectors/hubspot.md | 27 + .../connectors/ms_dynamics_365_sales.md | 23 + .../version-0.7.5/connectors/pipedrive.md | 24 + .../version-0.7.5/connectors/salesforce.md | 28 + .../version-0.7.5/connectors/zoho_crm.md | 22 + .../version-0.7.5/contributing.md | 17 + docs/versioned_docs/version-0.7.5/faq.md | 37 + .../version-0.7.5/getting-started.mdx | 246 ++ .../version-0.7.5/guides/_category_.json | 9 + .../version-0.7.5/guides/authentication.md | 26 + .../version-0.7.5/guides/embedded-links.mdx | 99 + .../version-0.7.5/guides/pagination.md | 50 + .../version-0.7.5/guides/syncing-data.md | 39 + docs/versioned_docs/version-0.7.5/intro.md | 63 + .../version-0.7.5/quickstart.mdx | 214 + .../version-0.7.5/references/_category_.json | 9 + .../version-0.7.5/references/hubspot.md | 23 + .../version-0.7.5/references/salesforce.md | 3 + docs/versioned_docs/version-0.7.5/roadmap.md | 39 + .../version-0.7.5-sidebars.json | 8 + docs/versions.json | 1 + helm/Chart.yaml | 4 +- openapi/crm/openapi.bundle.json | 2 +- openapi/crm/openapi.yaml | 2 +- openapi/mgmt/openapi.bundle.json | 2 +- openapi/mgmt/openapi.yaml | 2 +- .../parameters/header/x-customer-id.yaml | 7 + .../parameters/header/x-provider-name.yaml | 7 + .../parameters/query/created_after.yaml | 7 + .../parameters/query/created_before.yaml | 7 + .../components/parameters/query/cursor.yaml | 6 + .../parameters/query/customer_id.yaml | 6 + .../components/parameters/query/expand.yaml | 8 + .../query/include_deleted_data.yaml | 6 + .../parameters/query/modified_after.yaml | 7 + .../parameters/query/modified_before.yaml | 7 + .../parameters/query/page_size.yaml | 6 + .../parameters/query/provider_name.yaml | 6 + .../common/components/schemas/errors.yaml | 30 + .../common/components/schemas/logs.yaml | 38 + .../common/components/schemas/pagination.yaml | 10 + .../common/components/schemas/warnings.yaml | 36 + .../components/securitySchemes/x-api-key.yaml | 4 + .../schemas/create_update_account.yaml | 34 + .../schemas/create_update_contact.yaml | 28 + .../schemas/create_update_event.yaml | 43 + .../schemas/create_update_lead.yaml | 31 + .../schemas/create_update_opportunity.yaml | 34 + .../crm/components/schemas/filters.yaml | 30 + .../components/schemas/objects/account.yaml | 76 + .../components/schemas/objects/addresses.yaml | 51 + .../components/schemas/objects/contact.yaml | 72 + .../schemas/objects/custom_fields.yaml | 3 + .../schemas/objects/email_addresses.yaml | 18 + .../crm/components/schemas/objects/event.yaml | 90 + .../crm/components/schemas/objects/lead.yaml | 88 + .../schemas/objects/lifecycle_stage.yaml | 11 + .../schemas/objects/opportunity.yaml | 83 + .../schemas/objects/phone_numbers.yaml | 20 + .../crm/components/schemas/objects/user.yaml | 43 + .../version-0.7.5/crm/openapi.bundle.json | 3508 +++++++++++++++++ .../versioned/version-0.7.5/crm/openapi.yaml | 140 + .../version-0.7.5/crm/paths/accounts.yaml | 120 + .../crm/paths/accounts@_search.yaml | 91 + .../crm/paths/accounts@{account_id}.yaml | 92 + .../version-0.7.5/crm/paths/contacts.yaml | 124 + .../crm/paths/contacts@_search.yaml | 89 + .../crm/paths/contacts@{contact_id}.yaml | 67 + .../version-0.7.5/crm/paths/events.yaml | 86 + .../crm/paths/events@{event_id}.yaml | 71 + .../version-0.7.5/crm/paths/leads.yaml | 137 + .../crm/paths/leads@{lead_id}.yaml | 69 + .../crm/paths/opportunities.yaml | 111 + .../crm/paths/opportunities@_search.yaml | 73 + .../paths/opportunities@{opportunity_id}.yaml | 76 + .../version-0.7.5/crm/paths/passthrough.yaml | 85 + .../version-0.7.5/crm/paths/users.yaml | 55 + .../crm/paths/users@{user_id}.yaml | 23 + .../schemas/create_update_customer.yaml | 15 + .../schemas/create_update_integration.yaml | 17 + .../components/schemas/objects/category.yaml | 3 + .../schemas/objects/connection.yaml | 39 + .../components/schemas/objects/customer.yaml | 23 + .../schemas/objects/integration.yaml | 24 + .../schemas/objects/integration_config.yaml | 56 + .../schemas/objects/provider_name.yaml | 9 + .../components/schemas/objects/webhook.yaml | 30 + .../mgmt/components/schemas/sync_history.yaml | 47 + .../mgmt/components/schemas/sync_info.yaml | 44 + .../components/schemas/webhook-payload.yaml | 83 + .../version-0.7.5/mgmt/openapi.bundle.json | 1431 +++++++ .../versioned/version-0.7.5/mgmt/openapi.yaml | 87 + .../version-0.7.5/mgmt/paths/connections.yaml | 44 + .../paths/connections@{connection_id}.yaml | 48 + .../version-0.7.5/mgmt/paths/customers.yaml | 50 + .../mgmt/paths/customers@{customer_id}.yaml | 49 + .../mgmt/paths/integrations.yaml | 82 + .../paths/integrations@{integration_id}.yaml | 123 + .../mgmt/paths/sync_history.yaml | 78 + .../version-0.7.5/mgmt/paths/sync_info.yaml | 52 + .../version-0.7.5/mgmt/paths/webhook.yaml | 57 + .../version-0.7.5/mgmt/webhooks/webhook.yaml | 13 + package.json | 2 +- packages/core/package.json | 2 +- packages/db/package.json | 2 +- packages/schemas/package.json | 2 +- packages/sdk/package.json | 2 +- packages/sync-workflows/package.json | 2 +- packages/types/package.json | 2 +- 125 files changed, 9803 insertions(+), 24 deletions(-) create mode 100644 docs/versioned_docs/version-0.7.5/_privacy.md create mode 100644 docs/versioned_docs/version-0.7.5/api.md create mode 100644 docs/versioned_docs/version-0.7.5/architecture.mdx create mode 100644 docs/versioned_docs/version-0.7.5/concepts.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/_category_.json create mode 100644 docs/versioned_docs/version-0.7.5/connectors/activecampaign.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/connectors.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/copper.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/hubspot.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/ms_dynamics_365_sales.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/pipedrive.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/salesforce.md create mode 100644 docs/versioned_docs/version-0.7.5/connectors/zoho_crm.md create mode 100644 docs/versioned_docs/version-0.7.5/contributing.md create mode 100644 docs/versioned_docs/version-0.7.5/faq.md create mode 100644 docs/versioned_docs/version-0.7.5/getting-started.mdx create mode 100644 docs/versioned_docs/version-0.7.5/guides/_category_.json create mode 100644 docs/versioned_docs/version-0.7.5/guides/authentication.md create mode 100644 docs/versioned_docs/version-0.7.5/guides/embedded-links.mdx create mode 100644 docs/versioned_docs/version-0.7.5/guides/pagination.md create mode 100644 docs/versioned_docs/version-0.7.5/guides/syncing-data.md create mode 100644 docs/versioned_docs/version-0.7.5/intro.md create mode 100644 docs/versioned_docs/version-0.7.5/quickstart.mdx create mode 100644 docs/versioned_docs/version-0.7.5/references/_category_.json create mode 100644 docs/versioned_docs/version-0.7.5/references/hubspot.md create mode 100644 docs/versioned_docs/version-0.7.5/references/salesforce.md create mode 100644 docs/versioned_docs/version-0.7.5/roadmap.md create mode 100644 docs/versioned_sidebars/version-0.7.5-sidebars.json create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/header/x-customer-id.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/header/x-provider-name.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/created_after.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/created_before.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/cursor.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/customer_id.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/expand.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/include_deleted_data.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/modified_after.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/modified_before.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/page_size.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/parameters/query/provider_name.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/schemas/errors.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/schemas/logs.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/schemas/pagination.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/schemas/warnings.yaml create mode 100644 openapi/versioned/version-0.7.5/common/components/securitySchemes/x-api-key.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/create_update_account.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/create_update_contact.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/create_update_event.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/create_update_lead.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/create_update_opportunity.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/filters.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/account.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/addresses.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/contact.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/custom_fields.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/email_addresses.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/event.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/lead.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/lifecycle_stage.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/opportunity.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/phone_numbers.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/components/schemas/objects/user.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/openapi.bundle.json create mode 100644 openapi/versioned/version-0.7.5/crm/openapi.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/accounts.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/accounts@_search.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/accounts@{account_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/contacts.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/contacts@_search.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/contacts@{contact_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/events.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/events@{event_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/leads.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/leads@{lead_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/opportunities.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/opportunities@_search.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/opportunities@{opportunity_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/passthrough.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/users.yaml create mode 100644 openapi/versioned/version-0.7.5/crm/paths/users@{user_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_customer.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_integration.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/category.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/connection.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/customer.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration_config.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/provider_name.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/webhook.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_history.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_info.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/components/schemas/webhook-payload.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/openapi.bundle.json create mode 100644 openapi/versioned/version-0.7.5/mgmt/openapi.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/connections.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/connections@{connection_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/customers.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/customers@{customer_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/integrations.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/integrations@{integration_id}.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/sync_history.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/sync_info.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/paths/webhook.yaml create mode 100644 openapi/versioned/version-0.7.5/mgmt/webhooks/webhook.yaml diff --git a/README.md b/README.md index 7eb62fde9..6b966777d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ https://user-images.githubusercontent.com/1925713/223279162-c53ceb43-b51e-4d78-9 ### Run Supaglue locally ```shell -git clone -b v0.7.4 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v0.7.5 https://github.com/supaglue-labs/supaglue.git && cd supaglue ./scripts/create_quickstart_env.sh docker compose up ``` diff --git a/apps/api/package.json b/apps/api/package.json index 756dde39a..b89cd6188 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -1,6 +1,6 @@ { "name": "api", - "version": "0.7.4", + "version": "0.7.5", "packageManager": "yarn@3.4.1", "type": "commonjs", "dependencies": { diff --git a/apps/mgmt-ui/package.json b/apps/mgmt-ui/package.json index f96a3e114..55025ec06 100644 --- a/apps/mgmt-ui/package.json +++ b/apps/mgmt-ui/package.json @@ -1,6 +1,6 @@ { "name": "mgmt-ui", - "version": "0.7.4", + "version": "0.7.5", "private": true, "scripts": { "dev": "next dev", diff --git a/apps/sync-worker/package.json b/apps/sync-worker/package.json index 3ff7f7be2..40cb9a5d7 100644 --- a/apps/sync-worker/package.json +++ b/apps/sync-worker/package.json @@ -1,6 +1,6 @@ { "name": "sync-worker", - "version": "0.7.4", + "version": "0.7.5", "packageManager": "yarn@3.4.1", "dependencies": { "@sentry/integrations": "^7.43.0", diff --git a/docker-compose.yml b/docker-compose.yml index 835468803..022577e4e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -33,7 +33,7 @@ services: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-supaglue} api: - image: supaglue/api:0.7.4 + image: supaglue/api:0.7.5 ports: - '8080:8080' depends_on: @@ -52,7 +52,7 @@ services: restart: on-failure sync-worker: - image: supaglue/sync-worker:0.7.4 + image: supaglue/sync-worker:0.7.5 depends_on: postgres: condition: service_started @@ -65,7 +65,7 @@ services: restart: on-failure mgmt-ui: - image: supaglue/mgmt-ui:0.7.4 + image: supaglue/mgmt-ui:0.7.5 ports: - '3000:3000' depends_on: @@ -90,7 +90,7 @@ services: - temporalitedata:/data init: - image: supaglue/api:0.7.4 + image: supaglue/api:0.7.5 environment: <<: *common-env SUPAGLUE_QUICKSTART_API_KEY: ${SUPAGLUE_QUICKSTART_API_KEY:-some-api-key} diff --git a/docs/docs/getting-started.mdx b/docs/docs/getting-started.mdx index 1932b8e60..6a259430f 100644 --- a/docs/docs/getting-started.mdx +++ b/docs/docs/getting-started.mdx @@ -28,7 +28,7 @@ After creating your account, you will be directed to the management portal. Clone the Github repo and run the Supaglue stack locally using docker compose: ```shell -git clone -b v0.7.4 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v0.7.5 https://github.com/supaglue-labs/supaglue.git && cd supaglue docker compose up ``` diff --git a/docs/docs/quickstart.mdx b/docs/docs/quickstart.mdx index 41c32e3d8..17fc5dbc1 100644 --- a/docs/docs/quickstart.mdx +++ b/docs/docs/quickstart.mdx @@ -25,7 +25,7 @@ In less than 5 minutes, sync data from HubSpot or Salesforce into Supaglue and q Clone our repo, run our setup script which will create an `.env` file for this quickstart, and run the Supaglue stack locally using docker compose: ```shell -git clone -b v0.7.4 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v0.7.5 https://github.com/supaglue-labs/supaglue.git && cd supaglue ./scripts/create_quickstart_env.sh docker compose up ``` diff --git a/docs/package.json b/docs/package.json index 53eb39578..c9600fe95 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.7.4", + "version": "0.7.5", "private": true, "scripts": { "docusaurus": "docusaurus", diff --git a/docs/versioned_docs/version-0.7.5/_privacy.md b/docs/versioned_docs/version-0.7.5/_privacy.md new file mode 100644 index 000000000..436a6249a --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/_privacy.md @@ -0,0 +1,146 @@ +--- +sidebar_position: 8 +--- + +# Privacy policy + +Last updated: February 9, 2023 + +This Privacy Policy describes the privacy practices of Supergrain, Inc. (doing business as Supaglue) ("Supaglue +," "we", “us”, or "our") and how we +handle personal information that we collect through our digital properties that link to this Privacy Policy, +including our website (collectively, the "Service"). + +Supergrain provides integration tools to business customers. This Privacy Policy +does not apply to personal information that we handle on behalf of our business customers while providing our +services to them. Our use of this information is restricted by our agreements with those business customers. + +## Personal information we collect + +### Information you provide to us + +Personal information you may provide to us through the Service or otherwise includes: + +* **Contact data**, such as your first and last name, email and physical addresses, professional + title and organizational affiliation, and phone number. +* **Profile data**, such as the username and password that you may set to establish an online account with us. +* **Communications** that we exchange with you, including when you contact us with questions or feedback, through the Service, social media, or otherwise. +* **Payment and transactional data** , such as information relating to or needed to complete your orders and/or payments on or through the Service (including payment card information and billing information), and your purchase history. +* **Marketing data**, such as your preferences for receiving our marketing communications and details about your engagement with them. +* **Other data** not specifically listed here, which we will use as described in this Privacy Policy or as otherwise disclosed at the time of collection. + +If you choose to login to the Service via a third-party platform, we may collect information from that platform or network. For example, this information may include your email address and name. + +### Automatic data collection + +We, our service providers, and our business partners may automatically log information about you, your computer or mobile device, and your interaction over time with the Service, our communications and other online services, such as: + +* **Device data**, such as your computer's or mobile device's operating system type and version, manufacturer and model, browser type, screen resolution, RAM and disk size, CPU usage, device type (e.g., phone, tablet), IP address, unique identifiers (including identifiers used for advertising purposes), language settings, mobile device carrier, radio/network information (e.g., Wi-Fi, LTE, 3G), and general location information such as city, state or geographic area. +* **Online activity data**, such as pages or screens you viewed, how long you spent on a page or screen, the website you visited before browsing to the Service, navigation paths between pages or screens, information about your activity on a page or screen, access times and duration of access, and whether you have opened our marketing emails or clicked links within them. + +### Cookies and similar technologies + +Like many online services, we use the following technologies: + +* **Cookies**, which are text files that websites store on a visitor's device to uniquely identify the visitor's browser or to store information or settings in the browser for the purpose of helping you navigate between pages efficiently, remembering your preferences, enabling functionality, helping us understand user activity and patterns, and facilitating analytics and online advertising. +* **Local storage technologies**, like HTML5 and Flash, that provide cookie-equivalent functionality but can store larger amounts of data, including on your device outside of your browser in connection with specific applications. +* **Web beacons**, also known as pixel tags or clear GIFs, which are used to demonstrate that a webpage or email address was accessed or opened, or that certain content was viewed or clicked. + +### Data about others + +Users of the Service may have the opportunity to refer contacts to us and share their contact information with us. Please do not refer someone to us or share their contact information with us unless you have their permission to do so. + +## How we use your personal information + +We may use your personal information for the following purposes or as otherwise described at the time of collection: + +### Service delivery + +We may use your personal information to: + +* Provide, operate and improve the Service and our business. +* Process your payments and complete transactions with you. +* Facilitate your invitations to contacts who you want to invite to join the Service. +* Enable security features of the Service, such as by sending you security codes via email or SMS, and remembering devices from which you have previously logged in. +* Communicate with you about the Service, including by sending announcements, updates, security alerts, and support and administrative messages. +* Understand your needs and interests, and personalize your experience with the Service and our communications. +* Provide support for the Service, and respond to your requests, questions and feedback. + +### Research and development + +We may use your personal information for research and development purposes, including to analyze and improve the Service and our business. As part of these activities, we may create aggregated, de-identified or other anonymous data from personal information we collect. We make personal information into anonymous data by removing information that makes the data personally identifiable to you. We may use this anonymous data and share it with third parties for our lawful business purposes, including to analyze and improve the Service and promote our business. + +### Marketing and advertising + +We, our service providers and our third-party advertising partners may collect and use your personal information for marketing and advertising purposes: + +* **Direct marketing**. We may send you Supergrain-related or other direct marketing communications as permitted by law. You may opt-out of our marketing communications as described in the [Opt-out of marketing](#Opt_out_of_marketing) section below. +* **Interest-based advertising**. We may engage third-party advertising companies and social media companies to display ads on our Service and other online services. These companies may use cookies and similar technologies to collect information about your interaction (including the data described in the automatic data collection section above) over time across the Service, our communications and other online services, and use that information to serve online ads that they think will interest you. This is called interest-based advertising. We may also share information about our users with these companies to facilitate interest-based advertising to those or similar users on other online platforms. You can learn more about your choices for limiting interest-based advertising in the [Advertising choices](#Advertisingchoices) section below. + +### Compliance and protection + +We may use your personal information to: + +* Comply with applicable laws, lawful requests, and legal process, such as to respond to subpoenas or requests from government authorities +* Protect our, your or others' rights, privacy, safety or property (including by making and defending legal claims); +* Audit our internal processes for compliance with legal and contractual requirements or our internal policies; +* Enforce the terms and conditions that govern the Service; and - prevent, identify, investigate and deter fraudulent, harmful, unauthorized, unethical or illegal activity, including cyberattacks and identity theft. + +In some cases, we may specifically ask for your consent to collect, use or share your personal information, such as when required by law. + +## How we share your personal information + +We may share your personal information with the following parties and as otherwise described in this Privacy Policy or at the time of collection. + +* **Service providers.** Third partiesthat provide services on our behalf or help us operate the Service or our business (such as hosting, payment processing, information technology, customer support, email delivery, marketing, and website analytics). +* **Advertising partners.** Third-party advertising companies for the [interest-based advertising purposes](#_Interest-based_advertising._) described above. +* **Third-party platforms and social media networks.** If you have enabled features or functionality that connect the Service to a third-party platform (such as by logging in to the Service using your account with the third-party), we may disclose the personal information that you authorized us to share. We do not control the third party's use of your personal information. +* **Professional advisors.** Professional advisors, such as lawyers, auditors, bankers and insurers, where necessary in the course of the professional services that they render to us. +* **Authorities and others.** Law enforcement, government authorities, and private parties, as we believe in good faith to be necessary or appropriate for the [compliance and protection purposes](#_Compliance_and_operations.) described above. +* **Business transferees.** Acquirers and other relevant participants in business transactions (or negotiations and diligence for such transactions) involving a corporate divestiture, merger, consolidation, acquisition, reorganization, sale or other disposition of all or any portion of the business or assets of, or equity interests in, Supergrain or our affiliates (including, in connection with a bankruptcy or similar proceedings). + +## Your choices + +You have the following choices with respect to your personal information. + +* **Access or update your information**. If you have registered for a Service account with us, you may review and update certain account information by logging into the account. +* **Opt-out of marketing communications**. You may opt-out of marketing-related emails by following the opt-out or unsubscribe instructions at the bottom of the email, or by [contacting us](#contacting_us). Please note that if you choose to opt-out of marketing-related emails, you may continue to receive service-related and other non-marketing emails. +* **Cookies.** Most browser settings let you delete and reject cookies placed by websites. Many browsers accept cookies by default until you change your settings. If you do not accept cookies, you may not be able to use all functionality of the Service and it may not work properly. For more information about cookies, including how to see what cookies have been set on your browser and how to manage and delete them, visit [www.allaboutcookies.org](http://www.allaboutcookies.org/). We use Google Analytics to help us understand user activity on the Service. You can learn more about Google Analytics cookies at [https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage](https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage) and about how Google protects your data at [http://www.google.com/analytics/learn/privacy.html](http://www.google.com/analytics/learn/privacy.html) . You can prevent the use of Google Analytics relating to your use of our sites by downloading and installing a browser plugin available at [https://tools.google.com/dlpage/gaoptout?hl=en](https://tools.google.com/dlpage/gaoptout?hl=en). +* **Local storage**. You may be able to limit use of HTML5 cookies in your browser settings. Unlike other cookies, Flash-based local storage cannot be removed or rejected via your browser settings, but you can adjust the settings of your Flash player to block it. Blocking Flash storage may impede the functionality of Flash applications, including those employed by the Service. For more information on Flash local storage visit [https://helpx.adobe.com/flash-player/kb/disable-local-shared-objects-flash.html](https://helpx.adobe.com/flash-player/kb/disable-local-shared-objects-flash.html). +* **Advertising choices**. You can limit use of your information for interest-based advertising by: + * Browser settings. Blocking third-party cookies in your browser settings. + * Privacy browsers/plug-ins. By using privacy browsers or ad-blocking browser plug-ins that let you block tracking technologies. + * Platform settings. Google and Facebook offer opt-out features that let you opt-out of use of your information for interest-based advertising. Google: [https://adssettings.google.com/](https://adssettings.google.com/). Facebook: [https://www.facebook.com/about/ads](https://www.facebook.com/about/ads) + +You will need to apply these opt-out settings on each device from which you wish to opt-out. + +Please note that we also may work with companies that offer their own opt-out mechanisms and may not participate in the opt-out mechanisms that we linked to above. + +* **Do Not Track**. Some Internet browsers may be configured to send "Do Not Track" signals to the online services that you visit. We currently do not respond to "Do Not Track" or similar signals. To find out more about "Do Not Track," please visit [http://www.allaboutdnt.com](http://www.allaboutdnt.com/). +**Declining to provide information**. We need to collect personal information to provide certain services. If you do not provide the information we identify as required or mandatory, we may not be able to provide those services. +**Third-party platforms**. If you choose to connect to the Service through your social media account or other third-party platform, you may be able to use your settings in your account with that platform to limit the information we receive from it. If you revoke our ability to access information from a third-party platform, that choice will not apply to information that we have already received from that third party. + +## Other sites and services + +The Service may contain links to websites, mobile applications, and other online services operated by third parties. In addition, our content may be integrated into web pages or other online services that are not associated with us. These links and integrations are not an endorsement of, or representation that we are affiliated with, any third party. We do not control websites, mobile applications or online services operated by third parties, and we are not responsible for their actions. We encourage you to read the privacy policies of the other websites and mobile applications and online services you use. + +## Security + +We employ a number of technical, organizational and physical safeguards designed to protect the personal information we collect. However, security risk is inherent in all internet and information technologies and we cannot guarantee the security of your personal information. + +## International data transfer + +We are headquartered in the United States and may use service providers that operate in other countries. Your personal information may be transferred to the United States or other locations where privacy laws may not be as protective as those in your state, province, or country. + +## Children + +The Service is not intended for use by children under 16 years of age. If we learn that we have collected personal information through the Service from a child under 16 without the consent of the child's parent or guardian as required by law, we will delete it. We encourage parents or guardians with concerns to contact us. + +## Changes to this Privacy Policy + +We reserve the right to modify this Privacy Policy at any time. If we make material changes to this Privacy Policy, we will notify you by updating the date of this Privacy Policy and posting it on the Service. If required by law we will also provide notification of changes in another way that we believe is reasonably likely to reach you, such as via email or another manner through the Service. Any modifications to this Privacy Policy will be effective upon our posting the modified version (or as otherwise indicated at the time of posting). In all cases, your use of the Service after the effective date of any modified Privacy Policy indicates your acceptance of the modified Privacy Policy. + +## How to contact us + +* **Email** : support@supaglue.com +* **Mail** : 525 Brannan Street, Suite 304 San Francisco, CA 94107 diff --git a/docs/versioned_docs/version-0.7.5/api.md b/docs/versioned_docs/version-0.7.5/api.md new file mode 100644 index 000000000..274ad1de0 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/api.md @@ -0,0 +1,6 @@ +# API Reference + +Supaglue supports 2 APIs: + +* [Management API](api/mgmt) can be used to manage customer integrations and connections. +* [CRM API](api/crm) can be used to read and write data that has been synced into Supaglue from third-party CRM providers. diff --git a/docs/versioned_docs/version-0.7.5/architecture.mdx b/docs/versioned_docs/version-0.7.5/architecture.mdx new file mode 100644 index 000000000..de9f50c1d --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/architecture.mdx @@ -0,0 +1,47 @@ +--- +sidebar_position: 7 +--- + +# Architecture + +import ThemedImage from '@theme/ThemedImage'; + + + +## Components + +- Sync workflows +- Workflow engine (Temporal) +- DB Cache (Postgres) +- Backend API (Node.js Express) +- Common Model + +## Overview + +Supaglue is a platform that you can self-host on your infrastructure. It consists of two services, a backend API (Node.js Express) and workflow engine (Temporal), and a database (Postgres). + +The backend API serves four purposes: + +1. As a management layer for developers to configure Integrations. +2. As an authentication layer for Customers to authenticate with third-party tools to create Connections. +3. As a serving layer for developers to read/write Common Model objects. +4. As a worker layer for Sync workflows to read/write from third-party tools and cache in Supaglue's database. + +The database serves as a place to store two types of data: + +1. Supaglue application data (Integrations, Connections, Customers). +2. Data from Customers' third-party tools (raw and Common Model formats). + +The workflow engine is responsible for scheduling and executing Sync workflows which move data in/out of Supaglue and third-party tools. There are two general kinds of Syncs: + +1. Write sync: this sync will create/update records in third-party tools and then update Supaglue's cache. +2. Read sync + - Object sync - this sync is responsible for reading one type of third-party object and saving it to Supaglue's database cache in a raw and Common Model format. + - Association sync - this sync is run after all object syncs, scoped to a Connection, are finished running to associate related objects to one another. diff --git a/docs/versioned_docs/version-0.7.5/concepts.md b/docs/versioned_docs/version-0.7.5/concepts.md new file mode 100644 index 000000000..80ec189f2 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/concepts.md @@ -0,0 +1,39 @@ +--- +sidebar_position: 4 +--- + +# Concepts + +Learn about major Supaglue concepts. + +
+
Common Model
+
A canonical data model that has been standardized across all CRMs.
+ +
Connector
+
A code package that is used by Supaglue to interact with a CRM's auth, APIs, and object model.
+ +
Connection
+
A link between a Customer's CRM and a Supaglue Integration.
+ +
Customer
+
An end-user of a developer's application.
+ +
Embedded Link
+
A Customer-facing HTTP link that developers embed into their applications so their customers can authenticate their CRMs to the developers' application using Supaglue.
+ +
Integration
+
An offering made available by a developer to their customers so that Customers can connect their CRMs.
+ +
Provider
+
A CRM such as Salesforce or HubSpot.
+ +
Sync workflow
+
A process that Supaglue will run to move data from a third-party tool to/from Supaglue.
+ +
Sync Info
+
Metadata (start time, end time, status, model name) related to a Sync workflow.
+ +
Unified API
+
A HTTP API that gives developers a single interface to read and write common data models from multiple CRM providers.
+
diff --git a/docs/versioned_docs/version-0.7.5/connectors/_category_.json b/docs/versioned_docs/version-0.7.5/connectors/_category_.json new file mode 100644 index 000000000..e65b8bb0c --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Connectors", + "position": 5, + "link": { + "type": "doc", + "id": "connectors", + } +} diff --git a/docs/versioned_docs/version-0.7.5/connectors/activecampaign.md b/docs/versioned_docs/version-0.7.5/connectors/activecampaign.md new file mode 100644 index 000000000..4b16eb633 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/activecampaign.md @@ -0,0 +1,23 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/activecampaign.png +description: '' +--- + +# Active Campaign + +## Overview + +Supaglue interfaces with the ActiveCampaign V3 API. + + +| Feature | Available | +| -------------------------- | --------- | +| Auth | No | +| Reads: Full refresh | No | +| Reads: Incremental refresh | No | +| Creates | No | +| Updates | No | +| Handles rate limits | No | + +Supported object types: - diff --git a/docs/versioned_docs/version-0.7.5/connectors/connectors.md b/docs/versioned_docs/version-0.7.5/connectors/connectors.md new file mode 100644 index 000000000..587fd19a1 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/connectors.md @@ -0,0 +1,7 @@ +# Connectors + +import DocCardList from '@theme/DocCardList'; + +Here are the CRM connectors built and active maintained by Supaglue Labs. Email us (support@supaglue.com) to request a connector. + + \ No newline at end of file diff --git a/docs/versioned_docs/version-0.7.5/connectors/copper.md b/docs/versioned_docs/version-0.7.5/connectors/copper.md new file mode 100644 index 000000000..2a0780778 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/copper.md @@ -0,0 +1,22 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/copper.png +description: '' +--- + +# Copper + +## Overview + +Supaglue interfaces with the Copper V1 API. + +| Feature | Available | +| -------------------------- | --------- | +| Auth | No | +| Reads: Full refresh | No | +| Reads: Incremental refresh | No | +| Creates | No | +| Updates | No | +| Handles rate limits | No | + +Supported object types: - \ No newline at end of file diff --git a/docs/versioned_docs/version-0.7.5/connectors/hubspot.md b/docs/versioned_docs/version-0.7.5/connectors/hubspot.md new file mode 100644 index 000000000..c59d9f7f2 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/hubspot.md @@ -0,0 +1,27 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/ms_dynamics_365_sales.png +description: '' +--- + +# HubSpot + +## Overview + +Supaglue interfaces with the HubSpot V3 API. + +| Feature | Available | +| -------------------------- | --------- | +| Auth | Yes | +| Reads: Full refresh | Yes | +| Reads: Incremental refresh | Yes | +| Creates | Yes | +| Updates | Yes | +| Handles rate limits | Yes | + +Supported object types: + +- Company +- Contact +- Deal +- User diff --git a/docs/versioned_docs/version-0.7.5/connectors/ms_dynamics_365_sales.md b/docs/versioned_docs/version-0.7.5/connectors/ms_dynamics_365_sales.md new file mode 100644 index 000000000..5116f3961 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/ms_dynamics_365_sales.md @@ -0,0 +1,23 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/ms_dynamics_365_sales.png +description: '' +--- + +# Microsoft Dynamics 365 Sales + +## Overview + +Supaglue interfaces with the Microsoft Dynamics 365 V9 API. + +| Feature | Available | +| -------------------------- | --------- | +| Auth | Yes | +| Reads: Full refresh | No | +| Reads: Incremental refresh | No | +| Creates | No | +| Updates | No | +| Handles rate limits | No | + +Supported object types: - + diff --git a/docs/versioned_docs/version-0.7.5/connectors/pipedrive.md b/docs/versioned_docs/version-0.7.5/connectors/pipedrive.md new file mode 100644 index 000000000..8c590b1b1 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/pipedrive.md @@ -0,0 +1,24 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/pipedrive.png +description: '' +--- + +# Pipedrive + +## Overview + +Supaglue interfaces with the Pipedrive V1 API. + +Status: Alpha + +| Feature | Available | +| -------------------------- | --------- | +| Auth | Yes | +| Reads: Full refresh | No | +| Reads: Incremental refresh | No | +| Creates | No | +| Updates | No | +| Handles rate limits | No | + +Supported object types: - diff --git a/docs/versioned_docs/version-0.7.5/connectors/salesforce.md b/docs/versioned_docs/version-0.7.5/connectors/salesforce.md new file mode 100644 index 000000000..31027afd3 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/salesforce.md @@ -0,0 +1,28 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/salesforce.png +description: '' +--- + +# Salesforce + +## Overview + +Supaglue uses the Salesforce Bulk 2.0 API and the REST API. + +| Feature | Available | +| -------------------------- | --------- | +| Auth | Yes | +| Reads: Full refresh | Yes | +| Reads: Incremental refresh | Yes | +| Creates | Yes | +| Updates | Yes | +| Handles rate limits | Yes | + +Supported object types: + +- Account +- Contact +- Lead +- Opportunity +- User diff --git a/docs/versioned_docs/version-0.7.5/connectors/zoho_crm.md b/docs/versioned_docs/version-0.7.5/connectors/zoho_crm.md new file mode 100644 index 000000000..1f3f884e1 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/connectors/zoho_crm.md @@ -0,0 +1,22 @@ +--- +sidebar_custom_props: + icon: /img/connector_icons/zoho_crm.png +description: '' +--- + +# Zoho CRM + +## Overview + +Supaglue interfaces with the Zoho REST V3 API. + +| Feature | Available | +| -------------------------- | --------- | +| Auth | Yes | +| Reads: Full refresh | No | +| Reads: Incremental refresh | No | +| Creates | No | +| Updates | No | +| Handles rate limits | No | + +Supported object types: - diff --git a/docs/versioned_docs/version-0.7.5/contributing.md b/docs/versioned_docs/version-0.7.5/contributing.md new file mode 100644 index 000000000..531a8dedd --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/contributing.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 9 +--- + +# Contributing + +Supaglue is a community project: we welcome all kinds of contributions to help with our development. + +Here are some ways to contribute: + +- [Slack](https://join.slack.com/t/supagluecommunity/shared_invite/zt-1o2hiozzl-ZRQswNzlT5W4sXwrQnVlDg) - Discuss Supaglue with the team and other developers +- [Github](https://github.com/supaglue-labs/supaglue) - File bug reports and make code contributions +- [Twitter](https://twitter.com/supaglue_labs) - Get the latest news and announcements + +If you have questions, ideas, or feedback, reach out to us on Slack. We're a friendly group of folks based out of the San Francisco Bay Area. Drop by a say 👋 or grab a ☕️ with one of our teammates. + +Supaglue ❤️ diff --git a/docs/versioned_docs/version-0.7.5/faq.md b/docs/versioned_docs/version-0.7.5/faq.md new file mode 100644 index 000000000..9f7b770d0 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/faq.md @@ -0,0 +1,37 @@ +--- +sidebar_position: 10 +--- + +# FAQ + +## What is Supaglue? + +Supaglue is an open source unified API that makes it easy for developers to ship customer-facing CRM integrations. It's open-source, self-hostable, and fully extensible. + +## Who should use this? + +Currently, Supaglue is a good fit for developers at B2B SaaS companies who need to build user-facing Salesforce integrations into their product. Some common use cases would be building Salesforce integrations for sales enablement, sales automation, or marketing automation tools. + +## Why is this better than alternatives? + +Supaglue helps you ship customer-facing CRM integrations 10x faster through its unified API and common data model for CRMs. Because it is open source, Supaglue has several advantages over traditional unified APIs: it has no vendor lock-in, it's privacy-first, and it's fully extensible. + +## Is there a hosted version of Supaglue? + +We're currently building a cloud/managed version of Supaglue (which is how we plan to make money). Please reach out to us at hello@supaglue.com if you’re interested. + +## How do I self-host this? + +We're early and are working on documentation for self-hosting. Please reach out to us in Slack or at hello@supaglue.com in the meantime and we can help you get set up. + +## When are you going to be production-ready? + +We're still early in our journey (public alpha) but will be ready soon. Join our Slack community and/or sign up for our mailing list for updates! + +## Are you planning to support non-CRM integrations? + +Yes, we plan to expand to other verticals. Please let us know if you have a specific use case Supaglue can help with. + +## What kind of tracking/analytics do you collect? + +We use PostHog to anonymized, session-level event data in our API to help us improve the developer experience. We use Sentry for error reporting. You can opt out of tracking by setting `SUPAGLUE_DISABLE_ERROR_REPORTING=1` and `SUPAGLUE_DISABLE_ANALYTICS=1` in your `.env` file. diff --git a/docs/versioned_docs/version-0.7.5/getting-started.mdx b/docs/versioned_docs/version-0.7.5/getting-started.mdx new file mode 100644 index 000000000..6a259430f --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/getting-started.mdx @@ -0,0 +1,246 @@ +--- +sidebar_position: 3 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import BrowserWindow from '@site/src/components/BrowserWindow'; +import ThemedImage from '@theme/ThemedImage'; + +# Getting Started + +This guide will show you how to integrate Supaglue with your application in about 15 minutes. By the end, you will have configured a CRM integration, connected a sample customer's CRM, and queried their account records. + +## 1. Setup your Supaglue instance + + + + + +Sign up for [Supaglue Cloud](https://form.typeform.com/to/jv9ucMZR) early access. + +After creating your account, you will be directed to the management portal. + + + + + +Clone the Github repo and run the Supaglue stack locally using docker compose: + +```shell +git clone -b v0.7.5 https://github.com/supaglue-labs/supaglue.git && cd supaglue +docker compose up +``` + +Once Supaglue is running locally, open the [management portal](http://localhost:3000) in your browser. + + + + + +You can self-host Supaglue on your own infrastructure. See our self-hosting guide for more details. + +Once Supaglue is up and running on your infrastructure, navigate to the management portal and login with the following credentials: + +- username: `admin` +- password: `admin` (you should change this) + + + + +## 2. Configure customer-facing integrations + +Go to the "Configurations" tab to configure the integrations your customers will connect to. + + + +![image](/img/configurations-ui.png) + + + +Click on "Configure" and enter OAuth2 credentials for your HubSpot or Salesforce Connected Apps. You can find the credentials by following these guides: + +- [Salesforce](references/salesforce) +- [Hubspot](references/hubspot) + +Add the scopes your application needs from your application. + +:::info +Supaglue requires a set of minimum scopes to support reads and writes to common model objects. +::: + + + +![image](/img/configurations-details.png) + + + +## 3. Obtain your Supaglue API key + +Go to Configuration -> API Keys and click "Regenerate" to generate a new API key. This API key is used to authenticate all your requests against Supaglue's API. + + + +![image](/img/configuration-api-key.png) + + + +:::caution +You will not be able to view the API key after leaving the page, so make sure you store it in a safe place. +::: + +## 4. Create a customer + +Create a Supaglue customer using the [Management API](/api/mgmt#tag/Customers/operation/createCustomer). + +You will need four pieces of information when hitting this endpoint: + +- **customer_id**: the primary key you use in your application that uniquely identifies this customer. +- **name**: the name of the customer. +- **email**: the email associated with the customer. +- **api_key**: the Supaglue API key for Supaglue Application. + +Here's a sample request: + +```shell +curl --location --request PUT 'http://localhost:8080/mgmt/v1/customers' \ +--header 'x-api-key: {{api_key}}' +--header 'Content-Type: application/json' \ +--data-raw '{ + "name": "Customer 1", + "email": "customer-1@email.com", + "customer_id": "your_application_customer_id" +}' +``` + +:::info +A customer is an end-user in your application. You can create a Supaglue customer when they signup or update their profile in your application. You can also backfill your existing customers in Supaglue by running a script to hit the customers API endpoint. +::: + +## 5. Add Embedded Link to your application + +In your frontend application, add an [Embedded Link](guides/embedded-links) to let customers authenticate their CRMs with your application using Supaglue. + +The format of the link is: + +- `{PROTOCOL}{DOMAIN}`/oauth/connect?applicationId=`{APPLICATION_ID}`&customerId=`{CUSTOMER_ID}`&providerName=`{PROVIDER_NAME}`&returnUrl=`{RETURN_URL}` + +You can wrap link with additional styling. + +export const IntegrationCard = ({ icon, provider, description, to }) => ( +
+ +
{provider}
+
{description}
+
{ + window.location.href = to; + }} + className="border-solid font-semibold cursor-pointer hover:bg-slate-100 mt-6 px-4 py-2 border border-slate-300 rounded-md text-xs" + > + Connect +
+
+); + +
+ + + + +
+ +## 6. Create a connection + +Click on the Embedded Link you added in step 5. Go through the OAuth flow and install your CRM Connected App in a HubSpot or Salesforce account with the requested scopes. + +
+
+ +
+ +
+ +
+
+ +This creates a Supaglue connection, which you can verify by checking the customers page in the management portal. + +Upon successful connection, CRM common model records will start syncing to your Supaglue instance. + + + +![image](/img/customers-connections.png) + + + +## 7. Make API calls + +Once syncs have completed, you can start making API calls to Supaglue to read and write against the customer's CRM objects. + + + + +The following API call lists all customer account records: + +```bash +curl https://api.supaglue.com/crm/v1/accounts \ + -H 'x-api-key: {API_KEY}' \ + -H 'x-customer-id: {CUSTOMER_ID}' \ + -H 'x-provider-name: {PROVIDER_NAME}' +``` + + + + + +The following API call lists all customer account records: + +```bash +curl http://localhost:8080/crm/v1/accounts \ + -H 'x-api-key: {API_KEY}' \ + -H 'x-customer-id: {CUSTOMER_ID}' \ + -H 'x-provider-name: {PROVIDER_NAME}' +``` + + + + + +The following API call lists all customer account records: + +```bash +curl {BACKEND_HOST}/crm/v1/accounts \ + -H 'x-api-key: {API_KEY}' \ + -H 'x-customer-id: {CUSTOMER_ID}' \ + -H 'x-provider-name: {PROVIDER_NAME}' +``` + + + + +See the complete [CRM API reference](/api/crm) for all endpoints. diff --git a/docs/versioned_docs/version-0.7.5/guides/_category_.json b/docs/versioned_docs/version-0.7.5/guides/_category_.json new file mode 100644 index 000000000..df9938eb9 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/guides/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "Guides", + "position": 6, + "link": { + "type": "generated-index", + "description": "Learn about interacting with Supaglue's Unified API." + } + } + \ No newline at end of file diff --git a/docs/versioned_docs/version-0.7.5/guides/authentication.md b/docs/versioned_docs/version-0.7.5/guides/authentication.md new file mode 100644 index 000000000..d54c08fdc --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/guides/authentication.md @@ -0,0 +1,26 @@ +# Authentication + +Learn how to authenticate your requests to Supaglue's API. + +## Overview + +When you make a request to the Supaglue API, you will need to be an authorized user. Use an API key to identify yourself as an authorized user. + +API keys are generated using the Management Portal under the Configuration -> API Key page. + +![configuration-api-key](/img/configuration-api-key.png) + +:::info + +You will only be able to view the API key upon generation. Store it in a safe place. + +When you regenerate an API key, the previous key is invalidated. + +::: + +Pass in the API key in requests to the Supaglue API as a header: + +```curl +curl http://localhost:8080/crm/v1/contacts \ + -H 'x-api-key: ...' +``` diff --git a/docs/versioned_docs/version-0.7.5/guides/embedded-links.mdx b/docs/versioned_docs/version-0.7.5/guides/embedded-links.mdx new file mode 100644 index 000000000..a627bd010 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/guides/embedded-links.mdx @@ -0,0 +1,99 @@ +import ThemedImage from '@theme/ThemedImage'; + +# Embedded Links + +Learn how to use an Embedded Link in your frontend application so your customers can connect their third-party tools to your application using Supaglue. + +## Overview + +An Embedded Link is a HTTP link that initiates an authentication flow in your customer's third-party CRM to install your Connected App. Once installed, a connection is created in Supaglue allowing Supaglue to sync CRM data into its database. + +### Embedded Link format + +An Embedded Link takes the following form: + +`{PROTOCOL}{DOMAIN}`/oauth/connect?applicationId=`{APPLICATION_ID}`&customerId=`{CUSTOMER_ID}`&providerName=`{PROVIDER_NAME}`&returnUrl=`{RETURN_URL}` + +| Parameter | Description | Required | +| ------------------ | ---------------------------------------------------------------------------------------- | -------- | +| `{PROTOCOL}` | `http://` if running locally or `https://` if hosted on the cloud | Yes | +| `{DOMAIN}` | The domain at which the Supaglue backend is hosted (e.g. `localhost:8080`) | Yes | +| `{APPLICATION_ID}` | The unique identifier for your Supaglue application | Yes | +| `{CUSTOMER_ID}` | The unique identifier for a customer in your application | Yes | +| `{PROVIDER_NAME}` | The name of the third-party provider (e.g. `salesforce`, `hubspot`, etc.) | Yes | +| `{RETURN_URL}` | The URL to return to once the OAuth connection is complete, note: this can be uriEncoded | No | + +To obtain a `{PROVIDER_NAME}`, use the [Supaglue API](/api/crm) to create new integrations for your customers to have available for them to connect to. + +Examples: + +- [http://localhost:8080/oauth/connect?applicationId=a4398523-03a2-42dd-9681-c91e3e2efaf4&customerId=external-customer-hubspot&providerName=hubspot](http://localhost:8080/oauth/connect?applicationId=a4398523-03a2-42dd-9681-c91e3e2efaf4&customerId=external-customer-hubspot&providerName=hubspot) + +- [http://localhost:8080/oauth/connect?applicationId=a4398523-03a2-42dd-9681-c91e3e2efaf4&customerId=external-customer-hubspot&providerName=hubspot&returnUrl=https%3A%2F%2Fdocs.supaglue.com%2Fquickstart%233-query-the-supaglue-unified-api](http://localhost:8080/oauth/connect?applicationId=a4398523-03a2-42dd-9681-c91e3e2efaf4&customerId=external-customer-hubspot&providerName=hubspot&returnUrl=https%3A%2F%2Fdocs.supaglue.com%2Fquickstart%233-query-the-supaglue-unified-api) + +export const IntegrationCard = ({ icon, provider, description, to }) => ( +
+ +
{provider}
+
{description}
+
{ + window.location.href = to; + }} + className="border-solid font-semibold cursor-pointer hover:bg-slate-100 mt-6 px-4 py-2 border border-slate-300 rounded-md text-xs" + > + Connect +
+
+); + +### Embedded Links in UI components + +Embedded Links can be used in any UI components in your frontend application. For example, below are two cards that can be used to connect to Salesforce and Hubspot: + +
+ + + + +
+ +The code template for the cards above (using Typescript + React + Tailwindcss) is: + +```jsx +const IntegrationCard = ({ + icon, + provider, + description, + to, +}: { + icon: ReactNode, + provider: string, + description: string, + to: string, +}) => ( +
+ +
{provider}
+
{description}
+
{ + window.location.href = to; + }} + className="border-solid font-semibold cursor-pointer hover:bg-slate-100 mt-6 px-4 py-2 border border-slate-300 rounded-md text-xs" + > + Connect +
+
+); +``` diff --git a/docs/versioned_docs/version-0.7.5/guides/pagination.md b/docs/versioned_docs/version-0.7.5/guides/pagination.md new file mode 100644 index 000000000..7af8576d0 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/guides/pagination.md @@ -0,0 +1,50 @@ +# Pagination + +Learn how to paginate the results of list endpoints. + +## Overview + +If there are too many records to be returned for an object in one request, you can divide them up into pages. This is done using the `cursor` and `page_size` query parameters: + +- `page_size`: specifies how many results to return per list request. +- `cursor`: determines which page of the total result set should be returned. + +The `next` and `previous` cursor values in a list endpoint response are the cursor values to fetch the respective pages. If a value is null, then you have hit the end of page. + +:::info + +Supaglue list endpoints are sorted by id (UUID) as its stable sort key. + +::: + +Example request: + +```curl +curl 'http://localhost:8080/crm/v1/contacts?page_size=10' +``` + +Example response: + +```console +{ + "next": "eyJpZCI6IjAwMWM2ZWU1LTQzNDktNGUyYi1hMjA2LTM4ZjA1MGRjNGM2MiIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": null, + "results": [...] +} +``` + +To consume the next 10 results, set cursor to the `next` value: + +```curl +curl 'http://localhost:8080/crm/v1/contacts?page_size=10&cursor=eyJpZCI6IjAwMWM2ZWU1LTQzNDktNGUyYi1hMjA2LTM4ZjA1MGRjNGM2MiIsInJldmVyc2UiOmZhbHNlfQ==' +``` + +When you've reached the last page, the `next` cursor will be null: + +```console +{ + "next": null, + "previous": "eyJpZCI6IjAwMzAyYTMyLWNkYTAtNGI1My1iZGU4LTRhZjliZmMxZmQxZiIsInJldmVyc2UiOmZhbHNlfQ==", + "results": [...] +} +``` diff --git a/docs/versioned_docs/version-0.7.5/guides/syncing-data.md b/docs/versioned_docs/version-0.7.5/guides/syncing-data.md new file mode 100644 index 000000000..ce4328077 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/guides/syncing-data.md @@ -0,0 +1,39 @@ +# Syncing data to your app + +We recommending syncing data from Supaglue into your application using a [webhook](#1-create-an-http-endpoint-that-will-be-called-by-a-supaglue-webhook) +. + +## Syncing via webhook + +![sync-data](/img/etl.png) + +### 1. Create an HTTP endpoint that will be called by a Supaglue webhook + +This endpoint will be called when Supaglue finishes its sync. + +For each object type that you wish to sync, call the list endpoints utilizing the `modified_after` timestamp filter to incrementally fetch records. + +Start by setting `modified_after` to be the beginning of time (Epoch 0) to initially do a full refresh. + +For each page of records returned, write these records to your application database, and fetch the next page of records and repeat. + +You should store `modified_after` in your application so that the next time a Supaglue sync finishes you can only fetch and write new changes. + +#### Example +View a [full example here](https://github.com/supaglue-labs/ts-etl-example) utilizing Nodejs, Typescript, Express, and Prisma. + +- index.ts: [Webhook endpoint](https://github.com/supaglue-labs/ts-etl-example/blob/main/index.ts#L10) +- index.ts: [Concurrently fetch object lists](https://github.com/supaglue-labs/ts-etl-example/blob/main/index.ts#L25) +- supaglue.ts: [Fetch and write a page](https://github.com/supaglue-labs/ts-etl-example/blob/main/lib/supaglue.ts#L42) +- supaglue.ts: [Update watermark when a page is written](https://github.com/supaglue-labs/ts-etl-example/blob/main/lib/supaglue.ts#L95) +- supaglue:ts: [Paginate until done](https://github.com/supaglue-labs/ts-etl-example/blob/main/lib/supaglue.ts#L99) + +### 2. Register the webhook with Supaglue + +Use the [Management API's POST Webhook endpoint](/api/mgmt#tag/Webhook/operation/createWebhook) to register the endpoint implemented above. + +You can also use the [Postman webhook reference call](https://www.postman.com/supaglue/workspace/supaglue-public/request/18172762-f62a5612-c293-44c5-bb82-3f7b6c26aeb7) to create the webhook. + +## Syncing via cron/polling + +Instead of using a webhook to trigger your sync, you can instead use a cron or schedule based poll, utilizing the same incremental fetch and write logic above. diff --git a/docs/versioned_docs/version-0.7.5/intro.md b/docs/versioned_docs/version-0.7.5/intro.md new file mode 100644 index 000000000..c70ebd065 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/intro.md @@ -0,0 +1,63 @@ +--- +sidebar_position: 1 +slug: / +--- + +# Introduction + +## What is Supaglue? + +Supaglue is an open source unified API for CRMs. It handles authentication, caches and normalizes data from multiple CRM platforms, and provides a single set of API endpoints for reading and writing to those CRMs. Developers at B2B companies can use Supaglue to ship native, customer-facing CRM integrations in days. + +
+ +![supaglue-quickstart](/img/social_img.png) + +
+ +## Features + +- **Unified API**: single developer interface to read from and write to multiple third-party providers. +- **Common model**: a common data model for CRMs that normalizes core CRM entities and properties across multiple third-party providers. +- **High performance**: query against synced data in your own cloud with no rate limits. +- **Open source**: self-host and run Supaglue for free. +- **Privacy-first**: prevent sensitive customer data from leaving your infrastructure. +- **Connectors**: use [Supaglue-maintained connectors](connectors), or extend Supaglue by bringing your own connectors. +- **Developer-centric**: self-host multiple instances for local, staging, and production environments. +- **Monitoring and logs**: monitor the status of syncs and stream logs to your cloud. + +## How it works + +Developers can integrate with Supaglue in an hour or less: + +1. Create a Supaglue Cloud account or spin up Supaglue locally, and get your API key. +2. Configure your integration scopes and OAuth credentials. +3. Add an Embedded Link in your application. +4. Create Supaglue customers for each customer using your application. +5. Your customers connect their CRMs to your app, and Supaglue syncs their datainto Supaglue's backend, where it is cached, mapped to a common data model, and exposed through a unified REST API. +6. You access the Supaglue API from within your application, to help read data from and write data to your customers' CRMs. + +Supaglue consists of the following components: + +- Managed authentication +- Sync engine +- Postgres database +- Common data model +- REST API + +Supaglue is a separate service that runs alongside your stack. Supaglue is open source and can be self-hosted. + +## Use cases + +- **Lead scoring** - sync CRM records into your application to power your proprietary rules and ML models. +- **AI-based workflows** - segment, target, and compose personalized communications based on CRM data. +- **Sales enablement** - manage accounts and opportunities in your customer's CRM via your application UI. +- **CRM enrichment** - log emails, tasks, and product usage metrics to your customers' CRM. + +## Roadmap & vision + +Read more about where Supaglue is headed [here](/roadmap). + +## License + +[MIT License](https://github.com/supaglue-labs/supaglue/blob/main/LICENSE). diff --git a/docs/versioned_docs/version-0.7.5/quickstart.mdx b/docs/versioned_docs/version-0.7.5/quickstart.mdx new file mode 100644 index 000000000..17fc5dbc1 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/quickstart.mdx @@ -0,0 +1,214 @@ +--- +sidebar_position: 2 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import ThemedImage from '@theme/ThemedImage'; + +# Quickstart + +In less than 5 minutes, sync data from HubSpot or Salesforce into Supaglue and query it using a unified API. + + + +## 1. Run Supaglue locally + +Clone our repo, run our setup script which will create an `.env` file for this quickstart, and run the Supaglue stack locally using docker compose: + +```shell +git clone -b v0.7.5 https://github.com/supaglue-labs/supaglue.git && cd supaglue +./scripts/create_quickstart_env.sh +docker compose up +``` + +## 2. Authenticate Supaglue example app + +Click a card below to simulate a customer connecting their HubSpot or Salesforce account to your app. (Note: you'll need to have completed step 1 for this to work.) + +export const IntegrationCard = ({ icon, provider, description, to }) => ( +
+ +
{provider}
+
{description}
+
{ + window.location.href = to; + }} + className="border-solid font-semibold cursor-pointer hover:bg-slate-100 mt-6 px-4 py-2 border border-slate-300 rounded-md text-xs" + > + Connect +
+
+); + +
+ + + + +
+ +This will install the Supaglue Example App in the HubSpot or Salesforce account you've connected, so that your local Supaglue instance can start syncing data. + +
+ +
+ +
+ +
+ +
+ +
+ +Upon successful login, you will be redirected back to this page. + +:::info +To test running queries against Supaglue's API, you'll need the following: + +1. A Salesforce or HubSpot app that your customers can connect their CRMs to. +2. A sample "customer" to test with. +3. The sample customer's CRM instance that you'd like to query. + +For your convenience in this quickstart, we've provided Supaglue example apps and two mock customers: + +- Salesforce: `external-customer-salesforce` +- HubSpot: `external-customer-hubspot` + +If you don't have a sample CRM instance, you can create a free developer [HubSpot](https://app.hubspot.com/signup-hubspot/crm) or [Salesforce](https://developer.salesforce.com/signup) account. +::: + +## 3. Query the Supaglue unified API + +Now that you've successfully installed the Supaglue Example App in a Salesforce or HubSpot account, Supaglue will start asynchronously syncing Contacts, Leads, Accounts, and Opportunities in the background. This can take a few seconds or minutes depending on the size of the CRM instance. + +Make a `GET` request to get a list of accounts: + + + + +```shell +curl localhost:8080/crm/v1/accounts \ + -H 'x-api-key: some-api-key' \ + -H 'x-customer-id: external-customer-salesforce' \ + -H 'x-provider-name: salesforce' +``` + + + + +```shell +curl localhost:8080/crm/v1/accounts \ + -H 'x-api-key: some-api-key' \ + -H 'x-customer-id: external-customer-hubspot' \ + -H 'x-provider-name: hubspot' +``` + + + + +Example result: + +```console +{ + "results": [ + { + "id": "4019000e-8743-4603-9a0e-69633289666d", + "remote_id": "15134512387", + "owner_id": "005Dn000002DY8AIAW", + "name": "Supaglue", + "description": "open source unified api", + "industry": "software", + "website": "https://supaglue.com", + "number_of_employees": 6, + ... + }, + ... + ] +} +``` + +## 4. Check sync status (optional) + +If the curl in step 3 did not work, you can curl the `/mgmt/v1/sync-info` endpoint to check on the status of the syncs. + + + + +```shell +curl localhost:8080/mgmt/v1/sync-info \ + -H 'x-api-key: some-api-key' \ +``` + + + + +```shell +curl localhost:8080/mgmt/v1/sync-info \ + -H 'x-api-key: some-api-key' \ +``` + + + + +Example result: + +```console +[ + { + "model_name": "account", + "last_sync_start": "2023-02-24T07:52:00.076Z", + "next_sync_start": "2023-02-24T07:53:00.000Z", + "status": "DONE", + "connection_id": "1c36e9c1-1ed7-4055-ba00-41caf5b8875a", + "application_id": "a4398523-03a2-42dd-9681-c91e3e2efaf4", + "customer_id": "external-customer-hubspot", + "category": "crm", + "provider_name": "hubspot" + }, + ... +] +``` + +## References + +- Visit the [API Reference](/api) to view supported objects and HTTP methods. +- Visit the [Supaglue Postman Collection](https://www.postman.com/supaglue/workspace/supaglue-public/overview) to make HTTP requests against your instance of Supaglue. + +## Use your own Salesforce or HubSpot App + +Please reach out to us if you'd like to try Supaglue using your Salesforce Connected App or HubSpot App: [support@supaglue.com](mailto:support@supaglue.com). diff --git a/docs/versioned_docs/version-0.7.5/references/_category_.json b/docs/versioned_docs/version-0.7.5/references/_category_.json new file mode 100644 index 000000000..90c519275 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/references/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "References", + "position": 11, + "link": { + "type": "generated-index", + "description": "Other Supaglue reference documentation." + } + } + \ No newline at end of file diff --git a/docs/versioned_docs/version-0.7.5/references/hubspot.md b/docs/versioned_docs/version-0.7.5/references/hubspot.md new file mode 100644 index 000000000..dceaada81 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/references/hubspot.md @@ -0,0 +1,23 @@ +# Hubspot Connected App + +1. Login to your Hubspot developer account: https://app.hubspot.com/developer +2. Navigate to your Connected Application +3. Click on the "Auth" tab +4. Take note of "Client ID", "Client secret" to enter into Supaglue's Management Portal +5. Enter your OAuth2 redirect URL under "Redirect URLs" +6. Check the following scopes under "Scopes": + +Required for reads: + +- `crm.objects.owners.read` +- `crm.objects.companies.read` +- `crm.lists.read` +- `crm.objects.deals.read` +- `crm.objects.contacts.read` + +Required for writes: + +- `crm.objects.contacts.write` +- `crm.objects.companies.write` +- `crm.objects.deals.write` +- `crm.lists.write` diff --git a/docs/versioned_docs/version-0.7.5/references/salesforce.md b/docs/versioned_docs/version-0.7.5/references/salesforce.md new file mode 100644 index 000000000..4ff7b198a --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/references/salesforce.md @@ -0,0 +1,3 @@ +# Salesforce Connected App + +*Docs to be added...* diff --git a/docs/versioned_docs/version-0.7.5/roadmap.md b/docs/versioned_docs/version-0.7.5/roadmap.md new file mode 100644 index 000000000..67e5727b4 --- /dev/null +++ b/docs/versioned_docs/version-0.7.5/roadmap.md @@ -0,0 +1,39 @@ +--- +sidebar_position: 8 +--- + +# Roadmap & vision + +## Our vision + +Business today rely on dozens, sometimes hundreds of SaaS tools, to run their businesses. Modern SaaS products exist within a larger ecosystem, and supporting native integrations to other tools has become a table stakes requirement. + +Having built user-facing integrations ourselves, we know that building integrations can be painful and time-consuming. Our mission at Supaglue is to make building integrations fast, seamless, and extensible. Our immediate goal is to help developers ship integrations in days rather than months. We're starting with CRMs and plan to expand to other categories in the future. + +Our longer-term vision is to become the connected layer for all business applications. We took an open-source approach because we believe that this connected layer should be transparent, and that open source and community contributions is the only way to support the long-tail of SaaS connectors that businesses need. + +## Upcoming weeks + +In the coming weeks we plan to ship: + +✅ Associated objects
+✅ Management portal
+✅ Incremental reads
+🚧 Cloud / managed version of Supaglue
+🚧 Support for tasks, notes, and events in common model
+🚧 CDC event webhooks
+🚧 Client drivers
+🚧 API logs
+🚧 Metrics and alerting
+🚧 Sync configuration and throttling
+🚧 Customizable common model + +## Upcoming months / quarters + +We're also thinking about some longer-term projects: + +- CLI +- Connector developer kit (CDK) for community contributed connectors +- More Supaglue-supported connectors + +If there's something you like or have an idea for a feature, join our [Slack](https://join.slack.com/t/supagluecommunity/shared_invite/zt-1o2hiozzl-ZRQswNzlT5W4sXwrQnVlDg) and let us know! We'd love to hear from you. diff --git a/docs/versioned_sidebars/version-0.7.5-sidebars.json b/docs/versioned_sidebars/version-0.7.5-sidebars.json new file mode 100644 index 000000000..caea0c03b --- /dev/null +++ b/docs/versioned_sidebars/version-0.7.5-sidebars.json @@ -0,0 +1,8 @@ +{ + "tutorialSidebar": [ + { + "type": "autogenerated", + "dirName": "." + } + ] +} diff --git a/docs/versions.json b/docs/versions.json index eb1d7f489..bef97d934 100644 --- a/docs/versions.json +++ b/docs/versions.json @@ -1,4 +1,5 @@ [ + "0.7.5", "0.7.4", "0.7.3" ] diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 231a86e87..d2a530aeb 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -45,8 +45,8 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.0.11 +version: 0.0.12 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 0.7.4 +appVersion: 0.7.5 diff --git a/openapi/crm/openapi.bundle.json b/openapi/crm/openapi.bundle.json index 238c4d967..ea1d4efe6 100644 --- a/openapi/crm/openapi.bundle.json +++ b/openapi/crm/openapi.bundle.json @@ -1,7 +1,7 @@ { "openapi": "3.0.3", "info": { - "version": "0.7.4", + "version": "0.7.5", "title": "Supaglue CRM API", "contact": { "name": "Supaglue", diff --git a/openapi/crm/openapi.yaml b/openapi/crm/openapi.yaml index 27790b0bd..a5ad3a112 100644 --- a/openapi/crm/openapi.yaml +++ b/openapi/crm/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.3 info: - version: 0.7.4 + version: 0.7.5 title: Supaglue CRM API contact: name: Supaglue diff --git a/openapi/mgmt/openapi.bundle.json b/openapi/mgmt/openapi.bundle.json index acc45d827..b9ef1e64c 100644 --- a/openapi/mgmt/openapi.bundle.json +++ b/openapi/mgmt/openapi.bundle.json @@ -1,7 +1,7 @@ { "openapi": "3.1.0", "info": { - "version": "0.7.4", + "version": "0.7.5", "title": "Supaglue Management API", "contact": { "name": "Supaglue", diff --git a/openapi/mgmt/openapi.yaml b/openapi/mgmt/openapi.yaml index 65db2cb36..250bbd434 100644 --- a/openapi/mgmt/openapi.yaml +++ b/openapi/mgmt/openapi.yaml @@ -2,7 +2,7 @@ # Other than the `webhooks` key, we should not use 3.1.0 features since the validation middleware doesn't support it yet openapi: 3.1.0 info: - version: 0.7.4 + version: 0.7.5 title: Supaglue Management API contact: name: Supaglue diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/header/x-customer-id.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/header/x-customer-id.yaml new file mode 100644 index 000000000..006a1cf62 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/header/x-customer-id.yaml @@ -0,0 +1,7 @@ +name: x-customer-id +in: header +schema: + type: string + example: my-customer-1 +description: The customer ID that uniquely identifies the customer in your application +required: true diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/header/x-provider-name.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/header/x-provider-name.yaml new file mode 100644 index 000000000..71e392e1f --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/header/x-provider-name.yaml @@ -0,0 +1,7 @@ +name: x-provider-name +in: header +schema: + type: string + example: salesforce +description: The provider name +required: true diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/created_after.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/created_after.yaml new file mode 100644 index 000000000..eb6a5be9f --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/created_after.yaml @@ -0,0 +1,7 @@ +name: created_after +in: query +schema: + type: string + format: date-time + example: 2023-02-23T00:00:00Z +description: If provided, will only return objects created after this datetime diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/created_before.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/created_before.yaml new file mode 100644 index 000000000..1bbc4adf9 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/created_before.yaml @@ -0,0 +1,7 @@ +name: created_before +in: query +schema: + type: string + format: date-time + example: 2023-02-23T00:00:00Z +description: If provided, will only return objects created before this datetime diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/cursor.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/cursor.yaml new file mode 100644 index 000000000..039f20706 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/cursor.yaml @@ -0,0 +1,6 @@ +name: cursor +in: query +schema: + type: string + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw +description: The pagination cursor value diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/customer_id.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/customer_id.yaml new file mode 100644 index 000000000..f2a7ff2c6 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/customer_id.yaml @@ -0,0 +1,6 @@ +name: customer_id +in: query +schema: + type: string + example: 1bae5050-b8ff-472e-8b9f-01f29a81d1ee +description: The customer ID that uniquely identifies the customer in your application diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/expand.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/expand.yaml new file mode 100644 index 000000000..254ebe3b7 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/expand.yaml @@ -0,0 +1,8 @@ +name: expand +in: query +schema: + type: string + example: owner +description: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/include_deleted_data.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/include_deleted_data.yaml new file mode 100644 index 000000000..6829283e5 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/include_deleted_data.yaml @@ -0,0 +1,6 @@ +name: include_deleted_data +in: query +schema: + type: boolean + example: true +description: Whether to include data that was deleted in providers. diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/modified_after.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/modified_after.yaml new file mode 100644 index 000000000..9ad88e89c --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/modified_after.yaml @@ -0,0 +1,7 @@ +name: modified_after +in: query +schema: + type: string + format: date-time + example: 2023-02-23T00:00:00Z +description: If provided, will only return objects modified after this datetime diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/modified_before.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/modified_before.yaml new file mode 100644 index 000000000..5e582cd96 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/modified_before.yaml @@ -0,0 +1,7 @@ +name: modified_before +in: query +schema: + type: string + format: date-time + example: 2023-02-23T00:00:00Z +description: If provided, will only return objects modified before this datetime diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/page_size.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/page_size.yaml new file mode 100644 index 000000000..6f04f2f60 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/page_size.yaml @@ -0,0 +1,6 @@ +name: page_size +in: query +schema: + type: string + example: '3804695' +description: Number of results to return per page diff --git a/openapi/versioned/version-0.7.5/common/components/parameters/query/provider_name.yaml b/openapi/versioned/version-0.7.5/common/components/parameters/query/provider_name.yaml new file mode 100644 index 000000000..6239b97f8 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/parameters/query/provider_name.yaml @@ -0,0 +1,6 @@ +name: provider_name +in: query +schema: + type: string + example: salesforce +description: The provider name diff --git a/openapi/versioned/version-0.7.5/common/components/schemas/errors.yaml b/openapi/versioned/version-0.7.5/common/components/schemas/errors.yaml new file mode 100644 index 000000000..d5e70680b --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/schemas/errors.yaml @@ -0,0 +1,30 @@ +type: array +items: + type: object + properties: + detail: + type: string + example: name is a required field on model. + problem_type: + type: string + example: MISSING_REQUIRED_FIELD + source: + type: object + properties: + pointer: + type: string + example: irure consectetur + title: + type: string + example: Missing Required Field + example: + - detail: name is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + source: + pointer: irure consectetur + title: Missing Required Field + - detail: name is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + source: + pointer: et + title: Missing Required Field diff --git a/openapi/versioned/version-0.7.5/common/components/schemas/logs.yaml b/openapi/versioned/version-0.7.5/common/components/schemas/logs.yaml new file mode 100644 index 000000000..96fcd4242 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/schemas/logs.yaml @@ -0,0 +1,38 @@ +type: array +items: + type: object + properties: + dashboard_view: + type: string + example: >- + https://api.supaglue.com/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_id: + type: string + example: 99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + type: object + properties: + method: + type: string + example: POST + status_code: + type: number + example: 200 + url: + type: string + example: https://harvest.greenhouse.io/v1/candidates/ +example: + - dashboard_view: >- + https://api.supaglue.com/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + method: POST + status_code: 200 + url: https://harvest.greenhouse.io/v1/candidates/ + - dashboard_view: >- + https://api.supaglue.com/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + method: POST + status_code: 200 + url: https://harvest.greenhouse.io/v1/candidates/ diff --git a/openapi/versioned/version-0.7.5/common/components/schemas/pagination.yaml b/openapi/versioned/version-0.7.5/common/components/schemas/pagination.yaml new file mode 100644 index 000000000..3ad1f8c79 --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/schemas/pagination.yaml @@ -0,0 +1,10 @@ +type: object +properties: + next: + type: string + nullable: true + example: eyJpZCI6IjQyNTc5ZjczLTg1MjQtNDU3MC05YjY3LWVjYmQ3MDJjNmIxNCIsInJldmVyc2UiOmZhbHNlfQ== + previous: + type: string + nullable: true + example: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 diff --git a/openapi/versioned/version-0.7.5/common/components/schemas/warnings.yaml b/openapi/versioned/version-0.7.5/common/components/schemas/warnings.yaml new file mode 100644 index 000000000..0bd9ffb6e --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/schemas/warnings.yaml @@ -0,0 +1,36 @@ +type: array +items: + type: object + properties: + detail: + type: string + example: >- + An unrecognized field, age, was passed in with + request data. + problem_type: + type: string + example: UNRECOGNIZED_FIELD + source: + type: object + properties: + pointer: + type: string + example: Lorem ipsum + title: + type: string + example: Unrecognized Field +example: + - detail: >- + An unrecognized field, age, was passed in with request + data. + problem_type: UNRECOGNIZED_FIELD + source: + pointer: Lorem ipsum + title: Unrecognized Field + - detail: >- + An unrecognized field, age, was passed in with request + data. + problem_type: UNRECOGNIZED_FIELD + source: + pointer: in + title: Unrecognized Field diff --git a/openapi/versioned/version-0.7.5/common/components/securitySchemes/x-api-key.yaml b/openapi/versioned/version-0.7.5/common/components/securitySchemes/x-api-key.yaml new file mode 100644 index 000000000..3b625955a --- /dev/null +++ b/openapi/versioned/version-0.7.5/common/components/securitySchemes/x-api-key.yaml @@ -0,0 +1,4 @@ +type: apiKey +name: x-api-key +in: header +description: API key to allow developers to access the API diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_account.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_account.yaml new file mode 100644 index 000000000..220cc5606 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_account.yaml @@ -0,0 +1,34 @@ +type: object +properties: + description: + type: string + nullable: true + example: Integration API + industry: + type: string + nullable: true + example: API's + name: + type: string + nullable: true + example: Sample Customer + number_of_employees: + type: integer + nullable: true + example: 276000 + website: + type: string + nullable: true + example: https://supaglue.com/ + addresses: + $ref: './objects/addresses.yaml' + phone_numbers: + $ref: './objects/phone_numbers.yaml' + owner_id: + type: string + nullable: true + example: 9f3e97fd-4d5d-4efc-959d-bbebfac079f5 + lifecycle_stage: + $ref: './objects/lifecycle_stage.yaml' + custom_fields: + $ref: ./objects/custom_fields.yaml diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_contact.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_contact.yaml new file mode 100644 index 000000000..9a9bdbc1d --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_contact.yaml @@ -0,0 +1,28 @@ +type: object +properties: + first_name: + type: string + nullable: true + example: George + last_name: + type: string + nullable: true + example: Xing + account_id: + type: string + nullable: true + example: 64571bff-48ea-4469-9fa0-ee1a0bab38bd + addresses: + $ref: ./objects/addresses.yaml + email_addresses: + $ref: ./objects/email_addresses.yaml + phone_numbers: + $ref: ./objects/phone_numbers.yaml + owner_id: + type: string + nullable: true + example: 9f3e97fd-4d5d-4efc-959d-bbebfac079f5 + lifecycle_stage: + $ref: './objects/lifecycle_stage.yaml' + custom_fields: + $ref: ./objects/custom_fields.yaml diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_event.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_event.yaml new file mode 100644 index 000000000..7a79bfe9e --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_event.yaml @@ -0,0 +1,43 @@ +type: object +properties: + type: + type: string + nullable: true + example: Meeting + subject: + type: string + nullable: true + example: Meeting + start_time: + type: string + nullable: true + example: '2022-02-27T00:00:00Z' + end_time: + type: string + nullable: true + example: '2022-02-27T00:00:00Z' + content: + type: string + nullable: true + owner_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + account_id: + type: string + nullable: true + example: 1393711e-b7ba-46ef-b9cd-49134cf2c630 + contact_id: + type: string + nullable: true + example: 34288f14-7d3e-4275-8b14-3df6d116b1af + lead_id: + type: string + nullable: true + example: c1b1c601-6707-4d3a-8c1a-ec0127358019 + opportunity_id: + type: string + nullable: true + example: 2506e5f3-1805-405a-a13c-baa0ac524274 + custom_fields: + $ref: ./objects/custom_fields.yaml diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_lead.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_lead.yaml new file mode 100644 index 000000000..1789d90dd --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_lead.yaml @@ -0,0 +1,31 @@ +type: object +properties: + company: + type: string + nullable: true + example: Supaglue + first_name: + type: string + nullable: true + example: George + last_name: + type: string + nullable: true + example: Xing + lead_source: + type: string + nullable: true + example: API Blogger + title: + type: string + example: Co-Founder + email_addresses: + $ref: ./objects/email_addresses.yaml + addresses: + $ref: ./objects/addresses.yaml + owner_id: + type: string + nullable: true + example: 9f3e97fd-4d5d-4efc-959d-bbebfac079f5 + custom_fields: + $ref: ./objects/custom_fields.yaml diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_opportunity.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_opportunity.yaml new file mode 100644 index 000000000..75ae22880 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/create_update_opportunity.yaml @@ -0,0 +1,34 @@ +type: object +properties: + amount: + type: integer + nullable: true + example: 100000 + close_date: + type: string + nullable: true + example: '2022-02-10T00:00:00Z' + description: + type: string + nullable: true + example: Wants to use open source unified API for third-party integrations + name: + type: string + nullable: true + example: Needs Integrations + stage: + type: string + example: Closed Won + account_id: + type: string + nullable: true + example: 64571bff-48ea-4469-9fa0-ee1a0bab38bd + owner_id: + type: string + nullable: true + example: 9f3e97fd-4d5d-4efc-959d-bbebfac079f5 + pipeline: + type: string + nullable: true + custom_fields: + $ref: ./objects/custom_fields.yaml diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/filters.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/filters.yaml new file mode 100644 index 000000000..19334a13e --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/filters.yaml @@ -0,0 +1,30 @@ +equalsFilter: + type: object + additionalProperties: false + properties: + type: + type: string + enum: + - equals + value: + type: string + required: + - type + - value +# containsFilter: +# type: object +# additionalProperties: false +# properties: +# type: +# type: string +# enum: +# - contains +# value: +# type: string +# required: +# - type +# - value +filter: + oneOf: + - $ref: '#/equalsFilter' + # - $ref: '#/containsFilter' diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/account.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/account.yaml new file mode 100644 index 000000000..16f35021a --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/account.yaml @@ -0,0 +1,76 @@ +type: object +properties: + addresses: + $ref: './addresses.yaml' + description: + type: string + nullable: true + example: Integration API + id: + type: string + example: e888cedf-e9d0-42c5-9485-2d72984faef2 + remote_id: + type: string + example: 1234 + industry: + type: string + nullable: true + example: API's + last_activity_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + name: + type: string + nullable: true + example: Sample Customer + number_of_employees: + type: integer + nullable: true + example: 276000 + owner_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + owner: + $ref: ./user.yaml + phone_numbers: + $ref: './phone_numbers.yaml' + lifecycle_stage: + $ref: './lifecycle_stage.yaml' + website: + type: string + nullable: true + example: https://supaglue.com/ + remote_created_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_updated_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_was_deleted: + type: boolean + example: false + last_modified_at: + type: string + nullable: true # we should make this required + format: date-time + example: '2022-02-27T00:00:00Z' +required: + - addresses + - description + - id + - remote_id + - industry + - last_activity_at + - name + - number_of_employees + - owner_id + - phone_numbers + - website + - lifecycle_stage diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/addresses.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/addresses.yaml new file mode 100644 index 000000000..279bb0ebf --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/addresses.yaml @@ -0,0 +1,51 @@ +type: array +items: + type: object + properties: + address_type: + type: string + enum: + - primary + - mailing + - other + - billing + - shipping + city: + type: string + nullable: true + example: San Francisco + country: + type: string + nullable: true + example: USA + postal_code: + type: string + nullable: true + example: '94107' + state: + type: string + nullable: true + example: CA + street1: + type: string + nullable: true + example: 525 Brannan + street2: + type: string + nullable: true + example: ~ + required: + - address_type + - city + - country + - postal_code + - state + - street1 +example: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/contact.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/contact.yaml new file mode 100644 index 000000000..1df01b5c8 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/contact.yaml @@ -0,0 +1,72 @@ +type: object +properties: + account_id: + type: string + nullable: true + example: fd089246-09b1-4e3b-a60a-7a76314bbcce + account: + $ref: ./account.yaml + owner_id: + type: string + nullable: true + example: 23e640fe-6105-4a11-a636-3aa6b6c6e762 + owner: + $ref: ./user.yaml + addresses: + $ref: ./addresses.yaml + email_addresses: + $ref: ./email_addresses.yaml + first_name: + type: string + nullable: true + example: George + id: + type: string + example: 88cc44ca-7a34-4e8b-b0da-51c3aae34daf + remote_id: + type: string + example: 54312 + last_activity_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + last_name: + type: string + nullable: true + example: Xing + phone_numbers: + $ref: ./phone_numbers.yaml + lifecycle_stage: + $ref: './lifecycle_stage.yaml' + remote_created_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_updated_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_was_deleted: + type: boolean + example: false + last_modified_at: + type: string + nullable: true # we should make this required + format: date-time + example: '2022-02-27T00:00:00Z' +required: + - account_id + - owner_id + - description + - id + - remote_id + - addresses + - email_addresses + - first_name + - last_activity_at + - last_name + - phone_numbers + - lifecycle_stage diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/custom_fields.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/custom_fields.yaml new file mode 100644 index 000000000..83e2742e3 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/custom_fields.yaml @@ -0,0 +1,3 @@ +type: object +additionalProperties: true +description: Custom properties to be inserted that are not covered by the common model. Object keys must match exactly to the corresponding provider API. diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/email_addresses.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/email_addresses.yaml new file mode 100644 index 000000000..52b02a69c --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/email_addresses.yaml @@ -0,0 +1,18 @@ +type: array +items: + type: object + properties: + email_address: + type: string + example: hello@supaglue.com + email_address_type: + type: string + enum: + - primary + - work + required: + - email_address + - email_address_type +example: + - email_address: hello@supaglue.com + email_address_type: work diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/event.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/event.yaml new file mode 100644 index 000000000..87313d928 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/event.yaml @@ -0,0 +1,90 @@ +type: object +properties: + id: + type: string + example: e888cedf-e9d0-42c5-9485-2d72984faef2 + remote_id: + type: string + example: 1234 + type: + type: string + nullable: true + example: Meeting + subject: + type: string + nullable: true + example: Meeting + start_time: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + end_time: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + content: + type: string + nullable: true + owner_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + owner: + $ref: ./user.yaml + account_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + account: + $ref: ./account.yaml + contact_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + contact: + $ref: ./contact.yaml + lead_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + lead: + $ref: ./lead.yaml + opportunity_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + opportunity: + $ref: ./opportunity.yaml + remote_created_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_updated_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_was_deleted: + type: boolean + example: false + last_modified_at: + type: string + nullable: true # we should make this required + format: date-time + example: '2022-02-27T00:00:00Z' +required: + - id + - remote_id + - subject + - type + - content + - start_time + - end_time + - owner_id + - account_id + - contact_id + - lead_id + - opportunity_id diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/lead.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/lead.yaml new file mode 100644 index 000000000..2aef10f4b --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/lead.yaml @@ -0,0 +1,88 @@ +type: object +properties: + addresses: + $ref: ./addresses.yaml + company: + type: string + nullable: true + example: Supaglue + converted_account_id: + type: string + nullable: true + example: 88cc44ca-7a34-4e8b-b0da-51c3aae34daf + converted_account: + $ref: './account.yaml' + converted_contact_id: + type: string + nullable: true + example: 8c8de778-a219-4d6c-848c-1d57b52149f6 + converted_contact: + $ref: './contact.yaml' + converted_date: + type: string + nullable: true + format: date-time + example: '2023-02-27T00:00:00Z' + email_addresses: + $ref: ./email_addresses.yaml + first_name: + type: string + nullable: true + example: George + id: + type: string + example: e774484c-4ff2-421f-adfa-12f66ed75b91 + remote_id: + type: string + example: 54312 + last_name: + type: string + nullable: true + example: Xing + lead_source: + type: string + nullable: true + example: API Blogger + owner_id: + type: string + nullable: true + example: 62e5e0f7-becd-4ae2-be82-8b4e1d5ed8a2 + owner: + $ref: ./user.yaml + phone_numbers: + $ref: ./phone_numbers.yaml + title: + type: string + nullable: true + example: Co-Founder + remote_created_at: + type: string + nullable: true + format: date-time + example: '2023-02-10T00:00:00Z' + remote_updated_at: + type: string + nullable: true + format: date-time + example: '2023-02-10T00:00:00Z' + remote_was_deleted: + type: boolean + example: false + last_modified_at: + type: string + nullable: true # we should make this required + format: date-time + example: '2022-02-27T00:00:00Z' +required: + - addresses + - company + - converted_account_id + - converted_contact_id + - converted_date + - id + - remote_id + - last_name + - lead_source + - owner_id + - phone_numbers + - title diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/lifecycle_stage.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/lifecycle_stage.yaml new file mode 100644 index 000000000..6127cb35a --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/lifecycle_stage.yaml @@ -0,0 +1,11 @@ +type: string +nullable: true +enum: + - subscriber + - lead + - marketingqualifiedlead + - salesqualifiedlead + - opportunity + - customer + - evangelist + - other diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/opportunity.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/opportunity.yaml new file mode 100644 index 000000000..c5b3621b5 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/opportunity.yaml @@ -0,0 +1,83 @@ +type: object +properties: + account_id: + type: string + nullable: true + example: fd089246-09b1-4e3b-a60a-7a76314bbcce + account: + $ref: ./account.yaml + amount: + type: integer + nullable: true + example: 100000 + close_date: + type: string + nullable: true + format: date-time + example: '2023-02-27T00:00:00Z' + description: + type: string + nullable: true + example: Wants to use open source unified API for third-party integrations + id: + type: string + example: e888cedf-e9d0-42c5-9485-2d72984faef2 + remote_id: + type: string + example: 54312 + last_activity_at: + type: string + nullable: true + format: date-time + example: '2023-02-27T00:00:00Z' + name: + type: string + nullable: true + example: Needs third-party integrations + owner_id: + type: string + nullable: true + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + owner: + $ref: ./user.yaml + pipeline: + type: string + nullable: true + stage: + type: string + nullable: true + example: 'Closed Won' + status: + type: string # TODO: enum + nullable: true + example: OPEN + remote_created_at: + type: string + nullable: true + format: date-time + example: '2023-02-27T00:00:00Z' + remote_updated_at: + type: string + nullable: true + format: date-time + example: '2023-02-27T00:00:00Z' + remote_was_deleted: + type: boolean + example: false + last_modified_at: + type: string + nullable: true # we should make this required + format: date-time + example: '2022-02-27T00:00:00Z' +required: + - account_id + - amount + - description + - id + - remote_id + - last_activity_at + - name + - owner_id + - stage + - status + - pipeline diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/phone_numbers.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/phone_numbers.yaml new file mode 100644 index 000000000..69bc86f78 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/phone_numbers.yaml @@ -0,0 +1,20 @@ +type: array +items: + type: object + properties: + phone_number: + type: string + nullable: true + example: '+14151234567' + phone_number_type: + type: string + enum: + - primary + - mobile + - fax + required: + - phone_number + - phone_number_type +example: + - phone_number: '+14151234567' + phone_number_type: primary diff --git a/openapi/versioned/version-0.7.5/crm/components/schemas/objects/user.yaml b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/user.yaml new file mode 100644 index 000000000..3c01aec76 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/components/schemas/objects/user.yaml @@ -0,0 +1,43 @@ +type: object +properties: + id: + type: string + example: e888cedf-e9d0-42c5-9485-2d72984faef2 + remote_id: + type: string + example: 54312 + name: + type: string + nullable: true + example: George Xing + email: + type: string + nullable: true + example: george@supaglue.com + is_active: + type: boolean + nullable: true + remote_created_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_updated_at: + type: string + nullable: true + format: date-time + example: '2022-02-27T00:00:00Z' + remote_was_deleted: + type: boolean + example: false + last_modified_at: + type: string + nullable: true # we should make this required + format: date-time + example: '2022-02-27T00:00:00Z' +required: + - id + - remote_id + - name + - email + - is_active diff --git a/openapi/versioned/version-0.7.5/crm/openapi.bundle.json b/openapi/versioned/version-0.7.5/crm/openapi.bundle.json new file mode 100644 index 000000000..4ef63f316 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/openapi.bundle.json @@ -0,0 +1,3508 @@ +{ + "openapi": "3.0.3", + "info": { + "version": "0.7.5", + "title": "Supaglue CRM API", + "contact": { + "name": "Supaglue", + "email": "docs@supaglue.com", + "url": "https://supaglue.com" + }, + "description": "# Introduction\n\nWelcome to the Supaglue unified CRM API documentation. You can use this API to read data that has been synced into Supaglue from third-party providers.\n\n### Base API URL\n\n```\nhttp://localhost:8080/crm/v1\n```\n" + }, + "externalDocs": { + "description": "Try out our API in Postman!", + "url": "https://www.postman.com/supaglue/workspace/supaglue-public/overview" + }, + "servers": [ + { + "url": "http://localhost:8080/crm/v1", + "description": "Local Supaglue API" + } + ], + "paths": { + "/accounts": { + "get": { + "operationId": "getAccounts", + "tags": ["Accounts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List accounts", + "description": "Get a list of accounts", + "parameters": [ + { + "$ref": "#/components/parameters/include_deleted_data" + }, + { + "$ref": "#/components/parameters/created_after" + }, + { + "$ref": "#/components/parameters/created_before" + }, + { + "$ref": "#/components/parameters/modified_after" + }, + { + "$ref": "#/components/parameters/modified_before" + }, + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/expand" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "responses": { + "200": { + "description": "Accounts", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/account" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "description": "Integration API", + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6a", + "remote_id": 1234, + "industry": "APIs", + "last_activity_at": "2022-02-10T00:00:00Z", + "name": "Sample Customer", + "number_of_employees": 276000, + "owner_id": "cb40ff24-6587-4b24-82a3-9269a05d5dda", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2021-11-10T00:00:00Z", + "remote_updated_at": "2022-01-09T00:00:00Z", + "website": "https://supaglue.com/" + }, + { + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "description": "Integration API", + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6b", + "remote_id": 1235, + "industry": "APIs", + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Sample Customer", + "number_of_employees": 276000, + "owner_id": "cb40ff24-6587-4b24-82a3-9269a05d5dda", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "website": "https://supaglue.com/" + } + ] + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createAccount", + "summary": "Create account", + "tags": ["Accounts"], + "parameters": [], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_account" + } + }, + "required": ["model"] + } + } + } + }, + "responses": { + "201": { + "description": "Account created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/account" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/accounts/_search": { + "post": { + "operationId": "searchAccounts", + "summary": "Search accounts", + "tags": ["Accounts"], + "parameters": [ + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filters": { + "type": "object", + "properties": { + "website": { + "$ref": "#/components/schemas/filter" + } + } + } + }, + "required": ["filters"] + } + } + } + }, + "responses": { + "200": { + "description": "Accounts", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/account" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "description": "Integration API", + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6a", + "remote_id": 1234, + "industry": "APIs", + "last_activity_at": "2022-02-10T00:00:00Z", + "name": "Sample Customer", + "number_of_employees": 276000, + "owner_id": "cb40ff24-6587-4b24-82a3-9269a05d5dda", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2021-11-10T00:00:00Z", + "remote_updated_at": "2022-01-09T00:00:00Z", + "website": "https://supaglue.com/" + }, + { + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "description": "Integration API", + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6b", + "remote_id": 1235, + "industry": "APIs", + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Sample Customer", + "number_of_employees": 276000, + "owner_id": "cb40ff24-6587-4b24-82a3-9269a05d5dda", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "website": "https://supaglue.com/" + } + ] + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/accounts/{account_id}": { + "get": { + "operationId": "getAccount", + "summary": "Get account", + "tags": ["Accounts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/expand" + } + ], + "responses": { + "200": { + "description": "Account", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + }, + "examples": { + "Example": { + "value": { + "addresses": [ + { + "address_type": "BILLING", + "city": "San Francisco", + "country": "CX", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + }, + { + "address_type": "BILLING", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "description": "Integration API", + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6c", + "remote_id": 1234, + "industry": "API's", + "last_activity_at": "2022-02-10T00:00:00Z", + "name": "Supaglue", + "number_of_employees": 276000, + "owner_id": "9377fd4d-d420-4e0b-93ea-789078a3eab4", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "website": "https://supaglue.com/" + } + } + } + } + } + } + } + }, + "patch": { + "operationId": "updateAccount", + "summary": "Update account", + "tags": ["Accounts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_account" + } + }, + "required": ["model"] + } + } + } + }, + "responses": { + "200": { + "description": "Account updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/account" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + }, + { + "name": "account_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/contacts": { + "get": { + "operationId": "getContacts", + "tags": ["Contacts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List contacts", + "description": "Get a list of contacts", + "parameters": [ + { + "$ref": "#/components/parameters/include_deleted_data" + }, + { + "$ref": "#/components/parameters/created_after" + }, + { + "$ref": "#/components/parameters/created_before" + }, + { + "$ref": "#/components/parameters/modified_after" + }, + { + "$ref": "#/components/parameters/modified_before" + }, + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/expand" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "responses": { + "200": { + "description": "Contacts", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/contact" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "account_id": "9377fd4d-d420-4e0b-93ea-789078a3eab4", + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "email_addresses": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ], + "first_name": "George", + "id": "43a45011-c55e-42f3-81a1-99158c956775", + "remote_id": 1234, + "last_activity_at": "2023-02-27T00:00:00Z", + "last_name": "Xing", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z" + }, + { + "account": "9377fd4d-d420-4e0b-93ea-789078a3eab4", + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "email_addresses": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ], + "first_name": "George", + "id": "5733a8b6-472d-45fa-8f10-e0b00727cced", + "remote_id": 1235, + "last_activity_at": "2023-02-27T00:00:00Z", + "last_name": "Xing", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z" + } + ] + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createContact", + "summary": "Create contact", + "tags": ["Contacts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_contact" + } + }, + "required": ["model"] + }, + "example": { + "model": { + "first_name": "George", + "last_activity_at": "2022-02-10T00:00:00Z", + "last_name": "Xing", + "account_id": "64571bff-48ea-4469-9fa0-ee1a0bab38bd" + } + } + } + } + }, + "responses": { + "201": { + "description": "Contact created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/contact" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/contacts/_search": { + "post": { + "operationId": "searchContacts", + "summary": "Search contacts", + "tags": ["Contacts"], + "parameters": [ + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filters": { + "type": "object", + "properties": { + "email_address": { + "$ref": "#/components/schemas/filter" + } + } + } + }, + "required": ["filters"] + } + } + } + }, + "responses": { + "200": { + "description": "Contacts", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/contact" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "account_id": "9377fd4d-d420-4e0b-93ea-789078a3eab4", + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "email_addresses": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ], + "first_name": "George", + "id": "43a45011-c55e-42f3-81a1-99158c956775", + "remote_id": 1234, + "last_activity_at": "2023-02-27T00:00:00Z", + "last_name": "Xing", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z" + }, + { + "account": "9377fd4d-d420-4e0b-93ea-789078a3eab4", + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "email_addresses": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ], + "first_name": "George", + "id": "5733a8b6-472d-45fa-8f10-e0b00727cced", + "remote_id": 1235, + "last_activity_at": "2023-02-27T00:00:00Z", + "last_name": "Xing", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z" + } + ] + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/contacts/{contact_id}": { + "get": { + "operationId": "getContact", + "summary": "Get contact", + "tags": ["Contacts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/expand" + } + ], + "responses": { + "200": { + "description": "Contact", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/contact" + } + } + } + } + } + }, + "patch": { + "operationId": "updateContact", + "summary": "Update contact", + "tags": ["Contacts"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_contact" + } + }, + "required": ["model"] + }, + "examples": { + "Example": { + "value": { + "model": { + "first_name": "George", + "last_name": "Xing", + "account_id": "0ce05511-adbc-4144-a049-6631c7ea3b04" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Contact updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/contact" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + }, + { + "name": "contact_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/leads": { + "get": { + "operationId": "getLeads", + "tags": ["Leads"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List leads", + "description": "Get a list of leads", + "parameters": [ + { + "$ref": "#/components/parameters/include_deleted_data" + }, + { + "$ref": "#/components/parameters/created_after" + }, + { + "$ref": "#/components/parameters/created_before" + }, + { + "$ref": "#/components/parameters/modified_after" + }, + { + "$ref": "#/components/parameters/modified_before" + }, + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/expand" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "responses": { + "200": { + "description": "Leads", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/lead" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "company": "Supaglue", + "converted_account_id": "5733a8b6-472d-45fa-8f10-e0b00727cced", + "converted_contact_id": "7f65f33c-e645-40f8-b87c-6148899caa8e", + "converted_date": "2023-02-27T00:00:00Z", + "email_addresses": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ], + "first_name": "George", + "id": "62bd34b8-54fa-4628-ae75-5fd6be59e4b7", + "remote_id": 1234, + "last_name": "Xing", + "lead_source": "API Blogger", + "owner_id": "04363f99-e807-4f69-b233-3d31b92f9bb2", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "title": "Co-Founder" + }, + { + "addresses": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ], + "company": "Supaglue", + "converted_account_id": "c300123d-91e0-4519-b514-ff6d308eab47", + "converted_contact_id": "762b1d20-374b-41c9-a006-f6ed188a3e54", + "converted_date": "2022-03-10T00:00:00Z", + "email_addresses": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ], + "first_name": "George", + "id": "29b3e861-b1da-4f74-885a-e151c5759acf", + "remote_id": 1235, + "last_name": "Xing", + "lead_source": "API Blogger", + "owner_id": "71e01ac4-5f21-46e2-b021-46555ade976d", + "phone_numbers": [ + { + "phone_number": "+14151234567", + "phone_number_type": "mobile" + } + ], + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "title": "Co-Founder" + } + ] + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createLead", + "summary": "Create lead", + "tags": ["Leads"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_lead" + } + }, + "required": ["model"] + }, + "example": { + "model": { + "company": "Supaglue", + "first_name": "George", + "last_name": "Xing", + "lead_source": "API Blogger", + "title": "Co-Founder" + } + } + } + } + }, + "responses": { + "201": { + "description": "Lead created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/lead" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/leads/{lead_id}": { + "get": { + "operationId": "getLead", + "summary": "Get lead", + "tags": ["Leads"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/expand" + } + ], + "responses": { + "200": { + "description": "Lead", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/lead" + } + } + } + } + } + }, + "patch": { + "operationId": "updateLead", + "summary": "Update lead", + "tags": ["Leads"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_lead" + } + }, + "required": ["model"] + }, + "examples": { + "Example": { + "value": { + "model": { + "company": "Supaglue", + "first_name": "George", + "last_name": "Xing", + "lead_source": "API Blogger", + "title": "Co-Founder" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Lead updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/lead" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + }, + { + "name": "lead_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "82de27cb-6f8c-4278-b783-82d1d916eddc" + } + } + ] + }, + "/events": { + "get": { + "operationId": "getEvents", + "tags": ["Events"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List events", + "description": "Get a list of events", + "parameters": [ + { + "$ref": "#/components/parameters/include_deleted_data" + }, + { + "$ref": "#/components/parameters/created_after" + }, + { + "$ref": "#/components/parameters/created_before" + }, + { + "$ref": "#/components/parameters/modified_after" + }, + { + "$ref": "#/components/parameters/modified_before" + }, + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/expand" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "responses": { + "200": { + "description": "Events", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/event" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6a", + "remote_id": 1234, + "subject": "Meeting", + "type": "Meeting", + "content": null, + "start_time": "2022-02-10T00:00:00Z", + "end_time": "2022-02-10T00:30:00Z", + "owner_id": "cb40ff24-6587-4b24-82a3-9269a05d5dda", + "remote_created_at": "2021-11-10T00:00:00Z", + "remote_updated_at": "2022-01-09T00:00:00Z" + } + ] + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createEvent", + "summary": "Create event", + "tags": ["Events"], + "parameters": [], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_event" + } + }, + "required": ["model"] + } + } + } + }, + "responses": { + "201": { + "description": "Event created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/event" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/events/{event_id}": { + "get": { + "operationId": "getEvent", + "summary": "Get event", + "tags": ["Events"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/expand" + } + ], + "responses": { + "200": { + "description": "Event", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/event" + } + } + } + } + } + }, + "patch": { + "operationId": "updateEvent", + "summary": "Update event", + "tags": ["Events"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_event" + } + }, + "required": ["model"] + }, + "examples": { + "Example": { + "value": { + "model": { + "type": "Meeting", + "subject": "Meeting", + "content": null, + "start_time": "2022-02-27T00:00:00Z", + "end_time": "2022-02-27T00:30:00Z", + "owner_id": "4593d277-1654-4192-b155-a4663f1dbdc2", + "account_id": "0ce05511-adbc-4144-a049-6631c7ea3b04" + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Event updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/event" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + }, + { + "name": "event_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/opportunities": { + "get": { + "operationId": "getOpportunities", + "tags": ["Opportunities"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List opportunities", + "description": "Get a list of opportunities", + "parameters": [ + { + "$ref": "#/components/parameters/include_deleted_data" + }, + { + "$ref": "#/components/parameters/created_after" + }, + { + "$ref": "#/components/parameters/created_before" + }, + { + "$ref": "#/components/parameters/modified_after" + }, + { + "$ref": "#/components/parameters/modified_before" + }, + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/expand" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "responses": { + "200": { + "description": "Opportunities", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/opportunity" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "account": { + "id": "82de27cb-6f8c-4278-b783-82d1d916eddc" + }, + "amount": 100000, + "close_date": "2023-02-27T00:00:00Z", + "description": "Wants to use open source unified API for third-party integrations", + "id": "700eaee7-0b1d-40d3-90a9-1ebf77943a2e", + "remote_id": 1234, + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Needs third-party integrations", + "owner_id": "475789f9-0df9-4a09-959e-c9f5eb7a541c", + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "stage": "Closed Won" + }, + { + "account": { + "id": "0958cbc6-6040-430a-848e-aafacbadf4ae" + }, + "amount": 100000, + "close_date": "2023-02-27T00:00:00Z", + "description": "Wants to use open source unified API for third-party integrations", + "id": "1e68260b-f250-427b-88f1-26ccc34c62d6", + "remote_id": 1235, + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Needs third-party integrations", + "owner_id": "64761ae1-8c42-461c-8778-9671f9d39997", + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "stage": "Closed Lost" + } + ] + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createOpportunity", + "summary": "Create opportunity", + "tags": ["Opportunities"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_opportunity" + } + }, + "required": ["model"] + }, + "example": { + "model": { + "amount": 100000, + "close_date": "2023-02-27T00:00:00Z", + "description": "Wants to use open source unified API for third-party integrations", + "name": "Needs Integrations", + "stage": "Closed Won", + "account_id": "109c88c0-7bf4-4cd8-afbc-b51f9432ca0b" + } + } + } + } + }, + "responses": { + "201": { + "description": "Opportunity created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/opportunity" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/opportunities/_search": { + "post": { + "operationId": "searchOpportunities", + "summary": "Search Opportunities", + "tags": ["Opportunities"], + "parameters": [ + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filters": { + "type": "object", + "properties": { + "account_id": { + "$ref": "#/components/schemas/filter" + } + } + } + }, + "required": ["filters"] + } + } + } + }, + "responses": { + "200": { + "description": "Opportunities", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/opportunity" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "account": { + "id": "82de27cb-6f8c-4278-b783-82d1d916eddc" + }, + "amount": 100000, + "close_date": "2023-02-27T00:00:00Z", + "description": "Wants to use open source unified API for third-party integrations", + "id": "37704671-1955-47b3-b7a8-6ca814fa5005", + "remote_id": 1234, + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Needs third-party integrations", + "owner_id": "475789f9-0df9-4a09-959e-c9f5eb7a541c", + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "stage": "Closed Won" + }, + { + "account": { + "id": "82de27cb-6f8c-4278-b783-82d1d916eddc" + }, + "amount": 100000, + "close_date": "2023-02-27T00:00:00Z", + "description": "Wants to use open source unified API for third-party integrations", + "id": "1e68260b-f250-427b-88f1-26ccc34c62d6", + "remote_id": 1235, + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Needs third-party integrations", + "owner_id": "64761ae1-8c42-461c-8778-9671f9d39997", + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "stage": "Closed Lost" + } + ] + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/opportunities/{opportunity_id}": { + "get": { + "operationId": "getOpportunity", + "summary": "Get opportunity", + "tags": ["Opportunities"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/expand" + } + ], + "responses": { + "200": { + "description": "Opportunity", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/opportunity" + }, + "examples": { + "Example": { + "value": { + "account": { + "id": "a329053d-bf86-4b82-8356-9e897aa7dacc" + }, + "amount": 100000, + "close_date": "2023-02-27T00:00:00Z", + "description": "Wants to use open source unified API for third-party integrations", + "id": "3bde961a-90da-4daa-ab2e-cc4498c460f9", + "remote_id": 1234, + "last_activity_at": "2023-02-27T00:00:00Z", + "name": "Needs third-party integrations", + "owner": "93b0c2b5-26a8-4b92-b4e5-05d764eb1119", + "remote_created_at": "2023-02-27T00:00:00Z", + "remote_updated_at": "2023-02-27T00:00:00Z", + "stage": "Closed Won" + } + } + } + } + } + } + } + }, + "patch": { + "operationId": "updateOpportunity", + "summary": "Update opportunity", + "tags": ["Opportunities"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "$ref": "#/components/schemas/create_update_opportunity" + } + }, + "required": ["model"] + } + } + } + }, + "responses": { + "200": { + "description": "Opportunity updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/components/schemas/errors" + }, + "logs": { + "$ref": "#/components/schemas/logs" + }, + "model": { + "$ref": "#/components/schemas/opportunity" + }, + "warnings": { + "$ref": "#/components/schemas/warnings" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + }, + { + "name": "opportunity_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "c9f58083-a370-47b5-ad02-99160ea20372" + } + } + ] + }, + "/users": { + "get": { + "operationId": "getUsers", + "tags": ["Users"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List users", + "description": "Get a list of users", + "parameters": [ + { + "$ref": "#/components/parameters/include_deleted_data" + }, + { + "$ref": "#/components/parameters/created_after" + }, + { + "$ref": "#/components/parameters/created_before" + }, + { + "$ref": "#/components/parameters/modified_after" + }, + { + "$ref": "#/components/parameters/modified_before" + }, + { + "$ref": "#/components/parameters/cursor" + }, + { + "$ref": "#/components/parameters/expand" + }, + { + "$ref": "#/components/parameters/page_size" + } + ], + "responses": { + "200": { + "description": "Users", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/pagination" + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/user" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ==", + "previous": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9", + "results": [ + { + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6a", + "remote_id": 1234, + "name": "George Xing", + "email": "george@supaglue.com", + "is_active": true, + "remote_created_at": "2021-11-10T00:00:00Z", + "remote_updated_at": "2022-01-09T00:00:00Z" + }, + { + "id": "a0f8385c-4947-41d2-a276-740f792bb0e6", + "remote_id": 1235, + "name": "Thomas Chen", + "email": "tom@supaglue.com", + "is_active": true, + "remote_created_at": "2021-11-10T00:00:00Z", + "remote_updated_at": "2022-01-09T00:00:00Z" + } + ] + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + }, + "/users/{user_id}": { + "get": { + "operationId": "getUser", + "summary": "Get user", + "tags": ["Users"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "User", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/passthrough": { + "post": { + "operationId": "sendPassthroughRequest", + "tags": ["Passthrough"], + "summary": "Send passthrough request", + "description": "Send request directly to a provider", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The path to send the request to (do not pass the domain)" + }, + "method": { + "type": "string", + "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"], + "example": "GET" + }, + "headers": { + "type": "object", + "description": "Headers to pass to downstream", + "additionalProperties": { + "type": "string" + } + }, + "query": { + "type": "object", + "description": "Query parameters to pass to downstream", + "additionalProperties": { + "type": "string" + } + }, + "body": { + "type": "string", + "description": "Body to pass to downstream" + } + }, + "required": ["path", "method"] + } + } + } + }, + "responses": { + "200": { + "description": "Passthrough response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The full URL the request was went to", + "example": "https://customcrm.com/api/cars" + }, + "status": { + "type": "number", + "description": "Status code from the downstream", + "example": 200 + }, + "headers": { + "type": "object", + "description": "The response headers from the downstream", + "additionalProperties": { + "type": "string" + } + }, + "body": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "integer" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "additionalProperties": true + } + }, + { + "type": "object", + "additionalProperties": true + } + ], + "description": "The body from the downstream" + } + }, + "required": ["url", "status", "headers"] + }, + "examples": { + "Example": { + "value": { + "url": "https://customcrm.com/api/cars", + "status": 200, + "headers": { + "x-requests-limit": 96 + }, + "body": [] + } + } + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/x-customer-id" + }, + { + "$ref": "#/components/parameters/x-provider-name" + } + ] + } + }, + "tags": [ + { + "name": "Accounts", + "description": "The `Account` Common Model is used to represent a \"company\" in CRMs." + }, + { + "name": "Contacts", + "description": "The `Contact` Common Model is used to represent a \"contact\" in CRMs." + }, + { + "name": "Leads", + "description": "The `Lead` Common Model is used to represent a \"potential customer\" in CRMs." + }, + { + "name": "Opportunities", + "description": "The `Opportunity` Common Model is used to represent a \"deal opportunity\" in CRMs." + }, + { + "name": "Users", + "description": "The `User` Common Model is used to represent a \"user\" that can login to CRMs." + }, + { + "name": "Sync", + "description": "Get information and history for the sync process." + }, + { + "name": "Passthrough", + "description": "Passthrough operations to underlying providers." + } + ], + "components": { + "securitySchemes": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "x-api-key", + "in": "header", + "description": "API key to allow developers to access the API" + } + }, + "schemas": { + "account": { + "type": "object", + "properties": { + "addresses": { + "$ref": "#/components/schemas/addresses" + }, + "description": { + "type": "string", + "nullable": true, + "example": "Integration API" + }, + "id": { + "type": "string", + "example": "e888cedf-e9d0-42c5-9485-2d72984faef2" + }, + "remote_id": { + "type": "string", + "example": 1234 + }, + "industry": { + "type": "string", + "nullable": true, + "example": "API's" + }, + "last_activity_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Sample Customer" + }, + "number_of_employees": { + "type": "integer", + "nullable": true, + "example": 276000 + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "owner": { + "$ref": "#/components/schemas/user" + }, + "phone_numbers": { + "$ref": "#/components/schemas/phone_numbers" + }, + "lifecycle_stage": { + "$ref": "#/components/schemas/lifecycle_stage" + }, + "website": { + "type": "string", + "nullable": true, + "example": "https://supaglue.com/" + }, + "remote_created_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_was_deleted": { + "type": "boolean", + "example": false + }, + "last_modified_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + } + }, + "required": [ + "addresses", + "description", + "id", + "remote_id", + "industry", + "last_activity_at", + "name", + "number_of_employees", + "owner_id", + "phone_numbers", + "website", + "lifecycle_stage" + ] + }, + "create_update_account": { + "type": "object", + "properties": { + "description": { + "type": "string", + "nullable": true, + "example": "Integration API" + }, + "industry": { + "type": "string", + "nullable": true, + "example": "API's" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Sample Customer" + }, + "number_of_employees": { + "type": "integer", + "nullable": true, + "example": 276000 + }, + "website": { + "type": "string", + "nullable": true, + "example": "https://supaglue.com/" + }, + "addresses": { + "$ref": "#/components/schemas/addresses" + }, + "phone_numbers": { + "$ref": "#/components/schemas/phone_numbers" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" + }, + "lifecycle_stage": { + "$ref": "#/components/schemas/lifecycle_stage" + }, + "custom_fields": { + "$ref": "#/components/schemas/custom_fields" + } + } + }, + "contact": { + "type": "object", + "properties": { + "account_id": { + "type": "string", + "nullable": true, + "example": "fd089246-09b1-4e3b-a60a-7a76314bbcce" + }, + "account": { + "$ref": "#/components/schemas/account" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "23e640fe-6105-4a11-a636-3aa6b6c6e762" + }, + "owner": { + "$ref": "#/components/schemas/user" + }, + "addresses": { + "$ref": "#/components/schemas/addresses" + }, + "email_addresses": { + "$ref": "#/components/schemas/email_addresses" + }, + "first_name": { + "type": "string", + "nullable": true, + "example": "George" + }, + "id": { + "type": "string", + "example": "88cc44ca-7a34-4e8b-b0da-51c3aae34daf" + }, + "remote_id": { + "type": "string", + "example": 54312 + }, + "last_activity_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "last_name": { + "type": "string", + "nullable": true, + "example": "Xing" + }, + "phone_numbers": { + "$ref": "#/components/schemas/phone_numbers" + }, + "lifecycle_stage": { + "$ref": "#/components/schemas/lifecycle_stage" + }, + "remote_created_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_was_deleted": { + "type": "boolean", + "example": false + }, + "last_modified_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + } + }, + "required": [ + "account_id", + "owner_id", + "description", + "id", + "remote_id", + "addresses", + "email_addresses", + "first_name", + "last_activity_at", + "last_name", + "phone_numbers", + "lifecycle_stage" + ] + }, + "create_update_contact": { + "type": "object", + "properties": { + "first_name": { + "type": "string", + "nullable": true, + "example": "George" + }, + "last_name": { + "type": "string", + "nullable": true, + "example": "Xing" + }, + "account_id": { + "type": "string", + "nullable": true, + "example": "64571bff-48ea-4469-9fa0-ee1a0bab38bd" + }, + "addresses": { + "$ref": "#/components/schemas/addresses" + }, + "email_addresses": { + "$ref": "#/components/schemas/email_addresses" + }, + "phone_numbers": { + "$ref": "#/components/schemas/phone_numbers" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" + }, + "lifecycle_stage": { + "$ref": "#/components/schemas/lifecycle_stage" + }, + "custom_fields": { + "$ref": "#/components/schemas/custom_fields" + } + } + }, + "event": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "e888cedf-e9d0-42c5-9485-2d72984faef2" + }, + "remote_id": { + "type": "string", + "example": 1234 + }, + "type": { + "type": "string", + "nullable": true, + "example": "Meeting" + }, + "subject": { + "type": "string", + "nullable": true, + "example": "Meeting" + }, + "start_time": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "end_time": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "content": { + "type": "string", + "nullable": true + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "owner": { + "$ref": "#/components/schemas/user" + }, + "account_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "account": { + "$ref": "#/components/schemas/account" + }, + "contact_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "contact": { + "$ref": "#/components/schemas/contact" + }, + "lead_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "lead": { + "$ref": "#/components/schemas/lead" + }, + "opportunity_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "opportunity": { + "$ref": "#/components/schemas/opportunity" + }, + "remote_created_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_was_deleted": { + "type": "boolean", + "example": false + }, + "last_modified_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + } + }, + "required": [ + "id", + "remote_id", + "subject", + "type", + "content", + "start_time", + "end_time", + "owner_id", + "account_id", + "contact_id", + "lead_id", + "opportunity_id" + ] + }, + "create_update_event": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true, + "example": "Meeting" + }, + "subject": { + "type": "string", + "nullable": true, + "example": "Meeting" + }, + "start_time": { + "type": "string", + "nullable": true, + "example": "2022-02-27T00:00:00Z" + }, + "end_time": { + "type": "string", + "nullable": true, + "example": "2022-02-27T00:00:00Z" + }, + "content": { + "type": "string", + "nullable": true + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "account_id": { + "type": "string", + "nullable": true, + "example": "1393711e-b7ba-46ef-b9cd-49134cf2c630" + }, + "contact_id": { + "type": "string", + "nullable": true, + "example": "34288f14-7d3e-4275-8b14-3df6d116b1af" + }, + "lead_id": { + "type": "string", + "nullable": true, + "example": "c1b1c601-6707-4d3a-8c1a-ec0127358019" + }, + "opportunity_id": { + "type": "string", + "nullable": true, + "example": "2506e5f3-1805-405a-a13c-baa0ac524274" + }, + "custom_fields": { + "$ref": "#/components/schemas/custom_fields" + } + } + }, + "lead": { + "type": "object", + "properties": { + "addresses": { + "$ref": "#/components/schemas/addresses" + }, + "company": { + "type": "string", + "nullable": true, + "example": "Supaglue" + }, + "converted_account_id": { + "type": "string", + "nullable": true, + "example": "88cc44ca-7a34-4e8b-b0da-51c3aae34daf" + }, + "converted_account": { + "$ref": "#/components/schemas/account" + }, + "converted_contact_id": { + "type": "string", + "nullable": true, + "example": "8c8de778-a219-4d6c-848c-1d57b52149f6" + }, + "converted_contact": { + "$ref": "#/components/schemas/contact" + }, + "converted_date": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-27T00:00:00Z" + }, + "email_addresses": { + "$ref": "#/components/schemas/email_addresses" + }, + "first_name": { + "type": "string", + "nullable": true, + "example": "George" + }, + "id": { + "type": "string", + "example": "e774484c-4ff2-421f-adfa-12f66ed75b91" + }, + "remote_id": { + "type": "string", + "example": 54312 + }, + "last_name": { + "type": "string", + "nullable": true, + "example": "Xing" + }, + "lead_source": { + "type": "string", + "nullable": true, + "example": "API Blogger" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "62e5e0f7-becd-4ae2-be82-8b4e1d5ed8a2" + }, + "owner": { + "$ref": "#/components/schemas/user" + }, + "phone_numbers": { + "$ref": "#/components/schemas/phone_numbers" + }, + "title": { + "type": "string", + "nullable": true, + "example": "Co-Founder" + }, + "remote_created_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-10T00:00:00Z" + }, + "remote_updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-10T00:00:00Z" + }, + "remote_was_deleted": { + "type": "boolean", + "example": false + }, + "last_modified_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + } + }, + "required": [ + "addresses", + "company", + "converted_account_id", + "converted_contact_id", + "converted_date", + "id", + "remote_id", + "last_name", + "lead_source", + "owner_id", + "phone_numbers", + "title" + ] + }, + "create_update_lead": { + "type": "object", + "properties": { + "company": { + "type": "string", + "nullable": true, + "example": "Supaglue" + }, + "first_name": { + "type": "string", + "nullable": true, + "example": "George" + }, + "last_name": { + "type": "string", + "nullable": true, + "example": "Xing" + }, + "lead_source": { + "type": "string", + "nullable": true, + "example": "API Blogger" + }, + "title": { + "type": "string", + "example": "Co-Founder" + }, + "email_addresses": { + "$ref": "#/components/schemas/email_addresses" + }, + "addresses": { + "$ref": "#/components/schemas/addresses" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" + }, + "custom_fields": { + "$ref": "#/components/schemas/custom_fields" + } + } + }, + "opportunity": { + "type": "object", + "properties": { + "account_id": { + "type": "string", + "nullable": true, + "example": "fd089246-09b1-4e3b-a60a-7a76314bbcce" + }, + "account": { + "$ref": "#/components/schemas/account" + }, + "amount": { + "type": "integer", + "nullable": true, + "example": 100000 + }, + "close_date": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-27T00:00:00Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "Wants to use open source unified API for third-party integrations" + }, + "id": { + "type": "string", + "example": "e888cedf-e9d0-42c5-9485-2d72984faef2" + }, + "remote_id": { + "type": "string", + "example": 54312 + }, + "last_activity_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-27T00:00:00Z" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Needs third-party integrations" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "owner": { + "$ref": "#/components/schemas/user" + }, + "pipeline": { + "type": "string", + "nullable": true + }, + "stage": { + "type": "string", + "nullable": true, + "example": "Closed Won" + }, + "status": { + "type": "string", + "nullable": true, + "example": "OPEN" + }, + "remote_created_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-27T00:00:00Z" + }, + "remote_updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2023-02-27T00:00:00Z" + }, + "remote_was_deleted": { + "type": "boolean", + "example": false + }, + "last_modified_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + } + }, + "required": [ + "account_id", + "amount", + "description", + "id", + "remote_id", + "last_activity_at", + "name", + "owner_id", + "stage", + "status", + "pipeline" + ] + }, + "user": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "e888cedf-e9d0-42c5-9485-2d72984faef2" + }, + "remote_id": { + "type": "string", + "example": 54312 + }, + "name": { + "type": "string", + "nullable": true, + "example": "George Xing" + }, + "email": { + "type": "string", + "nullable": true, + "example": "george@supaglue.com" + }, + "is_active": { + "type": "boolean", + "nullable": true + }, + "remote_created_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_updated_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + }, + "remote_was_deleted": { + "type": "boolean", + "example": false + }, + "last_modified_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "example": "2022-02-27T00:00:00Z" + } + }, + "required": ["id", "remote_id", "name", "email", "is_active"] + }, + "create_update_opportunity": { + "type": "object", + "properties": { + "amount": { + "type": "integer", + "nullable": true, + "example": 100000 + }, + "close_date": { + "type": "string", + "nullable": true, + "example": "2022-02-10T00:00:00Z" + }, + "description": { + "type": "string", + "nullable": true, + "example": "Wants to use open source unified API for third-party integrations" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Needs Integrations" + }, + "stage": { + "type": "string", + "example": "Closed Won" + }, + "account_id": { + "type": "string", + "nullable": true, + "example": "64571bff-48ea-4469-9fa0-ee1a0bab38bd" + }, + "owner_id": { + "type": "string", + "nullable": true, + "example": "9f3e97fd-4d5d-4efc-959d-bbebfac079f5" + }, + "pipeline": { + "type": "string", + "nullable": true + }, + "custom_fields": { + "$ref": "#/components/schemas/custom_fields" + } + } + }, + "logs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "dashboard_view": { + "type": "string", + "example": "https://api.supaglue.com/logs/99433219-8017-4acd-bb3c-ceb23d663832" + }, + "log_id": { + "type": "string", + "example": "99433219-8017-4acd-bb3c-ceb23d663832" + }, + "log_summary": { + "type": "object", + "properties": { + "method": { + "type": "string", + "example": "POST" + }, + "status_code": { + "type": "number", + "example": 200 + }, + "url": { + "type": "string", + "example": "https://harvest.greenhouse.io/v1/candidates/" + } + } + } + } + }, + "example": [ + { + "dashboard_view": "https://api.supaglue.com/logs/99433219-8017-4acd-bb3c-ceb23d663832", + "log_id": "99433219-8017-4acd-bb3c-ceb23d663832", + "log_summary": { + "method": "POST", + "status_code": 200, + "url": "https://harvest.greenhouse.io/v1/candidates/" + } + }, + { + "dashboard_view": "https://api.supaglue.com/logs/99433219-8017-4acd-bb3c-ceb23d663832", + "log_id": "99433219-8017-4acd-bb3c-ceb23d663832", + "log_summary": { + "method": "POST", + "status_code": 200, + "url": "https://harvest.greenhouse.io/v1/candidates/" + } + } + ] + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "example": "name is a required field on model." + }, + "problem_type": { + "type": "string", + "example": "MISSING_REQUIRED_FIELD" + }, + "source": { + "type": "object", + "properties": { + "pointer": { + "type": "string", + "example": "irure consectetur" + } + } + }, + "title": { + "type": "string", + "example": "Missing Required Field" + } + }, + "example": [ + { + "detail": "name is a required field on model.", + "problem_type": "MISSING_REQUIRED_FIELD", + "source": { + "pointer": "irure consectetur" + }, + "title": "Missing Required Field" + }, + { + "detail": "name is a required field on model.", + "problem_type": "MISSING_REQUIRED_FIELD", + "source": { + "pointer": "et" + }, + "title": "Missing Required Field" + } + ] + } + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "example": "An unrecognized field, age, was passed in with request data." + }, + "problem_type": { + "type": "string", + "example": "UNRECOGNIZED_FIELD" + }, + "source": { + "type": "object", + "properties": { + "pointer": { + "type": "string", + "example": "Lorem ipsum" + } + } + }, + "title": { + "type": "string", + "example": "Unrecognized Field" + } + } + }, + "example": [ + { + "detail": "An unrecognized field, age, was passed in with request data.", + "problem_type": "UNRECOGNIZED_FIELD", + "source": { + "pointer": "Lorem ipsum" + }, + "title": "Unrecognized Field" + }, + { + "detail": "An unrecognized field, age, was passed in with request data.", + "problem_type": "UNRECOGNIZED_FIELD", + "source": { + "pointer": "in" + }, + "title": "Unrecognized Field" + } + ] + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address_type": { + "type": "string", + "enum": ["primary", "mailing", "other", "billing", "shipping"] + }, + "city": { + "type": "string", + "nullable": true, + "example": "San Francisco" + }, + "country": { + "type": "string", + "nullable": true, + "example": "USA" + }, + "postal_code": { + "type": "string", + "nullable": true, + "example": "94107" + }, + "state": { + "type": "string", + "nullable": true, + "example": "CA" + }, + "street1": { + "type": "string", + "nullable": true, + "example": "525 Brannan" + }, + "street2": { + "type": "string", + "nullable": true, + "example": null + } + }, + "required": ["address_type", "city", "country", "postal_code", "state", "street1"] + }, + "example": [ + { + "address_type": "shipping", + "city": "San Francisco", + "country": "US", + "postal_code": "94107", + "state": "CA", + "street1": "525 Brannan", + "street2": null + } + ] + }, + "email_addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "email_address": { + "type": "string", + "example": "hello@supaglue.com" + }, + "email_address_type": { + "type": "string", + "enum": ["primary", "work"] + } + }, + "required": ["email_address", "email_address_type"] + }, + "example": [ + { + "email_address": "hello@supaglue.com", + "email_address_type": "work" + } + ] + }, + "phone_numbers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "phone_number": { + "type": "string", + "nullable": true, + "example": "+14151234567" + }, + "phone_number_type": { + "type": "string", + "enum": ["primary", "mobile", "fax"] + } + }, + "required": ["phone_number", "phone_number_type"] + }, + "example": [ + { + "phone_number": "+14151234567", + "phone_number_type": "primary" + } + ] + }, + "pagination": { + "type": "object", + "properties": { + "next": { + "type": "string", + "nullable": true, + "example": "eyJpZCI6IjQyNTc5ZjczLTg1MjQtNDU3MC05YjY3LWVjYmQ3MDJjNmIxNCIsInJldmVyc2UiOmZhbHNlfQ==" + }, + "previous": { + "type": "string", + "nullable": true, + "example": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9" + } + } + }, + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Custom properties to be inserted that are not covered by the common model. Object keys must match exactly to the corresponding provider API." + }, + "filter": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["equals"] + }, + "value": { + "type": "string" + } + }, + "required": ["type", "value"] + } + ] + }, + "lifecycle_stage": { + "type": "string", + "nullable": true, + "enum": [ + "subscriber", + "lead", + "marketingqualifiedlead", + "salesqualifiedlead", + "opportunity", + "customer", + "evangelist", + "other" + ] + } + }, + "parameters": { + "include_deleted_data": { + "name": "include_deleted_data", + "in": "query", + "schema": { + "type": "boolean", + "example": true + }, + "description": "Whether to include data that was deleted in providers." + }, + "created_after": { + "name": "created_after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "example": "2023-02-23T00:00:00.000Z" + }, + "description": "If provided, will only return objects created after this datetime" + }, + "created_before": { + "name": "created_before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "example": "2023-02-23T00:00:00.000Z" + }, + "description": "If provided, will only return objects created before this datetime" + }, + "modified_after": { + "name": "modified_after", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "example": "2023-02-23T00:00:00.000Z" + }, + "description": "If provided, will only return objects modified after this datetime" + }, + "modified_before": { + "name": "modified_before", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "example": "2023-02-23T00:00:00.000Z" + }, + "description": "If provided, will only return objects modified before this datetime" + }, + "cursor": { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + }, + "description": "The pagination cursor value" + }, + "expand": { + "name": "expand", + "in": "query", + "schema": { + "type": "string", + "example": "owner" + }, + "description": "Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces" + }, + "page_size": { + "name": "page_size", + "in": "query", + "schema": { + "type": "string", + "example": "3804695" + }, + "description": "Number of results to return per page" + }, + "x-customer-id": { + "name": "x-customer-id", + "in": "header", + "schema": { + "type": "string", + "example": "my-customer-1" + }, + "description": "The customer ID that uniquely identifies the customer in your application", + "required": true + }, + "x-provider-name": { + "name": "x-provider-name", + "in": "header", + "schema": { + "type": "string", + "example": "salesforce" + }, + "description": "The provider name", + "required": true + } + } + } +} diff --git a/openapi/versioned/version-0.7.5/crm/openapi.yaml b/openapi/versioned/version-0.7.5/crm/openapi.yaml new file mode 100644 index 000000000..a5ad3a112 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/openapi.yaml @@ -0,0 +1,140 @@ +openapi: 3.0.3 +info: + version: 0.7.5 + title: Supaglue CRM API + contact: + name: Supaglue + email: docs@supaglue.com + url: 'https://supaglue.com' + description: | + # Introduction + + Welcome to the Supaglue unified CRM API documentation. You can use this API to read data that has been synced into Supaglue from third-party providers. + + ### Base API URL + + ``` + http://localhost:8080/crm/v1 + ``` +externalDocs: + description: Try out our API in Postman! + url: 'https://www.postman.com/supaglue/workspace/supaglue-public/overview' +servers: + - url: 'http://localhost:8080/crm/v1' + description: Local Supaglue API +paths: + '/accounts': + $ref: paths/accounts.yaml + '/accounts/_search': + $ref: paths/accounts@_search.yaml + '/accounts/{account_id}': + $ref: paths/accounts@{account_id}.yaml + '/contacts': + $ref: paths/contacts.yaml + '/contacts/_search': + $ref: paths/contacts@_search.yaml + '/contacts/{contact_id}': + $ref: paths/contacts@{contact_id}.yaml + '/leads': + $ref: paths/leads.yaml + '/leads/{lead_id}': + $ref: paths/leads@{lead_id}.yaml + '/events': + $ref: paths/events.yaml + '/events/{event_id}': + $ref: paths/events@{event_id}.yaml + '/opportunities': + $ref: paths/opportunities.yaml + '/opportunities/_search': + $ref: paths/opportunities@_search.yaml + '/opportunities/{opportunity_id}': + $ref: paths/opportunities@{opportunity_id}.yaml + '/users': + $ref: paths/users.yaml + '/users/{user_id}': + $ref: paths/users@{user_id}.yaml + '/passthrough': + $ref: paths/passthrough.yaml +tags: + - name: Accounts + description: The `Account` Common Model is used to represent a "company" in CRMs. + - name: Contacts + description: The `Contact` Common Model is used to represent a "contact" in CRMs. + - name: Leads + description: The `Lead` Common Model is used to represent a "potential customer" in CRMs. + - name: Opportunities + description: The `Opportunity` Common Model is used to represent a "deal opportunity" in CRMs. + - name: Users + description: The `User` Common Model is used to represent a "user" that can login to CRMs. + - name: Sync + description: Get information and history for the sync process. + - name: Passthrough + description: Passthrough operations to underlying providers. +components: + securitySchemes: + ApiKeyAuth: + $ref: ../common/components/securitySchemes/x-api-key.yaml + schemas: + account: + $ref: ./components/schemas/objects/account.yaml + create_update_account: + $ref: ./components/schemas/create_update_account.yaml + contact: + $ref: ./components/schemas/objects/contact.yaml + create_update_contact: + $ref: ./components/schemas/create_update_contact.yaml + event: + $ref: ./components/schemas/objects/event.yaml + create_update_event: + $ref: ./components/schemas/create_update_event.yaml + lead: + $ref: ./components/schemas/objects/lead.yaml + create_update_lead: + $ref: ./components/schemas/create_update_lead.yaml + opportunity: + $ref: ./components/schemas/objects/opportunity.yaml + user: + $ref: ./components/schemas/objects/user.yaml + create_update_opportunity: + $ref: ./components/schemas/create_update_opportunity.yaml + logs: + $ref: ../common/components/schemas/logs.yaml + errors: + $ref: ../common/components/schemas/errors.yaml + warnings: + $ref: ../common/components/schemas/warnings.yaml + addresses: + $ref: ./components/schemas/objects/addresses.yaml + email_addresses: + $ref: ./components/schemas/objects/email_addresses.yaml + phone_numbers: + $ref: ./components/schemas/objects/phone_numbers.yaml + pagination: + $ref: ../common/components/schemas/pagination.yaml + custom_fields: + $ref: ./components/schemas/objects/custom_fields.yaml + filter: + $ref: ./components/schemas/filters.yaml#/filter + lifecycle_stage: + $ref: ./components/schemas/objects/lifecycle_stage.yaml + parameters: + include_deleted_data: + $ref: ../common/components/parameters/query/include_deleted_data.yaml + created_after: + $ref: ../common/components/parameters/query/created_after.yaml + created_before: + $ref: ../common/components/parameters/query/created_before.yaml + modified_after: + $ref: ../common/components/parameters/query/modified_after.yaml + modified_before: + $ref: ../common/components/parameters/query/modified_before.yaml + cursor: + $ref: ../common/components/parameters/query/cursor.yaml + expand: + $ref: ../common/components/parameters/query/expand.yaml + page_size: + $ref: ../common/components/parameters/query/page_size.yaml + x-customer-id: + $ref: ../common/components/parameters/header/x-customer-id.yaml + x-provider-name: + $ref: ../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/accounts.yaml b/openapi/versioned/version-0.7.5/crm/paths/accounts.yaml new file mode 100644 index 000000000..44cc45dd8 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/accounts.yaml @@ -0,0 +1,120 @@ +get: + operationId: getAccounts + tags: + - Accounts + security: + - ApiKeyAuth: [] + summary: List accounts + description: >- + Get a list of accounts + parameters: + - $ref: ../../common/components/parameters/query/include_deleted_data.yaml + - $ref: ../../common/components/parameters/query/created_after.yaml + - $ref: ../../common/components/parameters/query/created_before.yaml + - $ref: ../../common/components/parameters/query/modified_after.yaml + - $ref: ../../common/components/parameters/query/modified_before.yaml + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/expand.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + responses: + '200': + description: Accounts + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/account.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + description: Integration API + id: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + remote_id: 1234 + industry: APIs + last_activity_at: '2022-02-10T00:00:00Z' + name: Sample Customer + number_of_employees: 276000 + owner_id: cb40ff24-6587-4b24-82a3-9269a05d5dda + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + website: https://supaglue.com/ + - addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + description: Integration API + id: 9572d08b-f19f-48cc-a992-1eb7031d3f6b + remote_id: 1235 + industry: APIs + last_activity_at: '2023-02-27T00:00:00Z' + name: Sample Customer + number_of_employees: 276000 + owner_id: cb40ff24-6587-4b24-82a3-9269a05d5dda + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + website: https://supaglue.com/ +post: + operationId: createAccount + summary: Create account + tags: + - Accounts + parameters: [] + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_account.yaml + required: + - model + responses: + '201': + description: Account created + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/account.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/accounts@_search.yaml b/openapi/versioned/version-0.7.5/crm/paths/accounts@_search.yaml new file mode 100644 index 000000000..8f9e7a410 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/accounts@_search.yaml @@ -0,0 +1,91 @@ +post: + operationId: searchAccounts + summary: Search accounts + tags: + - Accounts + parameters: + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + filters: + type: object + properties: + website: + $ref: ../components/schemas/filters.yaml#/filter + required: + - filters + responses: + '200': + description: Accounts + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/account.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + description: Integration API + id: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + remote_id: 1234 + industry: APIs + last_activity_at: '2022-02-10T00:00:00Z' + name: Sample Customer + number_of_employees: 276000 + owner_id: cb40ff24-6587-4b24-82a3-9269a05d5dda + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + website: https://supaglue.com/ + - addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + description: Integration API + id: 9572d08b-f19f-48cc-a992-1eb7031d3f6b + remote_id: 1235 + industry: APIs + last_activity_at: '2023-02-27T00:00:00Z' + name: Sample Customer + number_of_employees: 276000 + owner_id: cb40ff24-6587-4b24-82a3-9269a05d5dda + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + website: https://supaglue.com/ +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/accounts@{account_id}.yaml b/openapi/versioned/version-0.7.5/crm/paths/accounts@{account_id}.yaml new file mode 100644 index 000000000..eea2ed377 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/accounts@{account_id}.yaml @@ -0,0 +1,92 @@ +get: + operationId: getAccount + summary: Get account + tags: + - Accounts + security: + - ApiKeyAuth: [] + parameters: + - $ref: ../../common/components/parameters/query/expand.yaml + responses: + 200: + description: Account + content: + application/json: + schema: + $ref: ../components/schemas/objects/account.yaml + examples: + Example: + value: + addresses: + - address_type: BILLING + city: San Francisco + country: CX + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + - address_type: BILLING + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + description: Integration API + id: 9572d08b-f19f-48cc-a992-1eb7031d3f6c + remote_id: 1234 + industry: API's + last_activity_at: '2022-02-10T00:00:00Z' + name: Supaglue + number_of_employees: 276000 + owner_id: 9377fd4d-d420-4e0b-93ea-789078a3eab4 + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + website: https://supaglue.com/ +patch: + operationId: updateAccount + summary: Update account + tags: + - Accounts + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_account.yaml + required: + - model + responses: + 200: + description: Account updated + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/account.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml + - name: account_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/crm/paths/contacts.yaml b/openapi/versioned/version-0.7.5/crm/paths/contacts.yaml new file mode 100644 index 000000000..67091413d --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/contacts.yaml @@ -0,0 +1,124 @@ +get: + operationId: getContacts + tags: + - Contacts + security: + - ApiKeyAuth: [] + summary: List contacts + description: >- + Get a list of contacts + parameters: + - $ref: ../../common/components/parameters/query/include_deleted_data.yaml + - $ref: ../../common/components/parameters/query/created_after.yaml + - $ref: ../../common/components/parameters/query/created_before.yaml + - $ref: ../../common/components/parameters/query/modified_after.yaml + - $ref: ../../common/components/parameters/query/modified_before.yaml + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/expand.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + responses: + '200': + description: Contacts + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/contact.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - account_id: 9377fd4d-d420-4e0b-93ea-789078a3eab4 + addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + email_addresses: + - email_address: hello@supaglue.com + email_address_type: work + first_name: George + id: 43a45011-c55e-42f3-81a1-99158c956775 + remote_id: 1234 + last_activity_at: '2023-02-27T00:00:00Z' + last_name: Xing + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + - account: 9377fd4d-d420-4e0b-93ea-789078a3eab4 + addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + email_addresses: + - email_address: hello@supaglue.com + email_address_type: work + first_name: George + id: 5733a8b6-472d-45fa-8f10-e0b00727cced + remote_id: 1235 + last_activity_at: '2023-02-27T00:00:00Z' + last_name: Xing + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' +post: + operationId: createContact + summary: Create contact + tags: + - Contacts + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_contact.yaml + required: + - model + example: + model: + first_name: George + last_activity_at: '2022-02-10T00:00:00Z' + last_name: Xing + account_id: 64571bff-48ea-4469-9fa0-ee1a0bab38bd + responses: + '201': + description: Contact created + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/contact.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/contacts@_search.yaml b/openapi/versioned/version-0.7.5/crm/paths/contacts@_search.yaml new file mode 100644 index 000000000..4af554794 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/contacts@_search.yaml @@ -0,0 +1,89 @@ +post: + operationId: searchContacts + summary: Search contacts + tags: + - Contacts + parameters: + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + filters: + type: object + properties: + email_address: + $ref: ../components/schemas/filters.yaml#/filter + required: + - filters + responses: + '200': + description: Contacts + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/contact.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - account_id: 9377fd4d-d420-4e0b-93ea-789078a3eab4 + addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + email_addresses: + - email_address: hello@supaglue.com + email_address_type: work + first_name: George + id: 43a45011-c55e-42f3-81a1-99158c956775 + remote_id: 1234 + last_activity_at: '2023-02-27T00:00:00Z' + last_name: Xing + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + - account: 9377fd4d-d420-4e0b-93ea-789078a3eab4 + addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + email_addresses: + - email_address: hello@supaglue.com + email_address_type: work + first_name: George + id: 5733a8b6-472d-45fa-8f10-e0b00727cced + remote_id: 1235 + last_activity_at: '2023-02-27T00:00:00Z' + last_name: Xing + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/contacts@{contact_id}.yaml b/openapi/versioned/version-0.7.5/crm/paths/contacts@{contact_id}.yaml new file mode 100644 index 000000000..c199de533 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/contacts@{contact_id}.yaml @@ -0,0 +1,67 @@ +get: + operationId: getContact + summary: Get contact + tags: + - Contacts + security: + - ApiKeyAuth: [] + parameters: + - $ref: ../../common/components/parameters/query/expand.yaml + responses: + 200: + description: Contact + content: + application/json: + schema: + $ref: ../components/schemas/objects/contact.yaml +patch: + operationId: updateContact + summary: Update contact + tags: + - Contacts + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_contact.yaml + required: + - model + examples: + Example: + value: + model: + first_name: George + last_name: Xing + account_id: 0ce05511-adbc-4144-a049-6631c7ea3b04 + responses: + 200: + description: Contact updated + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/contact.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml + - name: contact_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/crm/paths/events.yaml b/openapi/versioned/version-0.7.5/crm/paths/events.yaml new file mode 100644 index 000000000..88083e71d --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/events.yaml @@ -0,0 +1,86 @@ +get: + operationId: getEvents + tags: + - Events + security: + - ApiKeyAuth: [] + summary: List events + description: >- + Get a list of events + parameters: + - $ref: ../../common/components/parameters/query/include_deleted_data.yaml + - $ref: ../../common/components/parameters/query/created_after.yaml + - $ref: ../../common/components/parameters/query/created_before.yaml + - $ref: ../../common/components/parameters/query/modified_after.yaml + - $ref: ../../common/components/parameters/query/modified_before.yaml + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/expand.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + responses: + '200': + description: Events + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/event.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - id: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + remote_id: 1234 + subject: Meeting + type: Meeting + content: ~ + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:30:00Z' + owner_id: cb40ff24-6587-4b24-82a3-9269a05d5dda + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' +post: + operationId: createEvent + summary: Create event + tags: + - Events + parameters: [] + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_event.yaml + required: + - model + responses: + '201': + description: Event created + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/event.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/events@{event_id}.yaml b/openapi/versioned/version-0.7.5/crm/paths/events@{event_id}.yaml new file mode 100644 index 000000000..235633cb2 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/events@{event_id}.yaml @@ -0,0 +1,71 @@ +get: + operationId: getEvent + summary: Get event + tags: + - Events + security: + - ApiKeyAuth: [] + parameters: + - $ref: ../../common/components/parameters/query/expand.yaml + responses: + 200: + description: Event + content: + application/json: + schema: + $ref: ../components/schemas/objects/event.yaml +patch: + operationId: updateEvent + summary: Update event + tags: + - Events + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_event.yaml + required: + - model + examples: + Example: + value: + model: + type: Meeting + subject: Meeting + content: ~ + start_time: '2022-02-27T00:00:00Z' + end_time: '2022-02-27T00:30:00Z' + owner_id: 4593d277-1654-4192-b155-a4663f1dbdc2 + account_id: 0ce05511-adbc-4144-a049-6631c7ea3b04 + responses: + 200: + description: Event updated + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/event.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml + - name: event_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/crm/paths/leads.yaml b/openapi/versioned/version-0.7.5/crm/paths/leads.yaml new file mode 100644 index 000000000..d7d399b09 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/leads.yaml @@ -0,0 +1,137 @@ +get: + operationId: getLeads + tags: + - Leads + security: + - ApiKeyAuth: [] + summary: List leads + description: >- + Get a list of leads + parameters: + - $ref: ../../common/components/parameters/query/include_deleted_data.yaml + - $ref: ../../common/components/parameters/query/created_after.yaml + - $ref: ../../common/components/parameters/query/created_before.yaml + - $ref: ../../common/components/parameters/query/modified_after.yaml + - $ref: ../../common/components/parameters/query/modified_before.yaml + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/expand.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + responses: + '200': + description: Leads + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/lead.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + company: Supaglue + converted_account_id: 5733a8b6-472d-45fa-8f10-e0b00727cced + converted_contact_id: 7f65f33c-e645-40f8-b87c-6148899caa8e + converted_date: '2023-02-27T00:00:00Z' + email_addresses: + - email_address: hello@supaglue.com + email_address_type: work + first_name: George + id: 62bd34b8-54fa-4628-ae75-5fd6be59e4b7 + remote_id: 1234 + last_name: Xing + lead_source: API Blogger + owner_id: 04363f99-e807-4f69-b233-3d31b92f9bb2 + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + title: Co-Founder + - addresses: + - address_type: shipping + city: San Francisco + country: US + postal_code: '94107' + state: CA + street1: 525 Brannan + street2: ~ + company: Supaglue + converted_account_id: c300123d-91e0-4519-b514-ff6d308eab47 + converted_contact_id: 762b1d20-374b-41c9-a006-f6ed188a3e54 + converted_date: '2022-03-10T00:00:00Z' + email_addresses: + - email_address: hello@supaglue.com + email_address_type: work + first_name: George + id: 29b3e861-b1da-4f74-885a-e151c5759acf + remote_id: 1235 + last_name: Xing + lead_source: API Blogger + owner_id: 71e01ac4-5f21-46e2-b021-46555ade976d + phone_numbers: + - phone_number: '+14151234567' + phone_number_type: mobile + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + title: Co-Founder +post: + operationId: createLead + summary: Create lead + tags: + - Leads + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_lead.yaml + required: + - model + example: + model: + company: Supaglue + first_name: George + last_name: Xing + lead_source: API Blogger + title: Co-Founder + responses: + '201': + description: Lead created + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/lead.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/leads@{lead_id}.yaml b/openapi/versioned/version-0.7.5/crm/paths/leads@{lead_id}.yaml new file mode 100644 index 000000000..9d64201c6 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/leads@{lead_id}.yaml @@ -0,0 +1,69 @@ +get: + operationId: getLead + summary: Get lead + tags: + - Leads + security: + - ApiKeyAuth: [] + parameters: + - $ref: ../../common/components/parameters/query/expand.yaml + responses: + 200: + description: Lead + content: + application/json: + schema: + $ref: ../components/schemas/objects/lead.yaml +patch: + operationId: updateLead + summary: Update lead + tags: + - Leads + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_lead.yaml + required: + - model + examples: + Example: + value: + model: + company: Supaglue + first_name: George + last_name: Xing + lead_source: API Blogger + title: Co-Founder + responses: + 200: + description: Lead updated + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/lead.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml + - name: lead_id + in: path + required: true + schema: + type: string + example: 82de27cb-6f8c-4278-b783-82d1d916eddc diff --git a/openapi/versioned/version-0.7.5/crm/paths/opportunities.yaml b/openapi/versioned/version-0.7.5/crm/paths/opportunities.yaml new file mode 100644 index 000000000..d212d9c76 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/opportunities.yaml @@ -0,0 +1,111 @@ +get: + operationId: getOpportunities + tags: + - Opportunities + security: + - ApiKeyAuth: [] + summary: List opportunities + description: >- + Get a list of opportunities + parameters: + - $ref: ../../common/components/parameters/query/include_deleted_data.yaml + - $ref: ../../common/components/parameters/query/created_after.yaml + - $ref: ../../common/components/parameters/query/created_before.yaml + - $ref: ../../common/components/parameters/query/modified_after.yaml + - $ref: ../../common/components/parameters/query/modified_before.yaml + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/expand.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + responses: + '200': + description: Opportunities + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/opportunity.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - account: + id: 82de27cb-6f8c-4278-b783-82d1d916eddc + amount: 100000 + close_date: '2023-02-27T00:00:00Z' + description: Wants to use open source unified API for third-party integrations + id: 700eaee7-0b1d-40d3-90a9-1ebf77943a2e + remote_id: 1234 + last_activity_at: '2023-02-27T00:00:00Z' + name: Needs third-party integrations + owner_id: 475789f9-0df9-4a09-959e-c9f5eb7a541c + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + stage: Closed Won + - account: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + amount: 100000 + close_date: '2023-02-27T00:00:00Z' + description: Wants to use open source unified API for third-party integrations + id: 1e68260b-f250-427b-88f1-26ccc34c62d6 + remote_id: 1235 + last_activity_at: '2023-02-27T00:00:00Z' + name: Needs third-party integrations + owner_id: 64761ae1-8c42-461c-8778-9671f9d39997 + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + stage: Closed Lost + +post: + operationId: createOpportunity + summary: Create opportunity + tags: + - Opportunities + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_opportunity.yaml + required: + - model + example: + model: + amount: 100000 + close_date: '2023-02-27T00:00:00Z' + description: Wants to use open source unified API for third-party integrations + name: Needs Integrations + stage: Closed Won + account_id: 109c88c0-7bf4-4cd8-afbc-b51f9432ca0b + responses: + '201': + description: Opportunity created + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/opportunity.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/opportunities@_search.yaml b/openapi/versioned/version-0.7.5/crm/paths/opportunities@_search.yaml new file mode 100644 index 000000000..bb7417023 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/opportunities@_search.yaml @@ -0,0 +1,73 @@ +post: + operationId: searchOpportunities + summary: Search Opportunities + tags: + - Opportunities + parameters: + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + security: + - ApiKeyAuth: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + filters: + type: object + properties: + account_id: + $ref: ../components/schemas/filters.yaml#/filter + required: + - filters + responses: + '200': + description: Opportunities + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/opportunity.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - account: + id: 82de27cb-6f8c-4278-b783-82d1d916eddc + amount: 100000 + close_date: '2023-02-27T00:00:00Z' + description: Wants to use open source unified API for third-party integrations + id: 37704671-1955-47b3-b7a8-6ca814fa5005 + remote_id: 1234 + last_activity_at: '2023-02-27T00:00:00Z' + name: Needs third-party integrations + owner_id: 475789f9-0df9-4a09-959e-c9f5eb7a541c + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + stage: Closed Won + - account: + id: 82de27cb-6f8c-4278-b783-82d1d916eddc + amount: 100000 + close_date: '2023-02-27T00:00:00Z' + description: Wants to use open source unified API for third-party integrations + id: 1e68260b-f250-427b-88f1-26ccc34c62d6 + remote_id: 1235 + last_activity_at: '2023-02-27T00:00:00Z' + name: Needs third-party integrations + owner_id: 64761ae1-8c42-461c-8778-9671f9d39997 + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + stage: Closed Lost +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/opportunities@{opportunity_id}.yaml b/openapi/versioned/version-0.7.5/crm/paths/opportunities@{opportunity_id}.yaml new file mode 100644 index 000000000..e65042a26 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/opportunities@{opportunity_id}.yaml @@ -0,0 +1,76 @@ +get: + operationId: getOpportunity + summary: Get opportunity + tags: + - Opportunities + security: + - ApiKeyAuth: [] + parameters: + - $ref: ../../common/components/parameters/query/expand.yaml + responses: + 200: + description: Opportunity + content: + application/json: + schema: + $ref: ../components/schemas/objects/opportunity.yaml + examples: + Example: + value: + account: + id: a329053d-bf86-4b82-8356-9e897aa7dacc + amount: 100000 + close_date: '2023-02-27T00:00:00Z' + description: Wants to use open source unified API for third-party integrations + id: 3bde961a-90da-4daa-ab2e-cc4498c460f9 + remote_id: 1234 + last_activity_at: '2023-02-27T00:00:00Z' + name: Needs third-party integrations + owner: 93b0c2b5-26a8-4b92-b4e5-05d764eb1119 + remote_created_at: '2023-02-27T00:00:00Z' + remote_updated_at: '2023-02-27T00:00:00Z' + stage: Closed Won +patch: + operationId: updateOpportunity + summary: Update opportunity + tags: + - Opportunities + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + model: + $ref: ../components/schemas/create_update_opportunity.yaml + required: + - model + responses: + 200: + description: Opportunity updated + content: + application/json: + schema: + type: object + properties: + errors: + $ref: ../../common/components/schemas/errors.yaml + logs: + $ref: ../../common/components/schemas/logs.yaml + model: + $ref: ../components/schemas/objects/opportunity.yaml + warnings: + $ref: ../../common/components/schemas/warnings.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml + - name: opportunity_id + in: path + required: true + schema: + type: string + example: c9f58083-a370-47b5-ad02-99160ea20372 diff --git a/openapi/versioned/version-0.7.5/crm/paths/passthrough.yaml b/openapi/versioned/version-0.7.5/crm/paths/passthrough.yaml new file mode 100644 index 000000000..b500d6b80 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/passthrough.yaml @@ -0,0 +1,85 @@ +post: + operationId: sendPassthroughRequest + tags: + - Passthrough + summary: Send passthrough request + description: >- + Send request directly to a provider + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + path: + type: string + description: The path to send the request to (do not pass the domain) + method: + type: string + enum: [GET, POST, PUT, PATCH, DELETE] + example: GET + headers: + type: object + description: Headers to pass to downstream + additionalProperties: + type: string + query: + type: object + description: Query parameters to pass to downstream + additionalProperties: + type: string + body: + type: string + description: Body to pass to downstream + required: + - path + - method + responses: + '200': + description: Passthrough response + content: + application/json: + schema: + type: object + properties: + url: + type: string + description: The full URL the request was went to + example: https://customcrm.com/api/cars + status: + type: number + description: Status code from the downstream + example: 200 + headers: + type: object + description: The response headers from the downstream + additionalProperties: + type: string + body: + anyOf: + - type: string + - type: number + - type: integer + - type: boolean + - type: array + items: + additionalProperties: true + - type: object + additionalProperties: true + description: The body from the downstream + required: + - url + - status + - headers + examples: + Example: + value: + url: https://customcrm.com/api/cars + status: 200 + headers: + x-requests-limit: 96 + body: [] +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/users.yaml b/openapi/versioned/version-0.7.5/crm/paths/users.yaml new file mode 100644 index 000000000..fa9051bcc --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/users.yaml @@ -0,0 +1,55 @@ +get: + operationId: getUsers + tags: + - Users + security: + - ApiKeyAuth: [] + summary: List users + description: >- + Get a list of users + parameters: + - $ref: ../../common/components/parameters/query/include_deleted_data.yaml + - $ref: ../../common/components/parameters/query/created_after.yaml + - $ref: ../../common/components/parameters/query/created_before.yaml + - $ref: ../../common/components/parameters/query/modified_after.yaml + - $ref: ../../common/components/parameters/query/modified_before.yaml + - $ref: ../../common/components/parameters/query/cursor.yaml + - $ref: ../../common/components/parameters/query/expand.yaml + - $ref: ../../common/components/parameters/query/page_size.yaml + responses: + '200': + description: Users + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/objects/user.yaml + examples: + Example: + value: + next: eyJpZCI6IjEyYjU3ZTM0LWZkMjEtNDk1OS04ZGIwLTA5N2EzZGEzODg2YyIsInJldmVyc2UiOmZhbHNlfQ== + previous: eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9 + results: + - id: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + remote_id: 1234 + name: George Xing + email: george@supaglue.com + is_active: true + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + - id: a0f8385c-4947-41d2-a276-740f792bb0e6 + remote_id: 1235 + name: Thomas Chen + email: tom@supaglue.com + is_active: true + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml diff --git a/openapi/versioned/version-0.7.5/crm/paths/users@{user_id}.yaml b/openapi/versioned/version-0.7.5/crm/paths/users@{user_id}.yaml new file mode 100644 index 000000000..daf8ba467 --- /dev/null +++ b/openapi/versioned/version-0.7.5/crm/paths/users@{user_id}.yaml @@ -0,0 +1,23 @@ +get: + operationId: getUser + summary: Get user + tags: + - Users + security: + - ApiKeyAuth: [] + responses: + 200: + description: User + content: + application/json: + schema: + $ref: ../components/schemas/objects/user.yaml +parameters: + - $ref: ../../common/components/parameters/header/x-customer-id.yaml + - $ref: ../../common/components/parameters/header/x-provider-name.yaml + - name: user_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_customer.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_customer.yaml new file mode 100644 index 000000000..1ae8aca16 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_customer.yaml @@ -0,0 +1,15 @@ +type: object +properties: + customer_id: + type: string + example: your-customers-unique-application-id + name: + type: string + example: MyCompany Inc + email: + type: string + example: contact@mycompany.com +required: + - name + - email + - customer_id diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_integration.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_integration.yaml new file mode 100644 index 000000000..38c4268f2 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/create_update_integration.yaml @@ -0,0 +1,17 @@ +type: object +properties: + category: + $ref: ./objects/category.yaml + auth_type: + type: string + enum: + - oauth2 + provider_name: + $ref: ./objects/provider_name.yaml + config: + $ref: ./objects/integration_config.yaml +required: + - category + - auth_type + - provider_name + - config diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/category.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/category.yaml new file mode 100644 index 000000000..27d3e1b68 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/category.yaml @@ -0,0 +1,3 @@ +type: string +enum: + - crm diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/connection.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/connection.yaml new file mode 100644 index 000000000..0adf7692c --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/connection.yaml @@ -0,0 +1,39 @@ +type: object +properties: + id: + type: string + example: e888cedf-e9d0-42c5-9485-2d72984faef2 + status: + type: string + enum: + - available + - added + - authorized + - callable + example: available + application_id: + type: string + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + customer_id: + type: string + example: my-customer-1 + integration_id: + type: string + example: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + provider_name: + $ref: ./provider_name.yaml + category: + $ref: ./category.yaml + remote_id: + type: string + description: For Hubspot, this is the account ID of the connected customer. For Salesforce, this is the instance URL. + example: 123456 +required: + - id + - status + - application_id + - customer_id + - integration_id + - provider_name + - category + - remote_id diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/customer.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/customer.yaml new file mode 100644 index 000000000..4698c8fab --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/customer.yaml @@ -0,0 +1,23 @@ +type: object +properties: + application_id: + type: string + example: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + customer_id: + type: string + example: your-customers-unique-application-id + name: + type: string + example: MyCompany Inc + email: + type: string + example: contact@mycompany.com + connections: + type: array + items: + $ref: ./connection.yaml +required: + - application_id + - name + - email + - customer_id diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration.yaml new file mode 100644 index 000000000..5ab08275e --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration.yaml @@ -0,0 +1,24 @@ +type: object +properties: + id: + type: string + example: e888cedf-e9d0-42c5-9485-2d72984faef2 + application_id: + type: string + example: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + category: + $ref: ./category.yaml + auth_type: + type: string + enum: + - oauth2 + provider_name: + $ref: ./provider_name.yaml + config: + $ref: ./integration_config.yaml +required: + - id + - application_id + - category + - auth_type + - provider_name diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration_config.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration_config.yaml new file mode 100644 index 000000000..d8fc0b321 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/integration_config.yaml @@ -0,0 +1,56 @@ +type: object +properties: + provider_app_id: + type: string + example: my_app_id + oauth: + type: object + properties: + oauth_scopes: + type: array + items: + type: string + example: crm.objects.contacts.read + credentials: + type: object + properties: + oauth_client_id: + type: string + example: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: + type: string + example: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + required: + - oauth_client_id + - oauth_client_secret + required: + - oauth_scopes + - credentials + sync: + type: object + properties: + period_ms: + type: integer + example: 60000 + required: + - period_ms +required: + - provider_app_id + - oauth + - sync +example: + provider_app_id: my_app_id + oauth: + oauth_scopes: + - crm.objects.contacts.read + - crm.objects.companies.read + - crm.objects.deals.read + - crm.objects.owners.read + - crm.objects.contacts.write + - crm.objects.companies.write + - crm.objects.deals.write + credentials: + oauth_client_id: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + sync: + period_ms: 60000 diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/provider_name.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/provider_name.yaml new file mode 100644 index 000000000..ee5601a1b --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/provider_name.yaml @@ -0,0 +1,9 @@ +type: string +enum: + - hubspot + - salesforce + - pipedrive + - zendesk_sell + - ms_dynamics_365_sales + - zoho_crm + - capsule diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/webhook.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/webhook.yaml new file mode 100644 index 000000000..25b587325 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/objects/webhook.yaml @@ -0,0 +1,30 @@ +type: object +properties: + url: + type: string + request_type: + type: string + enum: + - GET + - POST + - PUT + - DELETE + - PATCH + notify_on_sync_success: + type: boolean + notify_on_sync_error: + type: boolean + notify_on_connection_success: + type: boolean + notify_on_connection_error: + type: boolean + headers: + type: object + additionalProperties: true +required: + - url + - request_type + - notify_on_sync_success + - notify_on_sync_error + - notify_on_connection_success + - notify_on_connection_error diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_history.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_history.yaml new file mode 100644 index 000000000..119003582 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_history.yaml @@ -0,0 +1,47 @@ +type: object +properties: + model_name: + type: string + example: Account + error_message: + type: string + nullable: true + start_timestamp: + type: string + example: 2023-02-22T19:55:17.559537Z + end_timestamp: + type: string + nullable: true + example: 2023-02-22T20:55:17.559537Z + application_id: + type: string + example: 974125fa-ffb6-47fc-b12f-44c566fc5da1 + customer_id: + type: string + example: my-customer-1 + provider_name: + type: string + example: hubspot + category: + type: string + enum: [crm] + connection_id: + type: string + example: 3217ea51-11c8-43c9-9547-6f197e02e5e4 + status: + type: string # TODO enum? + enum: + - SUCCESS + - IN_PROGRESS + - FAILURE +required: + - model_name + - start_timestamp + - end_timestamp + - application_id + - customer_id + - status + - error_message + - provider_name + - category + - connection_id diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_info.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_info.yaml new file mode 100644 index 000000000..ca9d454c5 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/sync_info.yaml @@ -0,0 +1,44 @@ +type: object +properties: + model_name: + type: string + example: Account + last_sync_start: + type: string + nullable: true + example: 2023-02-22T19:55:17.559537Z + next_sync_start: + type: string + nullable: true + example: 2023-02-22T20:55:17.559537Z + status: + type: string + nullable: true + enum: + - SYNCING + - DONE + application_id: + type: string + example: 974125fa-ffb6-47fc-b12f-44c566fc5da1 + customer_id: + type: string + example: my-customer-1 + provider_name: + type: string + example: hubspot + category: + type: string + enum: [crm] + connection_id: + type: string + example: 3217ea51-11c8-43c9-9547-6f197e02e5e4 +required: + - model_name + - last_sync_start + - next_sync_start + - status + - application_id + - customer_id + - provider_name + - category + - connection_id diff --git a/openapi/versioned/version-0.7.5/mgmt/components/schemas/webhook-payload.yaml b/openapi/versioned/version-0.7.5/mgmt/components/schemas/webhook-payload.yaml new file mode 100644 index 000000000..71fb53998 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/components/schemas/webhook-payload.yaml @@ -0,0 +1,83 @@ +oneOf: + - type: object + title: Sync Finished Event + properties: + type: + enum: + - SYNC_SUCCESS + - SYNC_ERROR + payload: + type: object + properties: + connection_id: + type: string + example: e30cbb93-5b05-4186-b6de-1acc10013795 + customer_id: + type: string + example: 7bfcc74d-c98b-49de-8e8f-3dc7a17273f6 + provider_name: + type: string + enum: + - hubspot + - salesforce + example: hubspot + history_id: + type: string + example: 2fdbd03d-11f2-4e66-a5e6-2b731c71a12d + num_records_synced: + type: integer + example: 100 + common_model: + type: string + enum: + - opportunity + - contact + - account + - lead + - user + example: contact + error_message: + type: string + required: + - connection_id + - customer_id + - history_id + - num_records_synced + - common_model + required: + - type + - payload + - type: object + title: Connection Created Event + properties: + type: + enum: + - CONNECTION_SUCCESS + - CONNECTION_ERROR + payload: + type: object + properties: + customer_id: + type: string + example: e30cbb93-5b05-4186-b6de-1acc10013795 + integration_id: + type: string + example: 5a4dbac6-3a56-4ad9-8aa3-e7b7f00be024 + category: + type: string + enum: + - crm + provider_name: + type: string + enum: + - hubspot + - salesforce + example: hubspot + required: + - customer_id + - integration_id + - category + - provider_name + required: + - type + - payload diff --git a/openapi/versioned/version-0.7.5/mgmt/openapi.bundle.json b/openapi/versioned/version-0.7.5/mgmt/openapi.bundle.json new file mode 100644 index 000000000..f8adf5354 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/openapi.bundle.json @@ -0,0 +1,1431 @@ +{ + "openapi": "3.1.0", + "info": { + "version": "0.7.5", + "title": "Supaglue Management API", + "contact": { + "name": "Supaglue", + "email": "docs@supaglue.com", + "url": "https://supaglue.com" + }, + "description": "# Introduction\n\nWelcome to the Supaglue Management API documentation. You can use this API to manage customer integrations and connections.\n\n### Base API URL\n\n```\nhttp://localhost:8080/mgmt/v1\n```\n" + }, + "externalDocs": { + "description": "Try out our API in Postman!", + "url": "https://www.postman.com/supaglue/workspace/supaglue-public/overview" + }, + "servers": [ + { + "url": "http://localhost:8080/mgmt/v1", + "description": "Local Supaglue API" + } + ], + "paths": { + "/customers": { + "get": { + "operationId": "getCustomers", + "tags": ["Customers"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List customers", + "description": "Get a list of customers", + "responses": { + "200": { + "description": "Customers", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/customer" + } + }, + "examples": { + "Example": { + "value": [ + { + "customer_id": "your-customers-unique-application-id", + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "name": "MyCompany Inc", + "email": "contact@mycompany.com" + }, + { + "customer_id": "your-other-customers-unique-application-id2", + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "name": "TheirCompany Inc", + "email": "contact@theircompany.com" + } + ] + } + } + } + } + } + } + }, + "put": { + "operationId": "upsertCustomer", + "summary": "Upsert customer", + "tags": ["Customers"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_update_customer" + } + } + } + }, + "responses": { + "200": { + "description": "Customer upserted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + }, + "/customers/{customer_id}": { + "get": { + "operationId": "getCustomer", + "summary": "Get customer", + "tags": ["Customers"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Customer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + }, + "examples": { + "Example": { + "value": { + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "name": "MyCompany Inc", + "email": "contact@mycompany.com", + "customer_id": "your-customers-unique-application-id" + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteCustomer", + "summary": "Delete customer", + "tags": ["Customers"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Customer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/customer" + }, + "examples": { + "Example": { + "value": { + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "name": "MyCompany Inc", + "email": "contact@mycompany.com", + "customer_id": "your-customers-unique-application-id" + } + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "customer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "your-customers-unique-application-id" + } + } + ] + }, + "/integrations": { + "get": { + "operationId": "getIntegrations", + "tags": ["Integrations"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List integrations", + "description": "Get a list of integrations", + "responses": { + "200": { + "description": "Integrations", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/integration" + } + }, + "examples": { + "Example": { + "value": [ + { + "id": "e888cedf-e9d0-42c5-9485-2d72984faef8", + "category": "crm", + "auth_type": "oauth2", + "provider_name": "hubspot", + "config": { + "provider_app_id": "my_app_id", + "oauth": { + "oauth_scopes": [ + "crm.objects.contacts.read", + "crm.objects.companies.read", + "crm.objects.deals.read", + "crm.objects.owners.read", + "crm.objects.contacts.write", + "crm.objects.companies.write", + "crm.objects.deals.write" + ], + "credentials": { + "oauth_client_id": "7393b5a4-5e20-4648-87af-b7b297793fd1", + "oauth_client_secret": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "sync": { + "period_ms": 60000 + } + } + }, + { + "id": "cb40ff24-6587-4b24-82a3-9269a05d5dda", + "category": "crm", + "auth_type": "oauth2", + "provider_name": "salesforce", + "config": { + "provider_app_id": "my_app_id2", + "oauth": { + "oauth_scopes": [ + "crm.objects.contacts.read", + "crm.objects.companies.read", + "crm.objects.deals.read", + "crm.objects.owners.read", + "crm.objects.contacts.write", + "crm.objects.companies.write", + "crm.objects.deals.write" + ], + "credentials": { + "oauth_client_id": "7393b5a4-5e20-4648-87af-b7b297793fd1", + "oauth_client_secret": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "sync": { + "period_ms": 60000 + } + } + } + ] + } + } + } + } + } + } + }, + "post": { + "operationId": "createIntegration", + "summary": "Create integration", + "tags": ["Integrations"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_update_integration" + } + } + } + }, + "responses": { + "201": { + "description": "Integration created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/integration" + } + } + } + } + } + } + }, + "/integrations/{integration_id}": { + "get": { + "operationId": "getIntegration", + "summary": "Get integration", + "tags": ["Integrations"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Integration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/integration" + }, + "examples": { + "Example": { + "value": { + "id": "e888cedf-e9d0-42c5-9485-2d72984faef9", + "category": "crm", + "auth_type": "oauth2", + "provider_name": "hubspot", + "config": { + "provider_app_id": "my_app_id", + "oauth": { + "oauth_scopes": [ + "crm.objects.contacts.read", + "crm.objects.companies.read", + "crm.objects.deals.read", + "crm.objects.owners.read", + "crm.objects.contacts.write", + "crm.objects.companies.write", + "crm.objects.deals.write" + ], + "credentials": { + "oauth_client_id": "7393b5a4-5e20-4648-87af-b7b297793fd1", + "oauth_client_secret": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "sync": { + "period_ms": 60000 + } + } + } + } + } + } + } + } + } + }, + "put": { + "operationId": "updateIntegration", + "summary": "Update integration", + "tags": ["Integrations"], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_update_integration" + } + } + } + }, + "responses": { + "200": { + "description": "Integration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/integration" + }, + "examples": { + "Example": { + "value": { + "id": "e888cedf-e9d0-42c5-9485-2d72984faef0", + "category": "crm", + "auth_type": "oauth2", + "provider_name": "hubspot", + "config": { + "provider_app_id": "my_app_id", + "oauth": { + "oauth_scopes": [ + "crm.objects.contacts.read", + "crm.objects.companies.read", + "crm.objects.deals.read", + "crm.objects.owners.read", + "crm.objects.contacts.write", + "crm.objects.companies.write", + "crm.objects.deals.write" + ], + "credentials": { + "oauth_client_id": "7393b5a4-5e20-4648-87af-b7b297793fd1", + "oauth_client_secret": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "sync": { + "period_ms": 60000 + } + } + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteIntegration", + "summary": "Delete integration", + "tags": ["Integrations"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Integration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/integration" + }, + "examples": { + "Example": { + "value": { + "id": "e888cedf-e9d0-42c5-9485-2d72984faefa", + "category": "crm", + "auth_type": "oauth2", + "provider_name": "hubspot", + "config": { + "provider_app_id": "my_app_id", + "oauth": { + "oauth_scopes": [ + "crm.objects.contacts.read", + "crm.objects.companies.read", + "crm.objects.deals.read", + "crm.objects.owners.read", + "crm.objects.contacts.write", + "crm.objects.companies.write", + "crm.objects.deals.write" + ], + "credentials": { + "oauth_client_id": "7393b5a4-5e20-4648-87af-b7b297793fd1", + "oauth_client_secret": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "sync": { + "period_ms": 60000 + } + } + } + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "integration_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/customers/{customer_id}/connections": { + "get": { + "operationId": "getConnections", + "tags": ["Connections"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "List connections", + "description": "Get a list of connections", + "responses": { + "200": { + "description": "Connections", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connection" + } + }, + "examples": { + "Example": { + "value": [ + { + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6b", + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "customer_id": "my-customer-1", + "status": "available", + "integration_id": "9572d08b-f19f-48cc-a992-1eb7031d3f6a", + "provider_name": "salesforce", + "category": "crm", + "remote_id": "https://mycompany-dev-ed.develop.my.salesforce.com" + }, + { + "id": "e888cedf-e9d0-42c5-9485-2d72984faef7", + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "customer_id": "my-customer-2", + "status": "available", + "integration_id": "db40a684-3150-46d2-bfd2-acb341a72681", + "provider_name": "hubspot", + "category": "crm", + "remote_id": 1234567 + } + ] + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "customer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/customers/{customer_id}/connections/{connection_id}": { + "get": { + "operationId": "getConnection", + "summary": "Get connection", + "tags": ["Connections"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Connection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connection" + }, + "examples": { + "Example": { + "value": { + "id": "9572d08b-f19f-48cc-a992-1eb7031d3f6c", + "application_id": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69", + "customer_id": "my-customer-1", + "status": "available", + "integration_id": "9572d08b-f19f-48cc-a992-1eb7031d3f6a", + "provider_name": "salesforce", + "category": "crm", + "remote_id": "https://supaglue-dev-ed.develop.my.salesforce.com" + } + } + } + } + } + } + } + }, + "delete": { + "operationId": "deleteConnection", + "summary": "Delete connection", + "tags": ["Connections"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "204": { + "description": "Connection" + } + } + }, + "parameters": [ + { + "name": "customer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + }, + { + "name": "connection_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "0258cbc6-6020-430a-848e-aafacbadf4ae" + } + } + ] + }, + "/webhook": { + "get": { + "operationId": "getWebhook", + "tags": ["Webhook"], + "summary": "Get webhook", + "description": "Get webhook details", + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Applications", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook" + }, + "examples": { + "Example": { + "value": { + "url": "http://localhost:8080", + "request_type": "POST", + "notify_on_sync_success": true, + "notify_on_sync_error": true, + "notify_on_connection_success": true, + "notify_on_connection_error": true + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createWebhook", + "summary": "Create webhook", + "tags": ["Webhook"], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook" + } + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "201": { + "description": "Webhook created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteWebhook", + "summary": "Delete webhook", + "tags": ["Webhook"], + "parameters": [], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "responses": { + "200": { + "description": "Webhook deleted" + } + } + } + }, + "/sync-history": { + "get": { + "operationId": "getSyncHistory", + "tags": ["Sync"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get Sync History", + "description": "Get a list of Sync History objects.", + "parameters": [ + { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + }, + "description": "The pagination cursor value" + }, + { + "name": "page_size", + "in": "query", + "schema": { + "type": "string", + "example": "3804695" + }, + "description": "Number of results to return per page" + }, + { + "name": "customer_id", + "in": "query", + "schema": { + "type": "string", + "example": "my-customer-1" + }, + "description": "The customer ID that uniquely identifies the customer in your application" + }, + { + "name": "provider_name", + "in": "query", + "schema": { + "type": "string", + "example": "salesforce" + }, + "description": "The provider name" + }, + { + "name": "model", + "in": "query", + "schema": { + "type": "string", + "example": "contact" + }, + "description": "The model name to filter by" + } + ], + "responses": { + "200": { + "description": "Sync History", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "next": { + "type": "string", + "nullable": true, + "example": "eyJpZCI6IjQyNTc5ZjczLTg1MjQtNDU3MC05YjY3LWVjYmQ3MDJjNmIxNCIsInJldmVyc2UiOmZhbHNlfQ==" + }, + "previous": { + "type": "string", + "nullable": true, + "example": "eyJpZCI6IjBjZDhmYmZkLWU5NmQtNDEwZC05ZjQxLWIwMjU1YjdmNGI4NyIsInJldmVyc2UiOnRydWV9" + } + } + }, + { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/sync_history" + } + } + } + } + ] + }, + "examples": { + "Example": { + "value": { + "next": "sjkflwbajkbbkajwbcs", + "previous": null, + "results": [ + { + "model_name": "account", + "start_timestamp": "2023-02-22T19:55:17.559Z", + "status": "IN_PROGRESS", + "application_id": "3217ea51-11c8-43c9-9547-6f197e02e5e4", + "customer_id": "my-customer-1", + "provider_name": "hubspot", + "category": "crm", + "connection_id": "f723e58c-3034-4056-babf-a8871ac12480" + }, + { + "model_name": "contact", + "start_timestamp": "2023-02-22T19:50:17.559Z", + "end_timestamp": "2023-02-22T20:50:17.559Z", + "status": "ERROR", + "error_message": "Error: Something went wrong", + "application_id": "3217ea51-11c8-43c9-9547-6f197e02e5e4", + "customer_id": "my-customer-1", + "provider_name": "hubspot", + "category": "crm", + "connection_id": "f723e58c-3034-4056-babf-a8871ac12480" + } + ] + } + } + } + } + } + } + } + } + }, + "/sync-info": { + "get": { + "operationId": "getSyncInfos", + "tags": ["Sync"], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "summary": "Get Sync Info", + "description": "Get a list of Sync Info", + "parameters": [ + { + "name": "customer_id", + "in": "query", + "schema": { + "type": "string", + "example": "my-customer-1" + }, + "description": "The customer ID that uniquely identifies the customer in your application" + }, + { + "name": "provider_name", + "in": "query", + "schema": { + "type": "string", + "example": "salesforce" + }, + "description": "The provider name" + } + ], + "responses": { + "200": { + "description": "Sync Info List", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/sync_info" + } + }, + "examples": { + "Example": { + "value": [ + { + "model_name": "account", + "last_sync_start": "2023-02-22T19:55:17.559Z", + "next_sync_start": "2023-02-22T20:55:17.559Z", + "status": "SYNCING", + "application_id": "3217ea51-11c8-43c9-9547-6f197e02e5e4", + "customer_id": "my-customer-1", + "provider_name": "hubspot", + "category": "crm", + "connection_id": "f723e58c-3034-4056-babf-a8871ac12480" + }, + { + "model_name": "contact", + "last_sync_start": "2023-02-22T19:50:17.559Z", + "next_sync_start": "2023-02-22T20:50:17.559Z", + "status": "DONE", + "application_id": "3217ea51-11c8-43c9-9547-6f197e02e5e4", + "customer_id": "my-customer-1", + "provider_name": "hubspot", + "category": "crm", + "connection_id": "f723e58c-3034-4056-babf-a8871ac12480" + } + ] + } + } + } + } + } + } + } + } + }, + "tags": [], + "components": { + "securitySchemes": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "x-api-key", + "in": "header", + "description": "API key to allow developers to access the API" + } + }, + "schemas": { + "customer": { + "type": "object", + "properties": { + "application_id": { + "type": "string", + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "customer_id": { + "type": "string", + "example": "your-customers-unique-application-id" + }, + "name": { + "type": "string", + "example": "MyCompany Inc" + }, + "email": { + "type": "string", + "example": "contact@mycompany.com" + }, + "connections": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connection" + } + } + }, + "required": ["application_id", "name", "email", "customer_id"] + }, + "integration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "e888cedf-e9d0-42c5-9485-2d72984faef2" + }, + "application_id": { + "type": "string", + "example": "9572d08b-f19f-48cc-a992-1eb7031d3f6a" + }, + "category": { + "$ref": "#/components/schemas/category" + }, + "auth_type": { + "type": "string", + "enum": ["oauth2"] + }, + "provider_name": { + "$ref": "#/components/schemas/provider_name" + }, + "config": { + "$ref": "#/components/schemas/integration_config" + } + }, + "required": ["id", "application_id", "category", "auth_type", "provider_name"] + }, + "connection": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "e888cedf-e9d0-42c5-9485-2d72984faef2" + }, + "status": { + "type": "string", + "enum": ["available", "added", "authorized", "callable"], + "example": "available" + }, + "application_id": { + "type": "string", + "example": "d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69" + }, + "customer_id": { + "type": "string", + "example": "my-customer-1" + }, + "integration_id": { + "type": "string", + "example": "9572d08b-f19f-48cc-a992-1eb7031d3f6a" + }, + "provider_name": { + "$ref": "#/components/schemas/provider_name" + }, + "category": { + "$ref": "#/components/schemas/category" + }, + "remote_id": { + "type": "string", + "description": "For Hubspot, this is the account ID of the connected customer. For Salesforce, this is the instance URL.", + "example": 123456 + } + }, + "required": [ + "id", + "status", + "application_id", + "customer_id", + "integration_id", + "provider_name", + "category", + "remote_id" + ] + }, + "category": { + "type": "string", + "enum": ["crm"] + }, + "integration_config": { + "type": "object", + "properties": { + "provider_app_id": { + "type": "string", + "example": "my_app_id" + }, + "oauth": { + "type": "object", + "properties": { + "oauth_scopes": { + "type": "array", + "items": { + "type": "string", + "example": "crm.objects.contacts.read" + } + }, + "credentials": { + "type": "object", + "properties": { + "oauth_client_id": { + "type": "string", + "example": "7393b5a4-5e20-4648-87af-b7b297793fd1" + }, + "oauth_client_secret": { + "type": "string", + "example": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "required": ["oauth_client_id", "oauth_client_secret"] + } + }, + "required": ["oauth_scopes", "credentials"] + }, + "sync": { + "type": "object", + "properties": { + "period_ms": { + "type": "integer", + "example": 60000 + } + }, + "required": ["period_ms"] + } + }, + "required": ["provider_app_id", "oauth", "sync"], + "example": { + "provider_app_id": "my_app_id", + "oauth": { + "oauth_scopes": [ + "crm.objects.contacts.read", + "crm.objects.companies.read", + "crm.objects.deals.read", + "crm.objects.owners.read", + "crm.objects.contacts.write", + "crm.objects.companies.write", + "crm.objects.deals.write" + ], + "credentials": { + "oauth_client_id": "7393b5a4-5e20-4648-87af-b7b297793fd1", + "oauth_client_secret": "941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a" + } + }, + "sync": { + "period_ms": 60000 + } + } + }, + "provider_name": { + "type": "string", + "enum": ["hubspot", "salesforce", "pipedrive", "zendesk_sell", "ms_dynamics_365_sales", "zoho_crm", "capsule"] + }, + "create_update_customer": { + "type": "object", + "properties": { + "customer_id": { + "type": "string", + "example": "your-customers-unique-application-id" + }, + "name": { + "type": "string", + "example": "MyCompany Inc" + }, + "email": { + "type": "string", + "example": "contact@mycompany.com" + } + }, + "required": ["name", "email", "customer_id"] + }, + "create_update_integration": { + "type": "object", + "properties": { + "category": { + "$ref": "#/components/schemas/category" + }, + "auth_type": { + "type": "string", + "enum": ["oauth2"] + }, + "provider_name": { + "$ref": "#/components/schemas/provider_name" + }, + "config": { + "$ref": "#/components/schemas/integration_config" + } + }, + "required": ["category", "auth_type", "provider_name", "config"] + }, + "webhook": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "request_type": { + "type": "string", + "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"] + }, + "notify_on_sync_success": { + "type": "boolean" + }, + "notify_on_sync_error": { + "type": "boolean" + }, + "notify_on_connection_success": { + "type": "boolean" + }, + "notify_on_connection_error": { + "type": "boolean" + }, + "headers": { + "type": "object", + "additionalProperties": true + } + }, + "required": [ + "url", + "request_type", + "notify_on_sync_success", + "notify_on_sync_error", + "notify_on_connection_success", + "notify_on_connection_error" + ] + }, + "sync_info": { + "type": "object", + "properties": { + "model_name": { + "type": "string", + "example": "Account" + }, + "last_sync_start": { + "type": "string", + "nullable": true, + "example": "2023-02-22T19:55:17.559Z" + }, + "next_sync_start": { + "type": "string", + "nullable": true, + "example": "2023-02-22T20:55:17.559Z" + }, + "status": { + "type": "string", + "nullable": true, + "enum": ["SYNCING", "DONE"] + }, + "application_id": { + "type": "string", + "example": "974125fa-ffb6-47fc-b12f-44c566fc5da1" + }, + "customer_id": { + "type": "string", + "example": "my-customer-1" + }, + "provider_name": { + "type": "string", + "example": "hubspot" + }, + "category": { + "type": "string", + "enum": ["crm"] + }, + "connection_id": { + "type": "string", + "example": "3217ea51-11c8-43c9-9547-6f197e02e5e4" + } + }, + "required": [ + "model_name", + "last_sync_start", + "next_sync_start", + "status", + "application_id", + "customer_id", + "provider_name", + "category", + "connection_id" + ] + }, + "sync_history": { + "type": "object", + "properties": { + "model_name": { + "type": "string", + "example": "Account" + }, + "error_message": { + "type": "string", + "nullable": true + }, + "start_timestamp": { + "type": "string", + "example": "2023-02-22T19:55:17.559Z" + }, + "end_timestamp": { + "type": "string", + "nullable": true, + "example": "2023-02-22T20:55:17.559Z" + }, + "application_id": { + "type": "string", + "example": "974125fa-ffb6-47fc-b12f-44c566fc5da1" + }, + "customer_id": { + "type": "string", + "example": "my-customer-1" + }, + "provider_name": { + "type": "string", + "example": "hubspot" + }, + "category": { + "type": "string", + "enum": ["crm"] + }, + "connection_id": { + "type": "string", + "example": "3217ea51-11c8-43c9-9547-6f197e02e5e4" + }, + "status": { + "type": "string", + "enum": ["SUCCESS", "IN_PROGRESS", "FAILURE"] + } + }, + "required": [ + "model_name", + "start_timestamp", + "end_timestamp", + "application_id", + "customer_id", + "status", + "error_message", + "provider_name", + "category", + "connection_id" + ] + }, + "webhook-payload": { + "oneOf": [ + { + "type": "object", + "title": "Sync Finished Event", + "properties": { + "type": { + "enum": ["SYNC_SUCCESS", "SYNC_ERROR"] + }, + "payload": { + "type": "object", + "properties": { + "connection_id": { + "type": "string", + "example": "e30cbb93-5b05-4186-b6de-1acc10013795" + }, + "customer_id": { + "type": "string", + "example": "7bfcc74d-c98b-49de-8e8f-3dc7a17273f6" + }, + "provider_name": { + "type": "string", + "enum": ["hubspot", "salesforce"], + "example": "hubspot" + }, + "history_id": { + "type": "string", + "example": "2fdbd03d-11f2-4e66-a5e6-2b731c71a12d" + }, + "num_records_synced": { + "type": "integer", + "example": 100 + }, + "common_model": { + "type": "string", + "enum": ["opportunity", "contact", "account", "lead", "user"], + "example": "contact" + }, + "error_message": { + "type": "string" + } + }, + "required": ["connection_id", "customer_id", "history_id", "num_records_synced", "common_model"] + } + }, + "required": ["type", "payload"] + }, + { + "type": "object", + "title": "Connection Created Event", + "properties": { + "type": { + "enum": ["CONNECTION_SUCCESS", "CONNECTION_ERROR"] + }, + "payload": { + "type": "object", + "properties": { + "customer_id": { + "type": "string", + "example": "e30cbb93-5b05-4186-b6de-1acc10013795" + }, + "integration_id": { + "type": "string", + "example": "5a4dbac6-3a56-4ad9-8aa3-e7b7f00be024" + }, + "category": { + "type": "string", + "enum": ["crm"] + }, + "provider_name": { + "type": "string", + "enum": ["hubspot", "salesforce"], + "example": "hubspot" + } + }, + "required": ["customer_id", "integration_id", "category", "provider_name"] + } + }, + "required": ["type", "payload"] + } + ] + } + }, + "parameters": { + "cursor": { + "name": "cursor", + "in": "query", + "schema": { + "type": "string", + "example": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" + }, + "description": "The pagination cursor value" + }, + "page_size": { + "name": "page_size", + "in": "query", + "schema": { + "type": "string", + "example": "3804695" + }, + "description": "Number of results to return per page" + }, + "customer_id": { + "name": "customer_id", + "in": "query", + "schema": { + "type": "string", + "example": "1bae5050-b8ff-472e-8b9f-01f29a81d1ee" + }, + "description": "The customer ID that uniquely identifies the customer in your application" + }, + "provider_name": { + "name": "provider_name", + "in": "query", + "schema": { + "type": "string", + "example": "salesforce" + }, + "description": "The provider name" + } + } + }, + "webhooks": { + "webhook": { + "post": { + "operationId": "webhook", + "summary": "Webhook", + "tags": ["Webhook"], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook-payload" + } + } + } + }, + "responses": { + "200": { + "description": "Return a 200 status to indicate that the data was received successfully" + } + } + } + } + } +} diff --git a/openapi/versioned/version-0.7.5/mgmt/openapi.yaml b/openapi/versioned/version-0.7.5/mgmt/openapi.yaml new file mode 100644 index 000000000..250bbd434 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/openapi.yaml @@ -0,0 +1,87 @@ +# NOTE: Using 3.1.0 because we want to document webhooks. +# Other than the `webhooks` key, we should not use 3.1.0 features since the validation middleware doesn't support it yet +openapi: 3.1.0 +info: + version: 0.7.5 + title: Supaglue Management API + contact: + name: Supaglue + email: docs@supaglue.com + url: 'https://supaglue.com' + description: | + # Introduction + + Welcome to the Supaglue Management API documentation. You can use this API to manage customer integrations and connections. + + ### Base API URL + + ``` + http://localhost:8080/mgmt/v1 + ``` +externalDocs: + description: Try out our API in Postman! + url: 'https://www.postman.com/supaglue/workspace/supaglue-public/overview' +servers: + - url: 'http://localhost:8080/mgmt/v1' + description: Local Supaglue API +paths: + '/customers': + $ref: paths/customers.yaml + '/customers/{customer_id}': + $ref: paths/customers@{customer_id}.yaml + '/integrations': + $ref: paths/integrations.yaml + '/integrations/{integration_id}': + $ref: paths/integrations@{integration_id}.yaml + '/customers/{customer_id}/connections': + $ref: paths/connections.yaml + '/customers/{customer_id}/connections/{connection_id}': + $ref: paths/connections@{connection_id}.yaml + '/webhook': + $ref: paths/webhook.yaml + '/sync-history': + $ref: paths/sync_history.yaml + '/sync-info': + $ref: paths/sync_info.yaml +tags: [] +components: + securitySchemes: + ApiKeyAuth: + $ref: ../common/components/securitySchemes/x-api-key.yaml + schemas: + customer: + $ref: ./components/schemas/objects/customer.yaml + integration: + $ref: ./components/schemas/objects/integration.yaml + connection: + $ref: ./components/schemas/objects/connection.yaml + category: + $ref: ./components/schemas/objects/category.yaml + integration_config: + $ref: ./components/schemas/objects/integration_config.yaml + provider_name: + $ref: ./components/schemas/objects/provider_name.yaml + create_update_customer: + $ref: ./components/schemas/create_update_customer.yaml + create_update_integration: + $ref: ./components/schemas/create_update_integration.yaml + webhook: + $ref: ./components/schemas/objects/webhook.yaml + sync_info: + $ref: ./components/schemas/sync_info.yaml + sync_history: + $ref: ./components/schemas/sync_history.yaml + webhook-payload: + $ref: './components/schemas/webhook-payload.yaml' + parameters: + cursor: + $ref: ../common/components/parameters/query/cursor.yaml + page_size: + $ref: ../common/components/parameters/query/page_size.yaml + customer_id: + $ref: ../common/components/parameters/query/customer_id.yaml + provider_name: + $ref: ../common/components/parameters/query/provider_name.yaml +webhooks: + webhook: + $ref: ./webhooks/webhook.yaml diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/connections.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/connections.yaml new file mode 100644 index 000000000..aa10f2a45 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/connections.yaml @@ -0,0 +1,44 @@ +get: + operationId: getConnections + tags: + - Connections + security: + - ApiKeyAuth: [] + summary: List connections + description: >- + Get a list of connections + responses: + '200': + description: Connections + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/objects/connection.yaml + examples: + Example: + value: + - id: 9572d08b-f19f-48cc-a992-1eb7031d3f6b + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + customer_id: my-customer-1 + status: available + integration_id: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + provider_name: salesforce + category: crm + remote_id: https://mycompany-dev-ed.develop.my.salesforce.com + - id: e888cedf-e9d0-42c5-9485-2d72984faef7 + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + customer_id: my-customer-2 + status: available + integration_id: db40a684-3150-46d2-bfd2-acb341a72681 + provider_name: hubspot + category: crm + remote_id: 1234567 +parameters: + - name: customer_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/connections@{connection_id}.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/connections@{connection_id}.yaml new file mode 100644 index 000000000..3d4e7e70b --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/connections@{connection_id}.yaml @@ -0,0 +1,48 @@ +get: + operationId: getConnection + summary: Get connection + tags: + - Connections + security: + - ApiKeyAuth: [] + responses: + 200: + description: Connection + content: + application/json: + schema: + $ref: ../components/schemas/objects/connection.yaml + examples: + Example: + value: + id: 9572d08b-f19f-48cc-a992-1eb7031d3f6c + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + customer_id: my-customer-1 + status: available + integration_id: 9572d08b-f19f-48cc-a992-1eb7031d3f6a + provider_name: salesforce + category: crm + remote_id: https://supaglue-dev-ed.develop.my.salesforce.com +delete: + operationId: deleteConnection + summary: Delete connection + tags: + - Connections + security: + - ApiKeyAuth: [] + responses: + 204: + description: Connection +parameters: + - name: customer_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae + - name: connection_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/customers.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/customers.yaml new file mode 100644 index 000000000..d7642e5d5 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/customers.yaml @@ -0,0 +1,50 @@ +get: + operationId: getCustomers + tags: + - Customers + security: + - ApiKeyAuth: [] + summary: List customers + description: >- + Get a list of customers + responses: + '200': + description: Customers + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/objects/customer.yaml + examples: + Example: + value: + - customer_id: your-customers-unique-application-id + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + name: MyCompany Inc + email: contact@mycompany.com + - customer_id: your-other-customers-unique-application-id2 + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + name: TheirCompany Inc + email: contact@theircompany.com +put: + operationId: upsertCustomer + summary: Upsert customer + tags: + - Customers + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/create_update_customer.yaml + responses: + '200': + description: Customer upserted + content: + application/json: + schema: + $ref: ../components/schemas/objects/customer.yaml diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/customers@{customer_id}.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/customers@{customer_id}.yaml new file mode 100644 index 000000000..cabf431ea --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/customers@{customer_id}.yaml @@ -0,0 +1,49 @@ +get: + operationId: getCustomer + summary: Get customer + tags: + - Customers + security: + - ApiKeyAuth: [] + responses: + 200: + description: Customer + content: + application/json: + schema: + $ref: ../components/schemas/objects/customer.yaml + examples: + Example: + value: + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + name: MyCompany Inc + email: contact@mycompany.com + customer_id: your-customers-unique-application-id +delete: + operationId: deleteCustomer + summary: Delete customer + tags: + - Customers + security: + - ApiKeyAuth: [] + responses: + 200: + description: Customer + content: + application/json: + schema: + $ref: ../components/schemas/objects/customer.yaml + examples: + Example: + value: + application_id: d8ceb3ff-8b7f-4fa7-b8de-849292f6ca69 + name: MyCompany Inc + email: contact@mycompany.com + customer_id: your-customers-unique-application-id +parameters: + - name: customer_id + in: path + required: true + schema: + type: string + example: your-customers-unique-application-id diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/integrations.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/integrations.yaml new file mode 100644 index 000000000..da8eedc12 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/integrations.yaml @@ -0,0 +1,82 @@ +get: + operationId: getIntegrations + tags: + - Integrations + security: + - ApiKeyAuth: [] + summary: List integrations + description: >- + Get a list of integrations + responses: + '200': + description: Integrations + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/objects/integration.yaml + examples: + Example: + value: + - id: e888cedf-e9d0-42c5-9485-2d72984faef8 + category: crm + auth_type: oauth2 + provider_name: hubspot + config: + provider_app_id: my_app_id + oauth: + oauth_scopes: + - crm.objects.contacts.read + - crm.objects.companies.read + - crm.objects.deals.read + - crm.objects.owners.read + - crm.objects.contacts.write + - crm.objects.companies.write + - crm.objects.deals.write + credentials: + oauth_client_id: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + sync: + period_ms: 60000 + - id: cb40ff24-6587-4b24-82a3-9269a05d5dda + category: crm + auth_type: oauth2 + provider_name: salesforce + config: + provider_app_id: my_app_id2 + oauth: + oauth_scopes: + - crm.objects.contacts.read + - crm.objects.companies.read + - crm.objects.deals.read + - crm.objects.owners.read + - crm.objects.contacts.write + - crm.objects.companies.write + - crm.objects.deals.write + credentials: + oauth_client_id: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + sync: + period_ms: 60000 +post: + operationId: createIntegration + summary: Create integration + tags: + - Integrations + security: + - ApiKeyAuth: [] + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/create_update_integration.yaml + responses: + '201': + description: Integration created + content: + application/json: + schema: + $ref: ../components/schemas/objects/integration.yaml diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/integrations@{integration_id}.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/integrations@{integration_id}.yaml new file mode 100644 index 000000000..ad97a0f7e --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/integrations@{integration_id}.yaml @@ -0,0 +1,123 @@ +get: + operationId: getIntegration + summary: Get integration + tags: + - Integrations + security: + - ApiKeyAuth: [] + responses: + 200: + description: Integration + content: + application/json: + schema: + $ref: ../components/schemas/objects/integration.yaml + examples: + Example: + value: + id: e888cedf-e9d0-42c5-9485-2d72984faef9 + category: crm + auth_type: oauth2 + provider_name: hubspot + config: + provider_app_id: my_app_id + oauth: + oauth_scopes: + - crm.objects.contacts.read + - crm.objects.companies.read + - crm.objects.deals.read + - crm.objects.owners.read + - crm.objects.contacts.write + - crm.objects.companies.write + - crm.objects.deals.write + credentials: + oauth_client_id: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + sync: + period_ms: 60000 +put: + operationId: updateIntegration + summary: Update integration + tags: + - Integrations + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/create_update_integration.yaml + responses: + 200: + description: Integration + content: + application/json: + schema: + $ref: ../components/schemas/objects/integration.yaml + examples: + Example: + value: + id: e888cedf-e9d0-42c5-9485-2d72984faef0 + category: crm + auth_type: oauth2 + provider_name: hubspot + config: + provider_app_id: my_app_id + oauth: + oauth_scopes: + - crm.objects.contacts.read + - crm.objects.companies.read + - crm.objects.deals.read + - crm.objects.owners.read + - crm.objects.contacts.write + - crm.objects.companies.write + - crm.objects.deals.write + credentials: + oauth_client_id: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + sync: + period_ms: 60000 +delete: + operationId: deleteIntegration + summary: Delete integration + tags: + - Integrations + security: + - ApiKeyAuth: [] + responses: + 200: + description: Integration + content: + application/json: + schema: + $ref: ../components/schemas/objects/integration.yaml + examples: + Example: + value: + id: e888cedf-e9d0-42c5-9485-2d72984faefa + category: crm + auth_type: oauth2 + provider_name: hubspot + config: + provider_app_id: my_app_id + oauth: + oauth_scopes: + - crm.objects.contacts.read + - crm.objects.companies.read + - crm.objects.deals.read + - crm.objects.owners.read + - crm.objects.contacts.write + - crm.objects.companies.write + - crm.objects.deals.write + credentials: + oauth_client_id: 7393b5a4-5e20-4648-87af-b7b297793fd1 + oauth_client_secret: 941b846a-5a8c-48b8-b0e1-41b6d4bc4f1a + sync: + period_ms: 60000 +parameters: + - name: integration_id + in: path + required: true + schema: + type: string + example: 0258cbc6-6020-430a-848e-aafacbadf4ae diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/sync_history.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/sync_history.yaml new file mode 100644 index 000000000..cdd79c40c --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/sync_history.yaml @@ -0,0 +1,78 @@ +get: + operationId: getSyncHistory + tags: + - Sync + security: + - ApiKeyAuth: [] + summary: Get Sync History + description: >- + Get a list of Sync History objects. + parameters: + - name: cursor + in: query + schema: + type: string + example: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + description: The pagination cursor value + - name: page_size + in: query + schema: + type: string + example: '3804695' + description: Number of results to return per page + - name: customer_id + in: query + schema: + type: string + example: my-customer-1 + description: The customer ID that uniquely identifies the customer in your application + - name: provider_name + in: query + schema: + type: string + example: salesforce + description: The provider name + - name: model + in: query + schema: + type: string + example: 'contact' + description: The model name to filter by + responses: + '200': + description: Sync History + content: + application/json: + schema: + allOf: + - $ref: ../../common/components/schemas/pagination.yaml + - type: object + properties: + results: + type: array + items: + $ref: ../components/schemas/sync_history.yaml + examples: + Example: + value: + next: sjkflwbajkbbkajwbcs + previous: null + results: + - model_name: account + start_timestamp: 2023-02-22T19:55:17.559537Z + status: IN_PROGRESS + application_id: 3217ea51-11c8-43c9-9547-6f197e02e5e4 + customer_id: my-customer-1 + provider_name: hubspot + category: crm + connection_id: f723e58c-3034-4056-babf-a8871ac12480 + - model_name: contact + start_timestamp: 2023-02-22T19:50:17.559537Z + end_timestamp: 2023-02-22T20:50:17.559537Z + status: ERROR + error_message: 'Error: Something went wrong' + application_id: 3217ea51-11c8-43c9-9547-6f197e02e5e4 + customer_id: my-customer-1 + provider_name: hubspot + category: crm + connection_id: f723e58c-3034-4056-babf-a8871ac12480 diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/sync_info.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/sync_info.yaml new file mode 100644 index 000000000..8864aed98 --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/sync_info.yaml @@ -0,0 +1,52 @@ +get: + operationId: getSyncInfos + tags: + - Sync + security: + - ApiKeyAuth: [] + summary: Get Sync Info + description: >- + Get a list of Sync Info + parameters: + - name: customer_id + in: query + schema: + type: string + example: my-customer-1 + description: The customer ID that uniquely identifies the customer in your application + - name: provider_name + in: query + schema: + type: string + example: salesforce + description: The provider name + responses: + '200': + description: Sync Info List + content: + application/json: + schema: + type: array + items: + $ref: ../components/schemas/sync_info.yaml + examples: + Example: + value: + - model_name: account + last_sync_start: 2023-02-22T19:55:17.559537Z + next_sync_start: 2023-02-22T20:55:17.559537Z + status: SYNCING + application_id: 3217ea51-11c8-43c9-9547-6f197e02e5e4 + customer_id: my-customer-1 + provider_name: hubspot + category: crm + connection_id: f723e58c-3034-4056-babf-a8871ac12480 + - model_name: contact + last_sync_start: 2023-02-22T19:50:17.559537Z + next_sync_start: 2023-02-22T20:50:17.559537Z + status: DONE + application_id: 3217ea51-11c8-43c9-9547-6f197e02e5e4 + customer_id: my-customer-1 + provider_name: hubspot + category: crm + connection_id: f723e58c-3034-4056-babf-a8871ac12480 diff --git a/openapi/versioned/version-0.7.5/mgmt/paths/webhook.yaml b/openapi/versioned/version-0.7.5/mgmt/paths/webhook.yaml new file mode 100644 index 000000000..e6353739e --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/paths/webhook.yaml @@ -0,0 +1,57 @@ +get: + operationId: getWebhook + tags: + - Webhook + summary: Get webhook + description: >- + Get webhook details + security: + - ApiKeyAuth: [] + responses: + '200': + description: Applications + content: + application/json: + schema: + $ref: ../components/schemas/objects/webhook.yaml + examples: + Example: + value: + url: http://localhost:8080 + request_type: POST + notify_on_sync_success: true + notify_on_sync_error: true + notify_on_connection_success: true + notify_on_connection_error: true +post: + operationId: createWebhook + summary: Create webhook + tags: + - Webhook + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: ../components/schemas/objects/webhook.yaml + security: + - ApiKeyAuth: [] + responses: + '201': + description: Webhook created + content: + application/json: + schema: + $ref: ../components/schemas/objects/webhook.yaml +delete: + operationId: deleteWebhook + summary: Delete webhook + tags: + - Webhook + parameters: [] + security: + - ApiKeyAuth: [] + responses: + '200': + description: Webhook deleted diff --git a/openapi/versioned/version-0.7.5/mgmt/webhooks/webhook.yaml b/openapi/versioned/version-0.7.5/mgmt/webhooks/webhook.yaml new file mode 100644 index 000000000..1d817996c --- /dev/null +++ b/openapi/versioned/version-0.7.5/mgmt/webhooks/webhook.yaml @@ -0,0 +1,13 @@ +post: + operationId: webhook + summary: Webhook + tags: + - Webhook + requestBody: + content: + application/json: + schema: + $ref: '../components/schemas/webhook-payload.yaml' + responses: + '200': + description: Return a 200 status to indicate that the data was received successfully diff --git a/package.json b/package.json index b3ed8a87f..a410eb4a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "supaglue", - "version": "0.7.4", + "version": "0.7.5", "packageManager": "yarn@3.4.1", "private": true, "workspaces": [ diff --git a/packages/core/package.json b/packages/core/package.json index b7b29b80a..a5c261c42 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/core", - "version": "0.7.4", + "version": "0.7.5", "private": true, "index": "dist/index.js", "types": "index.ts", diff --git a/packages/db/package.json b/packages/db/package.json index e127d6616..c3be17526 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/db", - "version": "0.7.4", + "version": "0.7.5", "private": true, "packageManager": "yarn@3.4.1", "index": "dist/index.js", diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 48c73d9a8..46cd3c98b 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/schemas", - "version": "0.7.4", + "version": "0.7.5", "scripts": { "generate": "tsx scripts/generate_typescript_from_openapi.ts ../../openapi/crm/openapi.bundle.json gen/crm.ts && tsx scripts/generate_typescript_from_openapi.ts ../../openapi/mgmt/openapi.bundle.json gen/mgmt.ts" }, diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 33f039429..83335e3ca 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/sdk", - "version": "0.7.4", + "version": "0.7.5", "description": "OpenAPI clients for Supaglue", "keywords": [ "axios", diff --git a/packages/sync-workflows/package.json b/packages/sync-workflows/package.json index 2ca2ec05a..247fc5c34 100644 --- a/packages/sync-workflows/package.json +++ b/packages/sync-workflows/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/sync-workflows", - "version": "0.7.4", + "version": "0.7.5", "packageManager": "yarn@3.4.1", "dependencies": { "@supaglue/core": "workspace:*", diff --git a/packages/types/package.json b/packages/types/package.json index 90457add3..1cc9afdba 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/types", - "version": "0.7.4", + "version": "0.7.5", "private": true, "index": "dist/index.js", "types": "index.ts",