Repository: amp-labs/connectors
Pull request #106 (2024-03-19 03:17:36)

docs: Update README.md
Update the language to be more user friendly, and add a direct link so people who are browsing the repo as a part of learning about Ampersand can quickly figure out which providers are supported.


Patch:
diff --git a/README.md b/README.md
index 4fad73c4..fb308fb8 100644
--- a/README.md
+++ b/README.md
@@ -69,9 +69,9 @@ func main() {
 }
 ```
 
-## Provider catalog
+## Supported connectors
 
-The provider catalog is a YAML file that contains information about all SaaS providers that Ampersand supports. It contains information such as the base URL, and the operations that the provider supports. This is currently stored in the `providers/providers.yaml` file.
+Browse [the catalog file](https://github.com/amp-labs/connectors/blob/main/providers/catalog.go) to see a list of all the connectors that Ampersand supports, and which features are supported for connector.
 
 ## Ways to initialize a Connector
 
diff --git a/providers/catalog.go b/providers/catalog.go
index 866ed756..15c8ba90 100644
--- a/providers/catalog.go
+++ b/providers/catalog.go
@@ -5,19 +5,25 @@ package providers
 // ================================================================================
 
 const (
-	Salesforce Provider = "salesforce"
-	Hubspot    Provider = "hubspot"
-	LinkedIn   Provider = "linkedIn"
-	Salesloft  Provider = "salesloft"
-	Outreach   Provider = "outreach"
-	Sellsy     Provider = "sellsy"
-	Attio      Provider = "attio"
-	Close      Provider = "close"
-	Keap       Provider = "keap"
-	Asana      Provider = "asana"
-	Dropbox    Provider = "dropbox"
-	Notion     Provider = "notion"
-	Gong       Provider = "gong"
+	Salesforce        Provider = "salesforce"
+	Hubspot           Provider = "hubspot"
+	LinkedIn          Provider = "linkedIn"
+	Salesloft         Provider = "salesloft"
+	Outreach          Provider = "outreach"
+	Pipedrive         Provider = "pipedrive"
+	Sellsy            Provider = "sellsy"
+	Attio             Provider = "attio"
+	Close             Provider = "close"
+	Keap              Provider = "keap"
+	Asana             Provider = "asana"
+	Dropbox           Provider = "dropbox"
+	Notion            Provider = "notion"
+	Gong              Provider = "gong"
+	Zoom              Provider = "zoom"
+	Intercom          Provider = "intercom"
+	DocuSign          Provider = "docuSign"
+	DocuSignDeveloper Provider = "docuSignDeveloper"
+	Calendly          Provider = "calendly"
 )
 
 // ================================================================================
@@ -132,6 +138,25 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 		},
 	},
 
+	// Pipedrive configuration
+	Pipedrive: {
+		AuthType: Oauth2,
+		BaseURL:  "https://api.pipedrive.com",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://oauth.pipedrive.com/oauth/authorize",
+			TokenURL:                  "https://oauth.pipedrive.com/oauth/token",
+			ExplicitScopesRequired:    true,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
+
 	// Sellsy configuration
 	Sellsy: {
 		AuthType: Oauth2,
@@ -287,4 +312,99 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 			Write:     false,
 		},
 	},
+
+	// Zoom configuration
+	Zoom: {
+		AuthType: Oauth2,
+		BaseURL:  "https://api.zoom.us",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://zoom.us/oauth/authorize",
+			TokenURL:                  "https://zoom.us/oauth/token",
+			ExplicitScopesRequired:    false,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
+
+	// Intercom configuration
+	Intercom: {
+		AuthType: Oauth2,
+		BaseURL:  "https://api.intercom.io",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://app.intercom.com/oauth",
+			TokenURL:                  "https://api.intercom.io/auth/eagle/token",
+			ExplicitScopesRequired:    false,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
+
+	// DocuSign configuration
+	DocuSign: {
+		AuthType: Oauth2,
+		BaseURL:  "https://{{.workspace}}.docusign.net",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://account.docusign.com/oauth/auth",
+			TokenURL:                  "https://account.docusign.com/oauth/token",
+			ExplicitScopesRequired:    true,
+			ExplicitWorkspaceRequired: true,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
+
+	// DocuSign Developer configuration
+	DocuSignDeveloper: {
+		AuthType: Oauth2,
+		BaseURL:  "https://demo.docusign.net",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://account-d.docusign.com/oauth/auth",
+			TokenURL:                  "https://account-d.docusign.com/oauth/token",
+			ExplicitScopesRequired:    true,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
+
+	// Calendly configuration
+	Calendly: {
+		AuthType: Oauth2,
+		BaseURL:  "https://api.calendly.com",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://auth.calendly.com/oauth/authorize",
+			TokenURL:                  "https://auth.calendly.com/oauth/token",
+			ExplicitScopesRequired:    false,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
 }


Test patch:
diff --git a/providers/catalog_test.go b/providers/catalog_test.go
index a7b0f294..d17e0b28 100644
--- a/providers/catalog_test.go
+++ b/providers/catalog_test.go
@@ -158,6 +158,28 @@ var testCases = []struct { // nolint
 		expectedErr: nil,
 	},
 
+	{
+		provider: Pipedrive,
+		expected: &ProviderInfo{
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				AuthURL:                   "https://oauth.pipedrive.com/oauth/authorize",
+				TokenURL:                  "https://oauth.pipedrive.com/oauth/token",
+				ExplicitScopesRequired:    true,
+				ExplicitWorkspaceRequired: false,
+			},
+			Support: Support{
+				BulkWrite: false,
+				Proxy:     false,
+				Read:      false,
+				Subscribe: false,
+				Write:     false,
+			},
+			BaseURL: "https://api.pipedrive.com",
+		},
+		expectedErr: nil,
+	},
+
 	{
 		provider: Sellsy,
 		expected: &ProviderInfo{
@@ -347,6 +369,114 @@ var testCases = []struct { // nolint
 		},
 		expectedErr: nil,
 	},
+	{
+		provider:    Zoom,
+		description: "Zoom provider config with no substitutions",
+		expected: &ProviderInfo{
+			Support: Support{
+				Read:      false,
+				Write:     false,
+				BulkWrite: false,
+				Subscribe: false,
+				Proxy:     false,
+			},
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				AuthURL:                   "https://zoom.us/oauth/authorize",
+				TokenURL:                  "https://zoom.us/oauth/token",
+				ExplicitScopesRequired:    false,
+				ExplicitWorkspaceRequired: false,
+			},
+			BaseURL: "https://api.zoom.us",
+		},
+		expectedErr: nil,
+	},
+	{
+		provider:    Intercom,
+		description: "Valid Intercom provider config with no substitutions",
+		expected: &ProviderInfo{
+			Support: Support{
+				Read:      false,
+				Write:     false,
+				BulkWrite: false,
+				Subscribe: false,
+				Proxy:     false,
+			},
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				AuthURL:                   "https://app.intercom.com/oauth",
+				TokenURL:                  "https://api.intercom.io/auth/eagle/token",
+				ExplicitWorkspaceRequired: false,
+				ExplicitScopesRequired:    false,
+			},
+			BaseURL: "https://api.intercom.io",
+		},
+		expectedErr: nil,
+	},
+	{
+		provider: DocuSign,
+		expected: &ProviderInfo{
+			Support: Support{
+				Read:      false,
+				Write:     false,
+				BulkWrite: false,
+				Subscribe: false,
+				Proxy:     false,
+			},
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				AuthURL:                   "https://account.docusign.com/oauth/auth",
+				TokenURL:                  "https://account.docusign.com/oauth/token",
+				ExplicitScopesRequired:    true,
+				ExplicitWorkspaceRequired: true,
+			},
+			BaseURL: "https://{{.workspace}}.docusign.net",
+		},
+		expectedErr: nil,
+	},
+	{
+		provider: DocuSignDeveloper,
+		expected: &ProviderInfo{
+			Support: Support{
+				Read:      false,
+				Write:     false,
+				BulkWrite: false,
+				Subscribe: false,
+				Proxy:     false,
+			},
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				AuthURL:                   "https://account-d.docusign.com/oauth/auth",
+				TokenURL:                  "https://account-d.docusign.com/oauth/token",
+				ExplicitScopesRequired:    true,
+				ExplicitWorkspaceRequired: false,
+			},
+			BaseURL: "https://demo.docusign.net",
+		},
+		expectedErr: nil,
+	},
+	{
+		provider:    Calendly,
+		description: "Calendly provider config with no substitutions",
+		expected: &ProviderInfo{
+			Support: Support{
+				Read:      false,
+				Write:     false,
+				BulkWrite: false,
+				Subscribe: false,
+				Proxy:     false,
+			},
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				AuthURL:                   "https://auth.calendly.com/oauth/authorize",
+				TokenURL:                  "https://auth.calendly.com/oauth/token",
+				ExplicitScopesRequired:    false,
+				ExplicitWorkspaceRequired: false,
+			},
+			BaseURL: "https://api.calendly.com",
+		},
+		expectedErr: nil,
+	},
 }
 
 func TestReadInfo(t *testing.T) { // nolint