Files
mattermost/server/einterfaces/cloud.go
Agniva De Sarker efaa6264cc MM-53032: Fix module path after repo rename (#23689)
It was a good decision in hindsight to keep the public module as 0.x
because this would have been a breaking change again.

https://mattermost.atlassian.net/browse/MM-53032
```release-note
Changed the Go module path from github.com/mattermost/mattermost-server/server/v8 to github.com/mattermost/mattermost/server/v8.

For the public facing module, it's path is also changed from github.com/mattermost/mattermost-server/server/public to github.com/mattermost/mattermost/server/public
```
2023-06-11 10:54:35 +05:30

56 lines
2.9 KiB
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package einterfaces
import (
"github.com/mattermost/mattermost/server/public/model"
)
type CloudInterface interface {
GetCloudProduct(userID string, productID string) (*model.Product, error)
GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error)
GetSelfHostedProducts(userID string) ([]*model.Product, error)
GetCloudLimits(userID string) (*model.ProductLimits, error)
CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error)
ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error
GetCloudCustomer(userID string) (*model.CloudCustomer, error)
GetLicenseSelfServeStatus(userID string, token string) (*model.SubscriptionLicenseSelfServeStatusResponse, error)
UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error)
UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error)
GetSubscription(userID string) (*model.Subscription, error)
GetInvoicesForSubscription(userID string) ([]*model.Invoice, error)
GetInvoicePDF(userID, invoiceID string) ([]byte, string, error)
ChangeSubscription(userID, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error)
RequestCloudTrial(userID, subscriptionID, newValidBusinessEmail string) (*model.Subscription, error)
ValidateBusinessEmail(userID, email string) error
InvalidateCaches() error
// hosted customer methods
SelfHostedSignupAvailable() error
BootstrapSelfHostedSignup(req model.BootstrapSelfHostedSignupRequest) (*model.BootstrapSelfHostedSignupResponse, error)
CreateCustomerSelfHostedSignup(req model.SelfHostedCustomerForm, requesterEmail string) (*model.SelfHostedSignupCustomerResponse, error)
ConfirmSelfHostedSignup(req model.SelfHostedConfirmPaymentMethodRequest, requesterEmail string) (*model.SelfHostedSignupConfirmResponse, error)
ConfirmSelfHostedExpansion(req model.SelfHostedConfirmPaymentMethodRequest, requesterEmail string) (*model.SelfHostedSignupConfirmResponse, error)
ConfirmSelfHostedSignupLicenseApplication() error
GetSelfHostedInvoices() ([]*model.Invoice, error)
GetSelfHostedInvoicePDF(invoiceID string) ([]byte, string, error)
CreateOrUpdateSubscriptionHistoryEvent(userID string, userCount int) (*model.SubscriptionHistory, error)
HandleLicenseChange() error
CheckCWSConnection(userId string) error
SelfServeDeleteWorkspace(userID string, deletionRequest *model.WorkspaceDeletionRequest) error
SubscribeToNewsletter(userID string, req *model.SubscribeNewsletterRequest) error
// Used only for when a customer has telemetry disabled. In this scenario, true up review telemetry will be submitted via CWS.
SubmitTrueUpReview(userID string, trueUpReviewProfile map[string]any) error
}