pachca

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 13 Imported by: 0

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

View Source
const PachcaAPIURL = "https://api.pachca.com/api/shared/v1"

Variables ΒΆ

This section is empty.

Functions ΒΆ

func Ptr ΒΆ added in v1.0.1

func Ptr[T any](v T) *T

Ptr returns a pointer to the given value.

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 AddMembersRequest struct {
	MemberIDs []int32 `json:"member_ids"`
	Silent    *bool   `json:"silent,omitempty"`
}

type AddTagsRequest ΒΆ

type AddTagsRequest struct {
	GroupTagIDs []int32 `json:"group_tag_ids"`
}

type ApiError ΒΆ

type ApiError struct {
	Errors []ApiErrorItem `json:"errors"`
}

func (*ApiError) Error ΒΆ added in v1.0.1

func (e *ApiError) Error() string

type ApiErrorItem ΒΆ

type ApiErrorItem struct {
	Key     string              `json:"key"`
	Message string              `json:"message"`
	Code    ValidationErrorCode `json:"code"`
	Value   *string             `json:"value"`
	Payload map[string]any      `json:"payload"`
}

type AuditDetailsBot ΒΆ added in v1.1.0

type AuditDetailsBot struct {
	BotID   int32  `json:"bot_id"`
	ActorID *int32 `json:"actor_id"`
}

type AuditDetailsBotScopes ΒΆ added in v1.0.25

type AuditDetailsBotScopes struct {
	AddedScopes   []string `json:"added_scopes"`
	RemovedScopes []string `json:"removed_scopes"`
}

type AuditDetailsBotWebhookSettings ΒΆ added in v1.0.25

type AuditDetailsBotWebhookSettings struct {
	Changes map[string]any `json:"changes"`
}

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 AuditDetailsChatRenamed struct {
	OldName string `json:"old_name"`
	NewName string `json:"new_name"`
}

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 AuditDetailsKms struct {
	ChatID    int32  `json:"chat_id"`
	MessageID int32  `json:"message_id"`
	Reason    string `json:"reason"`
}

type AuditDetailsRoleChanged ΒΆ added in v1.0.1

type AuditDetailsRoleChanged struct {
	NewCompanyRole      string `json:"new_company_role"`
	PreviousCompanyRole string `json:"previous_company_role"`
	InitiatorID         int32  `json:"initiator_id"`
}

type AuditDetailsSearch ΒΆ added in v1.0.1

type AuditDetailsSearch struct {
	SearchType    string         `json:"search_type"`
	QueryPresent  bool           `json:"query_present"`
	CursorPresent bool           `json:"cursor_present"`
	Limit         int32          `json:"limit"`
	Filters       map[string]any `json:"filters"`
}

type AuditDetailsTagChat ΒΆ added in v1.0.1

type AuditDetailsTagChat struct {
	ChatID  int32  `json:"chat_id"`
	TagName string `json:"tag_name"`
}

type AuditDetailsTagName ΒΆ added in v1.0.1

type AuditDetailsTagName struct {
	Name string `json:"name"`
}

type AuditDetailsTokenScopes ΒΆ added in v1.0.1

type AuditDetailsTokenScopes struct {
	Scopes []string `json:"scopes"`
}

type AuditDetailsUserUpdated ΒΆ added in v1.0.1

type AuditDetailsUserUpdated struct {
	ChangedAttrs []string `json:"changed_attrs"`
	Context      *string  `json:"context,omitempty"`
}

type AuditDetailsVideoCallFinished ΒΆ added in v1.1.0

type AuditDetailsVideoCallFinished struct {
	ChatID           int32  `json:"chat_id"`
	Duration         int32  `json:"duration"`
	MaxMembersCount  int32  `json:"max_members_count"`
	StartedMessageID *int32 `json:"started_message_id"`
}

type AuditDetailsVideoCallRecording ΒΆ added in v1.0.27

type AuditDetailsVideoCallRecording struct {
	ChatID           int32  `json:"chat_id"`
	RecordingID      int32  `json:"recording_id"`
	FileID           int32  `json:"file_id"`
	Duration         int32  `json:"duration"`
	Size             int64  `json:"size"`
	StartedMessageID *int32 `json:"started_message_id"`
}

type AuditDetailsVideoCallStarted ΒΆ added in v1.1.0

type AuditDetailsVideoCallStarted struct {
	ChatID           int32  `json:"chat_id"`
	StartedMessageID *int32 `json:"started_message_id"`
}

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"               // НаТата ΠΊΠ½ΠΎΠΏΠΊΠ°
	BotEventNameMessageLinkShared       BotEventName = "message_link_shared"        // Π’ сообщСнии ΠΎΡ‚ΠΏΡ€Π°Π²Π»Π΅Π½Π° ссылка (для unfurl)
	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 (*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 (*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 Button ΒΆ

type Button struct {
	Text string  `json:"text"`
	URL  *string `json:"url,omitempty"`
	Data *string `json:"data,omitempty"`
}

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 ChatUpdateRequestChat struct {
	Name   *string `json:"name,omitempty"`
	Public *bool   `json:"public,omitempty"`
}

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 (s *ChatsServiceImpl) DownloadExport(ctx context.Context, id int32) (string, error)

func (*ChatsServiceImpl) GetChat ΒΆ added in v1.0.13

func (s *ChatsServiceImpl) GetChat(ctx context.Context, id int32) (*Chat, error)

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 (s *ChatsServiceStub) DownloadExport(ctx context.Context, id int32) (string, error)

func (*ChatsServiceStub) GetChat ΒΆ added in v1.0.13

func (s *ChatsServiceStub) GetChat(ctx context.Context, id int32) (*Chat, error)

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 (s *CommonServiceImpl) DownloadExport(ctx context.Context, id int32) (string, error)

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 (*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 (s *CommonServiceStub) DownloadExport(ctx context.Context, id int32) (string, error)

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 (*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 CompanyMemberWebhookPayload ΒΆ

type CompanyMemberWebhookPayload struct {
	Type             string        `json:"type"` // always "company_member"
	Event            UserEventType `json:"event"`
	UserIDs          []int32       `json:"user_ids"`
	CreatedAt        time.Time     `json:"created_at"`
	WebhookTimestamp int32         `json:"webhook_timestamp"`
}

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

type CustomPropertiesServiceStub ΒΆ added in v1.0.25

type CustomPropertiesServiceStub struct{}

func (*CustomPropertiesServiceStub) ListProperties ΒΆ added in v1.0.25

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 File ΒΆ

type File struct {
	ID       int32    `json:"id"`
	Key      string   `json:"key"`
	Name     string   `json:"name"`
	FileType FileType `json:"file_type"`
	URL      string   `json:"url"`
	Width    *int32   `json:"width"`
	Height   *int32   `json:"height"`
}

type FileType ΒΆ

type FileType string
const (
	FileTypeFile  FileType = "file"  // ΠžΠ±Ρ‹Ρ‡Π½Ρ‹ΠΉ Ρ„Π°ΠΉΠ»
	FileTypeImage FileType = "image" // Π˜Π·ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅
	FileTypeAudio FileType = "audio" // Аудиофайл
	FileTypeVoice FileType = "voice" // ГолосовоС сообщСниС
)

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 GetAuditEventsParams struct {
	StartTime  *time.Time
	EndTime    *time.Time
	EventKey   *AuditEventKey
	ActorID    *string
	ActorType  *string
	EntityID   *string
	EntityType *string
	Limit      *int32
	Cursor     *string
}

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 GetTagUsersParams struct {
	Limit  *int32
	Cursor *string
}

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 GetWebhookEventsParams struct {
	Limit  *int32
	Cursor *string
}

type GetWebhookEventsResponse ΒΆ added in v1.0.1

type GetWebhookEventsResponse struct {
	Data []WebhookEvent `json:"data"`
	Meta PaginationMeta `json:"meta"`
}

type GroupTag ΒΆ

type GroupTag struct {
	ID         int32  `json:"id"`
	Name       string `json:"name"`
	UsersCount int32  `json:"users_count"`
}

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) GetTag ΒΆ added in v1.0.13

func (s *GroupTagsServiceImpl) GetTag(ctx context.Context, id int32) (*GroupTag, error)

func (*GroupTagsServiceImpl) GetTagUsers ΒΆ added in v1.0.13

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 (*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) GetTag ΒΆ added in v1.0.13

func (s *GroupTagsServiceStub) GetTag(ctx context.Context, id int32) (*GroupTag, error)

func (*GroupTagsServiceStub) GetTagUsers ΒΆ added in v1.0.13

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 (*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 LinkPreviewImage struct {
	Key  string `json:"key"`
	Name string `json:"name"`
	Size *int32 `json:"size,omitempty"`
}

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             string        `json:"type"`  // always "message"
	Event            string        `json:"event"` // always "link_shared"
	ChatID           int32         `json:"chat_id"`
	MessageID        int32         `json:"message_id"`
	Links            []WebhookLink `json:"links"`
	UserID           int32         `json:"user_id"`
	CreatedAt        time.Time     `json:"created_at"`
	WebhookTimestamp int32         `json:"webhook_timestamp"`
}

type ListBotsParams ΒΆ added in v1.0.26

type ListBotsParams struct {
	Query  *string
	Limit  *int32
	Cursor *string
}

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 ListReactionsParams struct {
	Limit  *int32
	Cursor *string
}

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 ListReadMembersParams struct {
	Limit  *int32
	Cursor *string
}

type ListTagsParams ΒΆ added in v1.0.1

type ListTagsParams struct {
	Names  []string
	Limit  *int32
	Cursor *string
}

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 ListTasksParams struct {
	Limit  *int32
	Cursor *string
}

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 ListThreadsParams struct {
	LastMessageAtAfter  *time.Time
	LastMessageAtBefore *time.Time
	Limit               *int32
	Cursor              *string
}

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 ListUsersParams struct {
	Query  *string
	Limit  *int32
	Cursor *string
}

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) AddTags ΒΆ added in v1.0.13

func (s *MembersServiceImpl) AddTags(ctx context.Context, id int32, groupTagIds []int32) 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 (s *MembersServiceImpl) RemoveMember(ctx context.Context, id int32, userId int32) error

func (*MembersServiceImpl) RemoveTag ΒΆ added in v1.0.13

func (s *MembersServiceImpl) RemoveTag(ctx context.Context, id int32, tagId int32) error

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) AddTags ΒΆ added in v1.0.13

func (s *MembersServiceStub) AddTags(ctx context.Context, id int32, groupTagIds []int32) 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 (s *MembersServiceStub) RemoveMember(ctx context.Context, id int32, userId int32) error

func (*MembersServiceStub) RemoveTag ΒΆ added in v1.0.13

func (s *MembersServiceStub) RemoveTag(ctx context.Context, id int32, tagId int32) error

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 MessageThread struct {
	ID     int64 `json:"id"`
	ChatID int64 `json:"chat_id"`
}

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 (s *MessagesServiceImpl) GetMessage(ctx context.Context, id int32) (*Message, error)

func (*MessagesServiceImpl) ListChatMessages ΒΆ added in v1.0.13

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 (s *MessagesServiceStub) GetMessage(ctx context.Context, id int32) (*Message, error)

func (*MessagesServiceStub) ListChatMessages ΒΆ added in v1.0.13

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 PaginationMetaPaginate struct {
	NextPage string  `json:"next_page"`
	PrevPage *string `json:"prev_page,omitempty"`
	HasNext  *bool   `json:"has_next,omitempty"`
	HasPrev  *bool   `json:"has_prev,omitempty"`
}

type PollWebhookEventsOptions ΒΆ added in v1.0.21

type PollWebhookEventsOptions struct {
	Limit              *int32
	Interval           time.Duration
	CreatedAfter       *time.Time
	MaxSeenDeliveryIDs int
}

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 Reaction ΒΆ

type Reaction struct {
	UserID    int32     `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
	Code      string    `json:"code"`
	Name      string    `json:"name"`
}

type ReactionEventType ΒΆ

type ReactionEventType string
const (
	ReactionEventTypeNew    ReactionEventType = "new"    // Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅
	ReactionEventTypeDelete ReactionEventType = "delete" // Π£Π΄Π°Π»Π΅Π½ΠΈΠ΅
)

type ReactionRequest ΒΆ

type ReactionRequest struct {
	Code string  `json:"code"`
	Name *string `json:"name,omitempty"`
}

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 (*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 (*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 ReadMembersService interface {
	ListReadMembers(ctx context.Context, id int32, params *ListReadMembersParams) (*any, error)
}

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 RemoveReactionParams struct {
	Code string
	Name *string
}

type SearchChatsParams ΒΆ added in v1.0.1

type SearchChatsParams struct {
	Query       *string
	Limit       *int32
	Cursor      *string
	Order       *SortOrder
	CreatedFrom *time.Time
	CreatedTo   *time.Time
	Active      *bool
	ChatSubtype *ChatSubtype
	Personal    *bool
}

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 SearchMessagesParams struct {
	Query       *string
	Limit       *int32
	Cursor      *string
	Order       *SortOrder
	Sort        *MessageSearchSort
	CreatedFrom *time.Time
	CreatedTo   *time.Time
	ChatIDs     []int32
	UserIDs     []int32
	Active      *bool
}

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 (*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 (*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 (*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 (*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 (*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 (*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 SearchUsersParams struct {
	Query        *string
	Limit        *int32
	Cursor       *string
	Sort         *SearchSortOrder
	Order        *SortOrder
	CreatedFrom  *time.Time
	CreatedTo    *time.Time
	CompanyRoles []UserRole
}

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 (*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 (*SecurityServiceStub) GetAuditEventsAll ΒΆ added in v1.0.13

func (s *SecurityServiceStub) GetAuditEventsAll(ctx context.Context, params *GetAuditEventsParams) ([]AuditEvent, error)

type SortOrder ΒΆ

type SortOrder string
const (
	SortOrderAsc  SortOrder = "asc"  // По Π²ΠΎΠ·Ρ€Π°ΡΡ‚Π°Π½ΠΈΡŽ
	SortOrderDesc SortOrder = "desc" // По ΡƒΠ±Ρ‹Π²Π°Π½ΠΈΡŽ
)

type StatusUpdateRequest ΒΆ

type StatusUpdateRequest struct {
	Status StatusUpdateRequestStatus `json:"status"`
}

type StatusUpdateRequestStatus ΒΆ added in v1.0.1

type StatusUpdateRequestStatus struct {
	Emoji       string     `json:"emoji"`
	Title       string     `json:"title"`
	ExpiresAt   *time.Time `json:"expires_at,omitempty"`
	IsAway      *bool      `json:"is_away,omitempty"`
	AwayMessage *string    `json:"away_message,omitempty"`
}

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 TaskCreateRequestCustomProperty struct {
	ID    int32  `json:"id"`
	Value string `json:"value"`
}

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 TaskUpdateRequestCustomProperty struct {
	ID    int32  `json:"id"`
	Value string `json:"value"`
}

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) GetTask ΒΆ added in v1.0.13

func (s *TasksServiceImpl) GetTask(ctx context.Context, id int32) (*Task, 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) GetTask ΒΆ added in v1.0.13

func (s *TasksServiceStub) GetTask(ctx context.Context, id int32) (*Task, 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 Thread ΒΆ

type Thread struct {
	ID            int64     `json:"id"`
	ChatID        int64     `json:"chat_id"`
	UpdatedAt     time.Time `json:"updated_at"`
	MessageID     *int64    `json:"message_id"`
	MessageChatID *int64    `json:"message_chat_id"`
}

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 (s *ThreadsServiceImpl) CreateThread(ctx context.Context, id int32) (*Thread, error)

func (*ThreadsServiceImpl) GetThread ΒΆ added in v1.0.13

func (s *ThreadsServiceImpl) GetThread(ctx context.Context, id int32) (*Thread, error)

func (*ThreadsServiceImpl) ListThreads ΒΆ added in v1.0.19

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 (s *ThreadsServiceStub) CreateThread(ctx context.Context, id int32) (*Thread, error)

func (*ThreadsServiceStub) GetThread ΒΆ added in v1.0.13

func (s *ThreadsServiceStub) GetThread(ctx context.Context, id int32) (*Thread, error)

func (*ThreadsServiceStub) ListThreads ΒΆ added in v1.0.19

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 UpdateProfileAvatarRequest struct {
	Image io.Reader `json:"image"`
}

type UpdateUserAvatarRequest ΒΆ added in v1.0.12

type UpdateUserAvatarRequest struct {
	Image io.Reader `json:"image"`
}

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 UserCreateRequestCustomProperty struct {
	ID    int32  `json:"id"`
	Value string `json:"value"`
}

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 UserRole ΒΆ

type UserRole string
const (
	UserRoleAdmin      UserRole = "admin"       // Администратор
	UserRoleUser       UserRole = "user"        // Π‘ΠΎΡ‚Ρ€ΡƒΠ΄Π½ΠΈΠΊ
	UserRoleMultiGuest UserRole = "multi_guest" // ΠœΡƒΠ»ΡŒΡ‚ΠΈ-Π³ΠΎΡΡ‚ΡŒ
	UserRoleGuest      UserRole = "guest"       // Π“ΠΎΡΡ‚ΡŒ
)

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 UserUpdateRequestCustomProperty struct {
	ID    int32  `json:"id"`
	Value string `json:"value"`
}

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) GetUser ΒΆ added in v1.0.13

func (s *UsersServiceImpl) GetUser(ctx context.Context, id int32) (*User, 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) GetUser ΒΆ added in v1.0.13

func (s *UsersServiceStub) GetUser(ctx context.Context, id int32) (*User, 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 ViewBlock ΒΆ added in v1.0.1

type ViewBlock struct {
	Type        string     `json:"type"`
	Text        *string    `json:"text,omitempty"`
	Name        *string    `json:"name,omitempty"`
	Label       *string    `json:"label,omitempty"`
	InitialDate *time.Time `json:"initial_date,omitempty"`
}

type ViewBlockCheckbox ΒΆ

type ViewBlockCheckbox struct {
	Type     string                    `json:"type"` // always "checkbox"
	Name     string                    `json:"name"`
	Label    string                    `json:"label"`
	Options  []ViewBlockCheckboxOption `json:"options,omitempty"`
	Required *bool                     `json:"required,omitempty"`
	Hint     *string                   `json:"hint,omitempty"`
}

func (ViewBlockCheckbox) MarshalJSON ΒΆ added in v1.0.20

func (m ViewBlockCheckbox) MarshalJSON() ([]byte, error)

type ViewBlockCheckboxOption ΒΆ

type ViewBlockCheckboxOption struct {
	Text        string  `json:"text"`
	Value       string  `json:"value"`
	Description *string `json:"description,omitempty"`
	Checked     *bool   `json:"checked,omitempty"`
}

type ViewBlockDate ΒΆ

type ViewBlockDate struct {
	Type        string  `json:"type"` // always "date"
	Name        string  `json:"name"`
	Label       string  `json:"label"`
	InitialDate *string `json:"initial_date,omitempty"`
	Required    *bool   `json:"required,omitempty"`
	Hint        *string `json:"hint,omitempty"`
}

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 ViewBlockHeader struct {
	Type string `json:"type"` // always "header"
	Text string `json:"text"`
}

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 ViewBlockMarkdown struct {
	Type string `json:"type"` // always "markdown"
	Text string `json:"text"`
}

type ViewBlockPlainText ΒΆ

type ViewBlockPlainText struct {
	Type string `json:"type"` // always "plain_text"
	Text string `json:"text"`
}

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 ViewBlockSelectOption struct {
	Text     string `json:"text"`
	Value    string `json:"value"`
	Selected *bool  `json:"selected,omitempty"`
}

type ViewBlockSelectableOption ΒΆ

type ViewBlockSelectableOption struct {
	Text        string  `json:"text"`
	Value       string  `json:"value"`
	Description *string `json:"description,omitempty"`
	Selected    *bool   `json:"selected,omitempty"`
}

type ViewBlockTime ΒΆ

type ViewBlockTime struct {
	Type        string  `json:"type"` // always "time"
	Name        string  `json:"name"`
	Label       string  `json:"label"`
	InitialTime *string `json:"initial_time,omitempty"`
	Required    *bool   `json:"required,omitempty"`
	Hint        *string `json:"hint,omitempty"`
}

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 VoiceContent struct {
	DurationMs int32   `json:"duration_ms"`
	Waveform   string  `json:"waveform"`
	Transcript *string `json:"transcript"`
}

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 struct {
	URL    string `json:"url"`
	Domain string `json:"domain"`
	Skip   bool   `json:"skip"`
}

type WebhookMessageThread ΒΆ

type WebhookMessageThread struct {
	MessageID     int32 `json:"message_id"`
	MessageChatID int32 `json:"message_chat_id"`
}

type WebhookPayloadUnion ΒΆ

type WebhookPayloadUnion struct {
	MessageWebhookPayload       *MessageWebhookPayload
	ReactionWebhookPayload      *ReactionWebhookPayload
	ButtonWebhookPayload        *ButtonWebhookPayload
	ViewSubmitWebhookPayload    *ViewSubmitWebhookPayload
	ChatMemberWebhookPayload    *ChatMemberWebhookPayload
	CompanyMemberWebhookPayload *CompanyMemberWebhookPayload
	LinkSharedWebhookPayload    *LinkSharedWebhookPayload
	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

type WebhookVideoCallMember struct {
	UserID   int32     `json:"user_id"`
	JoinedAt time.Time `json:"joined_at"`
	LeftAt   time.Time `json:"left_at"`
}

type WebhookVideoCallThread ΒΆ added in v1.0.26

type WebhookVideoCallThread struct {
	ID            int32 `json:"id"`
	ChatID        int32 `json:"chat_id"`
	MessageID     int32 `json:"message_id"`
	MessageChatID int32 `json:"message_chat_id"`
}

Jump to

Keyboard shortcuts

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