Skip to content

Commit

Permalink
GATE-5639: update teams account via PATCH and add custom certificate …
Browse files Browse the repository at this point in the history
…setting (#1811)

* GATE-5639: Add custom certificate setting to teams account configuration

* Update 1811.txt

* Update 1811.txt

---------

Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
  • Loading branch information
alyssamw and jacobbednarz authored Apr 18, 2024
1 parent 6ba12b6 commit 6afd3ff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/1811.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_account: adds custom certificate setting to teams account configuration
```
9 changes: 9 additions & 0 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type TeamsAccountSettings struct {
ProtocolDetection *TeamsProtocolDetection `json:"protocol_detection,omitempty"`
BodyScanning *TeamsBodyScanning `json:"body_scanning,omitempty"`
ExtendedEmailMatching *TeamsExtendedEmailMatching `json:"extended_email_matching,omitempty"`
CustomCertificate *TeamsCustomCertificate `json:"custom_certificate,omitempty"`
}

type BrowserIsolation struct {
Expand Down Expand Up @@ -103,6 +104,14 @@ type TeamsExtendedEmailMatching struct {
Enabled *bool `json:"enabled,omitempty"`
}

type TeamsCustomCertificate struct {
Enabled *bool `json:"enabled,omitempty"`
ID string `json:"id,omitempty"`
BindingStatus string `json:"binding_status,omitempty"`
QsPackId string `json:"qs_pack_id,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

type TeamsRuleType = string

const (
Expand Down
6 changes: 6 additions & 0 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) {
},
"extended_email_matching": {
"enabled": true
},
"custom_certificate": {
"enabled": true
}
}
}
Expand All @@ -184,6 +187,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) {
ExtendedEmailMatching: &TeamsExtendedEmailMatching{
Enabled: BoolPtr(true),
},
CustomCertificate: &TeamsCustomCertificate{
Enabled: BoolPtr(true),
},
}

mux.HandleFunc("/accounts/"+testAccountID+"/gateway/configuration", handler)
Expand Down

0 comments on commit 6afd3ff

Please sign in to comment.