Merge branch 'master' of github.com:mattermost/mattermost-server into MM-47853-true-up-review-telemetry-off-non-air-gapped

Этот коммит содержится в:
Conor Macpherson
2022-12-27 11:20:09 -05:00
родитель d5a5686986 5e4d787766
Коммит 40c94892ee
33 изменённых файлов: 578 добавлений и 199 удалений

Просмотреть файл

@@ -8213,6 +8213,19 @@ func (c *Client4) GetCloudCustomer() (*CloudCustomer, *Response, error) {
return cloudCustomer, BuildResponse(r), nil
}
func (c *Client4) GetExpandStats(licenseId string) (*SubscriptionExpandStatus, *Response, error) {
r, err := c.DoAPIGet(fmt.Sprintf("%s%s?licenseID=%s", c.cloudRoute(), "/subscription/expand", licenseId), "")
if err != nil {
return nil, BuildResponse(r), err
}
defer closeBody(r)
var subscriptionExpandable *SubscriptionExpandStatus
json.NewDecoder(r.Body).Decode(&subscriptionExpandable)
return subscriptionExpandable, BuildResponse(r), nil
}
func (c *Client4) GetSubscription() (*Subscription, *Response, error) {
r, err := c.DoAPIGet(c.cloudRoute()+"/subscription", "")
if err != nil {

Просмотреть файл

@@ -124,6 +124,10 @@ type ValidateBusinessEmailResponse struct {
IsValid bool `json:"is_valid"`
}
type SubscriptionExpandStatus struct {
IsExpandable bool `json:"is_expandable"`
}
// CloudCustomerInfo represents editable info of a customer.
type CloudCustomerInfo struct {
Name string `json:"name"`

Просмотреть файл

@@ -333,13 +333,16 @@ type GetPostsOptions struct {
type PostCountOptions struct {
// Only include posts on a specific team. "" for any team.
TeamId string
MustHaveFile bool
MustHaveHashtag bool
ExcludeDeleted bool
UsersPostsOnly bool
TeamId string
MustHaveFile bool
MustHaveHashtag bool
ExcludeDeleted bool
ExcludeSystemPosts bool
UsersPostsOnly bool
// AllowFromCache looks up cache only when ExcludeDeleted and UsersPostsOnly are true and rest are falsy.
AllowFromCache bool
SincePostID string
SinceUpdateAt int64
}
func (o *Post) Etag() string {