Repository: amp-labs/connectors
Pull request #271 (2024-05-01 04:04:27)

chore: Update capitalization of Docusign connector
The product is called "Docusign", not "DocuSign". See https://support.docusign.com/s/articles/DocuSign-Developer-Support-FAQs?language=en_US (notice that the title of the page says "Docusign")


Patch:
diff --git a/providers/catalog.go b/providers/catalog.go
index 57921026..dcc577d2 100644
--- a/providers/catalog.go
+++ b/providers/catalog.go
@@ -29,8 +29,8 @@ const (
 	Intercom                            Provider = "intercom"
 	Capsule                             Provider = "capsule"
 	Wrike                               Provider = "wrike"
-	DocuSign                            Provider = "docuSign"
-	DocuSignDeveloper                   Provider = "docuSignDeveloper"
+	Docusign                            Provider = "docusign"
+	DocusignDeveloper                   Provider = "docusignDeveloper"
 	Calendly                            Provider = "calendly"
 	AWeber                              Provider = "aWeber"
 	GetResponse                         Provider = "getResponse"
@@ -55,6 +55,7 @@ const (
 	GoogleMail                          Provider = "googleMail"
 	Monday                              Provider = "monday"
 	Miro                                Provider = "miro"
+	Typeform                            Provider = "typeform"
 )
 
 // ================================================================================
@@ -593,7 +594,7 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 	// Gong configuration
 	Gong: {
 		AuthType: Oauth2,
-		BaseURL:  "https://{{.workspace}}.api.gong.io",
+		BaseURL:  "https://api.gong.io",
 		OauthOpts: OauthOpts{
 			AuthURL:                   "https://app.gong.io/oauth2/authorize",
 			TokenURL:                  "https://app.gong.io/oauth2/generate-customer-token",
@@ -666,10 +667,10 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 		},
 	},
 
-	// DocuSign configuration
+	// Docusign configuration
 	// TODO: we don't have a good way to get the server string yet. Need to make API call to /oauth/userinfo.
 	// Leaving this connector commented out until that is unblocked.
-	// DocuSign: {
+	// Docusign: {
 	//	AuthType: Oauth2,
 	//	BaseURL:  "https://{{.server}}.docusign.net",
 	//	OauthOpts: OauthOpts{
@@ -692,8 +693,8 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 	//	},
 	// },
 
-	// DocuSign Developer configuration
-	DocuSignDeveloper: {
+	// Docusign Developer configuration
+	DocusignDeveloper: {
 		AuthType: Oauth2,
 		BaseURL:  "https://demo.docusign.net",
 		OauthOpts: OauthOpts{
@@ -1343,4 +1344,28 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 			Write:     false,
 		},
 	},
+
+	Typeform: {
+		AuthType: Oauth2,
+		BaseURL:  "https://api.typeform.com",
+		OauthOpts: OauthOpts{
+			GrantType:                 AuthorizationCode,
+			AuthURL:                   "https://api.typeform.com/oauth/authorize",
+			TokenURL:                  "https://api.typeform.com/oauth/token",
+			ExplicitScopesRequired:    true,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: BulkWriteSupport{
+				Insert: false,
+				Update: false,
+				Upsert: false,
+				Delete: false,
+			},
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
 }


Test patch:
diff --git a/providers/catalog_test.go b/providers/catalog_test.go
index 46f96aab..000367cc 100644
--- a/providers/catalog_test.go
+++ b/providers/catalog_test.go
@@ -645,10 +645,7 @@ var testCases = []struct { // nolint
 	},
 	{
 		provider:    Gong,
-		description: "Gong provider config with valid substitutions",
-		substitutions: map[string]string{
-			"workspace": "testing",
-		},
+		description: "Gong provider config without substitutions",
 		expected: &ProviderInfo{
 			Support: Support{
 				Read:  false,
@@ -673,7 +670,7 @@ var testCases = []struct { // nolint
 					ConsumerRefField: "client_id",
 				},
 			},
-			BaseURL: "https://testing.api.gong.io",
+			BaseURL: "https://api.gong.io",
 		},
 		expectedErr: nil,
 	},
@@ -733,7 +730,7 @@ var testCases = []struct { // nolint
 	},
 	// TODO: uncomment this when the docusign connector is uncommented
 	//{
-	//	provider: DocuSign,
+	//	provider: Docusign,
 	//	substitutions: map[string]string{
 	//		"server": "example",
 	//	},
@@ -762,7 +759,7 @@ var testCases = []struct { // nolint
 	//	expectedErr: nil,
 	// },
 	{
-		provider: DocuSignDeveloper,
+		provider: DocusignDeveloper,
 		expected: &ProviderInfo{
 			Support: Support{
 				Read:  false,
@@ -1506,6 +1503,34 @@ var testCases = []struct { // nolint
 		},
 		expectedErr: nil,
 	},
+	{
+		provider:    Typeform,
+		description: "Valid Typeform provider config with no substitutions",
+		expected: &ProviderInfo{
+			AuthType: Oauth2,
+			OauthOpts: OauthOpts{
+				GrantType:                 AuthorizationCode,
+				AuthURL:                   "https://api.typeform.com/oauth/authorize",
+				TokenURL:                  "https://api.typeform.com/oauth/token",
+				ExplicitScopesRequired:    true,
+				ExplicitWorkspaceRequired: false,
+			},
+			Support: Support{
+				BulkWrite: BulkWriteSupport{
+					Insert: false,
+					Update: false,
+					Upsert: false,
+					Delete: false,
+				},
+				Proxy:     false,
+				Read:      false,
+				Subscribe: false,
+				Write:     false,
+			},
+			BaseURL: "https://api.typeform.com",
+		},
+		expectedErr: nil,
+	},
 }
 
 func TestReadInfo(t *testing.T) { // nolint