Documentation
¶
Index ¶
- Constants
- func Ptr[T any](v T) *T
- type AccessTokenInfo
- type AddMembersRequest
- type AddTagsRequest
- type ApiError
- type ApiErrorItem
- type AuditDetailsBotScopes
- type AuditDetailsBotWebhookSettings
- type AuditDetailsChatId
- type AuditDetailsChatPermission
- type AuditDetailsChatRenamed
- type AuditDetailsDlp
- type AuditDetailsEmpty
- type AuditDetailsInitiator
- type AuditDetailsInviter
- type AuditDetailsKms
- type AuditDetailsRoleChanged
- type AuditDetailsSearch
- type AuditDetailsTagChat
- type AuditDetailsTagName
- type AuditDetailsTokenScopes
- type AuditDetailsUserUpdated
- type AuditEvent
- type AuditEventDetailsUnion
- type AuditEventKey
- type AvatarData
- type BotCanEdit
- type BotCreateRequest
- type BotCreateRequestWebhook
- type BotCreateResponse
- type BotEventName
- type BotResponse
- type BotTemplateEngine
- type BotTriggerOn
- type BotUpdateRequest
- type BotUpdateRequestWebhook
- type BotWebhook
- type BotWebhookSelfUpdateRequest
- type BotWebhookSelfUpdateRequestWebhook
- type BotWhoCanAdd
- type BotsService
- type BotsServiceImpl
- func (s *BotsServiceImpl) CreateBot(ctx context.Context, request BotCreateRequest) (*BotCreateResponse, error)
- func (s *BotsServiceImpl) DeleteBot(ctx context.Context, id int32) error
- func (s *BotsServiceImpl) DeleteWebhookEvent(ctx context.Context, id string) error
- func (s *BotsServiceImpl) GetBot(ctx context.Context, id int32) (*BotResponse, error)
- func (s *BotsServiceImpl) GetWebhookEvents(ctx context.Context, params *GetWebhookEventsParams) (*GetWebhookEventsResponse, error)
- func (s *BotsServiceImpl) GetWebhookEventsAll(ctx context.Context, params *GetWebhookEventsParams) ([]WebhookEvent, error)
- func (s *BotsServiceImpl) ListBots(ctx context.Context, params *ListBotsParams) (*ListBotsResponse, error)
- func (s *BotsServiceImpl) ListBotsAll(ctx context.Context, params *ListBotsParams) ([]BotResponse, error)
- func (s *BotsServiceImpl) PollWebhookEvents(ctx context.Context, options *PollWebhookEventsOptions, ...) error
- func (s *BotsServiceImpl) PollWebhookPayloads(ctx context.Context, options *PollWebhookEventsOptions, ...) error
- func (s *BotsServiceImpl) RecreateBotToken(ctx context.Context, id int32) (*BotCreateResponse, error)
- func (s *BotsServiceImpl) SelfRecreateBotToken(ctx context.Context) (*BotCreateResponse, error)
- func (s *BotsServiceImpl) SelfUpdateBotWebhook(ctx context.Context, request BotWebhookSelfUpdateRequest) (*BotResponse, error)
- func (s *BotsServiceImpl) UpdateBot(ctx context.Context, id int32, request BotUpdateRequest) (*BotResponse, error)
- type BotsServiceStub
- func (s *BotsServiceStub) CreateBot(ctx context.Context, request BotCreateRequest) (*BotCreateResponse, error)
- func (s *BotsServiceStub) DeleteBot(ctx context.Context, id int32) error
- func (s *BotsServiceStub) DeleteWebhookEvent(ctx context.Context, id string) error
- func (s *BotsServiceStub) GetBot(ctx context.Context, id int32) (*BotResponse, error)
- func (s *BotsServiceStub) GetWebhookEvents(ctx context.Context, params *GetWebhookEventsParams) (*GetWebhookEventsResponse, error)
- func (s *BotsServiceStub) GetWebhookEventsAll(ctx context.Context, params *GetWebhookEventsParams) ([]WebhookEvent, error)
- func (s *BotsServiceStub) ListBots(ctx context.Context, params *ListBotsParams) (*ListBotsResponse, error)
- func (s *BotsServiceStub) ListBotsAll(ctx context.Context, params *ListBotsParams) ([]BotResponse, error)
- func (s *BotsServiceStub) PollWebhookEvents(ctx context.Context, options *PollWebhookEventsOptions, ...) error
- func (s *BotsServiceStub) PollWebhookPayloads(ctx context.Context, options *PollWebhookEventsOptions, ...) error
- func (s *BotsServiceStub) RecreateBotToken(ctx context.Context, id int32) (*BotCreateResponse, error)
- func (s *BotsServiceStub) SelfRecreateBotToken(ctx context.Context) (*BotCreateResponse, error)
- func (s *BotsServiceStub) SelfUpdateBotWebhook(ctx context.Context, request BotWebhookSelfUpdateRequest) (*BotResponse, error)
- func (s *BotsServiceStub) UpdateBot(ctx context.Context, id int32, request BotUpdateRequest) (*BotResponse, error)
- type Button
- type ButtonWebhookPayload
- type Chat
- type ChatAvailability
- type ChatCreateRequest
- type ChatCreateRequestChat
- type ChatMemberRole
- type ChatMemberRoleFilter
- type ChatMemberWebhookPayload
- type ChatSortField
- type ChatSubtype
- type ChatUpdateRequest
- type ChatUpdateRequestChat
- type ChatsService
- type ChatsServiceImpl
- func (s *ChatsServiceImpl) ArchiveChat(ctx context.Context, id int32) error
- func (s *ChatsServiceImpl) CreateChat(ctx context.Context, request ChatCreateRequest) (*Chat, error)
- func (s *ChatsServiceImpl) DownloadExport(ctx context.Context, id int32) (string, error)
- func (s *ChatsServiceImpl) GetChat(ctx context.Context, id int32) (*Chat, error)
- func (s *ChatsServiceImpl) ListChats(ctx context.Context, params *ListChatsParams) (*ListChatsResponse, error)
- func (s *ChatsServiceImpl) ListChatsAll(ctx context.Context, params *ListChatsParams) ([]Chat, error)
- func (s *ChatsServiceImpl) RequestExport(ctx context.Context, request ExportRequest) error
- func (s *ChatsServiceImpl) UnarchiveChat(ctx context.Context, id int32) error
- func (s *ChatsServiceImpl) UpdateChat(ctx context.Context, id int32, request ChatUpdateRequest) (*Chat, error)
- type ChatsServiceStub
- func (s *ChatsServiceStub) ArchiveChat(ctx context.Context, id int32) error
- func (s *ChatsServiceStub) CreateChat(ctx context.Context, request ChatCreateRequest) (*Chat, error)
- func (s *ChatsServiceStub) DownloadExport(ctx context.Context, id int32) (string, error)
- func (s *ChatsServiceStub) GetChat(ctx context.Context, id int32) (*Chat, error)
- func (s *ChatsServiceStub) ListChats(ctx context.Context, params *ListChatsParams) (*ListChatsResponse, error)
- func (s *ChatsServiceStub) ListChatsAll(ctx context.Context, params *ListChatsParams) ([]Chat, error)
- func (s *ChatsServiceStub) RequestExport(ctx context.Context, request ExportRequest) error
- func (s *ChatsServiceStub) UnarchiveChat(ctx context.Context, id int32) error
- func (s *ChatsServiceStub) UpdateChat(ctx context.Context, id int32, request ChatUpdateRequest) (*Chat, error)
- type ClientOption
- func WithBaseURL(baseURL string) ClientOption
- func WithBots(service BotsService) ClientOption
- func WithChats(service ChatsService) ClientOption
- func WithCommon(service CommonService) ClientOption
- func WithCustomProperties(service CustomPropertiesService) ClientOption
- func WithFiles(service FilesService) ClientOption
- func WithGroupTags(service GroupTagsService) ClientOption
- func WithLinkPreviews(service LinkPreviewsService) ClientOption
- func WithMembers(service MembersService) ClientOption
- func WithMessages(service MessagesService) ClientOption
- func WithOauth(service OAuthService) ClientOption
- func WithProfile(service ProfileService) ClientOption
- func WithReactions(service ReactionsService) ClientOption
- func WithReadMembers(service ReadMembersService) ClientOption
- func WithSearch(service SearchService) ClientOption
- func WithSecurity(service SecurityService) ClientOption
- func WithTasks(service TasksService) ClientOption
- func WithThreads(service ThreadsService) ClientOption
- func WithUsers(service UsersService) ClientOption
- func WithViews(service ViewsService) ClientOption
- type CommonServicedeprecated
- type CommonServiceImpl
- func (s *CommonServiceImpl) DownloadExport(ctx context.Context, id int32) (string, error)
- func (s *CommonServiceImpl) GetUploadParams(ctx context.Context) (*UploadParams, error)
- func (s *CommonServiceImpl) ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
- func (s *CommonServiceImpl) RequestExport(ctx context.Context, request ExportRequest) error
- func (s *CommonServiceImpl) UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
- type CommonServiceStub
- func (s *CommonServiceStub) DownloadExport(ctx context.Context, id int32) (string, error)
- func (s *CommonServiceStub) GetUploadParams(ctx context.Context) (*UploadParams, error)
- func (s *CommonServiceStub) ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
- func (s *CommonServiceStub) RequestExport(ctx context.Context, request ExportRequest) error
- func (s *CommonServiceStub) UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
- type CompanyMemberWebhookPayload
- type CustomPropertiesService
- type CustomPropertiesServiceImpl
- type CustomPropertiesServiceStub
- type CustomProperty
- type CustomPropertyDataType
- type CustomPropertyDefinition
- type ExportRequest
- type File
- type FileType
- type FileUploadRequest
- type FilesService
- type FilesServiceImpl
- type FilesServiceStub
- type Forwarding
- type GetAuditEventsParams
- type GetAuditEventsResponse
- type GetTagUsersParams
- type GetTagUsersResponse
- type GetWebhookEventsParams
- type GetWebhookEventsResponse
- type GroupTag
- type GroupTagRequest
- type GroupTagRequestGroupTag
- type GroupTagsService
- type GroupTagsServiceImpl
- func (s *GroupTagsServiceImpl) CreateTag(ctx context.Context, request GroupTagRequest) (*GroupTag, error)
- func (s *GroupTagsServiceImpl) DeleteTag(ctx context.Context, id int32) error
- func (s *GroupTagsServiceImpl) GetTag(ctx context.Context, id int32) (*GroupTag, error)
- func (s *GroupTagsServiceImpl) GetTagUsers(ctx context.Context, id int32, params *GetTagUsersParams) (*GetTagUsersResponse, error)
- func (s *GroupTagsServiceImpl) GetTagUsersAll(ctx context.Context, id int32, params *GetTagUsersParams) ([]User, error)
- func (s *GroupTagsServiceImpl) ListTags(ctx context.Context, params *ListTagsParams) (*ListTagsResponse, error)
- func (s *GroupTagsServiceImpl) ListTagsAll(ctx context.Context, params *ListTagsParams) ([]GroupTag, error)
- func (s *GroupTagsServiceImpl) UpdateTag(ctx context.Context, id int32, request GroupTagRequest) (*GroupTag, error)
- type GroupTagsServiceStub
- func (s *GroupTagsServiceStub) CreateTag(ctx context.Context, request GroupTagRequest) (*GroupTag, error)
- func (s *GroupTagsServiceStub) DeleteTag(ctx context.Context, id int32) error
- func (s *GroupTagsServiceStub) GetTag(ctx context.Context, id int32) (*GroupTag, error)
- func (s *GroupTagsServiceStub) GetTagUsers(ctx context.Context, id int32, params *GetTagUsersParams) (*GetTagUsersResponse, error)
- func (s *GroupTagsServiceStub) GetTagUsersAll(ctx context.Context, id int32, params *GetTagUsersParams) ([]User, error)
- func (s *GroupTagsServiceStub) ListTags(ctx context.Context, params *ListTagsParams) (*ListTagsResponse, error)
- func (s *GroupTagsServiceStub) ListTagsAll(ctx context.Context, params *ListTagsParams) ([]GroupTag, error)
- func (s *GroupTagsServiceStub) UpdateTag(ctx context.Context, id int32, request GroupTagRequest) (*GroupTag, error)
- type InviteStatus
- type LinkPreview
- type LinkPreviewImage
- type LinkPreviewsRequest
- type LinkPreviewsServicedeprecated
- type LinkPreviewsServiceImpl
- type LinkPreviewsServiceStub
- type LinkSharedWebhookPayload
- type ListBotsParams
- type ListBotsResponse
- type ListChatMessagesParams
- type ListChatMessagesResponse
- type ListChatsParams
- type ListChatsResponse
- type ListMembersParams
- type ListMembersResponse
- type ListPropertiesParams
- type ListPropertiesResponse
- type ListReactionsParams
- type ListReactionsResponse
- type ListReadMembersParams
- type ListTagsParams
- type ListTagsResponse
- type ListTasksParams
- type ListTasksResponse
- type ListThreadsParams
- type ListThreadsResponse
- type ListUsersParams
- type ListUsersResponse
- type MemberEventType
- type MembersService
- type MembersServiceImpl
- func (s *MembersServiceImpl) AddMembers(ctx context.Context, id int32, request AddMembersRequest) error
- func (s *MembersServiceImpl) AddTags(ctx context.Context, id int32, groupTagIds []int32) error
- func (s *MembersServiceImpl) LeaveChat(ctx context.Context, id int32) error
- func (s *MembersServiceImpl) ListMembers(ctx context.Context, id int32, params *ListMembersParams) (*ListMembersResponse, error)
- func (s *MembersServiceImpl) ListMembersAll(ctx context.Context, id int32, params *ListMembersParams) ([]User, error)
- func (s *MembersServiceImpl) RemoveMember(ctx context.Context, id int32, userId int32) error
- func (s *MembersServiceImpl) RemoveTag(ctx context.Context, id int32, tagId int32) error
- func (s *MembersServiceImpl) UpdateMemberRole(ctx context.Context, id int32, userId int32, role ChatMemberRole) error
- type MembersServiceStub
- func (s *MembersServiceStub) AddMembers(ctx context.Context, id int32, request AddMembersRequest) error
- func (s *MembersServiceStub) AddTags(ctx context.Context, id int32, groupTagIds []int32) error
- func (s *MembersServiceStub) LeaveChat(ctx context.Context, id int32) error
- func (s *MembersServiceStub) ListMembers(ctx context.Context, id int32, params *ListMembersParams) (*ListMembersResponse, error)
- func (s *MembersServiceStub) ListMembersAll(ctx context.Context, id int32, params *ListMembersParams) ([]User, error)
- func (s *MembersServiceStub) RemoveMember(ctx context.Context, id int32, userId int32) error
- func (s *MembersServiceStub) RemoveTag(ctx context.Context, id int32, tagId int32) error
- func (s *MembersServiceStub) UpdateMemberRole(ctx context.Context, id int32, userId int32, role ChatMemberRole) error
- type Message
- type MessageCreateRequest
- type MessageCreateRequestFile
- type MessageCreateRequestMessage
- type MessageEntityType
- type MessageSearchSort
- type MessageSortField
- type MessageThread
- type MessageUpdateRequest
- type MessageUpdateRequestFile
- type MessageUpdateRequestMessage
- type MessageWebhookPayload
- type MessagesService
- type MessagesServiceImpl
- func (s *MessagesServiceImpl) CreateMessage(ctx context.Context, request MessageCreateRequest) (*Message, error)
- func (s *MessagesServiceImpl) DeleteMessage(ctx context.Context, id int32) error
- func (s *MessagesServiceImpl) GetMessage(ctx context.Context, id int32) (*Message, error)
- func (s *MessagesServiceImpl) ListChatMessages(ctx context.Context, params ListChatMessagesParams) (*ListChatMessagesResponse, error)
- func (s *MessagesServiceImpl) ListChatMessagesAll(ctx context.Context, params *ListChatMessagesParams) ([]Message, error)
- func (s *MessagesServiceImpl) PinMessage(ctx context.Context, id int32) error
- func (s *MessagesServiceImpl) Unfurl(ctx context.Context, id int32, request LinkPreviewsRequest) error
- func (s *MessagesServiceImpl) UnpinMessage(ctx context.Context, id int32) error
- func (s *MessagesServiceImpl) UpdateMessage(ctx context.Context, id int32, request MessageUpdateRequest) (*Message, error)
- type MessagesServiceStub
- func (s *MessagesServiceStub) CreateMessage(ctx context.Context, request MessageCreateRequest) (*Message, error)
- func (s *MessagesServiceStub) DeleteMessage(ctx context.Context, id int32) error
- func (s *MessagesServiceStub) GetMessage(ctx context.Context, id int32) (*Message, error)
- func (s *MessagesServiceStub) ListChatMessages(ctx context.Context, params ListChatMessagesParams) (*ListChatMessagesResponse, error)
- func (s *MessagesServiceStub) ListChatMessagesAll(ctx context.Context, params *ListChatMessagesParams) ([]Message, error)
- func (s *MessagesServiceStub) PinMessage(ctx context.Context, id int32) error
- func (s *MessagesServiceStub) Unfurl(ctx context.Context, id int32, request LinkPreviewsRequest) error
- func (s *MessagesServiceStub) UnpinMessage(ctx context.Context, id int32) error
- func (s *MessagesServiceStub) UpdateMessage(ctx context.Context, id int32, request MessageUpdateRequest) (*Message, error)
- type NotImplementedError
- type OAuthError
- type OAuthScope
- type OAuthService
- type OAuthServiceImpl
- type OAuthServiceStub
- type OpenViewRequest
- type OpenViewRequestView
- type PachcaClient
- type PaginationMeta
- type PaginationMetaPaginate
- type PollWebhookEventsOptions
- type ProfileService
- type ProfileServiceImpl
- func (s *ProfileServiceImpl) DeleteProfileAvatar(ctx context.Context) error
- func (s *ProfileServiceImpl) DeleteStatus(ctx context.Context) error
- func (s *ProfileServiceImpl) GetProfile(ctx context.Context) (*User, error)
- func (s *ProfileServiceImpl) GetStatus(ctx context.Context) (*any, error)
- func (s *ProfileServiceImpl) GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
- func (s *ProfileServiceImpl) UpdateProfileAvatar(ctx context.Context, image io.Reader) (*AvatarData, error)
- func (s *ProfileServiceImpl) UpdateStatus(ctx context.Context, request StatusUpdateRequest) (*UserStatus, error)
- type ProfileServiceStub
- func (s *ProfileServiceStub) DeleteProfileAvatar(ctx context.Context) error
- func (s *ProfileServiceStub) DeleteStatus(ctx context.Context) error
- func (s *ProfileServiceStub) GetProfile(ctx context.Context) (*User, error)
- func (s *ProfileServiceStub) GetStatus(ctx context.Context) (*any, error)
- func (s *ProfileServiceStub) GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
- func (s *ProfileServiceStub) UpdateProfileAvatar(ctx context.Context, image io.Reader) (*AvatarData, error)
- func (s *ProfileServiceStub) UpdateStatus(ctx context.Context, request StatusUpdateRequest) (*UserStatus, error)
- type Reaction
- type ReactionEventType
- type ReactionRequest
- type ReactionWebhookPayload
- type ReactionsService
- type ReactionsServiceImpl
- func (s *ReactionsServiceImpl) AddReaction(ctx context.Context, id int32, request ReactionRequest) (*Reaction, error)
- func (s *ReactionsServiceImpl) ListReactions(ctx context.Context, id int32, params *ListReactionsParams) (*ListReactionsResponse, error)
- func (s *ReactionsServiceImpl) ListReactionsAll(ctx context.Context, id int32, params *ListReactionsParams) ([]Reaction, error)
- func (s *ReactionsServiceImpl) RemoveReaction(ctx context.Context, id int32, params RemoveReactionParams) error
- type ReactionsServiceStub
- func (s *ReactionsServiceStub) AddReaction(ctx context.Context, id int32, request ReactionRequest) (*Reaction, error)
- func (s *ReactionsServiceStub) ListReactions(ctx context.Context, id int32, params *ListReactionsParams) (*ListReactionsResponse, error)
- func (s *ReactionsServiceStub) ListReactionsAll(ctx context.Context, id int32, params *ListReactionsParams) ([]Reaction, error)
- func (s *ReactionsServiceStub) RemoveReaction(ctx context.Context, id int32, params RemoveReactionParams) error
- type ReadMembersService
- type ReadMembersServiceImpl
- type ReadMembersServiceStub
- type RemoveReactionParams
- type SearchChatsParams
- type SearchChatsResponse
- type SearchEntityType
- type SearchMessagesParams
- type SearchMessagesResponse
- type SearchPaginationMeta
- type SearchPaginationMetaPaginate
- type SearchService
- type SearchServiceImpl
- func (s *SearchServiceImpl) SearchChats(ctx context.Context, params *SearchChatsParams) (*SearchChatsResponse, error)
- func (s *SearchServiceImpl) SearchChatsAll(ctx context.Context, params *SearchChatsParams) ([]Chat, error)
- func (s *SearchServiceImpl) SearchMessages(ctx context.Context, params *SearchMessagesParams) (*SearchMessagesResponse, error)
- func (s *SearchServiceImpl) SearchMessagesAll(ctx context.Context, params *SearchMessagesParams) ([]Message, error)
- func (s *SearchServiceImpl) SearchUsers(ctx context.Context, params *SearchUsersParams) (*SearchUsersResponse, error)
- func (s *SearchServiceImpl) SearchUsersAll(ctx context.Context, params *SearchUsersParams) ([]User, error)
- type SearchServiceStub
- func (s *SearchServiceStub) SearchChats(ctx context.Context, params *SearchChatsParams) (*SearchChatsResponse, error)
- func (s *SearchServiceStub) SearchChatsAll(ctx context.Context, params *SearchChatsParams) ([]Chat, error)
- func (s *SearchServiceStub) SearchMessages(ctx context.Context, params *SearchMessagesParams) (*SearchMessagesResponse, error)
- func (s *SearchServiceStub) SearchMessagesAll(ctx context.Context, params *SearchMessagesParams) ([]Message, error)
- func (s *SearchServiceStub) SearchUsers(ctx context.Context, params *SearchUsersParams) (*SearchUsersResponse, error)
- func (s *SearchServiceStub) SearchUsersAll(ctx context.Context, params *SearchUsersParams) ([]User, error)
- type SearchSortOrder
- type SearchUsersParams
- type SearchUsersResponse
- type SecurityService
- type SecurityServiceImpl
- type SecurityServiceStub
- type SortOrder
- type StatusUpdateRequest
- type StatusUpdateRequestStatus
- type StubClientOption
- func WithStubBots(service BotsService) StubClientOption
- func WithStubChats(service ChatsService) StubClientOption
- func WithStubCommon(service CommonService) StubClientOption
- func WithStubCustomProperties(service CustomPropertiesService) StubClientOption
- func WithStubFiles(service FilesService) StubClientOption
- func WithStubGroupTags(service GroupTagsService) StubClientOption
- func WithStubLinkPreviews(service LinkPreviewsService) StubClientOption
- func WithStubMembers(service MembersService) StubClientOption
- func WithStubMessages(service MessagesService) StubClientOption
- func WithStubOauth(service OAuthService) StubClientOption
- func WithStubProfile(service ProfileService) StubClientOption
- func WithStubReactions(service ReactionsService) StubClientOption
- func WithStubReadMembers(service ReadMembersService) StubClientOption
- func WithStubSearch(service SearchService) StubClientOption
- func WithStubSecurity(service SecurityService) StubClientOption
- func WithStubTasks(service TasksService) StubClientOption
- func WithStubThreads(service ThreadsService) StubClientOption
- func WithStubUsers(service UsersService) StubClientOption
- func WithStubViews(service ViewsService) StubClientOption
- type Task
- type TaskCreateRequest
- type TaskCreateRequestCustomProperty
- type TaskCreateRequestTask
- type TaskKind
- type TaskStatus
- type TaskUpdateRequest
- type TaskUpdateRequestCustomProperty
- type TaskUpdateRequestTask
- type TasksService
- type TasksServiceImpl
- func (s *TasksServiceImpl) CreateTask(ctx context.Context, request TaskCreateRequest) (*Task, error)
- func (s *TasksServiceImpl) DeleteTask(ctx context.Context, id int32) error
- func (s *TasksServiceImpl) GetTask(ctx context.Context, id int32) (*Task, error)
- func (s *TasksServiceImpl) ListTasks(ctx context.Context, params *ListTasksParams) (*ListTasksResponse, error)
- func (s *TasksServiceImpl) ListTasksAll(ctx context.Context, params *ListTasksParams) ([]Task, error)
- func (s *TasksServiceImpl) UpdateTask(ctx context.Context, id int32, request TaskUpdateRequest) (*Task, error)
- type TasksServiceStub
- func (s *TasksServiceStub) CreateTask(ctx context.Context, request TaskCreateRequest) (*Task, error)
- func (s *TasksServiceStub) DeleteTask(ctx context.Context, id int32) error
- func (s *TasksServiceStub) GetTask(ctx context.Context, id int32) (*Task, error)
- func (s *TasksServiceStub) ListTasks(ctx context.Context, params *ListTasksParams) (*ListTasksResponse, error)
- func (s *TasksServiceStub) ListTasksAll(ctx context.Context, params *ListTasksParams) ([]Task, error)
- func (s *TasksServiceStub) UpdateTask(ctx context.Context, id int32, request TaskUpdateRequest) (*Task, error)
- type Thread
- type ThreadsService
- type ThreadsServiceImpl
- func (s *ThreadsServiceImpl) CreateThread(ctx context.Context, id int32) (*Thread, error)
- func (s *ThreadsServiceImpl) GetThread(ctx context.Context, id int32) (*Thread, error)
- func (s *ThreadsServiceImpl) ListThreads(ctx context.Context, params *ListThreadsParams) (*ListThreadsResponse, error)
- func (s *ThreadsServiceImpl) ListThreadsAll(ctx context.Context, params *ListThreadsParams) ([]Thread, error)
- type ThreadsServiceStub
- func (s *ThreadsServiceStub) CreateThread(ctx context.Context, id int32) (*Thread, error)
- func (s *ThreadsServiceStub) GetThread(ctx context.Context, id int32) (*Thread, error)
- func (s *ThreadsServiceStub) ListThreads(ctx context.Context, params *ListThreadsParams) (*ListThreadsResponse, error)
- func (s *ThreadsServiceStub) ListThreadsAll(ctx context.Context, params *ListThreadsParams) ([]Thread, error)
- type UpdateMemberRoleRequest
- type UpdateProfileAvatarRequest
- type UpdateUserAvatarRequest
- type UploadParams
- type User
- type UserCreateRequest
- type UserCreateRequestCustomProperty
- type UserCreateRequestUser
- type UserCreateRole
- type UserEventType
- type UserRole
- type UserRoleInput
- type UserStatus
- type UserStatusAwayMessage
- type UserUpdateRequest
- type UserUpdateRequestCustomProperty
- type UserUpdateRequestUser
- type UsersService
- type UsersServiceImpl
- func (s *UsersServiceImpl) CreateUser(ctx context.Context, request UserCreateRequest) (*User, error)
- func (s *UsersServiceImpl) DeleteUser(ctx context.Context, id int32) error
- func (s *UsersServiceImpl) DeleteUserAvatar(ctx context.Context, userId int32) error
- func (s *UsersServiceImpl) DeleteUserStatus(ctx context.Context, userId int32) error
- func (s *UsersServiceImpl) GetUser(ctx context.Context, id int32) (*User, error)
- func (s *UsersServiceImpl) GetUserStatus(ctx context.Context, userId int32) (*any, error)
- func (s *UsersServiceImpl) ListUsers(ctx context.Context, params *ListUsersParams) (*ListUsersResponse, error)
- func (s *UsersServiceImpl) ListUsersAll(ctx context.Context, params *ListUsersParams) ([]User, error)
- func (s *UsersServiceImpl) UpdateUser(ctx context.Context, id int32, request UserUpdateRequest) (*User, error)
- func (s *UsersServiceImpl) UpdateUserAvatar(ctx context.Context, userId int32, image io.Reader) (*AvatarData, error)
- func (s *UsersServiceImpl) UpdateUserStatus(ctx context.Context, userId int32, request StatusUpdateRequest) (*UserStatus, error)
- type UsersServiceStub
- func (s *UsersServiceStub) CreateUser(ctx context.Context, request UserCreateRequest) (*User, error)
- func (s *UsersServiceStub) DeleteUser(ctx context.Context, id int32) error
- func (s *UsersServiceStub) DeleteUserAvatar(ctx context.Context, userId int32) error
- func (s *UsersServiceStub) DeleteUserStatus(ctx context.Context, userId int32) error
- func (s *UsersServiceStub) GetUser(ctx context.Context, id int32) (*User, error)
- func (s *UsersServiceStub) GetUserStatus(ctx context.Context, userId int32) (*any, error)
- func (s *UsersServiceStub) ListUsers(ctx context.Context, params *ListUsersParams) (*ListUsersResponse, error)
- func (s *UsersServiceStub) ListUsersAll(ctx context.Context, params *ListUsersParams) ([]User, error)
- func (s *UsersServiceStub) UpdateUser(ctx context.Context, id int32, request UserUpdateRequest) (*User, error)
- func (s *UsersServiceStub) UpdateUserAvatar(ctx context.Context, userId int32, image io.Reader) (*AvatarData, error)
- func (s *UsersServiceStub) UpdateUserStatus(ctx context.Context, userId int32, request StatusUpdateRequest) (*UserStatus, error)
- type ValidationErrorCode
- type VideoCallEventType
- type VideoCallWebhookPayload
- type ViewBlock
- type ViewBlockCheckbox
- type ViewBlockCheckboxOption
- type ViewBlockDate
- type ViewBlockDivider
- type ViewBlockFileInput
- type ViewBlockHeader
- type ViewBlockInput
- type ViewBlockMarkdown
- type ViewBlockPlainText
- type ViewBlockRadio
- type ViewBlockSelect
- type ViewBlockSelectOption
- type ViewBlockSelectableOption
- type ViewBlockTime
- type ViewBlockUnion
- type ViewSubmitWebhookPayload
- type ViewsService
- type ViewsServiceImpl
- type ViewsServiceStub
- type VoiceContent
- type WebhookEvent
- type WebhookEventType
- type WebhookLink
- type WebhookMessageThread
- type WebhookPayloadUnion
- type WebhookVideoCallMember
- type WebhookVideoCallThread
Constants ¶
View Source
const PachcaAPIURL = "https://api.pachca.com/api/shared/v1"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessTokenInfo ¶
type AccessTokenInfo struct {
ID int64 `json:"id"`
Token string `json:"token"`
UserID int64 `json:"user_id"`
Scopes []OAuthScope `json:"scopes"`
CreatedAt time.Time `json:"created_at"`
Name *string `json:"name"`
RevokedAt *string `json:"revoked_at"`
ExpiresIn *int32 `json:"expires_in"`
LastUsedAt *string `json:"last_used_at"`
}
type AddMembersRequest ¶
type AddTagsRequest ¶
type AddTagsRequest struct {
GroupTagIDs []int32 `json:"group_tag_ids"`
}
type ApiError ¶
type ApiError struct {
Errors []ApiErrorItem `json:"errors"`
}
type ApiErrorItem ¶
type AuditDetailsBotScopes ¶ added in v1.0.25
type AuditDetailsBotWebhookSettings ¶ added in v1.0.25
type AuditDetailsChatId ¶ added in v1.0.1
type AuditDetailsChatId struct {
ChatID int32 `json:"chat_id"`
}
type AuditDetailsChatPermission ¶ added in v1.0.1
type AuditDetailsChatPermission struct {
PublicAccess bool `json:"public_access"`
}
type AuditDetailsChatRenamed ¶ added in v1.0.1
type AuditDetailsDlp ¶ added in v1.0.1
type AuditDetailsDlp struct {
DlpRuleID int32 `json:"dlp_rule_id"`
DlpRuleName string `json:"dlp_rule_name"`
MessageID int32 `json:"message_id"`
ChatID int32 `json:"chat_id"`
UserID int32 `json:"user_id"`
ConditionsMatched bool `json:"conditions_matched"`
ActionMessage *string `json:"action_message"`
}
type AuditDetailsEmpty ¶ added in v1.0.1
type AuditDetailsEmpty struct {
}
type AuditDetailsInitiator ¶ added in v1.0.1
type AuditDetailsInitiator struct {
InitiatorID int32 `json:"initiator_id"`
}
type AuditDetailsInviter ¶ added in v1.0.1
type AuditDetailsInviter struct {
InviterID int32 `json:"inviter_id"`
}
type AuditDetailsKms ¶ added in v1.0.1
type AuditDetailsRoleChanged ¶ added in v1.0.1
type AuditDetailsSearch ¶ added in v1.0.1
type AuditDetailsTagChat ¶ added in v1.0.1
type AuditDetailsTagName ¶ added in v1.0.1
type AuditDetailsTagName struct {
Name string `json:"name"`
}
type AuditDetailsTokenScopes ¶ added in v1.0.1
type AuditDetailsTokenScopes struct {
Scopes []string `json:"scopes"`
}
type AuditDetailsUserUpdated ¶ added in v1.0.1
type AuditDetailsUserUpdated struct {
ChangedAttrs []string `json:"changed_attrs"`
}
type AuditEvent ¶
type AuditEvent struct {
ID string `json:"id"`
CreatedAt time.Time `json:"created_at"`
EventKey AuditEventKey `json:"event_key"`
EntityID string `json:"entity_id"`
EntityType string `json:"entity_type"`
ActorID string `json:"actor_id"`
ActorType string `json:"actor_type"`
Details AuditEventDetailsUnion `json:"details"`
IpAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
}
type AuditEventDetailsUnion ¶ added in v1.0.1
type AuditEventDetailsUnion struct {
AuditDetailsEmpty *AuditDetailsEmpty
AuditDetailsUserUpdated *AuditDetailsUserUpdated
AuditDetailsRoleChanged *AuditDetailsRoleChanged
AuditDetailsTagName *AuditDetailsTagName
AuditDetailsInitiator *AuditDetailsInitiator
AuditDetailsInviter *AuditDetailsInviter
AuditDetailsChatRenamed *AuditDetailsChatRenamed
AuditDetailsChatPermission *AuditDetailsChatPermission
AuditDetailsTagChat *AuditDetailsTagChat
AuditDetailsChatId *AuditDetailsChatId
AuditDetailsTokenScopes *AuditDetailsTokenScopes
AuditDetailsKms *AuditDetailsKms
AuditDetailsDlp *AuditDetailsDlp
AuditDetailsSearch *AuditDetailsSearch
AuditDetailsBotScopes *AuditDetailsBotScopes
AuditDetailsBotWebhookSettings *AuditDetailsBotWebhookSettings
}
func (AuditEventDetailsUnion) MarshalJSON ¶ added in v1.0.1
func (u AuditEventDetailsUnion) MarshalJSON() ([]byte, error)
func (*AuditEventDetailsUnion) UnmarshalJSON ¶ added in v1.0.1
func (u *AuditEventDetailsUnion) UnmarshalJSON(data []byte) error
type AuditEventKey ¶
type AuditEventKey string
const ( AuditEventKeyUserLogin AuditEventKey = "user_login" // Пользователь успешно вошел в систему AuditEventKeyUserLogout AuditEventKey = "user_logout" // Пользователь вышел из системы AuditEventKeyUser2faFail AuditEventKey = "user_2fa_fail" // Неудачная попытка двухфакторной аутентификации AuditEventKeyUser2faSuccess AuditEventKey = "user_2fa_success" // Успешная двухфакторная аутентификация AuditEventKeyUserCreated AuditEventKey = "user_created" // Создана новая учетная запись пользователя AuditEventKeyUserDeleted AuditEventKey = "user_deleted" // Учетная запись пользователя удалена AuditEventKeyUserRoleChanged AuditEventKey = "user_role_changed" // Роль пользователя была изменена AuditEventKeyUserUpdated AuditEventKey = "user_updated" // Данные пользователя обновлены AuditEventKeyTagCreated AuditEventKey = "tag_created" // Создан новый тег AuditEventKeyTagDeleted AuditEventKey = "tag_deleted" // Тег удален AuditEventKeyUserAddedToTag AuditEventKey = "user_added_to_tag" // Пользователь добавлен в тег AuditEventKeyUserRemovedFromTag AuditEventKey = "user_removed_from_tag" // Пользователь удален из тега AuditEventKeyChatCreated AuditEventKey = "chat_created" // Создан новый чат AuditEventKeyChatRenamed AuditEventKey = "chat_renamed" // Чат переименован AuditEventKeyChatPermissionChanged AuditEventKey = "chat_permission_changed" // Изменены права доступа к чату AuditEventKeyUserChatJoin AuditEventKey = "user_chat_join" // Пользователь присоединился к чату AuditEventKeyUserChatLeave AuditEventKey = "user_chat_leave" // Пользователь покинул чат AuditEventKeyTagAddedToChat AuditEventKey = "tag_added_to_chat" // Тег добавлен в чат AuditEventKeyTagRemovedFromChat AuditEventKey = "tag_removed_from_chat" // Тег удален из чата AuditEventKeyMessageUpdated AuditEventKey = "message_updated" // Сообщение отредактировано AuditEventKeyMessageDeleted AuditEventKey = "message_deleted" // Сообщение удалено AuditEventKeyMessageCreated AuditEventKey = "message_created" // Сообщение создано AuditEventKeyReactionCreated AuditEventKey = "reaction_created" // Реакция добавлена AuditEventKeyReactionDeleted AuditEventKey = "reaction_deleted" // Реакция удалена AuditEventKeyThreadCreated AuditEventKey = "thread_created" // Тред создан AuditEventKeyAccessTokenCreated AuditEventKey = "access_token_created" // Создан новый токен доступа AuditEventKeyAccessTokenUpdated AuditEventKey = "access_token_updated" // Токен доступа обновлен AuditEventKeyAccessTokenDestroy AuditEventKey = "access_token_destroy" // Токен доступа удален AuditEventKeyKmsEncrypt AuditEventKey = "kms_encrypt" // Данные зашифрованы AuditEventKeyKmsDecrypt AuditEventKey = "kms_decrypt" // Данные расшифрованы AuditEventKeyAuditEventsAccessed AuditEventKey = "audit_events_accessed" // Доступ к журналам аудита получен AuditEventKeyDlpViolationDetected AuditEventKey = "dlp_violation_detected" // Срабатывание правила DLP-системы AuditEventKeySearchUsersApi AuditEventKey = "search_users_api" // Поиск сотрудников через API AuditEventKeySearchChatsApi AuditEventKey = "search_chats_api" // Поиск чатов через API AuditEventKeySearchMessagesApi AuditEventKey = "search_messages_api" // Поиск сообщений через API AuditEventKeyBotScopesUpdated AuditEventKey = "bot_scopes_updated" // Изменены скоупы токена бота AuditEventKeyBotWebhookSettingsUpdated AuditEventKey = "bot_webhook_settings_updated" // Изменены настройки исходящего вебхука бота AuditEventKeyBotTokenRecreated AuditEventKey = "bot_token_recreated" // Токен бота перевыпущен (ротация) AuditEventKeyBotDeleted AuditEventKey = "bot_deleted" // Бот удалён )
type AvatarData ¶ added in v1.0.12
type AvatarData struct {
ImageURL string `json:"image_url"`
}
type BotCanEdit ¶ added in v1.0.26
type BotCanEdit string
const ( BotCanEditAdmin BotCanEdit = "admin" // Администраторы компании BotCanEditChatOwners BotCanEdit = "chat_owners" // Владельцы чатов, в которые добавлен бот )
type BotCreateRequest ¶ added in v1.0.22
type BotCreateRequest struct {
Webhook BotCreateRequestWebhook `json:"webhook"`
}
type BotCreateRequestWebhook ¶ added in v1.0.23
type BotCreateRequestWebhook struct {
Name string `json:"name"`
Nickname *string `json:"nickname,omitempty"`
OutgoingURL *string `json:"outgoing_url,omitempty"`
Events []BotEventName `json:"events,omitempty"`
TriggerOn *BotTriggerOn `json:"trigger_on,omitempty"`
Commands []string `json:"commands,omitempty"`
Scopes []string `json:"scopes,omitempty"`
Template *string `json:"template,omitempty"`
TemplateEngine *BotTemplateEngine `json:"template_engine,omitempty"`
ChallengeKey *string `json:"challenge_key,omitempty"`
LinkPreviewEnabled *bool `json:"link_preview_enabled,omitempty"`
IgnoreSelfMessages *bool `json:"ignore_self_messages,omitempty"`
EventsHistoryEnabled *bool `json:"events_history_enabled,omitempty"`
WhoCanAdd *BotWhoCanAdd `json:"who_can_add,omitempty"`
CanEdit []BotCanEdit `json:"can_edit,omitempty"`
SingleChat *bool `json:"single_chat,omitempty"`
}
func (BotCreateRequestWebhook) MarshalJSON ¶ added in v1.0.23
func (m BotCreateRequestWebhook) MarshalJSON() ([]byte, error)
type BotCreateResponse ¶ added in v1.0.22
type BotCreateResponse struct {
ID int32 `json:"id"`
Webhook BotWebhook `json:"webhook"`
AccessToken string `json:"access_token"`
}
type BotEventName ¶ added in v1.0.22
type BotEventName string
const ( BotEventNameMessageNew BotEventName = "message_new" // Новое сообщение BotEventNameMessageUpdate BotEventName = "message_update" // Сообщение отредактировано BotEventNameMessageDelete BotEventName = "message_delete" // Сообщение удалено BotEventNameReactionNew BotEventName = "reaction_new" // Добавлена реакция BotEventNameReactionDelete BotEventName = "reaction_delete" // Реакция удалена BotEventNameButtonClick BotEventName = "button_click" // Нажата кнопка BotEventNameChatMemberAdd BotEventName = "chat_member_add" // Участник добавлен в чат BotEventNameChatMemberRemove BotEventName = "chat_member_remove" // Участник удалён из чата BotEventNameCompanyMemberInvite BotEventName = "company_member_invite" // Сотрудник приглашён в компанию BotEventNameCompanyMemberConfirm BotEventName = "company_member_confirm" // Сотрудник подтвердил приглашение BotEventNameCompanyMemberSuspend BotEventName = "company_member_suspend" // Сотрудник деактивирован BotEventNameCompanyMemberActivate BotEventName = "company_member_activate" // Сотрудник активирован BotEventNameCompanyMemberDelete BotEventName = "company_member_delete" // Сотрудник удалён из компании BotEventNameCompanyMemberUpdate BotEventName = "company_member_update" // Данные сотрудника изменены BotEventNameBillCreated BotEventName = "bill_created" // Создан счёт BotEventNameVideoCallStarted BotEventName = "video_call_started" BotEventNameVideoCallFinished BotEventName = "video_call_finished" BotEventNameVideoCallRecordingReady BotEventName = "video_call_recording_ready" )
type BotResponse ¶
type BotResponse struct {
ID int32 `json:"id"`
Webhook BotWebhook `json:"webhook"`
}
type BotTemplateEngine ¶ added in v1.0.24
type BotTemplateEngine string
const ( BotTemplateEngineLiquid BotTemplateEngine = "liquid" // Liquid — условия, циклы и фильтры BotTemplateEngineMustache BotTemplateEngine = "mustache" // Mustache — простая подстановка без логики )
type BotTriggerOn ¶ added in v1.0.22
type BotTriggerOn string
const ( BotTriggerOnCommands BotTriggerOn = "commands" // Только на команды (триггер-слова) из commands BotTriggerOnAllMessages BotTriggerOn = "all_messages" // На все сообщения в чатах, где есть бот BotTriggerOnUnfurl BotTriggerOn = "unfurl" // На развёртывание ссылок (link previews) )
type BotUpdateRequest ¶
type BotUpdateRequest struct {
Webhook BotUpdateRequestWebhook `json:"webhook"`
}
type BotUpdateRequestWebhook ¶ added in v1.0.23
type BotUpdateRequestWebhook struct {
Name *string `json:"name,omitempty"`
Nickname *string `json:"nickname,omitempty"`
OutgoingURL *string `json:"outgoing_url,omitempty"`
Events []BotEventName `json:"events,omitempty"`
TriggerOn *BotTriggerOn `json:"trigger_on,omitempty"`
Commands []string `json:"commands,omitempty"`
Scopes []string `json:"scopes,omitempty"`
Template *string `json:"template,omitempty"`
TemplateEngine *BotTemplateEngine `json:"template_engine,omitempty"`
ChallengeKey *string `json:"challenge_key,omitempty"`
LinkPreviewEnabled *bool `json:"link_preview_enabled,omitempty"`
IgnoreSelfMessages *bool `json:"ignore_self_messages,omitempty"`
EventsHistoryEnabled *bool `json:"events_history_enabled,omitempty"`
WhoCanAdd *BotWhoCanAdd `json:"who_can_add,omitempty"`
CanEdit []BotCanEdit `json:"can_edit,omitempty"`
}
func (BotUpdateRequestWebhook) MarshalJSON ¶ added in v1.0.23
func (m BotUpdateRequestWebhook) MarshalJSON() ([]byte, error)
type BotWebhook ¶ added in v1.0.22
type BotWebhook struct {
Name string `json:"name"`
Nickname string `json:"nickname"`
Events []BotEventName `json:"events"`
TriggerOn BotTriggerOn `json:"trigger_on"`
Commands []string `json:"commands"`
Scopes []string `json:"scopes"`
TemplateEngine BotTemplateEngine `json:"template_engine"`
LinkPreviewEnabled bool `json:"link_preview_enabled"`
IgnoreSelfMessages bool `json:"ignore_self_messages"`
EventsHistoryEnabled bool `json:"events_history_enabled"`
SingleChat bool `json:"single_chat"`
CanEdit []BotCanEdit `json:"can_edit"`
WhoCanAdd BotWhoCanAdd `json:"who_can_add"`
OutgoingURL *string `json:"outgoing_url"`
Template *string `json:"template"`
ChallengeKey *string `json:"challenge_key"`
}
type BotWebhookSelfUpdateRequest ¶ added in v1.0.23
type BotWebhookSelfUpdateRequest struct {
Webhook BotWebhookSelfUpdateRequestWebhook `json:"webhook"`
}
type BotWebhookSelfUpdateRequestWebhook ¶ added in v1.0.23
type BotWebhookSelfUpdateRequestWebhook struct {
OutgoingURL string `json:"outgoing_url"`
}
type BotWhoCanAdd ¶ added in v1.0.26
type BotWhoCanAdd string
const ( BotWhoCanAddCreator BotWhoCanAdd = "creator" // Только создатель бота BotWhoCanAddCreatorAdmin BotWhoCanAdd = "creator_admin" // Создатель и администраторы компании BotWhoCanAddCreatorAdminUser BotWhoCanAdd = "creator_admin_user" // Создатель, администраторы и участники компании BotWhoCanAddAnyone BotWhoCanAdd = "anyone" // Любой пользователь, в том числе гости )
type BotsService ¶ added in v1.0.1
type BotsService interface {
ListBots(ctx context.Context, params *ListBotsParams) (*ListBotsResponse, error)
ListBotsAll(ctx context.Context, params *ListBotsParams) ([]BotResponse, error)
GetBot(ctx context.Context, id int32) (*BotResponse, error)
GetWebhookEvents(ctx context.Context, params *GetWebhookEventsParams) (*GetWebhookEventsResponse, error)
GetWebhookEventsAll(ctx context.Context, params *GetWebhookEventsParams) ([]WebhookEvent, error)
PollWebhookEvents(ctx context.Context, options *PollWebhookEventsOptions, handler func(WebhookEvent) error) error
PollWebhookPayloads(ctx context.Context, options *PollWebhookEventsOptions, handler func(WebhookPayloadUnion) error) error
SelfRecreateBotToken(ctx context.Context) (*BotCreateResponse, error)
CreateBot(ctx context.Context, request BotCreateRequest) (*BotCreateResponse, error)
RecreateBotToken(ctx context.Context, id int32) (*BotCreateResponse, error)
SelfUpdateBotWebhook(ctx context.Context, request BotWebhookSelfUpdateRequest) (*BotResponse, error)
UpdateBot(ctx context.Context, id int32, request BotUpdateRequest) (*BotResponse, error)
DeleteBot(ctx context.Context, id int32) error
DeleteWebhookEvent(ctx context.Context, id string) error
}
type BotsServiceImpl ¶ added in v1.0.13
type BotsServiceImpl struct {
// contains filtered or unexported fields
}
func (*BotsServiceImpl) CreateBot ¶ added in v1.0.22
func (s *BotsServiceImpl) CreateBot(ctx context.Context, request BotCreateRequest) (*BotCreateResponse, error)
func (*BotsServiceImpl) DeleteBot ¶ added in v1.0.26
func (s *BotsServiceImpl) DeleteBot(ctx context.Context, id int32) error
func (*BotsServiceImpl) DeleteWebhookEvent ¶ added in v1.0.13
func (s *BotsServiceImpl) DeleteWebhookEvent(ctx context.Context, id string) error
func (*BotsServiceImpl) GetBot ¶ added in v1.0.22
func (s *BotsServiceImpl) GetBot(ctx context.Context, id int32) (*BotResponse, error)
func (*BotsServiceImpl) GetWebhookEvents ¶ added in v1.0.13
func (s *BotsServiceImpl) GetWebhookEvents(ctx context.Context, params *GetWebhookEventsParams) (*GetWebhookEventsResponse, error)
func (*BotsServiceImpl) GetWebhookEventsAll ¶ added in v1.0.13
func (s *BotsServiceImpl) GetWebhookEventsAll(ctx context.Context, params *GetWebhookEventsParams) ([]WebhookEvent, error)
func (*BotsServiceImpl) ListBots ¶ added in v1.0.26
func (s *BotsServiceImpl) ListBots(ctx context.Context, params *ListBotsParams) (*ListBotsResponse, error)
func (*BotsServiceImpl) ListBotsAll ¶ added in v1.0.26
func (s *BotsServiceImpl) ListBotsAll(ctx context.Context, params *ListBotsParams) ([]BotResponse, error)
func (*BotsServiceImpl) PollWebhookEvents ¶ added in v1.0.21
func (s *BotsServiceImpl) PollWebhookEvents(ctx context.Context, options *PollWebhookEventsOptions, handler func(WebhookEvent) error) error
func (*BotsServiceImpl) PollWebhookPayloads ¶ added in v1.0.21
func (s *BotsServiceImpl) PollWebhookPayloads(ctx context.Context, options *PollWebhookEventsOptions, handler func(WebhookPayloadUnion) error) error
func (*BotsServiceImpl) RecreateBotToken ¶ added in v1.0.25
func (s *BotsServiceImpl) RecreateBotToken(ctx context.Context, id int32) (*BotCreateResponse, error)
func (*BotsServiceImpl) SelfRecreateBotToken ¶ added in v1.0.25
func (s *BotsServiceImpl) SelfRecreateBotToken(ctx context.Context) (*BotCreateResponse, error)
func (*BotsServiceImpl) SelfUpdateBotWebhook ¶ added in v1.0.23
func (s *BotsServiceImpl) SelfUpdateBotWebhook(ctx context.Context, request BotWebhookSelfUpdateRequest) (*BotResponse, error)
func (*BotsServiceImpl) UpdateBot ¶ added in v1.0.13
func (s *BotsServiceImpl) UpdateBot(ctx context.Context, id int32, request BotUpdateRequest) (*BotResponse, error)
type BotsServiceStub ¶ added in v1.0.13
type BotsServiceStub struct{}
func (*BotsServiceStub) CreateBot ¶ added in v1.0.22
func (s *BotsServiceStub) CreateBot(ctx context.Context, request BotCreateRequest) (*BotCreateResponse, error)
func (*BotsServiceStub) DeleteBot ¶ added in v1.0.26
func (s *BotsServiceStub) DeleteBot(ctx context.Context, id int32) error
func (*BotsServiceStub) DeleteWebhookEvent ¶ added in v1.0.13
func (s *BotsServiceStub) DeleteWebhookEvent(ctx context.Context, id string) error
func (*BotsServiceStub) GetBot ¶ added in v1.0.22
func (s *BotsServiceStub) GetBot(ctx context.Context, id int32) (*BotResponse, error)
func (*BotsServiceStub) GetWebhookEvents ¶ added in v1.0.13
func (s *BotsServiceStub) GetWebhookEvents(ctx context.Context, params *GetWebhookEventsParams) (*GetWebhookEventsResponse, error)
func (*BotsServiceStub) GetWebhookEventsAll ¶ added in v1.0.13
func (s *BotsServiceStub) GetWebhookEventsAll(ctx context.Context, params *GetWebhookEventsParams) ([]WebhookEvent, error)
func (*BotsServiceStub) ListBots ¶ added in v1.0.26
func (s *BotsServiceStub) ListBots(ctx context.Context, params *ListBotsParams) (*ListBotsResponse, error)
func (*BotsServiceStub) ListBotsAll ¶ added in v1.0.26
func (s *BotsServiceStub) ListBotsAll(ctx context.Context, params *ListBotsParams) ([]BotResponse, error)
func (*BotsServiceStub) PollWebhookEvents ¶ added in v1.0.21
func (s *BotsServiceStub) PollWebhookEvents(ctx context.Context, options *PollWebhookEventsOptions, handler func(WebhookEvent) error) error
func (*BotsServiceStub) PollWebhookPayloads ¶ added in v1.0.21
func (s *BotsServiceStub) PollWebhookPayloads(ctx context.Context, options *PollWebhookEventsOptions, handler func(WebhookPayloadUnion) error) error
func (*BotsServiceStub) RecreateBotToken ¶ added in v1.0.25
func (s *BotsServiceStub) RecreateBotToken(ctx context.Context, id int32) (*BotCreateResponse, error)
func (*BotsServiceStub) SelfRecreateBotToken ¶ added in v1.0.25
func (s *BotsServiceStub) SelfRecreateBotToken(ctx context.Context) (*BotCreateResponse, error)
func (*BotsServiceStub) SelfUpdateBotWebhook ¶ added in v1.0.23
func (s *BotsServiceStub) SelfUpdateBotWebhook(ctx context.Context, request BotWebhookSelfUpdateRequest) (*BotResponse, error)
func (*BotsServiceStub) UpdateBot ¶ added in v1.0.13
func (s *BotsServiceStub) UpdateBot(ctx context.Context, id int32, request BotUpdateRequest) (*BotResponse, error)
type ButtonWebhookPayload ¶
type ButtonWebhookPayload struct {
Type string `json:"type"` // always "button"
Event string `json:"event"` // always "click"
MessageID int32 `json:"message_id"`
TriggerID string `json:"trigger_id"`
Data string `json:"data"`
UserID int32 `json:"user_id"`
ChatID int32 `json:"chat_id"`
WebhookTimestamp int32 `json:"webhook_timestamp"`
}
type Chat ¶
type Chat struct {
ID int32 `json:"id"`
Name string `json:"name"`
CreatedAt time.Time `json:"created_at"`
OwnerID int32 `json:"owner_id"`
MemberIDs []int32 `json:"member_ids"`
GroupTagIDs []int32 `json:"group_tag_ids"`
Channel bool `json:"channel"`
Personal bool `json:"personal"`
Public bool `json:"public"`
LastMessageAt time.Time `json:"last_message_at"`
MeetRoomURL string `json:"meet_room_url"`
}
type ChatAvailability ¶
type ChatAvailability string
const ( ChatAvailabilityIsMember ChatAvailability = "is_member" // Чаты, где пользователь является участником ChatAvailabilityPublic ChatAvailability = "public" // Все открытые чаты компании, вне зависимости от участия в них пользователя )
type ChatCreateRequest ¶
type ChatCreateRequest struct {
Chat ChatCreateRequestChat `json:"chat"`
}
type ChatCreateRequestChat ¶ added in v1.0.1
type ChatCreateRequestChat struct {
Name string `json:"name"`
MemberIDs []int32 `json:"member_ids,omitempty"`
GroupTagIDs []int32 `json:"group_tag_ids,omitempty"`
Channel *bool `json:"channel,omitempty"`
Public *bool `json:"public,omitempty"`
}
func (ChatCreateRequestChat) MarshalJSON ¶ added in v1.0.20
func (m ChatCreateRequestChat) MarshalJSON() ([]byte, error)
type ChatMemberRole ¶
type ChatMemberRole string
const ( ChatMemberRoleAdmin ChatMemberRole = "admin" // Админ ChatMemberRoleEditor ChatMemberRole = "editor" // Редактор (доступно только для каналов) ChatMemberRoleMember ChatMemberRole = "member" // Участник или подписчик )
type ChatMemberRoleFilter ¶
type ChatMemberRoleFilter string
const ( ChatMemberRoleFilterAll ChatMemberRoleFilter = "all" // Любая роль ChatMemberRoleFilterOwner ChatMemberRoleFilter = "owner" // Создатель ChatMemberRoleFilterAdmin ChatMemberRoleFilter = "admin" // Админ ChatMemberRoleFilterEditor ChatMemberRoleFilter = "editor" // Редактор ChatMemberRoleFilterMember ChatMemberRoleFilter = "member" // Участник/подписчик )
type ChatMemberWebhookPayload ¶
type ChatMemberWebhookPayload struct {
Type string `json:"type"` // always "chat_member"
Event MemberEventType `json:"event"`
ChatID int32 `json:"chat_id"`
UserIDs []int32 `json:"user_ids"`
CreatedAt time.Time `json:"created_at"`
WebhookTimestamp int32 `json:"webhook_timestamp"`
ThreadID *int32 `json:"thread_id"`
}
type ChatSortField ¶ added in v1.0.12
type ChatSortField string
const ( ChatSortFieldID ChatSortField = "id" // По идентификатору чата ChatSortFieldLastMessageAt ChatSortField = "last_message_at" // По дате и времени создания последнего сообщения )
type ChatSubtype ¶ added in v1.0.1
type ChatSubtype string
const ( ChatSubtypeDiscussion ChatSubtype = "discussion" // Канал или беседа ChatSubtypeThread ChatSubtype = "thread" // Тред )
type ChatUpdateRequest ¶
type ChatUpdateRequest struct {
Chat ChatUpdateRequestChat `json:"chat"`
}
type ChatUpdateRequestChat ¶ added in v1.0.1
type ChatsService ¶ added in v1.0.1
type ChatsService interface {
ListChats(ctx context.Context, params *ListChatsParams) (*ListChatsResponse, error)
ListChatsAll(ctx context.Context, params *ListChatsParams) ([]Chat, error)
GetChat(ctx context.Context, id int32) (*Chat, error)
DownloadExport(ctx context.Context, id int32) (string, error)
CreateChat(ctx context.Context, request ChatCreateRequest) (*Chat, error)
RequestExport(ctx context.Context, request ExportRequest) error
UpdateChat(ctx context.Context, id int32, request ChatUpdateRequest) (*Chat, error)
ArchiveChat(ctx context.Context, id int32) error
UnarchiveChat(ctx context.Context, id int32) error
}
type ChatsServiceImpl ¶ added in v1.0.13
type ChatsServiceImpl struct {
// contains filtered or unexported fields
}
func (*ChatsServiceImpl) ArchiveChat ¶ added in v1.0.13
func (s *ChatsServiceImpl) ArchiveChat(ctx context.Context, id int32) error
func (*ChatsServiceImpl) CreateChat ¶ added in v1.0.13
func (s *ChatsServiceImpl) CreateChat(ctx context.Context, request ChatCreateRequest) (*Chat, error)
func (*ChatsServiceImpl) DownloadExport ¶ added in v1.0.25
func (*ChatsServiceImpl) ListChats ¶ added in v1.0.13
func (s *ChatsServiceImpl) ListChats(ctx context.Context, params *ListChatsParams) (*ListChatsResponse, error)
func (*ChatsServiceImpl) ListChatsAll ¶ added in v1.0.13
func (s *ChatsServiceImpl) ListChatsAll(ctx context.Context, params *ListChatsParams) ([]Chat, error)
func (*ChatsServiceImpl) RequestExport ¶ added in v1.0.25
func (s *ChatsServiceImpl) RequestExport(ctx context.Context, request ExportRequest) error
func (*ChatsServiceImpl) UnarchiveChat ¶ added in v1.0.13
func (s *ChatsServiceImpl) UnarchiveChat(ctx context.Context, id int32) error
func (*ChatsServiceImpl) UpdateChat ¶ added in v1.0.13
func (s *ChatsServiceImpl) UpdateChat(ctx context.Context, id int32, request ChatUpdateRequest) (*Chat, error)
type ChatsServiceStub ¶ added in v1.0.13
type ChatsServiceStub struct{}
func (*ChatsServiceStub) ArchiveChat ¶ added in v1.0.13
func (s *ChatsServiceStub) ArchiveChat(ctx context.Context, id int32) error
func (*ChatsServiceStub) CreateChat ¶ added in v1.0.13
func (s *ChatsServiceStub) CreateChat(ctx context.Context, request ChatCreateRequest) (*Chat, error)
func (*ChatsServiceStub) DownloadExport ¶ added in v1.0.25
func (*ChatsServiceStub) ListChats ¶ added in v1.0.13
func (s *ChatsServiceStub) ListChats(ctx context.Context, params *ListChatsParams) (*ListChatsResponse, error)
func (*ChatsServiceStub) ListChatsAll ¶ added in v1.0.13
func (s *ChatsServiceStub) ListChatsAll(ctx context.Context, params *ListChatsParams) ([]Chat, error)
func (*ChatsServiceStub) RequestExport ¶ added in v1.0.25
func (s *ChatsServiceStub) RequestExport(ctx context.Context, request ExportRequest) error
func (*ChatsServiceStub) UnarchiveChat ¶ added in v1.0.13
func (s *ChatsServiceStub) UnarchiveChat(ctx context.Context, id int32) error
func (*ChatsServiceStub) UpdateChat ¶ added in v1.0.13
func (s *ChatsServiceStub) UpdateChat(ctx context.Context, id int32, request ChatUpdateRequest) (*Chat, error)
type ClientOption ¶
type ClientOption func(*clientConfig)
func WithBaseURL ¶
func WithBaseURL(baseURL string) ClientOption
func WithBots ¶ added in v1.0.13
func WithBots(service BotsService) ClientOption
func WithChats ¶ added in v1.0.13
func WithChats(service ChatsService) ClientOption
func WithCommon ¶ added in v1.0.13
func WithCommon(service CommonService) ClientOption
func WithCustomProperties ¶ added in v1.0.25
func WithCustomProperties(service CustomPropertiesService) ClientOption
func WithFiles ¶ added in v1.0.25
func WithFiles(service FilesService) ClientOption
func WithGroupTags ¶ added in v1.0.13
func WithGroupTags(service GroupTagsService) ClientOption
func WithLinkPreviews ¶ added in v1.0.13
func WithLinkPreviews(service LinkPreviewsService) ClientOption
func WithMembers ¶ added in v1.0.13
func WithMembers(service MembersService) ClientOption
func WithMessages ¶ added in v1.0.13
func WithMessages(service MessagesService) ClientOption
func WithOauth ¶ added in v1.0.25
func WithOauth(service OAuthService) ClientOption
func WithProfile ¶ added in v1.0.13
func WithProfile(service ProfileService) ClientOption
func WithReactions ¶ added in v1.0.13
func WithReactions(service ReactionsService) ClientOption
func WithReadMembers ¶ added in v1.0.13
func WithReadMembers(service ReadMembersService) ClientOption
func WithSearch ¶ added in v1.0.13
func WithSearch(service SearchService) ClientOption
func WithSecurity ¶ added in v1.0.13
func WithSecurity(service SecurityService) ClientOption
func WithTasks ¶ added in v1.0.13
func WithTasks(service TasksService) ClientOption
func WithThreads ¶ added in v1.0.13
func WithThreads(service ThreadsService) ClientOption
func WithUsers ¶ added in v1.0.13
func WithUsers(service UsersService) ClientOption
func WithViews ¶ added in v1.0.13
func WithViews(service ViewsService) ClientOption
type CommonService
deprecated
added in
v1.0.1
type CommonService interface {
GetUploadParams(ctx context.Context) (*UploadParams, error)
UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
RequestExport(ctx context.Context, request ExportRequest) error
DownloadExport(ctx context.Context, id int32) (string, error)
}
Deprecated: CommonService is kept for backward compatibility — use the new service(s).
type CommonServiceImpl ¶ added in v1.0.13
type CommonServiceImpl struct {
// contains filtered or unexported fields
}
func (*CommonServiceImpl) DownloadExport ¶ added in v1.0.13
func (*CommonServiceImpl) GetUploadParams ¶ added in v1.0.13
func (s *CommonServiceImpl) GetUploadParams(ctx context.Context) (*UploadParams, error)
func (*CommonServiceImpl) ListProperties ¶ added in v1.0.13
func (s *CommonServiceImpl) ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
func (*CommonServiceImpl) RequestExport ¶ added in v1.0.13
func (s *CommonServiceImpl) RequestExport(ctx context.Context, request ExportRequest) error
func (*CommonServiceImpl) UploadFile ¶ added in v1.0.13
func (s *CommonServiceImpl) UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
type CommonServiceStub ¶ added in v1.0.13
type CommonServiceStub struct{}
func (*CommonServiceStub) DownloadExport ¶ added in v1.0.13
func (*CommonServiceStub) GetUploadParams ¶ added in v1.0.13
func (s *CommonServiceStub) GetUploadParams(ctx context.Context) (*UploadParams, error)
func (*CommonServiceStub) ListProperties ¶ added in v1.0.13
func (s *CommonServiceStub) ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
func (*CommonServiceStub) RequestExport ¶ added in v1.0.13
func (s *CommonServiceStub) RequestExport(ctx context.Context, request ExportRequest) error
func (*CommonServiceStub) UploadFile ¶ added in v1.0.13
func (s *CommonServiceStub) UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
type CustomPropertiesService ¶ added in v1.0.25
type CustomPropertiesService interface {
ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
}
type CustomPropertiesServiceImpl ¶ added in v1.0.25
type CustomPropertiesServiceImpl struct {
// contains filtered or unexported fields
}
func (*CustomPropertiesServiceImpl) ListProperties ¶ added in v1.0.25
func (s *CustomPropertiesServiceImpl) ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
type CustomPropertiesServiceStub ¶ added in v1.0.25
type CustomPropertiesServiceStub struct{}
func (*CustomPropertiesServiceStub) ListProperties ¶ added in v1.0.25
func (s *CustomPropertiesServiceStub) ListProperties(ctx context.Context, params ListPropertiesParams) (*ListPropertiesResponse, error)
type CustomProperty ¶
type CustomProperty struct {
ID int32 `json:"id"`
Name string `json:"name"`
DataType CustomPropertyDataType `json:"data_type"`
Value string `json:"value"`
}
type CustomPropertyDataType ¶
type CustomPropertyDataType string
const ( CustomPropertyDataTypeString CustomPropertyDataType = "string" // Строковое значение CustomPropertyDataTypeNumber CustomPropertyDataType = "number" // Числовое значение CustomPropertyDataTypeDate CustomPropertyDataType = "date" // Дата CustomPropertyDataTypeLink CustomPropertyDataType = "link" // Ссылка )
type CustomPropertyDefinition ¶
type CustomPropertyDefinition struct {
ID int32 `json:"id"`
Name string `json:"name"`
DataType CustomPropertyDataType `json:"data_type"`
}
type ExportRequest ¶
type ExportRequest struct {
StartAt string `json:"start_at"`
EndAt string `json:"end_at"`
WebhookURL string `json:"webhook_url"`
ChatIDs []int32 `json:"chat_ids,omitempty"`
SkipChatsFile *bool `json:"skip_chats_file,omitempty"`
}
func (ExportRequest) MarshalJSON ¶ added in v1.0.20
func (m ExportRequest) MarshalJSON() ([]byte, error)
type FileUploadRequest ¶
type FileUploadRequest struct {
ContentDisposition string `json:"Content-Disposition"`
ACL string `json:"acl"`
Policy string `json:"policy"`
XAMZCredential string `json:"x-amz-credential"`
XAMZAlgorithm string `json:"x-amz-algorithm"`
XAMZDate string `json:"x-amz-date"`
XAMZSignature string `json:"x-amz-signature"`
Key string `json:"key"`
File io.Reader `json:"file"`
}
type FilesService ¶ added in v1.0.25
type FilesService interface {
UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
GetUploadParams(ctx context.Context) (*UploadParams, error)
}
type FilesServiceImpl ¶ added in v1.0.25
type FilesServiceImpl struct {
// contains filtered or unexported fields
}
func (*FilesServiceImpl) GetUploadParams ¶ added in v1.0.25
func (s *FilesServiceImpl) GetUploadParams(ctx context.Context) (*UploadParams, error)
func (*FilesServiceImpl) UploadFile ¶ added in v1.0.25
func (s *FilesServiceImpl) UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
type FilesServiceStub ¶ added in v1.0.25
type FilesServiceStub struct{}
func (*FilesServiceStub) GetUploadParams ¶ added in v1.0.25
func (s *FilesServiceStub) GetUploadParams(ctx context.Context) (*UploadParams, error)
func (*FilesServiceStub) UploadFile ¶ added in v1.0.25
func (s *FilesServiceStub) UploadFile(ctx context.Context, directUrl string, request FileUploadRequest) error
type Forwarding ¶
type Forwarding struct {
OriginalMessageID int32 `json:"original_message_id"`
OriginalChatID int32 `json:"original_chat_id"`
AuthorID int32 `json:"author_id"`
OriginalCreatedAt time.Time `json:"original_created_at"`
OriginalThreadID *int32 `json:"original_thread_id"`
OriginalThreadMessageID *int32 `json:"original_thread_message_id"`
OriginalThreadParentChatID *int32 `json:"original_thread_parent_chat_id"`
}
type GetAuditEventsParams ¶ added in v1.0.1
type GetAuditEventsResponse ¶ added in v1.0.1
type GetAuditEventsResponse struct {
Data []AuditEvent `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type GetTagUsersParams ¶ added in v1.0.1
type GetTagUsersResponse ¶ added in v1.0.1
type GetTagUsersResponse struct {
Data []User `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type GetWebhookEventsParams ¶ added in v1.0.1
type GetWebhookEventsResponse ¶ added in v1.0.1
type GetWebhookEventsResponse struct {
Data []WebhookEvent `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type GroupTagRequest ¶
type GroupTagRequest struct {
GroupTag GroupTagRequestGroupTag `json:"group_tag"`
}
type GroupTagRequestGroupTag ¶ added in v1.0.1
type GroupTagRequestGroupTag struct {
Name string `json:"name"`
}
type GroupTagsService ¶ added in v1.0.1
type GroupTagsService interface {
ListTags(ctx context.Context, params *ListTagsParams) (*ListTagsResponse, error)
ListTagsAll(ctx context.Context, params *ListTagsParams) ([]GroupTag, error)
GetTag(ctx context.Context, id int32) (*GroupTag, error)
GetTagUsers(ctx context.Context, id int32, params *GetTagUsersParams) (*GetTagUsersResponse, error)
GetTagUsersAll(ctx context.Context, id int32, params *GetTagUsersParams) ([]User, error)
CreateTag(ctx context.Context, request GroupTagRequest) (*GroupTag, error)
UpdateTag(ctx context.Context, id int32, request GroupTagRequest) (*GroupTag, error)
DeleteTag(ctx context.Context, id int32) error
}
type GroupTagsServiceImpl ¶ added in v1.0.13
type GroupTagsServiceImpl struct {
// contains filtered or unexported fields
}
func (*GroupTagsServiceImpl) CreateTag ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) CreateTag(ctx context.Context, request GroupTagRequest) (*GroupTag, error)
func (*GroupTagsServiceImpl) DeleteTag ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) DeleteTag(ctx context.Context, id int32) error
func (*GroupTagsServiceImpl) GetTagUsers ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) GetTagUsers(ctx context.Context, id int32, params *GetTagUsersParams) (*GetTagUsersResponse, error)
func (*GroupTagsServiceImpl) GetTagUsersAll ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) GetTagUsersAll(ctx context.Context, id int32, params *GetTagUsersParams) ([]User, error)
func (*GroupTagsServiceImpl) ListTags ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) ListTags(ctx context.Context, params *ListTagsParams) (*ListTagsResponse, error)
func (*GroupTagsServiceImpl) ListTagsAll ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) ListTagsAll(ctx context.Context, params *ListTagsParams) ([]GroupTag, error)
func (*GroupTagsServiceImpl) UpdateTag ¶ added in v1.0.13
func (s *GroupTagsServiceImpl) UpdateTag(ctx context.Context, id int32, request GroupTagRequest) (*GroupTag, error)
type GroupTagsServiceStub ¶ added in v1.0.13
type GroupTagsServiceStub struct{}
func (*GroupTagsServiceStub) CreateTag ¶ added in v1.0.13
func (s *GroupTagsServiceStub) CreateTag(ctx context.Context, request GroupTagRequest) (*GroupTag, error)
func (*GroupTagsServiceStub) DeleteTag ¶ added in v1.0.13
func (s *GroupTagsServiceStub) DeleteTag(ctx context.Context, id int32) error
func (*GroupTagsServiceStub) GetTagUsers ¶ added in v1.0.13
func (s *GroupTagsServiceStub) GetTagUsers(ctx context.Context, id int32, params *GetTagUsersParams) (*GetTagUsersResponse, error)
func (*GroupTagsServiceStub) GetTagUsersAll ¶ added in v1.0.13
func (s *GroupTagsServiceStub) GetTagUsersAll(ctx context.Context, id int32, params *GetTagUsersParams) ([]User, error)
func (*GroupTagsServiceStub) ListTags ¶ added in v1.0.13
func (s *GroupTagsServiceStub) ListTags(ctx context.Context, params *ListTagsParams) (*ListTagsResponse, error)
func (*GroupTagsServiceStub) ListTagsAll ¶ added in v1.0.13
func (s *GroupTagsServiceStub) ListTagsAll(ctx context.Context, params *ListTagsParams) ([]GroupTag, error)
func (*GroupTagsServiceStub) UpdateTag ¶ added in v1.0.13
func (s *GroupTagsServiceStub) UpdateTag(ctx context.Context, id int32, request GroupTagRequest) (*GroupTag, error)
type InviteStatus ¶
type InviteStatus string
const ( InviteStatusConfirmed InviteStatus = "confirmed" // Принято InviteStatusSent InviteStatus = "sent" // Отправлено )
type LinkPreview ¶
type LinkPreview struct {
Title string `json:"title"`
Description string `json:"description"`
ImageURL *string `json:"image_url,omitempty"`
Image *LinkPreviewImage `json:"image,omitempty"`
}
type LinkPreviewImage ¶ added in v1.0.1
type LinkPreviewsRequest ¶
type LinkPreviewsRequest struct {
LinkPreviews map[string]LinkPreview `json:"link_previews"`
}
type LinkPreviewsService
deprecated
added in
v1.0.1
type LinkPreviewsService interface {
CreateLinkPreviews(ctx context.Context, id int32, request LinkPreviewsRequest) error
}
Deprecated: LinkPreviewsService is kept for backward compatibility — use the new service(s).
type LinkPreviewsServiceImpl ¶ added in v1.0.13
type LinkPreviewsServiceImpl struct {
// contains filtered or unexported fields
}
func (*LinkPreviewsServiceImpl) CreateLinkPreviews ¶ added in v1.0.13
func (s *LinkPreviewsServiceImpl) CreateLinkPreviews(ctx context.Context, id int32, request LinkPreviewsRequest) error
type LinkPreviewsServiceStub ¶ added in v1.0.13
type LinkPreviewsServiceStub struct{}
func (*LinkPreviewsServiceStub) CreateLinkPreviews ¶ added in v1.0.13
func (s *LinkPreviewsServiceStub) CreateLinkPreviews(ctx context.Context, id int32, request LinkPreviewsRequest) error
type LinkSharedWebhookPayload ¶
type LinkSharedWebhookPayload struct {
}
type ListBotsParams ¶ added in v1.0.26
type ListBotsResponse ¶ added in v1.0.26
type ListBotsResponse struct {
Data []BotResponse `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListChatMessagesParams ¶ added in v1.0.1
type ListChatMessagesParams struct {
ChatID int32
Sort *MessageSortField
Order *SortOrder
Limit *int32
Cursor *string
}
type ListChatMessagesResponse ¶ added in v1.0.1
type ListChatMessagesResponse struct {
Data []Message `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListChatsParams ¶ added in v1.0.1
type ListChatsParams struct {
Sort *ChatSortField
Order *SortOrder
Availability *ChatAvailability
LastMessageAtAfter *time.Time
LastMessageAtBefore *time.Time
Personal *bool
Limit *int32
Cursor *string
}
type ListChatsResponse ¶ added in v1.0.1
type ListChatsResponse struct {
Data []Chat `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListMembersParams ¶ added in v1.0.1
type ListMembersParams struct {
Role *ChatMemberRoleFilter
Limit *int32
Cursor *string
}
type ListMembersResponse ¶ added in v1.0.1
type ListMembersResponse struct {
Data []User `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListPropertiesParams ¶ added in v1.0.1
type ListPropertiesParams struct {
EntityType SearchEntityType
}
type ListPropertiesResponse ¶ added in v1.0.1
type ListPropertiesResponse struct {
Data []CustomPropertyDefinition `json:"data"`
}
type ListReactionsParams ¶ added in v1.0.1
type ListReactionsResponse ¶ added in v1.0.1
type ListReactionsResponse struct {
Data []Reaction `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListReadMembersParams ¶ added in v1.0.1
type ListTagsParams ¶ added in v1.0.1
type ListTagsResponse ¶ added in v1.0.1
type ListTagsResponse struct {
Data []GroupTag `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListTasksParams ¶ added in v1.0.1
type ListTasksResponse ¶ added in v1.0.1
type ListTasksResponse struct {
Data []Task `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListThreadsParams ¶ added in v1.0.19
type ListThreadsResponse ¶ added in v1.0.19
type ListThreadsResponse struct {
Data []Thread `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type ListUsersParams ¶ added in v1.0.1
type ListUsersResponse ¶ added in v1.0.1
type ListUsersResponse struct {
Data []User `json:"data"`
Meta PaginationMeta `json:"meta"`
}
type MemberEventType ¶
type MemberEventType string
const ( MemberEventTypeAdd MemberEventType = "add" // Добавление MemberEventTypeRemove MemberEventType = "remove" // Удаление )
type MembersService ¶ added in v1.0.1
type MembersService interface {
ListMembers(ctx context.Context, id int32, params *ListMembersParams) (*ListMembersResponse, error)
ListMembersAll(ctx context.Context, id int32, params *ListMembersParams) ([]User, error)
AddTags(ctx context.Context, id int32, groupTagIds []int32) error
AddMembers(ctx context.Context, id int32, request AddMembersRequest) error
UpdateMemberRole(ctx context.Context, id int32, userId int32, role ChatMemberRole) error
RemoveTag(ctx context.Context, id int32, tagId int32) error
LeaveChat(ctx context.Context, id int32) error
RemoveMember(ctx context.Context, id int32, userId int32) error
}
type MembersServiceImpl ¶ added in v1.0.13
type MembersServiceImpl struct {
// contains filtered or unexported fields
}
func (*MembersServiceImpl) AddMembers ¶ added in v1.0.13
func (s *MembersServiceImpl) AddMembers(ctx context.Context, id int32, request AddMembersRequest) error
func (*MembersServiceImpl) LeaveChat ¶ added in v1.0.13
func (s *MembersServiceImpl) LeaveChat(ctx context.Context, id int32) error
func (*MembersServiceImpl) ListMembers ¶ added in v1.0.13
func (s *MembersServiceImpl) ListMembers(ctx context.Context, id int32, params *ListMembersParams) (*ListMembersResponse, error)
func (*MembersServiceImpl) ListMembersAll ¶ added in v1.0.13
func (s *MembersServiceImpl) ListMembersAll(ctx context.Context, id int32, params *ListMembersParams) ([]User, error)
func (*MembersServiceImpl) RemoveMember ¶ added in v1.0.13
func (*MembersServiceImpl) UpdateMemberRole ¶ added in v1.0.13
func (s *MembersServiceImpl) UpdateMemberRole(ctx context.Context, id int32, userId int32, role ChatMemberRole) error
type MembersServiceStub ¶ added in v1.0.13
type MembersServiceStub struct{}
func (*MembersServiceStub) AddMembers ¶ added in v1.0.13
func (s *MembersServiceStub) AddMembers(ctx context.Context, id int32, request AddMembersRequest) error
func (*MembersServiceStub) LeaveChat ¶ added in v1.0.13
func (s *MembersServiceStub) LeaveChat(ctx context.Context, id int32) error
func (*MembersServiceStub) ListMembers ¶ added in v1.0.13
func (s *MembersServiceStub) ListMembers(ctx context.Context, id int32, params *ListMembersParams) (*ListMembersResponse, error)
func (*MembersServiceStub) ListMembersAll ¶ added in v1.0.13
func (s *MembersServiceStub) ListMembersAll(ctx context.Context, id int32, params *ListMembersParams) ([]User, error)
func (*MembersServiceStub) RemoveMember ¶ added in v1.0.13
func (*MembersServiceStub) UpdateMemberRole ¶ added in v1.0.13
func (s *MembersServiceStub) UpdateMemberRole(ctx context.Context, id int32, userId int32, role ChatMemberRole) error
type Message ¶
type Message struct {
ID int32 `json:"id"`
EntityType MessageEntityType `json:"entity_type"`
EntityID int32 `json:"entity_id"`
ChatID int32 `json:"chat_id"`
RootChatID int32 `json:"root_chat_id"`
Content string `json:"content"`
UserID int32 `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
URL string `json:"url"`
Files []File `json:"files"`
VoiceContent *VoiceContent `json:"voice_content"`
Buttons [][]Button `json:"buttons"`
Thread *MessageThread `json:"thread"`
Forwarding *Forwarding `json:"forwarding"`
ParentMessageID *int32 `json:"parent_message_id"`
DisplayAvatarURL *string `json:"display_avatar_url"`
DisplayName *string `json:"display_name"`
ChangedAt *string `json:"changed_at"`
DeletedAt *string `json:"deleted_at"`
}
type MessageCreateRequest ¶
type MessageCreateRequest struct {
Message MessageCreateRequestMessage `json:"message"`
LinkPreview *bool `json:"link_preview,omitempty"`
}
type MessageCreateRequestFile ¶ added in v1.0.1
type MessageCreateRequestFile struct {
Key string `json:"key"`
Name string `json:"name"`
FileType FileType `json:"file_type"`
Size int32 `json:"size"`
Width *int32 `json:"width,omitempty"`
Height *int32 `json:"height,omitempty"`
DurationMs *int32 `json:"duration_ms,omitempty"`
Waveform *string `json:"waveform,omitempty"`
}
type MessageCreateRequestMessage ¶ added in v1.0.1
type MessageCreateRequestMessage struct {
EntityID int32 `json:"entity_id"`
Content string `json:"content"`
EntityType *MessageEntityType `json:"entity_type,omitempty"`
Files []MessageCreateRequestFile `json:"files,omitempty"`
Buttons [][]Button `json:"buttons,omitempty"`
ParentMessageID *int32 `json:"parent_message_id,omitempty"`
DisplayAvatarURL *string `json:"display_avatar_url,omitempty"`
DisplayName *string `json:"display_name,omitempty"`
SkipInviteMentions *bool `json:"skip_invite_mentions,omitempty"`
}
func (MessageCreateRequestMessage) MarshalJSON ¶ added in v1.0.20
func (m MessageCreateRequestMessage) MarshalJSON() ([]byte, error)
type MessageEntityType ¶
type MessageEntityType string
const ( MessageEntityTypeDiscussion MessageEntityType = "discussion" // Беседа или канал MessageEntityTypeThread MessageEntityType = "thread" // Тред MessageEntityTypeUser MessageEntityType = "user" // Пользователь )
type MessageSearchSort ¶ added in v1.0.24
type MessageSearchSort string
const ( MessageSearchSortCreatedAt MessageSearchSort = "created_at" // По дате создания (хронология) MessageSearchSortRelevance MessageSearchSort = "relevance" // По релевантности )
type MessageSortField ¶ added in v1.0.12
type MessageSortField string
const (
MessageSortFieldID MessageSortField = "id" // По идентификатору сообщения
)
type MessageThread ¶ added in v1.0.2
type MessageUpdateRequest ¶
type MessageUpdateRequest struct {
Message MessageUpdateRequestMessage `json:"message"`
}
type MessageUpdateRequestFile ¶ added in v1.0.1
type MessageUpdateRequestFile struct {
Key string `json:"key"`
Name string `json:"name"`
FileType *FileType `json:"file_type,omitempty"`
Size *int32 `json:"size,omitempty"`
Width *int32 `json:"width,omitempty"`
Height *int32 `json:"height,omitempty"`
DurationMs *int32 `json:"duration_ms,omitempty"`
Waveform *string `json:"waveform,omitempty"`
}
type MessageUpdateRequestMessage ¶ added in v1.0.1
type MessageUpdateRequestMessage struct {
Content *string `json:"content,omitempty"`
Files []MessageUpdateRequestFile `json:"files,omitempty"`
Buttons [][]Button `json:"buttons,omitempty"`
DisplayAvatarURL *string `json:"display_avatar_url,omitempty"`
DisplayName *string `json:"display_name,omitempty"`
}
func (MessageUpdateRequestMessage) MarshalJSON ¶ added in v1.0.20
func (m MessageUpdateRequestMessage) MarshalJSON() ([]byte, error)
type MessageWebhookPayload ¶
type MessageWebhookPayload struct {
Type string `json:"type"` // always "message"
ID int32 `json:"id"`
Event WebhookEventType `json:"event"`
EntityType MessageEntityType `json:"entity_type"`
EntityID int32 `json:"entity_id"`
Content string `json:"content"`
UserID int32 `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
URL string `json:"url"`
ChatID int32 `json:"chat_id"`
WebhookTimestamp int32 `json:"webhook_timestamp"`
ParentMessageID *int32 `json:"parent_message_id"`
Thread *WebhookMessageThread `json:"thread"`
}
type MessagesService ¶ added in v1.0.1
type MessagesService interface {
ListChatMessages(ctx context.Context, params ListChatMessagesParams) (*ListChatMessagesResponse, error)
ListChatMessagesAll(ctx context.Context, params *ListChatMessagesParams) ([]Message, error)
GetMessage(ctx context.Context, id int32) (*Message, error)
CreateMessage(ctx context.Context, request MessageCreateRequest) (*Message, error)
Unfurl(ctx context.Context, id int32, request LinkPreviewsRequest) error
PinMessage(ctx context.Context, id int32) error
UpdateMessage(ctx context.Context, id int32, request MessageUpdateRequest) (*Message, error)
DeleteMessage(ctx context.Context, id int32) error
UnpinMessage(ctx context.Context, id int32) error
}
type MessagesServiceImpl ¶ added in v1.0.13
type MessagesServiceImpl struct {
// contains filtered or unexported fields
}
func (*MessagesServiceImpl) CreateMessage ¶ added in v1.0.13
func (s *MessagesServiceImpl) CreateMessage(ctx context.Context, request MessageCreateRequest) (*Message, error)
func (*MessagesServiceImpl) DeleteMessage ¶ added in v1.0.13
func (s *MessagesServiceImpl) DeleteMessage(ctx context.Context, id int32) error
func (*MessagesServiceImpl) GetMessage ¶ added in v1.0.13
func (*MessagesServiceImpl) ListChatMessages ¶ added in v1.0.13
func (s *MessagesServiceImpl) ListChatMessages(ctx context.Context, params ListChatMessagesParams) (*ListChatMessagesResponse, error)
func (*MessagesServiceImpl) ListChatMessagesAll ¶ added in v1.0.13
func (s *MessagesServiceImpl) ListChatMessagesAll(ctx context.Context, params *ListChatMessagesParams) ([]Message, error)
func (*MessagesServiceImpl) PinMessage ¶ added in v1.0.13
func (s *MessagesServiceImpl) PinMessage(ctx context.Context, id int32) error
func (*MessagesServiceImpl) Unfurl ¶ added in v1.0.25
func (s *MessagesServiceImpl) Unfurl(ctx context.Context, id int32, request LinkPreviewsRequest) error
func (*MessagesServiceImpl) UnpinMessage ¶ added in v1.0.13
func (s *MessagesServiceImpl) UnpinMessage(ctx context.Context, id int32) error
func (*MessagesServiceImpl) UpdateMessage ¶ added in v1.0.13
func (s *MessagesServiceImpl) UpdateMessage(ctx context.Context, id int32, request MessageUpdateRequest) (*Message, error)
type MessagesServiceStub ¶ added in v1.0.13
type MessagesServiceStub struct{}
func (*MessagesServiceStub) CreateMessage ¶ added in v1.0.13
func (s *MessagesServiceStub) CreateMessage(ctx context.Context, request MessageCreateRequest) (*Message, error)
func (*MessagesServiceStub) DeleteMessage ¶ added in v1.0.13
func (s *MessagesServiceStub) DeleteMessage(ctx context.Context, id int32) error
func (*MessagesServiceStub) GetMessage ¶ added in v1.0.13
func (*MessagesServiceStub) ListChatMessages ¶ added in v1.0.13
func (s *MessagesServiceStub) ListChatMessages(ctx context.Context, params ListChatMessagesParams) (*ListChatMessagesResponse, error)
func (*MessagesServiceStub) ListChatMessagesAll ¶ added in v1.0.13
func (s *MessagesServiceStub) ListChatMessagesAll(ctx context.Context, params *ListChatMessagesParams) ([]Message, error)
func (*MessagesServiceStub) PinMessage ¶ added in v1.0.13
func (s *MessagesServiceStub) PinMessage(ctx context.Context, id int32) error
func (*MessagesServiceStub) Unfurl ¶ added in v1.0.25
func (s *MessagesServiceStub) Unfurl(ctx context.Context, id int32, request LinkPreviewsRequest) error
func (*MessagesServiceStub) UnpinMessage ¶ added in v1.0.13
func (s *MessagesServiceStub) UnpinMessage(ctx context.Context, id int32) error
func (*MessagesServiceStub) UpdateMessage ¶ added in v1.0.13
func (s *MessagesServiceStub) UpdateMessage(ctx context.Context, id int32, request MessageUpdateRequest) (*Message, error)
type NotImplementedError ¶ added in v1.0.13
type NotImplementedError struct {
Method string
}
NotImplementedError is returned by stub methods that have not been implemented.
func (NotImplementedError) Error ¶ added in v1.0.13
func (e NotImplementedError) Error() string
type OAuthError ¶
type OAuthError struct {
Err string `json:"error"`
ErrorDescription string `json:"error_description"`
}
func (*OAuthError) Error ¶
func (e *OAuthError) Error() string
type OAuthScope ¶
type OAuthScope string
const ( OAuthScopeChatsRead OAuthScope = "chats:read" // Просмотр чатов и списка чатов OAuthScopeChatsCreate OAuthScope = "chats:create" // Создание новых чатов OAuthScopeChatsUpdate OAuthScope = "chats:update" // Изменение настроек чата OAuthScopeChatsArchive OAuthScope = "chats:archive" // Архивация и разархивация чатов OAuthScopeChatsLeave OAuthScope = "chats:leave" // Выход из чатов OAuthScopeChatMembersRead OAuthScope = "chat_members:read" // Просмотр участников чата OAuthScopeChatMembersWrite OAuthScope = "chat_members:write" // Добавление, изменение и удаление участников чата OAuthScopeChatExportsRead OAuthScope = "chat_exports:read" // Скачивание экспортов чата OAuthScopeChatExportsWrite OAuthScope = "chat_exports:write" // Создание экспортов чата OAuthScopeMessagesRead OAuthScope = "messages:read" // Просмотр сообщений в чатах OAuthScopeMessagesCreate OAuthScope = "messages:create" // Отправка сообщений OAuthScopeMessagesUpdate OAuthScope = "messages:update" // Редактирование сообщений OAuthScopeMessagesDelete OAuthScope = "messages:delete" // Удаление сообщений OAuthScopeReactionsRead OAuthScope = "reactions:read" // Просмотр реакций на сообщения OAuthScopeReactionsWrite OAuthScope = "reactions:write" // Добавление и удаление реакций OAuthScopePinsWrite OAuthScope = "pins:write" // Закрепление и открепление сообщений OAuthScopeThreadsRead OAuthScope = "threads:read" // Просмотр тредов (комментариев) OAuthScopeThreadsCreate OAuthScope = "threads:create" // Создание тредов (комментариев) OAuthScopeLinkPreviewsWrite OAuthScope = "link_previews:write" // Unfurl (разворачивание ссылок) OAuthScopeUsersRead OAuthScope = "users:read" // Просмотр информации о сотрудниках и списка сотрудников OAuthScopeUsersCreate OAuthScope = "users:create" // Создание новых сотрудников OAuthScopeUsersUpdate OAuthScope = "users:update" // Редактирование данных сотрудника OAuthScopeUsersDelete OAuthScope = "users:delete" // Удаление сотрудников OAuthScopeGroupTagsRead OAuthScope = "group_tags:read" // Просмотр тегов OAuthScopeGroupTagsWrite OAuthScope = "group_tags:write" // Создание, редактирование и удаление тегов OAuthScopeBotsRead OAuthScope = "bots:read" // Просмотр ботов OAuthScopeBotsWrite OAuthScope = "bots:write" // Управление ботами OAuthScopeBotSelfWebhookWrite OAuthScope = "bot_self:webhook:write" // Самостоятельное управление адресом вебхука бота OAuthScopeBotSelfWrite OAuthScope = "bot_self:write" // Самостоятельное управление настройками бота OAuthScopeProfileRead OAuthScope = "profile:read" // Просмотр информации о своем профиле OAuthScopeProfileStatusRead OAuthScope = "profile_status:read" // Просмотр статуса профиля OAuthScopeProfileStatusWrite OAuthScope = "profile_status:write" // Изменение и удаление статуса профиля OAuthScopeProfileAvatarWrite OAuthScope = "profile_avatar:write" // Изменение и удаление аватара профиля OAuthScopeUserStatusRead OAuthScope = "user_status:read" // Просмотр статуса сотрудника OAuthScopeUserStatusWrite OAuthScope = "user_status:write" // Изменение и удаление статуса сотрудника OAuthScopeUserAvatarWrite OAuthScope = "user_avatar:write" // Изменение и удаление аватара сотрудника OAuthScopeCustomPropertiesRead OAuthScope = "custom_properties:read" // Просмотр дополнительных полей OAuthScopeAuditEventsRead OAuthScope = "audit_events:read" // Просмотр журнала аудита OAuthScopeTasksRead OAuthScope = "tasks:read" // Просмотр задач OAuthScopeTasksCreate OAuthScope = "tasks:create" // Создание задач OAuthScopeTasksUpdate OAuthScope = "tasks:update" // Изменение задачи OAuthScopeTasksDelete OAuthScope = "tasks:delete" // Удаление задачи OAuthScopeFilesRead OAuthScope = "files:read" // Скачивание файлов OAuthScopeFilesWrite OAuthScope = "files:write" // Загрузка файлов OAuthScopeUploadsWrite OAuthScope = "uploads:write" // Получение данных для загрузки файлов OAuthScopeViewsWrite OAuthScope = "views:write" // Открытие форм (представлений) OAuthScopeWebhooksRead OAuthScope = "webhooks:read" // Просмотр вебхуков OAuthScopeWebhooksWrite OAuthScope = "webhooks:write" // Создание и управление вебхуками OAuthScopeWebhooksEventsRead OAuthScope = "webhooks:events:read" // Просмотр лога вебхуков OAuthScopeWebhooksEventsDelete OAuthScope = "webhooks:events:delete" // Удаление записи в логе вебхука OAuthScopeSearchUsers OAuthScope = "search:users" // Поиск сотрудников OAuthScopeSearchChats OAuthScope = "search:chats" // Поиск чатов OAuthScopeSearchMessages OAuthScope = "search:messages" // Поиск сообщений )
type OAuthService ¶ added in v1.0.25
type OAuthService interface {
GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
}
type OAuthServiceImpl ¶ added in v1.0.25
type OAuthServiceImpl struct {
// contains filtered or unexported fields
}
func (*OAuthServiceImpl) GetTokenInfo ¶ added in v1.0.25
func (s *OAuthServiceImpl) GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
type OAuthServiceStub ¶ added in v1.0.25
type OAuthServiceStub struct{}
func (*OAuthServiceStub) GetTokenInfo ¶ added in v1.0.25
func (s *OAuthServiceStub) GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
type OpenViewRequest ¶
type OpenViewRequest struct {
Type string `json:"type"` // always "modal"
TriggerID string `json:"trigger_id"`
View OpenViewRequestView `json:"view"`
PrivateMetadata *string `json:"private_metadata,omitempty"`
CallbackID *string `json:"callback_id,omitempty"`
}
type OpenViewRequestView ¶ added in v1.0.1
type OpenViewRequestView struct {
Title string `json:"title"`
Blocks []ViewBlockUnion `json:"blocks"`
CloseText *string `json:"close_text,omitempty"`
SubmitText *string `json:"submit_text,omitempty"`
}
type PachcaClient ¶ added in v1.0.1
type PachcaClient struct {
Bots BotsService
Chats ChatsService
Common CommonService
CustomProperties CustomPropertiesService
Files FilesService
GroupTags GroupTagsService
LinkPreviews LinkPreviewsService
Members MembersService
Messages MessagesService
Oauth OAuthService
Profile ProfileService
Reactions ReactionsService
ReadMembers ReadMembersService
Search SearchService
Security SecurityService
Tasks TasksService
Threads ThreadsService
Users UsersService
Views ViewsService
}
func NewPachcaClient ¶ added in v1.0.1
func NewPachcaClient(token string, opts ...ClientOption) *PachcaClient
func NewPachcaClientWithHTTP ¶ added in v1.0.13
func NewPachcaClientWithHTTP(baseURL string, client *http.Client, opts ...ClientOption) *PachcaClient
func NewStubPachcaClient ¶ added in v1.0.13
func NewStubPachcaClient(opts ...StubClientOption) *PachcaClient
type PaginationMeta ¶
type PaginationMeta struct {
Paginate PaginationMetaPaginate `json:"paginate"`
}
type PaginationMetaPaginate ¶ added in v1.0.1
type PollWebhookEventsOptions ¶ added in v1.0.21
type ProfileService ¶ added in v1.0.1
type ProfileService interface {
GetProfile(ctx context.Context) (*User, error)
GetStatus(ctx context.Context) (*any, error)
UpdateProfileAvatar(ctx context.Context, image io.Reader) (*AvatarData, error)
UpdateStatus(ctx context.Context, request StatusUpdateRequest) (*UserStatus, error)
DeleteProfileAvatar(ctx context.Context) error
DeleteStatus(ctx context.Context) error
GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
}
type ProfileServiceImpl ¶ added in v1.0.13
type ProfileServiceImpl struct {
// contains filtered or unexported fields
}
func (*ProfileServiceImpl) DeleteProfileAvatar ¶ added in v1.0.13
func (s *ProfileServiceImpl) DeleteProfileAvatar(ctx context.Context) error
func (*ProfileServiceImpl) DeleteStatus ¶ added in v1.0.13
func (s *ProfileServiceImpl) DeleteStatus(ctx context.Context) error
func (*ProfileServiceImpl) GetProfile ¶ added in v1.0.13
func (s *ProfileServiceImpl) GetProfile(ctx context.Context) (*User, error)
func (*ProfileServiceImpl) GetStatus ¶ added in v1.0.13
func (s *ProfileServiceImpl) GetStatus(ctx context.Context) (*any, error)
func (*ProfileServiceImpl) GetTokenInfo ¶ added in v1.0.13
func (s *ProfileServiceImpl) GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
func (*ProfileServiceImpl) UpdateProfileAvatar ¶ added in v1.0.13
func (s *ProfileServiceImpl) UpdateProfileAvatar(ctx context.Context, image io.Reader) (*AvatarData, error)
func (*ProfileServiceImpl) UpdateStatus ¶ added in v1.0.13
func (s *ProfileServiceImpl) UpdateStatus(ctx context.Context, request StatusUpdateRequest) (*UserStatus, error)
type ProfileServiceStub ¶ added in v1.0.13
type ProfileServiceStub struct{}
func (*ProfileServiceStub) DeleteProfileAvatar ¶ added in v1.0.13
func (s *ProfileServiceStub) DeleteProfileAvatar(ctx context.Context) error
func (*ProfileServiceStub) DeleteStatus ¶ added in v1.0.13
func (s *ProfileServiceStub) DeleteStatus(ctx context.Context) error
func (*ProfileServiceStub) GetProfile ¶ added in v1.0.13
func (s *ProfileServiceStub) GetProfile(ctx context.Context) (*User, error)
func (*ProfileServiceStub) GetStatus ¶ added in v1.0.13
func (s *ProfileServiceStub) GetStatus(ctx context.Context) (*any, error)
func (*ProfileServiceStub) GetTokenInfo ¶ added in v1.0.13
func (s *ProfileServiceStub) GetTokenInfo(ctx context.Context) (*AccessTokenInfo, error)
func (*ProfileServiceStub) UpdateProfileAvatar ¶ added in v1.0.13
func (s *ProfileServiceStub) UpdateProfileAvatar(ctx context.Context, image io.Reader) (*AvatarData, error)
func (*ProfileServiceStub) UpdateStatus ¶ added in v1.0.13
func (s *ProfileServiceStub) UpdateStatus(ctx context.Context, request StatusUpdateRequest) (*UserStatus, error)
type ReactionEventType ¶
type ReactionEventType string
const ( ReactionEventTypeNew ReactionEventType = "new" // Создание ReactionEventTypeDelete ReactionEventType = "delete" // Удаление )
type ReactionRequest ¶
type ReactionWebhookPayload ¶
type ReactionWebhookPayload struct {
Type string `json:"type"` // always "reaction"
Event ReactionEventType `json:"event"`
MessageID int32 `json:"message_id"`
Code string `json:"code"`
Name string `json:"name"`
UserID int32 `json:"user_id"`
CreatedAt time.Time `json:"created_at"`
WebhookTimestamp int32 `json:"webhook_timestamp"`
ChatID *int32 `json:"chat_id"`
}
type ReactionsService ¶ added in v1.0.1
type ReactionsService interface {
ListReactions(ctx context.Context, id int32, params *ListReactionsParams) (*ListReactionsResponse, error)
ListReactionsAll(ctx context.Context, id int32, params *ListReactionsParams) ([]Reaction, error)
AddReaction(ctx context.Context, id int32, request ReactionRequest) (*Reaction, error)
RemoveReaction(ctx context.Context, id int32, params RemoveReactionParams) error
}
type ReactionsServiceImpl ¶ added in v1.0.13
type ReactionsServiceImpl struct {
// contains filtered or unexported fields
}
func (*ReactionsServiceImpl) AddReaction ¶ added in v1.0.13
func (s *ReactionsServiceImpl) AddReaction(ctx context.Context, id int32, request ReactionRequest) (*Reaction, error)
func (*ReactionsServiceImpl) ListReactions ¶ added in v1.0.13
func (s *ReactionsServiceImpl) ListReactions(ctx context.Context, id int32, params *ListReactionsParams) (*ListReactionsResponse, error)
func (*ReactionsServiceImpl) ListReactionsAll ¶ added in v1.0.13
func (s *ReactionsServiceImpl) ListReactionsAll(ctx context.Context, id int32, params *ListReactionsParams) ([]Reaction, error)
func (*ReactionsServiceImpl) RemoveReaction ¶ added in v1.0.13
func (s *ReactionsServiceImpl) RemoveReaction(ctx context.Context, id int32, params RemoveReactionParams) error
type ReactionsServiceStub ¶ added in v1.0.13
type ReactionsServiceStub struct{}
func (*ReactionsServiceStub) AddReaction ¶ added in v1.0.13
func (s *ReactionsServiceStub) AddReaction(ctx context.Context, id int32, request ReactionRequest) (*Reaction, error)
func (*ReactionsServiceStub) ListReactions ¶ added in v1.0.13
func (s *ReactionsServiceStub) ListReactions(ctx context.Context, id int32, params *ListReactionsParams) (*ListReactionsResponse, error)
func (*ReactionsServiceStub) ListReactionsAll ¶ added in v1.0.13
func (s *ReactionsServiceStub) ListReactionsAll(ctx context.Context, id int32, params *ListReactionsParams) ([]Reaction, error)
func (*ReactionsServiceStub) RemoveReaction ¶ added in v1.0.13
func (s *ReactionsServiceStub) RemoveReaction(ctx context.Context, id int32, params RemoveReactionParams) error
type ReadMembersService ¶ added in v1.0.1
type ReadMembersServiceImpl ¶ added in v1.0.13
type ReadMembersServiceImpl struct {
// contains filtered or unexported fields
}
func (*ReadMembersServiceImpl) ListReadMembers ¶ added in v1.0.13
func (s *ReadMembersServiceImpl) ListReadMembers(ctx context.Context, id int32, params *ListReadMembersParams) (*any, error)
type ReadMembersServiceStub ¶ added in v1.0.13
type ReadMembersServiceStub struct{}
func (*ReadMembersServiceStub) ListReadMembers ¶ added in v1.0.13
func (s *ReadMembersServiceStub) ListReadMembers(ctx context.Context, id int32, params *ListReadMembersParams) (*any, error)
type RemoveReactionParams ¶ added in v1.0.1
type SearchChatsParams ¶ added in v1.0.1
type SearchChatsResponse ¶ added in v1.0.1
type SearchChatsResponse struct {
Data []Chat `json:"data"`
Meta SearchPaginationMeta `json:"meta"`
}
type SearchEntityType ¶
type SearchEntityType string
const ( SearchEntityTypeUser SearchEntityType = "User" // Пользователь SearchEntityTypeTask SearchEntityType = "Task" // Задача )
type SearchMessagesParams ¶ added in v1.0.1
type SearchMessagesResponse ¶ added in v1.0.1
type SearchMessagesResponse struct {
Data []Message `json:"data"`
Meta SearchPaginationMeta `json:"meta"`
}
type SearchPaginationMeta ¶ added in v1.0.1
type SearchPaginationMeta struct {
Total int32 `json:"total"`
Paginate SearchPaginationMetaPaginate `json:"paginate"`
}
type SearchPaginationMetaPaginate ¶ added in v1.0.1
type SearchPaginationMetaPaginate struct {
NextPage string `json:"next_page"`
}
type SearchService ¶ added in v1.0.1
type SearchService interface {
SearchChats(ctx context.Context, params *SearchChatsParams) (*SearchChatsResponse, error)
SearchChatsAll(ctx context.Context, params *SearchChatsParams) ([]Chat, error)
SearchMessages(ctx context.Context, params *SearchMessagesParams) (*SearchMessagesResponse, error)
SearchMessagesAll(ctx context.Context, params *SearchMessagesParams) ([]Message, error)
SearchUsers(ctx context.Context, params *SearchUsersParams) (*SearchUsersResponse, error)
SearchUsersAll(ctx context.Context, params *SearchUsersParams) ([]User, error)
}
type SearchServiceImpl ¶ added in v1.0.13
type SearchServiceImpl struct {
// contains filtered or unexported fields
}
func (*SearchServiceImpl) SearchChats ¶ added in v1.0.13
func (s *SearchServiceImpl) SearchChats(ctx context.Context, params *SearchChatsParams) (*SearchChatsResponse, error)
func (*SearchServiceImpl) SearchChatsAll ¶ added in v1.0.13
func (s *SearchServiceImpl) SearchChatsAll(ctx context.Context, params *SearchChatsParams) ([]Chat, error)
func (*SearchServiceImpl) SearchMessages ¶ added in v1.0.13
func (s *SearchServiceImpl) SearchMessages(ctx context.Context, params *SearchMessagesParams) (*SearchMessagesResponse, error)
func (*SearchServiceImpl) SearchMessagesAll ¶ added in v1.0.13
func (s *SearchServiceImpl) SearchMessagesAll(ctx context.Context, params *SearchMessagesParams) ([]Message, error)
func (*SearchServiceImpl) SearchUsers ¶ added in v1.0.13
func (s *SearchServiceImpl) SearchUsers(ctx context.Context, params *SearchUsersParams) (*SearchUsersResponse, error)
func (*SearchServiceImpl) SearchUsersAll ¶ added in v1.0.13
func (s *SearchServiceImpl) SearchUsersAll(ctx context.Context, params *SearchUsersParams) ([]User, error)
type SearchServiceStub ¶ added in v1.0.13
type SearchServiceStub struct{}
func (*SearchServiceStub) SearchChats ¶ added in v1.0.13
func (s *SearchServiceStub) SearchChats(ctx context.Context, params *SearchChatsParams) (*SearchChatsResponse, error)
func (*SearchServiceStub) SearchChatsAll ¶ added in v1.0.13
func (s *SearchServiceStub) SearchChatsAll(ctx context.Context, params *SearchChatsParams) ([]Chat, error)
func (*SearchServiceStub) SearchMessages ¶ added in v1.0.13
func (s *SearchServiceStub) SearchMessages(ctx context.Context, params *SearchMessagesParams) (*SearchMessagesResponse, error)
func (*SearchServiceStub) SearchMessagesAll ¶ added in v1.0.13
func (s *SearchServiceStub) SearchMessagesAll(ctx context.Context, params *SearchMessagesParams) ([]Message, error)
func (*SearchServiceStub) SearchUsers ¶ added in v1.0.13
func (s *SearchServiceStub) SearchUsers(ctx context.Context, params *SearchUsersParams) (*SearchUsersResponse, error)
func (*SearchServiceStub) SearchUsersAll ¶ added in v1.0.13
func (s *SearchServiceStub) SearchUsersAll(ctx context.Context, params *SearchUsersParams) ([]User, error)
type SearchSortOrder ¶ added in v1.0.1
type SearchSortOrder string
const ( SearchSortOrderByScore SearchSortOrder = "by_score" // По релевантности SearchSortOrderAlphabetical SearchSortOrder = "alphabetical" // По алфавиту SearchSortOrderCreation SearchSortOrder = "creation" // По дате создания )
type SearchUsersParams ¶ added in v1.0.1
type SearchUsersResponse ¶ added in v1.0.1
type SearchUsersResponse struct {
Data []User `json:"data"`
Meta SearchPaginationMeta `json:"meta"`
}
type SecurityService ¶ added in v1.0.1
type SecurityService interface {
GetAuditEvents(ctx context.Context, params *GetAuditEventsParams) (*GetAuditEventsResponse, error)
GetAuditEventsAll(ctx context.Context, params *GetAuditEventsParams) ([]AuditEvent, error)
}
type SecurityServiceImpl ¶ added in v1.0.13
type SecurityServiceImpl struct {
// contains filtered or unexported fields
}
func (*SecurityServiceImpl) GetAuditEvents ¶ added in v1.0.13
func (s *SecurityServiceImpl) GetAuditEvents(ctx context.Context, params *GetAuditEventsParams) (*GetAuditEventsResponse, error)
func (*SecurityServiceImpl) GetAuditEventsAll ¶ added in v1.0.13
func (s *SecurityServiceImpl) GetAuditEventsAll(ctx context.Context, params *GetAuditEventsParams) ([]AuditEvent, error)
type SecurityServiceStub ¶ added in v1.0.13
type SecurityServiceStub struct{}
func (*SecurityServiceStub) GetAuditEvents ¶ added in v1.0.13
func (s *SecurityServiceStub) GetAuditEvents(ctx context.Context, params *GetAuditEventsParams) (*GetAuditEventsResponse, error)
func (*SecurityServiceStub) GetAuditEventsAll ¶ added in v1.0.13
func (s *SecurityServiceStub) GetAuditEventsAll(ctx context.Context, params *GetAuditEventsParams) ([]AuditEvent, error)
type StatusUpdateRequest ¶
type StatusUpdateRequest struct {
Status StatusUpdateRequestStatus `json:"status"`
}
type StatusUpdateRequestStatus ¶ added in v1.0.1
type StubClientOption ¶ added in v1.0.13
type StubClientOption func(*stubClientConfig)
func WithStubBots ¶ added in v1.0.13
func WithStubBots(service BotsService) StubClientOption
func WithStubChats ¶ added in v1.0.13
func WithStubChats(service ChatsService) StubClientOption
func WithStubCommon ¶ added in v1.0.13
func WithStubCommon(service CommonService) StubClientOption
func WithStubCustomProperties ¶ added in v1.0.25
func WithStubCustomProperties(service CustomPropertiesService) StubClientOption
func WithStubFiles ¶ added in v1.0.25
func WithStubFiles(service FilesService) StubClientOption
func WithStubGroupTags ¶ added in v1.0.13
func WithStubGroupTags(service GroupTagsService) StubClientOption
func WithStubLinkPreviews ¶ added in v1.0.13
func WithStubLinkPreviews(service LinkPreviewsService) StubClientOption
func WithStubMembers ¶ added in v1.0.13
func WithStubMembers(service MembersService) StubClientOption
func WithStubMessages ¶ added in v1.0.13
func WithStubMessages(service MessagesService) StubClientOption
func WithStubOauth ¶ added in v1.0.25
func WithStubOauth(service OAuthService) StubClientOption
func WithStubProfile ¶ added in v1.0.13
func WithStubProfile(service ProfileService) StubClientOption
func WithStubReactions ¶ added in v1.0.13
func WithStubReactions(service ReactionsService) StubClientOption
func WithStubReadMembers ¶ added in v1.0.13
func WithStubReadMembers(service ReadMembersService) StubClientOption
func WithStubSearch ¶ added in v1.0.13
func WithStubSearch(service SearchService) StubClientOption
func WithStubSecurity ¶ added in v1.0.13
func WithStubSecurity(service SecurityService) StubClientOption
func WithStubTasks ¶ added in v1.0.13
func WithStubTasks(service TasksService) StubClientOption
func WithStubThreads ¶ added in v1.0.13
func WithStubThreads(service ThreadsService) StubClientOption
func WithStubUsers ¶ added in v1.0.13
func WithStubUsers(service UsersService) StubClientOption
func WithStubViews ¶ added in v1.0.13
func WithStubViews(service ViewsService) StubClientOption
type Task ¶
type Task struct {
ID int32 `json:"id"`
Kind TaskKind `json:"kind"`
Content string `json:"content"`
Priority int32 `json:"priority"`
UserID int32 `json:"user_id"`
Status TaskStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
PerformerIDs []int32 `json:"performer_ids"`
AllDay bool `json:"all_day"`
CustomProperties []CustomProperty `json:"custom_properties"`
DueAt *string `json:"due_at"`
ChatID *int32 `json:"chat_id"`
}
type TaskCreateRequest ¶
type TaskCreateRequest struct {
Task TaskCreateRequestTask `json:"task"`
}
type TaskCreateRequestCustomProperty ¶ added in v1.0.1
type TaskCreateRequestTask ¶ added in v1.0.1
type TaskCreateRequestTask struct {
Kind TaskKind `json:"kind"`
Content *string `json:"content,omitempty"`
DueAt *time.Time `json:"due_at,omitempty"`
Priority *int32 `json:"priority,omitempty"`
PerformerIDs []int32 `json:"performer_ids,omitempty"`
ChatID *int32 `json:"chat_id,omitempty"`
AllDay *bool `json:"all_day,omitempty"`
CustomProperties []TaskCreateRequestCustomProperty `json:"custom_properties,omitempty"`
}
func (TaskCreateRequestTask) MarshalJSON ¶ added in v1.0.20
func (m TaskCreateRequestTask) MarshalJSON() ([]byte, error)
type TaskStatus ¶
type TaskStatus string
const ( TaskStatusDone TaskStatus = "done" // Выполнено TaskStatusUndone TaskStatus = "undone" // Активно )
type TaskUpdateRequest ¶
type TaskUpdateRequest struct {
Task TaskUpdateRequestTask `json:"task"`
}
type TaskUpdateRequestCustomProperty ¶ added in v1.0.1
type TaskUpdateRequestTask ¶ added in v1.0.1
type TaskUpdateRequestTask struct {
Kind *TaskKind `json:"kind,omitempty"`
Content *string `json:"content,omitempty"`
DueAt *time.Time `json:"due_at,omitempty"`
Priority *int32 `json:"priority,omitempty"`
PerformerIDs []int32 `json:"performer_ids,omitempty"`
Status *TaskStatus `json:"status,omitempty"`
AllDay *bool `json:"all_day,omitempty"`
DoneAt *time.Time `json:"done_at,omitempty"`
CustomProperties []TaskUpdateRequestCustomProperty `json:"custom_properties,omitempty"`
}
func (TaskUpdateRequestTask) MarshalJSON ¶ added in v1.0.20
func (m TaskUpdateRequestTask) MarshalJSON() ([]byte, error)
type TasksService ¶ added in v1.0.1
type TasksService interface {
ListTasks(ctx context.Context, params *ListTasksParams) (*ListTasksResponse, error)
ListTasksAll(ctx context.Context, params *ListTasksParams) ([]Task, error)
GetTask(ctx context.Context, id int32) (*Task, error)
CreateTask(ctx context.Context, request TaskCreateRequest) (*Task, error)
UpdateTask(ctx context.Context, id int32, request TaskUpdateRequest) (*Task, error)
DeleteTask(ctx context.Context, id int32) error
}
type TasksServiceImpl ¶ added in v1.0.13
type TasksServiceImpl struct {
// contains filtered or unexported fields
}
func (*TasksServiceImpl) CreateTask ¶ added in v1.0.13
func (s *TasksServiceImpl) CreateTask(ctx context.Context, request TaskCreateRequest) (*Task, error)
func (*TasksServiceImpl) DeleteTask ¶ added in v1.0.13
func (s *TasksServiceImpl) DeleteTask(ctx context.Context, id int32) error
func (*TasksServiceImpl) ListTasks ¶ added in v1.0.13
func (s *TasksServiceImpl) ListTasks(ctx context.Context, params *ListTasksParams) (*ListTasksResponse, error)
func (*TasksServiceImpl) ListTasksAll ¶ added in v1.0.13
func (s *TasksServiceImpl) ListTasksAll(ctx context.Context, params *ListTasksParams) ([]Task, error)
func (*TasksServiceImpl) UpdateTask ¶ added in v1.0.13
func (s *TasksServiceImpl) UpdateTask(ctx context.Context, id int32, request TaskUpdateRequest) (*Task, error)
type TasksServiceStub ¶ added in v1.0.13
type TasksServiceStub struct{}
func (*TasksServiceStub) CreateTask ¶ added in v1.0.13
func (s *TasksServiceStub) CreateTask(ctx context.Context, request TaskCreateRequest) (*Task, error)
func (*TasksServiceStub) DeleteTask ¶ added in v1.0.13
func (s *TasksServiceStub) DeleteTask(ctx context.Context, id int32) error
func (*TasksServiceStub) ListTasks ¶ added in v1.0.13
func (s *TasksServiceStub) ListTasks(ctx context.Context, params *ListTasksParams) (*ListTasksResponse, error)
func (*TasksServiceStub) ListTasksAll ¶ added in v1.0.13
func (s *TasksServiceStub) ListTasksAll(ctx context.Context, params *ListTasksParams) ([]Task, error)
func (*TasksServiceStub) UpdateTask ¶ added in v1.0.13
func (s *TasksServiceStub) UpdateTask(ctx context.Context, id int32, request TaskUpdateRequest) (*Task, error)
type ThreadsService ¶ added in v1.0.1
type ThreadsService interface {
ListThreads(ctx context.Context, params *ListThreadsParams) (*ListThreadsResponse, error)
ListThreadsAll(ctx context.Context, params *ListThreadsParams) ([]Thread, error)
GetThread(ctx context.Context, id int32) (*Thread, error)
CreateThread(ctx context.Context, id int32) (*Thread, error)
}
type ThreadsServiceImpl ¶ added in v1.0.13
type ThreadsServiceImpl struct {
// contains filtered or unexported fields
}
func (*ThreadsServiceImpl) CreateThread ¶ added in v1.0.13
func (*ThreadsServiceImpl) ListThreads ¶ added in v1.0.19
func (s *ThreadsServiceImpl) ListThreads(ctx context.Context, params *ListThreadsParams) (*ListThreadsResponse, error)
func (*ThreadsServiceImpl) ListThreadsAll ¶ added in v1.0.19
func (s *ThreadsServiceImpl) ListThreadsAll(ctx context.Context, params *ListThreadsParams) ([]Thread, error)
type ThreadsServiceStub ¶ added in v1.0.13
type ThreadsServiceStub struct{}
func (*ThreadsServiceStub) CreateThread ¶ added in v1.0.13
func (*ThreadsServiceStub) ListThreads ¶ added in v1.0.19
func (s *ThreadsServiceStub) ListThreads(ctx context.Context, params *ListThreadsParams) (*ListThreadsResponse, error)
func (*ThreadsServiceStub) ListThreadsAll ¶ added in v1.0.19
func (s *ThreadsServiceStub) ListThreadsAll(ctx context.Context, params *ListThreadsParams) ([]Thread, error)
type UpdateMemberRoleRequest ¶
type UpdateMemberRoleRequest struct {
Role ChatMemberRole `json:"role"`
}
type UpdateProfileAvatarRequest ¶ added in v1.0.12
type UpdateUserAvatarRequest ¶ added in v1.0.12
type UploadParams ¶
type UploadParams struct {
ContentDisposition string `json:"Content-Disposition"`
ACL string `json:"acl"`
Policy string `json:"policy"`
XAMZCredential string `json:"x-amz-credential"`
XAMZAlgorithm string `json:"x-amz-algorithm"`
XAMZDate string `json:"x-amz-date"`
XAMZSignature string `json:"x-amz-signature"`
Key string `json:"key"`
DirectURL string `json:"direct_url"`
}
type User ¶
type User struct {
ID int32 `json:"id"`
FirstName string `json:"first_name"`
Nickname string `json:"nickname"`
Role UserRole `json:"role"`
Suspended bool `json:"suspended"`
InviteStatus InviteStatus `json:"invite_status"`
ListTags []string `json:"list_tags"`
CustomProperties []CustomProperty `json:"custom_properties"`
Bot bool `json:"bot"`
Sso bool `json:"sso"`
CreatedAt time.Time `json:"created_at"`
LastName *string `json:"last_name"`
Email *string `json:"email"`
PhoneNumber *string `json:"phone_number"`
Department *string `json:"department"`
Title *string `json:"title"`
InviterID *int32 `json:"inviter_id"`
UserStatus *UserStatus `json:"user_status"`
LastActivityAt *string `json:"last_activity_at"`
TimeZone *string `json:"time_zone"`
ImageURL *string `json:"image_url"`
}
type UserCreateRequest ¶
type UserCreateRequest struct {
User UserCreateRequestUser `json:"user"`
SkipEmailNotify *bool `json:"skip_email_notify,omitempty"`
}
type UserCreateRequestCustomProperty ¶ added in v1.0.1
type UserCreateRequestUser ¶ added in v1.0.1
type UserCreateRequestUser struct {
Email string `json:"email"`
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty"`
Nickname *string `json:"nickname,omitempty"`
Department *string `json:"department,omitempty"`
Title *string `json:"title,omitempty"`
Role *UserCreateRole `json:"role,omitempty"`
Suspended *bool `json:"suspended,omitempty"`
ListTags []string `json:"list_tags,omitempty"`
ChatIDs []int32 `json:"chat_ids,omitempty"`
CustomProperties []UserCreateRequestCustomProperty `json:"custom_properties,omitempty"`
}
func (UserCreateRequestUser) MarshalJSON ¶ added in v1.0.20
func (m UserCreateRequestUser) MarshalJSON() ([]byte, error)
type UserCreateRole ¶ added in v1.0.17
type UserCreateRole string
const ( UserCreateRoleAdmin UserCreateRole = "admin" // Администратор UserCreateRoleUser UserCreateRole = "user" // Сотрудник UserCreateRoleMultiGuest UserCreateRole = "multi_guest" // Мульти-гость UserCreateRoleGuest UserCreateRole = "guest" // Гость )
type UserEventType ¶
type UserEventType string
const ( UserEventTypeInvite UserEventType = "invite" // Приглашение UserEventTypeConfirm UserEventType = "confirm" // Подтверждение UserEventTypeUpdate UserEventType = "update" // Обновление UserEventTypeSuspend UserEventType = "suspend" // Приостановка UserEventTypeActivate UserEventType = "activate" // Активация UserEventTypeDelete UserEventType = "delete" // Удаление )
type UserRoleInput ¶ added in v1.0.3
type UserRoleInput string
const ( UserRoleInputAdmin UserRoleInput = "admin" // Администратор UserRoleInputUser UserRoleInput = "user" // Сотрудник UserRoleInputMultiGuest UserRoleInput = "multi_guest" // Мульти-гость )
type UserStatus ¶
type UserStatus struct {
Emoji string `json:"emoji"`
Title string `json:"title"`
IsAway bool `json:"is_away"`
ExpiresAt *string `json:"expires_at"`
AwayMessage *UserStatusAwayMessage `json:"away_message"`
}
type UserStatusAwayMessage ¶ added in v1.0.1
type UserStatusAwayMessage struct {
Text string `json:"text"`
}
type UserUpdateRequest ¶
type UserUpdateRequest struct {
User UserUpdateRequestUser `json:"user"`
}
type UserUpdateRequestCustomProperty ¶ added in v1.0.1
type UserUpdateRequestUser ¶ added in v1.0.1
type UserUpdateRequestUser struct {
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty"`
Email *string `json:"email,omitempty"`
PhoneNumber *string `json:"phone_number,omitempty"`
Nickname *string `json:"nickname,omitempty"`
Department *string `json:"department,omitempty"`
Title *string `json:"title,omitempty"`
Role *UserRoleInput `json:"role,omitempty"`
Suspended *bool `json:"suspended,omitempty"`
ListTags []string `json:"list_tags,omitempty"`
CustomProperties []UserUpdateRequestCustomProperty `json:"custom_properties,omitempty"`
}
func (UserUpdateRequestUser) MarshalJSON ¶ added in v1.0.20
func (m UserUpdateRequestUser) MarshalJSON() ([]byte, error)
type UsersService ¶ added in v1.0.1
type UsersService interface {
ListUsers(ctx context.Context, params *ListUsersParams) (*ListUsersResponse, error)
ListUsersAll(ctx context.Context, params *ListUsersParams) ([]User, error)
GetUser(ctx context.Context, id int32) (*User, error)
GetUserStatus(ctx context.Context, userId int32) (*any, error)
CreateUser(ctx context.Context, request UserCreateRequest) (*User, error)
UpdateUser(ctx context.Context, id int32, request UserUpdateRequest) (*User, error)
UpdateUserAvatar(ctx context.Context, userId int32, image io.Reader) (*AvatarData, error)
UpdateUserStatus(ctx context.Context, userId int32, request StatusUpdateRequest) (*UserStatus, error)
DeleteUser(ctx context.Context, id int32) error
DeleteUserAvatar(ctx context.Context, userId int32) error
DeleteUserStatus(ctx context.Context, userId int32) error
}
type UsersServiceImpl ¶ added in v1.0.13
type UsersServiceImpl struct {
// contains filtered or unexported fields
}
func (*UsersServiceImpl) CreateUser ¶ added in v1.0.13
func (s *UsersServiceImpl) CreateUser(ctx context.Context, request UserCreateRequest) (*User, error)
func (*UsersServiceImpl) DeleteUser ¶ added in v1.0.13
func (s *UsersServiceImpl) DeleteUser(ctx context.Context, id int32) error
func (*UsersServiceImpl) DeleteUserAvatar ¶ added in v1.0.13
func (s *UsersServiceImpl) DeleteUserAvatar(ctx context.Context, userId int32) error
func (*UsersServiceImpl) DeleteUserStatus ¶ added in v1.0.13
func (s *UsersServiceImpl) DeleteUserStatus(ctx context.Context, userId int32) error
func (*UsersServiceImpl) GetUserStatus ¶ added in v1.0.13
func (*UsersServiceImpl) ListUsers ¶ added in v1.0.13
func (s *UsersServiceImpl) ListUsers(ctx context.Context, params *ListUsersParams) (*ListUsersResponse, error)
func (*UsersServiceImpl) ListUsersAll ¶ added in v1.0.13
func (s *UsersServiceImpl) ListUsersAll(ctx context.Context, params *ListUsersParams) ([]User, error)
func (*UsersServiceImpl) UpdateUser ¶ added in v1.0.13
func (s *UsersServiceImpl) UpdateUser(ctx context.Context, id int32, request UserUpdateRequest) (*User, error)
func (*UsersServiceImpl) UpdateUserAvatar ¶ added in v1.0.13
func (s *UsersServiceImpl) UpdateUserAvatar(ctx context.Context, userId int32, image io.Reader) (*AvatarData, error)
func (*UsersServiceImpl) UpdateUserStatus ¶ added in v1.0.13
func (s *UsersServiceImpl) UpdateUserStatus(ctx context.Context, userId int32, request StatusUpdateRequest) (*UserStatus, error)
type UsersServiceStub ¶ added in v1.0.13
type UsersServiceStub struct{}
func (*UsersServiceStub) CreateUser ¶ added in v1.0.13
func (s *UsersServiceStub) CreateUser(ctx context.Context, request UserCreateRequest) (*User, error)
func (*UsersServiceStub) DeleteUser ¶ added in v1.0.13
func (s *UsersServiceStub) DeleteUser(ctx context.Context, id int32) error
func (*UsersServiceStub) DeleteUserAvatar ¶ added in v1.0.13
func (s *UsersServiceStub) DeleteUserAvatar(ctx context.Context, userId int32) error
func (*UsersServiceStub) DeleteUserStatus ¶ added in v1.0.13
func (s *UsersServiceStub) DeleteUserStatus(ctx context.Context, userId int32) error
func (*UsersServiceStub) GetUserStatus ¶ added in v1.0.13
func (*UsersServiceStub) ListUsers ¶ added in v1.0.13
func (s *UsersServiceStub) ListUsers(ctx context.Context, params *ListUsersParams) (*ListUsersResponse, error)
func (*UsersServiceStub) ListUsersAll ¶ added in v1.0.13
func (s *UsersServiceStub) ListUsersAll(ctx context.Context, params *ListUsersParams) ([]User, error)
func (*UsersServiceStub) UpdateUser ¶ added in v1.0.13
func (s *UsersServiceStub) UpdateUser(ctx context.Context, id int32, request UserUpdateRequest) (*User, error)
func (*UsersServiceStub) UpdateUserAvatar ¶ added in v1.0.13
func (s *UsersServiceStub) UpdateUserAvatar(ctx context.Context, userId int32, image io.Reader) (*AvatarData, error)
func (*UsersServiceStub) UpdateUserStatus ¶ added in v1.0.13
func (s *UsersServiceStub) UpdateUserStatus(ctx context.Context, userId int32, request StatusUpdateRequest) (*UserStatus, error)
type ValidationErrorCode ¶
type ValidationErrorCode string
const ( ValidationErrorCodeBlank ValidationErrorCode = "blank" // Обязательное поле (не может быть пустым) ValidationErrorCodeTooLong ValidationErrorCode = "too_long" // Слишком длинное значение (пояснения вы получите в поле message) ValidationErrorCodeInvalid ValidationErrorCode = "invalid" // Поле не соответствует правилам (пояснения вы получите в поле message) ValidationErrorCodeInclusion ValidationErrorCode = "inclusion" // Поле имеет непредусмотренное значение ValidationErrorCodeExclusion ValidationErrorCode = "exclusion" // Поле имеет недопустимое значение ValidationErrorCodeTaken ValidationErrorCode = "taken" // Название для этого поля уже существует ValidationErrorCodeWrongEmoji ValidationErrorCode = "wrong_emoji" // Emoji статуса не может содержать значения отличные от Emoji символа ValidationErrorCodeNotFound ValidationErrorCode = "not_found" // Объект не найден ValidationErrorCodeAlreadyExists ValidationErrorCode = "already_exists" // Объект уже существует (пояснения вы получите в поле message) ValidationErrorCodePersonalChat ValidationErrorCode = "personal_chat" // Ошибка личного чата (пояснения вы получите в поле message) ValidationErrorCodeDisplayedError ValidationErrorCode = "displayed_error" // Отображаемая ошибка (пояснения вы получите в поле message) ValidationErrorCodeNotAuthorized ValidationErrorCode = "not_authorized" // Действие запрещено ValidationErrorCodeInvalidDateRange ValidationErrorCode = "invalid_date_range" // Выбран слишком большой диапазон дат ValidationErrorCodeInvalidWebhookURL ValidationErrorCode = "invalid_webhook_url" // Некорректный URL вебхука ValidationErrorCodeRateLimit ValidationErrorCode = "rate_limit" // Достигнут лимит запросов ValidationErrorCodeLicensesLimit ValidationErrorCode = "licenses_limit" // Превышен лимит активных сотрудников (пояснения вы получите в поле message) ValidationErrorCodeUserLimit ValidationErrorCode = "user_limit" // Превышен лимит количества реакций, которые может добавить пользователь (20 уникальных реакций) ValidationErrorCodeUniqueLimit ValidationErrorCode = "unique_limit" // Превышен лимит количества уникальных реакций, которые можно добавить на сообщение (30 уникальных реакций) ValidationErrorCodeGeneralLimit ValidationErrorCode = "general_limit" // Превышен лимит количества реакций, которые можно добавить на сообщение (1000 реакций) ValidationErrorCodeUnhandled ValidationErrorCode = "unhandled" // Ошибка выполнения запроса (пояснения вы получите в поле message) ValidationErrorCodeTriggerNotFound ValidationErrorCode = "trigger_not_found" // Не удалось найти идентификатор события ValidationErrorCodeTriggerExpired ValidationErrorCode = "trigger_expired" // Время жизни идентификатора события истекло ValidationErrorCodeRequired ValidationErrorCode = "required" // Обязательный параметр не передан ValidationErrorCodeIn ValidationErrorCode = "in" // Недопустимое значение (не входит в список допустимых) ValidationErrorCodeNotApplicable ValidationErrorCode = "not_applicable" // Значение неприменимо в данном контексте (пояснения вы получите в поле message) ValidationErrorCodeSelfUpdate ValidationErrorCode = "self_update" // Нельзя изменить свои собственные данные ValidationErrorCodeOwnerProtected ValidationErrorCode = "owner_protected" // Нельзя изменить данные владельца ValidationErrorCodeAlreadyAssigned ValidationErrorCode = "already_assigned" // Значение уже назначено ValidationErrorCodeForbidden ValidationErrorCode = "forbidden" // Недостаточно прав для выполнения действия (пояснения вы получите в поле message) ValidationErrorCodePermissionDenied ValidationErrorCode = "permission_denied" // Доступ запрещён (недостаточно прав) ValidationErrorCodeAccessDenied ValidationErrorCode = "access_denied" // Доступ запрещён ValidationErrorCodeWrongParams ValidationErrorCode = "wrong_params" // Некорректные параметры запроса (пояснения вы получите в поле message) ValidationErrorCodePaymentRequired ValidationErrorCode = "payment_required" // Требуется оплата ValidationErrorCodeMinLength ValidationErrorCode = "min_length" // Значение слишком короткое (пояснения вы получите в поле message) ValidationErrorCodeMaxLength ValidationErrorCode = "max_length" // Значение слишком длинное (пояснения вы получите в поле message) ValidationErrorCodeUseOfSystemWords ValidationErrorCode = "use_of_system_words" // Использовано зарезервированное системное слово (here, all) ValidationErrorCodeExportFileNotFound ValidationErrorCode = "export_file_not_found" // Файл экспорта не найден или ещё не готов ValidationErrorCodeCannotKickOwner ValidationErrorCode = "cannot_kick_owner" // Нельзя исключить владельца чата ValidationErrorCodePinFailed ValidationErrorCode = "pin_failed" // Не удалось закрепить сообщение ValidationErrorCodeMessageDeleted ValidationErrorCode = "message_deleted" // Сообщение удалено ValidationErrorCodeThreadMessage ValidationErrorCode = "thread_message" // Нельзя создать тред для сообщения, которое уже находится в треде )
type VideoCallEventType ¶ added in v1.0.26
type VideoCallEventType string
const ( VideoCallEventTypeStarted VideoCallEventType = "started" // Видеозвонок начался VideoCallEventTypeFinished VideoCallEventType = "finished" // Видеозвонок завершился VideoCallEventTypeRecordingReady VideoCallEventType = "recording_ready" // Запись видеозвонка готова )
type VideoCallWebhookPayload ¶ added in v1.0.26
type VideoCallWebhookPayload struct {
Type string `json:"type"` // always "video_call"
Event VideoCallEventType `json:"event"`
VideoRoomID int32 `json:"video_room_id"`
ChatID int32 `json:"chat_id"`
OwnerID int32 `json:"owner_id"`
WebhookTimestamp int32 `json:"webhook_timestamp"`
Thread *WebhookVideoCallThread `json:"thread"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
Duration *int32 `json:"duration,omitempty"`
Members []WebhookVideoCallMember `json:"members,omitempty"`
RecordingID *int32 `json:"recording_id,omitempty"`
FileID *int32 `json:"file_id"`
URL *string `json:"url,omitempty"`
Size *int32 `json:"size,omitempty"`
}
func (VideoCallWebhookPayload) MarshalJSON ¶ added in v1.0.26
func (m VideoCallWebhookPayload) MarshalJSON() ([]byte, error)
type ViewBlockCheckbox ¶
type ViewBlockCheckbox struct {
Type string `json:"type"` // always "checkbox"
Name string `json:"name"`
Label string `json:"label"`
Options []ViewBlockCheckboxOption `json:"options,omitempty"`
Required *bool `json:"required,omitempty"`
Hint *string `json:"hint,omitempty"`
}
func (ViewBlockCheckbox) MarshalJSON ¶ added in v1.0.20
func (m ViewBlockCheckbox) MarshalJSON() ([]byte, error)
type ViewBlockCheckboxOption ¶
type ViewBlockDate ¶
type ViewBlockDivider ¶
type ViewBlockDivider struct {
Type string `json:"type"` // always "divider"
}
type ViewBlockFileInput ¶
type ViewBlockFileInput struct {
Type string `json:"type"` // always "file_input"
Name string `json:"name"`
Label string `json:"label"`
Filetypes []string `json:"filetypes,omitempty"`
MaxFiles *int32 `json:"max_files,omitempty"`
Required *bool `json:"required,omitempty"`
Hint *string `json:"hint,omitempty"`
}
func (ViewBlockFileInput) MarshalJSON ¶ added in v1.0.20
func (m ViewBlockFileInput) MarshalJSON() ([]byte, error)
type ViewBlockHeader ¶
type ViewBlockInput ¶
type ViewBlockInput struct {
Type string `json:"type"` // always "input"
Name string `json:"name"`
Label string `json:"label"`
Placeholder *string `json:"placeholder,omitempty"`
Multiline *bool `json:"multiline,omitempty"`
InitialValue *string `json:"initial_value,omitempty"`
MinLength *int32 `json:"min_length,omitempty"`
MaxLength *int32 `json:"max_length,omitempty"`
Required *bool `json:"required,omitempty"`
Hint *string `json:"hint,omitempty"`
}
type ViewBlockMarkdown ¶
type ViewBlockPlainText ¶
type ViewBlockRadio ¶
type ViewBlockRadio struct {
Type string `json:"type"` // always "radio"
Name string `json:"name"`
Label string `json:"label"`
Options []ViewBlockSelectableOption `json:"options,omitempty"`
Required *bool `json:"required,omitempty"`
Hint *string `json:"hint,omitempty"`
}
func (ViewBlockRadio) MarshalJSON ¶ added in v1.0.20
func (m ViewBlockRadio) MarshalJSON() ([]byte, error)
type ViewBlockSelect ¶
type ViewBlockSelect struct {
Type string `json:"type"` // always "select"
Name string `json:"name"`
Label string `json:"label"`
Options []ViewBlockSelectOption `json:"options,omitempty"`
Required *bool `json:"required,omitempty"`
Hint *string `json:"hint,omitempty"`
}
func (ViewBlockSelect) MarshalJSON ¶ added in v1.0.20
func (m ViewBlockSelect) MarshalJSON() ([]byte, error)
type ViewBlockSelectOption ¶ added in v1.0.22
type ViewBlockTime ¶
type ViewBlockUnion ¶
type ViewBlockUnion struct {
ViewBlockHeader *ViewBlockHeader
ViewBlockPlainText *ViewBlockPlainText
ViewBlockMarkdown *ViewBlockMarkdown
ViewBlockDivider *ViewBlockDivider
ViewBlockInput *ViewBlockInput
ViewBlockSelect *ViewBlockSelect
ViewBlockRadio *ViewBlockRadio
ViewBlockCheckbox *ViewBlockCheckbox
ViewBlockDate *ViewBlockDate
ViewBlockTime *ViewBlockTime
ViewBlockFileInput *ViewBlockFileInput
}
func (ViewBlockUnion) MarshalJSON ¶
func (u ViewBlockUnion) MarshalJSON() ([]byte, error)
func (*ViewBlockUnion) UnmarshalJSON ¶
func (u *ViewBlockUnion) UnmarshalJSON(data []byte) error
type ViewSubmitWebhookPayload ¶ added in v1.0.12
type ViewSubmitWebhookPayload struct {
Type string `json:"type"` // always "view"
Event string `json:"event"` // always "submit"
UserID int32 `json:"user_id"`
Data map[string]string `json:"data"`
WebhookTimestamp int32 `json:"webhook_timestamp"`
CallbackID *string `json:"callback_id"`
PrivateMetadata *string `json:"private_metadata"`
ChatID *int32 `json:"chat_id"`
}
type ViewsService ¶ added in v1.0.1
type ViewsService interface {
OpenView(ctx context.Context, request OpenViewRequest) error
}
type ViewsServiceImpl ¶ added in v1.0.13
type ViewsServiceImpl struct {
// contains filtered or unexported fields
}
func (*ViewsServiceImpl) OpenView ¶ added in v1.0.13
func (s *ViewsServiceImpl) OpenView(ctx context.Context, request OpenViewRequest) error
type ViewsServiceStub ¶ added in v1.0.13
type ViewsServiceStub struct{}
func (*ViewsServiceStub) OpenView ¶ added in v1.0.13
func (s *ViewsServiceStub) OpenView(ctx context.Context, request OpenViewRequest) error
type VoiceContent ¶ added in v1.0.22
type WebhookEvent ¶
type WebhookEvent struct {
ID string `json:"id"`
EventType string `json:"event_type"`
Payload WebhookPayloadUnion `json:"payload"`
CreatedAt time.Time `json:"created_at"`
}
type WebhookEventType ¶
type WebhookEventType string
const ( WebhookEventTypeNew WebhookEventType = "new" // Создание WebhookEventTypeUpdate WebhookEventType = "update" // Обновление WebhookEventTypeDelete WebhookEventType = "delete" // Удаление )
type WebhookLink ¶
type WebhookMessageThread ¶
type WebhookPayloadUnion ¶
type WebhookPayloadUnion struct {
MessageWebhookPayload *MessageWebhookPayload
ReactionWebhookPayload *ReactionWebhookPayload
ButtonWebhookPayload *ButtonWebhookPayload
ViewSubmitWebhookPayload *ViewSubmitWebhookPayload
ChatMemberWebhookPayload *ChatMemberWebhookPayload
CompanyMemberWebhookPayload *CompanyMemberWebhookPayload
VideoCallWebhookPayload *VideoCallWebhookPayload
}
func (WebhookPayloadUnion) MarshalJSON ¶
func (u WebhookPayloadUnion) MarshalJSON() ([]byte, error)
func (*WebhookPayloadUnion) UnmarshalJSON ¶
func (u *WebhookPayloadUnion) UnmarshalJSON(data []byte) error
type WebhookVideoCallMember ¶ added in v1.0.26
Click to show internal directories.
Click to hide internal directories.