From 9c89950e9d99a7d44f593fa7495c4566f481392a Mon Sep 17 00:00:00 2001 From: Jeremy Cocks <98757756+jeremy-cxf@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:38:23 +0100 Subject: [PATCH] add fields to site integrations (#65) --- api.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api.go b/api.go index 0391700..63b0b0b 100644 --- a/api.go +++ b/api.go @@ -1109,9 +1109,10 @@ func (sc *Client) ListIntegrations(corpName, siteName string) ([]Integration, er // IntegrationBody is the body for adding an integration. type IntegrationBody struct { - URL string `json:"url"` - Type string `json:"type"` - Events []string `json:"events"` + URL string `json:"url"` + Type string `json:"type"` + Events []string `json:"events"` + Fields map[string]string `json:"fields,omitempty"` } // AddIntegration adds an integration. @@ -1153,8 +1154,9 @@ func (sc *Client) GetIntegration(corpName, siteName, id string) (Integration, er // UpdateIntegrationBody is the body for updating an integration. type UpdateIntegrationBody struct { - URL string `json:"url,omitempty"` - Events []string `json:"events,omitempty"` + URL string `json:"url,omitempty"` + Events []string `json:"events,omitempty"` + Fields map[string]string `json:"fields,omitempty"` } // UpdateIntegration updates an integration by id.