notificationclientv2

package
v0.2.99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	NewsletterSubscribeUser(
		ctx context.Context,
		req NewsletterSubscribeUserRequest,
		reqEditors ...func(req *http.Request) error,
	) (*NewsletterSubscribeUserResponse, *http.Response, error)
	NewsletterGetInfo(
		ctx context.Context,
		req NewsletterGetInfoRequest,
		reqEditors ...func(req *http.Request) error,
	) (*NewsletterGetInfoResponse, *http.Response, error)
	NewsletterUnsubscribeUser(
		ctx context.Context,
		req NewsletterUnsubscribeUserRequest,
		reqEditors ...func(req *http.Request) error,
	) (*http.Response, error)
	CountUnreadNotifications(
		ctx context.Context,
		req CountUnreadNotificationsRequest,
		reqEditors ...func(req *http.Request) error,
	) (*CountUnreadNotificationsResponse, *http.Response, error)
	ListNotifications(
		ctx context.Context,
		req ListNotificationsRequest,
		reqEditors ...func(req *http.Request) error,
	) (*[]messagingv2.Notification, *http.Response, error)
	ReadAllNotificationsDeprecated(
		ctx context.Context,
		req ReadAllNotificationsDeprecatedRequest,
		reqEditors ...func(req *http.Request) error,
	) (*ReadAllNotificationsDeprecatedResponse, *http.Response, error)
	ReadAllNotifications(
		ctx context.Context,
		req ReadAllNotificationsRequest,
		reqEditors ...func(req *http.Request) error,
	) (*ReadAllNotificationsResponse, *http.Response, error)
	ReadNotification(
		ctx context.Context,
		req ReadNotificationRequest,
		reqEditors ...func(req *http.Request) error,
	) (*ReadNotificationResponse, *http.Response, error)
}

func NewClient

func NewClient(client httpclient.RequestRunner) Client

type CountUnreadNotificationsRequest

type CountUnreadNotificationsRequest struct {
}

CountUnreadNotificationsRequest models a request for the 'notifications-count-unread-notifications' operation. See [1] for more information.

Get the counts for unread notifications of the user.

The user is determined by the access token used. Lighter weight route instead of getting all unread notifications and count yourself.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/notifications-count-unread-notifications

func (*CountUnreadNotificationsRequest) BuildRequest

func (r *CountUnreadNotificationsRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type CountUnreadNotificationsResponse

type CountUnreadNotificationsResponse struct {
	Error   int64 `json:"error"`
	Info    int64 `json:"info"`
	Success int64 `json:"success"`
	Total   int64 `json:"total"`
	Warning int64 `json:"warning"`
}

func (*CountUnreadNotificationsResponse) Validate

type ListNotificationsRequest

type ListNotificationsRequest struct {
	Status   *ListNotificationsRequestQueryStatus
	Severity []ListNotificationsRequestQuerySeverityItem
	Type     []string
	TypeNot  []string
	Limit    *int64
	Skip     *int64
	Page     *int64
}

ListNotificationsRequest models a request for the 'notifications-list-notifications' operation. See [1] for more information.

List all unread notifications.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/notifications-list-notifications

func (*ListNotificationsRequest) BuildRequest

func (r *ListNotificationsRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type ListNotificationsRequestQuerySeverityItem added in v0.2.75

type ListNotificationsRequestQuerySeverityItem string
const ListNotificationsRequestQuerySeverityItemError ListNotificationsRequestQuerySeverityItem = "error"
const ListNotificationsRequestQuerySeverityItemInfo ListNotificationsRequestQuerySeverityItem = "info"
const ListNotificationsRequestQuerySeverityItemSuccess ListNotificationsRequestQuerySeverityItem = "success"
const ListNotificationsRequestQuerySeverityItemWarning ListNotificationsRequestQuerySeverityItem = "warning"

func (ListNotificationsRequestQuerySeverityItem) Validate added in v0.2.75

type ListNotificationsRequestQueryStatus

type ListNotificationsRequestQueryStatus string
const ListNotificationsRequestQueryStatusRead ListNotificationsRequestQueryStatus = "read"
const ListNotificationsRequestQueryStatusUnread ListNotificationsRequestQueryStatus = "unread"

func (ListNotificationsRequestQueryStatus) Validate

type NewsletterGetInfoRequest

type NewsletterGetInfoRequest struct {
}

NewsletterGetInfoRequest models a request for the 'newsletter-get-info' operation. See [1] for more information.

Getting the subscription status of the subscription.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/newsletter-get-info

func (*NewsletterGetInfoRequest) BuildRequest

func (r *NewsletterGetInfoRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type NewsletterGetInfoResponse

type NewsletterGetInfoResponse struct {
	Active     bool   `json:"active"`
	Email      string `json:"email"`
	Registered bool   `json:"registered"`
}

func (*NewsletterGetInfoResponse) Validate

func (o *NewsletterGetInfoResponse) Validate() error

type NewsletterSubscribeUserRequest

type NewsletterSubscribeUserRequest struct {
	Body NewsletterSubscribeUserRequestBody
}

NewsletterSubscribeUserRequest models a request for the 'newsletter-subscribe-user' operation. See [1] for more information.

Subscribe a user to the mStudio newsletter.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/newsletter-subscribe-user

func (*NewsletterSubscribeUserRequest) BuildRequest

func (r *NewsletterSubscribeUserRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type NewsletterSubscribeUserRequestBody

type NewsletterSubscribeUserRequestBody struct {
	FirstName *string `json:"firstName,omitempty"`
	LastName  *string `json:"lastName,omitempty"`
}

NewsletterSubscribeUserRequestBody models the JSON body of a 'newsletter-subscribe-user' request

func (*NewsletterSubscribeUserRequestBody) Validate

type NewsletterSubscribeUserResponse

type NewsletterSubscribeUserResponse struct {
	Active     bool   `json:"active"`
	Email      string `json:"email"`
	Registered bool   `json:"registered"`
}

func (*NewsletterSubscribeUserResponse) Validate

func (o *NewsletterSubscribeUserResponse) Validate() error

type NewsletterUnsubscribeUserRequest

type NewsletterUnsubscribeUserRequest struct {
}

NewsletterUnsubscribeUserRequest models a request for the 'newsletter-unsubscribe-user' operation. See [1] for more information.

Unsubscribe a user from the mStudio newsletter.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/newsletter-unsubscribe-user

func (*NewsletterUnsubscribeUserRequest) BuildRequest

func (r *NewsletterUnsubscribeUserRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type ReadAllNotificationsDeprecatedRequest

type ReadAllNotificationsDeprecatedRequest struct {
	Body ReadAllNotificationsDeprecatedRequestBody
}

ReadAllNotificationsDeprecatedRequest models a request for the 'notifications-read-all-notifications-deprecated' operation. See [1] for more information.

Mark all notifications as read (deprecated).

Deprecated route. Please use /v2/notifications/actions/read-all instead.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/notifications-read-all-notifications-deprecated

func (*ReadAllNotificationsDeprecatedRequest) BuildRequest

func (r *ReadAllNotificationsDeprecatedRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type ReadAllNotificationsDeprecatedRequestBody

type ReadAllNotificationsDeprecatedRequestBody struct {
}

ReadAllNotificationsDeprecatedRequestBody models the JSON body of a 'notifications-read-all-notifications-deprecated' request

func (*ReadAllNotificationsDeprecatedRequestBody) Validate

type ReadAllNotificationsDeprecatedResponse

type ReadAllNotificationsDeprecatedResponse struct {
	Status messagingv2.NotificationStatus `json:"status"`
}

func (*ReadAllNotificationsDeprecatedResponse) Validate

type ReadAllNotificationsRequest

type ReadAllNotificationsRequest struct {
	Body               ReadAllNotificationsRequestBody
	Severities         []ReadAllNotificationsRequestQuerySeveritiesItem
	ReferenceID        *string
	ReferenceAggregate *string
	ReferenceDomain    *string
}

ReadAllNotificationsRequest models a request for the 'notifications-read-all-notifications' operation. See [1] for more information.

Mark all notifications as read.

Mark all notifications for the authenticated user as read.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/notifications-read-all-notifications

func (*ReadAllNotificationsRequest) BuildRequest

func (r *ReadAllNotificationsRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type ReadAllNotificationsRequestBody

type ReadAllNotificationsRequestBody struct {
}

ReadAllNotificationsRequestBody models the JSON body of a 'notifications-read-all-notifications' request

func (*ReadAllNotificationsRequestBody) Validate

func (o *ReadAllNotificationsRequestBody) Validate() error

type ReadAllNotificationsRequestQuerySeveritiesItem

type ReadAllNotificationsRequestQuerySeveritiesItem string
const ReadAllNotificationsRequestQuerySeveritiesItemError ReadAllNotificationsRequestQuerySeveritiesItem = "error"
const ReadAllNotificationsRequestQuerySeveritiesItemInfo ReadAllNotificationsRequestQuerySeveritiesItem = "info"
const ReadAllNotificationsRequestQuerySeveritiesItemSuccess ReadAllNotificationsRequestQuerySeveritiesItem = "success"
const ReadAllNotificationsRequestQuerySeveritiesItemWarning ReadAllNotificationsRequestQuerySeveritiesItem = "warning"

func (ReadAllNotificationsRequestQuerySeveritiesItem) Validate

type ReadAllNotificationsResponse

type ReadAllNotificationsResponse struct {
	Status       messagingv2.NotificationStatus `json:"status"`
	UpdatedCount int64                          `json:"updatedCount"`
}

func (*ReadAllNotificationsResponse) Validate

func (o *ReadAllNotificationsResponse) Validate() error

type ReadNotificationRequest

type ReadNotificationRequest struct {
	Body           ReadNotificationRequestBody
	NotificationID string
}

ReadNotificationRequest models a request for the 'notifications-read-notification' operation. See [1] for more information.

Mark notification as read.

[1]: https://developer.mittwald.de/docs/v2/reference/notification/notifications-read-notification

func (*ReadNotificationRequest) BuildRequest

func (r *ReadNotificationRequest) BuildRequest(reqEditors ...func(req *http.Request) error) (*http.Request, error)

BuildRequest builds an *http.Request instance from this request that may be used with any regular *http.Client instance.

type ReadNotificationRequestBody

type ReadNotificationRequestBody struct {
	Status messagingv2.NotificationStatus `json:"status"`
}

ReadNotificationRequestBody models the JSON body of a 'notifications-read-notification' request

func (*ReadNotificationRequestBody) Validate

func (o *ReadNotificationRequestBody) Validate() error

type ReadNotificationResponse

type ReadNotificationResponse struct {
	Status messagingv2.NotificationStatus `json:"status"`
}

func (*ReadNotificationResponse) Validate

func (o *ReadNotificationResponse) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL