Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockEndpoint ¶
type BlockEndpoint struct{}
Blocks another user in your account from exchanging direct messages with you.
While the block stands neither of you can start a direct message with the other or post in one you already share; group conversations and customer cases are unaffected. Blocking someone you have already blocked returns the original block instead of creating a second one.
func (*BlockEndpoint) Materialize ¶
func (e *BlockEndpoint) Materialize() *apiendpoint.APIEndpoint[*BlockRequest, *apiresource.MessagingBlock]
type BlockRequest ¶
type BlockRequest struct {
// The account user to block.
//
// It must be someone else in your account; you cannot block yourself.
BlockedAccountUserID string `json:"blocked_account_user_id" validate:"required"`
}
Request to block another account user from messaging the caller.
func (*BlockRequest) SchemaExample ¶
func (*BlockRequest) SchemaExample() any
type BlockSvc ¶
type BlockSvc interface {
Block(ctx context.Context, req *BlockRequest) (*apiresource.MessagingBlock, *apierror.APIError)
Unblock(ctx context.Context, req *UnblockRequest) (*apiresource.EmptyResource, *apierror.APIError)
ListBlocks(ctx context.Context, req *ListBlocksRequest) (*apiresource.List[apiresource.MessagingBlock], *apierror.APIError)
}
BlockSvc backs the message block endpoints via the notification-service ChatService gRPC client.
func NewBlockSvc ¶
func NewBlockSvc(config *BlockSvcConfig) BlockSvc
type BlockSvcConfig ¶
type BlockSvcConfig struct {
// ChatClient (required) is the notification-service ChatService gRPC client.
ChatClient pb.ChatServiceClient
}
type ListBlocksEndpoint ¶
type ListBlocksEndpoint struct{}
Lists the users you have blocked, most recently blocked first.
Only blocks you created are returned — you are never told who has blocked you.
func (*ListBlocksEndpoint) Materialize ¶
func (e *ListBlocksEndpoint) Materialize() *apiendpoint.APIEndpoint[*ListBlocksRequest, *apiresource.List[apiresource.MessagingBlock]]
type ListBlocksRequest ¶
type ListBlocksRequest struct{}
Request to list the account users the caller has blocked.
type UnblockEndpoint ¶
type UnblockEndpoint struct{}
Lifts a block you placed on another user, letting the two of you message each other again.
Only your own block is removed: if the other person has also blocked you, direct messages between you stay blocked. Unblocking someone you have not blocked succeeds and changes nothing.
func (*UnblockEndpoint) Materialize ¶
func (e *UnblockEndpoint) Materialize() *apiendpoint.APIEndpoint[*UnblockRequest, *apiresource.EmptyResource]
type UnblockRequest ¶
type UnblockRequest struct {
// The account user to unblock.
//
// This is the ID of the blocked account user, not the block record's own ID.
BlockedAccountUserID string `path:"id" validate:"required"`
}
Request to remove a block the caller created.