Documentation
ΒΆ
Index ΒΆ
- Constants
- func Ptr[T any](v T) *T
- type AccessTokenInfo
- type AddMembersRequest
- type AddTagsRequest
- type ApiError
- type ApiErrorItem
- type AuditDetailsBot
- 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 AuditDetailsVideoCallFinished
- type AuditDetailsVideoCallRecording
- type AuditDetailsVideoCallStarted
- 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) (*UserStatus, 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) (*UserStatus, 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) CreateStandaloneThread(ctx context.Context) (*Thread, error)
- 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) CreateStandaloneThread(ctx context.Context) (*Thread, error)
- 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) (*UserStatus, 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) (*UserStatus, 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 AuditDetailsBot ΒΆ added in v1.1.0
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 AuditDetailsVideoCallFinished ΒΆ added in v1.1.0
type AuditDetailsVideoCallRecording ΒΆ added in v1.0.27
type AuditDetailsVideoCallStarted ΒΆ added in v1.1.0
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
AuditDetailsBot *AuditDetailsBot
AuditDetailsBotScopes *AuditDetailsBotScopes
AuditDetailsBotWebhookSettings *AuditDetailsBotWebhookSettings
AuditDetailsVideoCallStarted *AuditDetailsVideoCallStarted
AuditDetailsVideoCallFinished *AuditDetailsVideoCallFinished
AuditDetailsVideoCallRecording *AuditDetailsVideoCallRecording
Raw json.RawMessage
}
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
UnmarshalJSON decodes AuditEventDetailsUnion, which carries no discriminator field: the member is chosen by which one best matches the payload keys. The raw payload is always kept in Raw so an unrecognised shape is never a decode 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" // ΠΠΎΡ ΡΠ΄Π°Π»ΡΠ½ AuditEventKeyVideoCallStarted AuditEventKey = "video_call_started" // ΠΠΈΠ΄Π΅ΠΎΠ·Π²ΠΎΠ½ΠΎΠΊ Π½Π°ΡΠ°Ρ AuditEventKeyVideoCallFinished AuditEventKey = "video_call_finished" // ΠΠΈΠ΄Π΅ΠΎΠ·Π²ΠΎΠ½ΠΎΠΊ Π·Π°Π²Π΅ΡΡΡΠ½ AuditEventKeyVideoCallRecordingReady AuditEventKey = "video_call_recording_ready" // ΠΠ°ΠΏΠΈΡΡ Π²ΠΈΠ΄Π΅ΠΎΠ·Π²ΠΎΠ½ΠΊΠ° Π³ΠΎΡΠΎΠ²Π° )
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" // ΠΠ°Π½Π½ΡΠ΅ ΡΠΎΡΡΡΠ΄Π½ΠΈΠΊΠ° ΠΈΠ·ΠΌΠ΅Π½Π΅Π½Ρ 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"`
ChangedAt *string `json:"changed_at"`
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) (*UserStatus, 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) (*UserStatus, 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) (*UserStatus, 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 TaskKind ΒΆ
type TaskKind string
const ( TaskKindCall TaskKind = "call" // ΠΠΎΠ·Π²ΠΎΠ½ΠΈΡΡ ΠΊΠΎΠ½ΡΠ°ΠΊΡΡ TaskKindMeeting TaskKind = "meeting" // ΠΡΡΡΠ΅ΡΠ° TaskKindReminder TaskKind = "reminder" // ΠΡΠΎΡΡΠΎΠ΅ Π½Π°ΠΏΠΎΠΌΠΈΠ½Π°Π½ΠΈΠ΅ TaskKindEvent TaskKind = "event" // Π‘ΠΎΠ±ΡΡΠΈΠ΅ TaskKindEmail TaskKind = "email" // ΠΠ°ΠΏΠΈΡΠ°ΡΡ ΠΏΠΈΡΡΠΌΠΎ )
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)
CreateStandaloneThread(ctx context.Context) (*Thread, error)
}
type ThreadsServiceImpl ΒΆ added in v1.0.13
type ThreadsServiceImpl struct {
// contains filtered or unexported fields
}
func (*ThreadsServiceImpl) CreateStandaloneThread ΒΆ added in v1.0.27
func (s *ThreadsServiceImpl) CreateStandaloneThread(ctx context.Context) (*Thread, error)
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) CreateStandaloneThread ΒΆ added in v1.0.27
func (s *ThreadsServiceStub) CreateStandaloneThread(ctx context.Context) (*Thread, error)
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"`
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"`
FirstName *string `json:"first_name"`
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) (*UserStatus, 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 (s *UsersServiceImpl) GetUserStatus(ctx context.Context, userId int32) (*UserStatus, error)
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 (s *UsersServiceStub) GetUserStatus(ctx context.Context, userId int32) (*UserStatus, error)
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 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]any `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.