Repository: amp-labs/connectors
Pull request #121 (2024-03-22 07:12:06)

[ENG-800] feat: Add ZohoCRM connector
## Catalog variables
No required catalog variables

## Notes

## Testing 
### GET 
URL: <localhost:4444/crm/v6/Contacts?fields=Full_Name,Account_Name> 
![Zoho - get proxy ok](https://github.com/amp-labs/connectors/assets/95291462/1be0287d-44ba-4ad6-9c26-a48d8e2b48cf)


### POST
URL: <localhost:4444/api/v2/unattended_computer/group> - fails if run via proxy
![Zoho - post proxy fails](https://github.com/amp-labs/connectors/assets/95291462/26f12f37-b15e-4f6b-bec5-0b8999f3cfd9)
In case it is run directly, works fine - 
![Zoho post direct works fine](https://github.com/amp-labs/connectors/assets/95291462/871f2d2a-5184-4c98-94e6-52e5b0a46e44)

### PUT
URL: <localhost:4444/api/v2/unattended_computer/group>
![Zoho put proxy ok](https://github.com/amp-labs/connectors/assets/95291462/2f9ee231-c30a-4438-9d50-d0e9dd60c976)


### DELETE
URL: <localhost:4444/api/v2/unattended_computer/group> - fails
![Zoho - del proxy fails](https://github.com/amp-labs/connectors/assets/95291462/4cf6e275-79dd-4822-aef7-71d8809b3c7e)
But if we hit the endpoint directly - everything works fine 
![Zoho - del direct is ok](https://github.com/amp-labs/connectors/assets/95291462/3d99e54a-8693-41ec-9d64-33f60f859da8)


## Pagination
![Zoho pagination sample](https://github.com/amp-labs/connectors/assets/95291462/8744cff7-8639-42ca-8770-8e4d7b94d085)



Listener430: @RajatPawar hi, could you please kindly take a look when avaialable? 

Patch:
diff --git a/providers/catalog.go b/providers/catalog.go
index 320f5e68..0f525e86 100644
--- a/providers/catalog.go
+++ b/providers/catalog.go
@@ -12,6 +12,7 @@ const (
 	Outreach          Provider = "outreach"
 	Pipedrive         Provider = "pipedrive"
 	Copper            Provider = "copper"
+	ZohoCRM           Provider = "zohoCRM"
 	Sellsy            Provider = "sellsy"
 	Attio             Provider = "attio"
 	Close             Provider = "close"
@@ -177,6 +178,25 @@ var catalog = CatalogType{ // nolint:gochecknoglobals
 		},
 	},
 
+	// ZohoCRM configuration
+	ZohoCRM: {
+		AuthType: Oauth2,
+		BaseURL:  "https://www.zohoapis.com",
+		OauthOpts: OauthOpts{
+			AuthURL:                   "https://accounts.zoho.com/oauth/v2/auth",
+			TokenURL:                  "https://accounts.zoho.com/oauth/v2/token",
+			ExplicitScopesRequired:    true,
+			ExplicitWorkspaceRequired: false,
+		},
+		Support: Support{
+			BulkWrite: false,
+			Proxy:     false,
+			Read:      false,
+			Subscribe: false,
+			Write:     false,
+		},
+	},
+
 	// Sellsy configuration
 	Sellsy: {
 		AuthType: Oauth2,


Test patch:
diff --git a/providers/catalog_test.go b/providers/catalog_test.go
index 44fe8bca..b626369f 100644
--- a/providers/catalog_test.go
+++ b/providers/catalog_test.go
@@ -203,6 +203,29 @@ var testCases = []struct { // nolint
 		expectedErr: nil,
 	},
 
+	{
+		provider:    ZohoCRM,
+		description: "Valid ZohoCRM 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://accounts.zoho.com/oauth/v2/auth",
+				TokenURL:                  "https://accounts.zoho.com/oauth/v2/token",
+				ExplicitScopesRequired:    true,
+				ExplicitWorkspaceRequired: false,
+			},
+			BaseURL: "https://www.zohoapis.com",
+		},
+		expectedErr: nil,
+	},
+
 	{
 		provider: Sellsy,
 		expected: &ProviderInfo{