diff --git a/README.md b/README.md index 44baa7d45..243a92c9d 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.1 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v0.7.2 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 51851b34f..66606135c 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -1,6 +1,6 @@ { "name": "api", - "version": "0.7.1", + "version": "0.7.2", "packageManager": "yarn@3.4.1", "type": "commonjs", "dependencies": { diff --git a/apps/mgmt-ui/package.json b/apps/mgmt-ui/package.json index 6df4b882f..5ee18c897 100644 --- a/apps/mgmt-ui/package.json +++ b/apps/mgmt-ui/package.json @@ -1,6 +1,6 @@ { "name": "mgmt-ui", - "version": "0.7.1", + "version": "0.7.2", "private": true, "scripts": { "dev": "next dev", diff --git a/apps/sync-worker/package.json b/apps/sync-worker/package.json index 9643066cc..23aa90b5b 100644 --- a/apps/sync-worker/package.json +++ b/apps/sync-worker/package.json @@ -1,6 +1,6 @@ { "name": "sync-worker", - "version": "0.7.1", + "version": "0.7.2", "packageManager": "yarn@3.4.1", "dependencies": { "@sentry/integrations": "^7.43.0", diff --git a/docker-compose.yml b/docker-compose.yml index a5684941b..8cf845267 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.1 + image: supaglue/api:0.7.2 ports: - '8080:8080' depends_on: @@ -52,7 +52,7 @@ services: restart: on-failure sync-worker: - image: supaglue/sync-worker:0.7.1 + image: supaglue/sync-worker:0.7.2 depends_on: postgres: condition: service_started @@ -65,7 +65,7 @@ services: restart: on-failure mgmt-ui: - image: supaglue/mgmt-ui:0.7.1 + image: supaglue/mgmt-ui:0.7.2 ports: - '3000:3000' depends_on: @@ -90,7 +90,7 @@ services: - temporalitedata:/data init: - image: supaglue/api:0.7.1 + image: supaglue/api:0.7.2 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 e35a1c183..e24fc174f 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.1 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v0.7.2 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 00dd08c0b..108774d9d 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.1 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v2 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 43d82ad90..9f3cdf216 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.7.1", + "version": "0.7.2", "private": true, "scripts": { "docusaurus": "docusaurus", diff --git a/docs/versioned_docs/version-0.7.0/_privacy.md b/docs/versioned_docs/version-0.7.2/_privacy.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/_privacy.md rename to docs/versioned_docs/version-0.7.2/_privacy.md diff --git a/docs/versioned_docs/version-0.7.0/api.md b/docs/versioned_docs/version-0.7.2/api.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/api.md rename to docs/versioned_docs/version-0.7.2/api.md diff --git a/docs/versioned_docs/version-0.7.0/architecture.mdx b/docs/versioned_docs/version-0.7.2/architecture.mdx similarity index 100% rename from docs/versioned_docs/version-0.7.0/architecture.mdx rename to docs/versioned_docs/version-0.7.2/architecture.mdx diff --git a/docs/versioned_docs/version-0.7.0/concepts.md b/docs/versioned_docs/version-0.7.2/concepts.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/concepts.md rename to docs/versioned_docs/version-0.7.2/concepts.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/_category_.json b/docs/versioned_docs/version-0.7.2/connectors/_category_.json similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/_category_.json rename to docs/versioned_docs/version-0.7.2/connectors/_category_.json diff --git a/docs/versioned_docs/version-0.7.0/connectors/activecampaign.md b/docs/versioned_docs/version-0.7.2/connectors/activecampaign.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/activecampaign.md rename to docs/versioned_docs/version-0.7.2/connectors/activecampaign.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/capsule.md b/docs/versioned_docs/version-0.7.2/connectors/capsule.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/capsule.md rename to docs/versioned_docs/version-0.7.2/connectors/capsule.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/copper.md b/docs/versioned_docs/version-0.7.2/connectors/copper.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/copper.md rename to docs/versioned_docs/version-0.7.2/connectors/copper.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/freshsales.md b/docs/versioned_docs/version-0.7.2/connectors/freshsales.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/freshsales.md rename to docs/versioned_docs/version-0.7.2/connectors/freshsales.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/hubspot.md b/docs/versioned_docs/version-0.7.2/connectors/hubspot.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/hubspot.md rename to docs/versioned_docs/version-0.7.2/connectors/hubspot.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/keap.md b/docs/versioned_docs/version-0.7.2/connectors/keap.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/keap.md rename to docs/versioned_docs/version-0.7.2/connectors/keap.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/ms_dynamics_365_sales.md b/docs/versioned_docs/version-0.7.2/connectors/ms_dynamics_365_sales.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/ms_dynamics_365_sales.md rename to docs/versioned_docs/version-0.7.2/connectors/ms_dynamics_365_sales.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/pipedrive.md b/docs/versioned_docs/version-0.7.2/connectors/pipedrive.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/pipedrive.md rename to docs/versioned_docs/version-0.7.2/connectors/pipedrive.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/salesforce.md b/docs/versioned_docs/version-0.7.2/connectors/salesforce.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/salesforce.md rename to docs/versioned_docs/version-0.7.2/connectors/salesforce.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/teamwork_crm.md b/docs/versioned_docs/version-0.7.2/connectors/teamwork_crm.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/teamwork_crm.md rename to docs/versioned_docs/version-0.7.2/connectors/teamwork_crm.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/zendesk_sell.md b/docs/versioned_docs/version-0.7.2/connectors/zendesk_sell.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/zendesk_sell.md rename to docs/versioned_docs/version-0.7.2/connectors/zendesk_sell.md diff --git a/docs/versioned_docs/version-0.7.0/connectors/zoho_crm.md b/docs/versioned_docs/version-0.7.2/connectors/zoho_crm.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/connectors/zoho_crm.md rename to docs/versioned_docs/version-0.7.2/connectors/zoho_crm.md diff --git a/docs/versioned_docs/version-0.7.0/contributing.md b/docs/versioned_docs/version-0.7.2/contributing.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/contributing.md rename to docs/versioned_docs/version-0.7.2/contributing.md diff --git a/docs/versioned_docs/version-0.7.0/faq.md b/docs/versioned_docs/version-0.7.2/faq.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/faq.md rename to docs/versioned_docs/version-0.7.2/faq.md diff --git a/docs/versioned_docs/version-0.7.0/getting-started.mdx b/docs/versioned_docs/version-0.7.2/getting-started.mdx similarity index 96% rename from docs/versioned_docs/version-0.7.0/getting-started.mdx rename to docs/versioned_docs/version-0.7.2/getting-started.mdx index bc4236bb9..e24fc174f 100644 --- a/docs/versioned_docs/version-0.7.0/getting-started.mdx +++ b/docs/versioned_docs/version-0.7.2/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.0 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v0.7.2 https://github.com/supaglue-labs/supaglue.git && cd supaglue docker compose up ``` @@ -96,21 +96,20 @@ Create a Supaglue customer using the [Management API](/api/mgmt#tag/Customers/op 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. -- **application_id**: your Supaglue application id: `a4398523-03a2-42dd-9681-c91e3e2efaf4`. - **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: {{apiKey}}' +--header 'x-api-key: {{api_key}}' --header 'Content-Type: application/json' \ --data-raw '{ - "application_id": "{{applicationId}}", "name": "Customer 1", "email": "customer-1@email.com", - "customer_id": "0001" + "customer_id": "your_application_customer_id" }' ``` diff --git a/docs/versioned_docs/version-0.7.0/guides/_category_.json b/docs/versioned_docs/version-0.7.2/guides/_category_.json similarity index 100% rename from docs/versioned_docs/version-0.7.0/guides/_category_.json rename to docs/versioned_docs/version-0.7.2/guides/_category_.json diff --git a/docs/versioned_docs/version-0.7.0/guides/authentication.md b/docs/versioned_docs/version-0.7.2/guides/authentication.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/guides/authentication.md rename to docs/versioned_docs/version-0.7.2/guides/authentication.md diff --git a/docs/versioned_docs/version-0.7.0/guides/embedded-links.mdx b/docs/versioned_docs/version-0.7.2/guides/embedded-links.mdx similarity index 100% rename from docs/versioned_docs/version-0.7.0/guides/embedded-links.mdx rename to docs/versioned_docs/version-0.7.2/guides/embedded-links.mdx diff --git a/docs/versioned_docs/version-0.7.0/guides/pagination.md b/docs/versioned_docs/version-0.7.2/guides/pagination.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/guides/pagination.md rename to docs/versioned_docs/version-0.7.2/guides/pagination.md diff --git a/docs/versioned_docs/version-0.7.0/guides/syncing-data.md b/docs/versioned_docs/version-0.7.2/guides/syncing-data.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/guides/syncing-data.md rename to docs/versioned_docs/version-0.7.2/guides/syncing-data.md diff --git a/docs/versioned_docs/version-0.7.0/intro.md b/docs/versioned_docs/version-0.7.2/intro.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/intro.md rename to docs/versioned_docs/version-0.7.2/intro.md diff --git a/docs/versioned_docs/version-0.7.0/quickstart.mdx b/docs/versioned_docs/version-0.7.2/quickstart.mdx similarity index 98% rename from docs/versioned_docs/version-0.7.0/quickstart.mdx rename to docs/versioned_docs/version-0.7.2/quickstart.mdx index b44bb23f1..108774d9d 100644 --- a/docs/versioned_docs/version-0.7.0/quickstart.mdx +++ b/docs/versioned_docs/version-0.7.2/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.0 https://github.com/supaglue-labs/supaglue.git && cd supaglue +git clone -b v2 https://github.com/supaglue-labs/supaglue.git && cd supaglue ./scripts/create_quickstart_env.sh docker compose up ``` diff --git a/docs/versioned_docs/version-0.7.0/references/_category_.json b/docs/versioned_docs/version-0.7.2/references/_category_.json similarity index 100% rename from docs/versioned_docs/version-0.7.0/references/_category_.json rename to docs/versioned_docs/version-0.7.2/references/_category_.json diff --git a/docs/versioned_docs/version-0.7.0/references/hubspot.md b/docs/versioned_docs/version-0.7.2/references/hubspot.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/references/hubspot.md rename to docs/versioned_docs/version-0.7.2/references/hubspot.md diff --git a/docs/versioned_docs/version-0.7.0/references/salesforce.md b/docs/versioned_docs/version-0.7.2/references/salesforce.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/references/salesforce.md rename to docs/versioned_docs/version-0.7.2/references/salesforce.md diff --git a/docs/versioned_docs/version-0.7.0/roadmap.md b/docs/versioned_docs/version-0.7.2/roadmap.md similarity index 100% rename from docs/versioned_docs/version-0.7.0/roadmap.md rename to docs/versioned_docs/version-0.7.2/roadmap.md diff --git a/docs/versioned_sidebars/version-0.7.0-sidebars.json b/docs/versioned_sidebars/version-0.7.2-sidebars.json similarity index 100% rename from docs/versioned_sidebars/version-0.7.0-sidebars.json rename to docs/versioned_sidebars/version-0.7.2-sidebars.json diff --git a/docs/versions.json b/docs/versions.json index 478b8e044..3511ec605 100644 --- a/docs/versions.json +++ b/docs/versions.json @@ -1,4 +1,4 @@ [ - "0.7.1", - "0.7.0" + "0.7.2", + "0.7.1" ] diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 617aa9a4f..7df60d590 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.8 +version: 0.0.9 # 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.1 +appVersion: 0.7.2 diff --git a/openapi/crm/openapi.bundle.json b/openapi/crm/openapi.bundle.json index e9edc751f..503e6e1b6 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.1", + "version": "0.7.2", "title": "Supaglue CRM API", "contact": { "name": "Supaglue", diff --git a/openapi/crm/openapi.yaml b/openapi/crm/openapi.yaml index 0156c4408..6897b0b3b 100644 --- a/openapi/crm/openapi.yaml +++ b/openapi/crm/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.3 info: - version: 0.7.1 + version: 0.7.2 title: Supaglue CRM API contact: name: Supaglue diff --git a/openapi/mgmt/openapi.bundle.json b/openapi/mgmt/openapi.bundle.json index 2b436beef..0501e5992 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.1", + "version": "0.7.2", "title": "Supaglue Management API", "contact": { "name": "Supaglue", diff --git a/openapi/mgmt/openapi.yaml b/openapi/mgmt/openapi.yaml index 83b28dd97..b779e9c30 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.1 + version: 0.7.2 title: Supaglue Management API contact: name: Supaglue diff --git a/openapi/versioned/version-0.7.2/common/components/parameters/header/x-customer-id.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/header/x-customer-id.yaml new file mode 100644 index 000000000..006a1cf62 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/header/x-provider-name.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/header/x-provider-name.yaml new file mode 100644 index 000000000..71e392e1f --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/created_after.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/created_after.yaml new file mode 100644 index 000000000..eb6a5be9f --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/created_before.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/created_before.yaml new file mode 100644 index 000000000..1bbc4adf9 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/cursor.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/cursor.yaml new file mode 100644 index 000000000..039f20706 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/customer_id.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/customer_id.yaml new file mode 100644 index 000000000..f2a7ff2c6 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/expand.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/expand.yaml new file mode 100644 index 000000000..254ebe3b7 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/include_deleted_data.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/include_deleted_data.yaml new file mode 100644 index 000000000..6829283e5 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/modified_after.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/modified_after.yaml new file mode 100644 index 000000000..9ad88e89c --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/modified_before.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/modified_before.yaml new file mode 100644 index 000000000..5e582cd96 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/page_size.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/page_size.yaml new file mode 100644 index 000000000..6f04f2f60 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/parameters/query/provider_name.yaml b/openapi/versioned/version-0.7.2/common/components/parameters/query/provider_name.yaml new file mode 100644 index 000000000..6239b97f8 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/schemas/errors.yaml b/openapi/versioned/version-0.7.2/common/components/schemas/errors.yaml new file mode 100644 index 000000000..d5e70680b --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/schemas/logs.yaml b/openapi/versioned/version-0.7.2/common/components/schemas/logs.yaml new file mode 100644 index 000000000..96fcd4242 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/schemas/pagination.yaml b/openapi/versioned/version-0.7.2/common/components/schemas/pagination.yaml new file mode 100644 index 000000000..3ad1f8c79 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/schemas/warnings.yaml b/openapi/versioned/version-0.7.2/common/components/schemas/warnings.yaml new file mode 100644 index 000000000..0bd9ffb6e --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/common/components/securitySchemes/x-api-key.yaml b/openapi/versioned/version-0.7.2/common/components/securitySchemes/x-api-key.yaml new file mode 100644 index 000000000..3b625955a --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/create_update_account.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/create_update_account.yaml new file mode 100644 index 000000000..220cc5606 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/create_update_contact.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/create_update_contact.yaml new file mode 100644 index 000000000..9a9bdbc1d --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/create_update_event.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/create_update_event.yaml new file mode 100644 index 000000000..7a79bfe9e --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/create_update_lead.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/create_update_lead.yaml new file mode 100644 index 000000000..1789d90dd --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/create_update_opportunity.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/create_update_opportunity.yaml new file mode 100644 index 000000000..75ae22880 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/filters.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/filters.yaml new file mode 100644 index 000000000..19334a13e --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/account.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/account.yaml new file mode 100644 index 000000000..16f35021a --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/addresses.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/addresses.yaml new file mode 100644 index 000000000..279bb0ebf --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/contact.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/contact.yaml new file mode 100644 index 000000000..1df01b5c8 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/custom_fields.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/custom_fields.yaml new file mode 100644 index 000000000..83e2742e3 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/email_addresses.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/email_addresses.yaml new file mode 100644 index 000000000..52b02a69c --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/event.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/event.yaml new file mode 100644 index 000000000..87313d928 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/lead.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/lead.yaml new file mode 100644 index 000000000..2aef10f4b --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/lifecycle_stage.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/lifecycle_stage.yaml new file mode 100644 index 000000000..6127cb35a --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/opportunity.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/opportunity.yaml new file mode 100644 index 000000000..c5b3621b5 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/phone_numbers.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/phone_numbers.yaml new file mode 100644 index 000000000..69bc86f78 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/components/schemas/objects/user.yaml b/openapi/versioned/version-0.7.2/crm/components/schemas/objects/user.yaml new file mode 100644 index 000000000..3c01aec76 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/openapi.bundle.json b/openapi/versioned/version-0.7.2/crm/openapi.bundle.json new file mode 100644 index 000000000..503e6e1b6 --- /dev/null +++ b/openapi/versioned/version-0.7.2/crm/openapi.bundle.json @@ -0,0 +1,3636 @@ +{ + "openapi": "3.0.3", + "info": { + "version": "0.7.2", + "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 + } + } + } +} \ No newline at end of file diff --git a/openapi/versioned/version-0.7.2/crm/openapi.yaml b/openapi/versioned/version-0.7.2/crm/openapi.yaml new file mode 100644 index 000000000..6897b0b3b --- /dev/null +++ b/openapi/versioned/version-0.7.2/crm/openapi.yaml @@ -0,0 +1,140 @@ +openapi: 3.0.3 +info: + version: 0.7.2 + 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.2/crm/paths/accounts.yaml b/openapi/versioned/version-0.7.2/crm/paths/accounts.yaml new file mode 100644 index 000000000..44cc45dd8 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/accounts@_search.yaml b/openapi/versioned/version-0.7.2/crm/paths/accounts@_search.yaml new file mode 100644 index 000000000..8f9e7a410 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/accounts@{account_id}.yaml b/openapi/versioned/version-0.7.2/crm/paths/accounts@{account_id}.yaml new file mode 100644 index 000000000..eea2ed377 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/contacts.yaml b/openapi/versioned/version-0.7.2/crm/paths/contacts.yaml new file mode 100644 index 000000000..67091413d --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/contacts@_search.yaml b/openapi/versioned/version-0.7.2/crm/paths/contacts@_search.yaml new file mode 100644 index 000000000..4af554794 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/contacts@{contact_id}.yaml b/openapi/versioned/version-0.7.2/crm/paths/contacts@{contact_id}.yaml new file mode 100644 index 000000000..c199de533 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/events.yaml b/openapi/versioned/version-0.7.2/crm/paths/events.yaml new file mode 100644 index 000000000..88083e71d --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/events@{event_id}.yaml b/openapi/versioned/version-0.7.2/crm/paths/events@{event_id}.yaml new file mode 100644 index 000000000..235633cb2 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/leads.yaml b/openapi/versioned/version-0.7.2/crm/paths/leads.yaml new file mode 100644 index 000000000..d7d399b09 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/leads@{lead_id}.yaml b/openapi/versioned/version-0.7.2/crm/paths/leads@{lead_id}.yaml new file mode 100644 index 000000000..9d64201c6 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/opportunities.yaml b/openapi/versioned/version-0.7.2/crm/paths/opportunities.yaml new file mode 100644 index 000000000..d212d9c76 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/opportunities@_search.yaml b/openapi/versioned/version-0.7.2/crm/paths/opportunities@_search.yaml new file mode 100644 index 000000000..bb7417023 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/opportunities@{opportunity_id}.yaml b/openapi/versioned/version-0.7.2/crm/paths/opportunities@{opportunity_id}.yaml new file mode 100644 index 000000000..e65042a26 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/passthrough.yaml b/openapi/versioned/version-0.7.2/crm/paths/passthrough.yaml new file mode 100644 index 000000000..b500d6b80 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/users.yaml b/openapi/versioned/version-0.7.2/crm/paths/users.yaml new file mode 100644 index 000000000..fa9051bcc --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/crm/paths/users@{user_id}.yaml b/openapi/versioned/version-0.7.2/crm/paths/users@{user_id}.yaml new file mode 100644 index 000000000..daf8ba467 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/create_update_customer.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/create_update_customer.yaml new file mode 100644 index 000000000..1ae8aca16 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/create_update_integration.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/create_update_integration.yaml new file mode 100644 index 000000000..38c4268f2 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/objects/category.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/category.yaml new file mode 100644 index 000000000..27d3e1b68 --- /dev/null +++ b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/category.yaml @@ -0,0 +1,3 @@ +type: string +enum: + - crm diff --git a/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/connection.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/connection.yaml new file mode 100644 index 000000000..0adf7692c --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/objects/customer.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/customer.yaml new file mode 100644 index 000000000..4698c8fab --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/objects/integration.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/integration.yaml new file mode 100644 index 000000000..5ab08275e --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/objects/integration_config.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/integration_config.yaml new file mode 100644 index 000000000..d8fc0b321 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/objects/provider_name.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/provider_name.yaml new file mode 100644 index 000000000..ee5601a1b --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/objects/webhook.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/objects/webhook.yaml new file mode 100644 index 000000000..25b587325 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/sync_history.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/sync_history.yaml new file mode 100644 index 000000000..119003582 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/sync_info.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/sync_info.yaml new file mode 100644 index 000000000..ca9d454c5 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/components/schemas/webhook-payload.yaml b/openapi/versioned/version-0.7.2/mgmt/components/schemas/webhook-payload.yaml new file mode 100644 index 000000000..71fb53998 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/openapi.bundle.json b/openapi/versioned/version-0.7.2/mgmt/openapi.bundle.json new file mode 100644 index 000000000..0501e5992 --- /dev/null +++ b/openapi/versioned/version-0.7.2/mgmt/openapi.bundle.json @@ -0,0 +1,1572 @@ +{ + "openapi": "3.1.0", + "info": { + "version": "0.7.2", + "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" + } + } + } + } + } +} \ No newline at end of file diff --git a/openapi/versioned/version-0.7.2/mgmt/openapi.yaml b/openapi/versioned/version-0.7.2/mgmt/openapi.yaml new file mode 100644 index 000000000..b779e9c30 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2 + 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.2/mgmt/paths/connections.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/connections.yaml new file mode 100644 index 000000000..aa10f2a45 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/connections@{connection_id}.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/connections@{connection_id}.yaml new file mode 100644 index 000000000..3d4e7e70b --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/customers.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/customers.yaml new file mode 100644 index 000000000..d7642e5d5 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/customers@{customer_id}.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/customers@{customer_id}.yaml new file mode 100644 index 000000000..cabf431ea --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/integrations.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/integrations.yaml new file mode 100644 index 000000000..da8eedc12 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/integrations@{integration_id}.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/integrations@{integration_id}.yaml new file mode 100644 index 000000000..ad97a0f7e --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/sync_history.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/sync_history.yaml new file mode 100644 index 000000000..cdd79c40c --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/sync_info.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/sync_info.yaml new file mode 100644 index 000000000..8864aed98 --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/paths/webhook.yaml b/openapi/versioned/version-0.7.2/mgmt/paths/webhook.yaml new file mode 100644 index 000000000..e6353739e --- /dev/null +++ b/openapi/versioned/version-0.7.2/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.2/mgmt/webhooks/webhook.yaml b/openapi/versioned/version-0.7.2/mgmt/webhooks/webhook.yaml new file mode 100644 index 000000000..1d817996c --- /dev/null +++ b/openapi/versioned/version-0.7.2/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 6cc8f21db..46fda79a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "supaglue", - "version": "0.7.1", + "version": "0.7.2", "packageManager": "yarn@3.4.1", "private": true, "workspaces": [ diff --git a/packages/core/package.json b/packages/core/package.json index c974d3585..4ee1a135f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/core", - "version": "0.7.1", + "version": "0.7.2", "private": true, "index": "dist/index.js", "types": "index.ts", diff --git a/packages/db/package.json b/packages/db/package.json index 1d1bb4998..e9e5b546f 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/db", - "version": "0.7.1", + "version": "0.7.2", "private": true, "packageManager": "yarn@3.4.1", "index": "dist/index.js", diff --git a/packages/schemas/package.json b/packages/schemas/package.json index c90eab5eb..77a418609 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/schemas", - "version": "0.7.1", + "version": "0.7.2", "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 2f3ec440e..9ea69c2c7 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/sdk", - "version": "0.7.1", + "version": "0.7.2", "description": "OpenAPI clients for Supaglue", "keywords": [ "axios", diff --git a/packages/sync-workflows/package.json b/packages/sync-workflows/package.json index 6c875487f..86dadbbce 100644 --- a/packages/sync-workflows/package.json +++ b/packages/sync-workflows/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/sync-workflows", - "version": "0.7.1", + "version": "0.7.2", "packageManager": "yarn@3.4.1", "dependencies": { "@supaglue/core": "workspace:*", diff --git a/packages/types/package.json b/packages/types/package.json index 756ca49a8..f9b99ff53 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/types", - "version": "0.7.1", + "version": "0.7.2", "private": true, "index": "dist/index.js", "types": "index.ts", diff --git a/packages/utils/package.json b/packages/utils/package.json index c172df84c..326707931 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@supaglue/utils", - "version": "0.7.1", + "version": "0.7.2", "private": true, "index": "dist/index.js", "types": "index.ts",