From 5ea70feb2426baec93b3442b68526d4a341c5e49 Mon Sep 17 00:00:00 2001 From: Jeremy Cocks Date: Thu, 15 Aug 2024 20:33:48 +0100 Subject: [PATCH] add fields to site integrations --- 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.