watcherclient

package
v0.0.0-...-d0884dd Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Code generated by cmd/main. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClientFactory

type BaseClientFactory func(cfg *config.Config, apiURL string, authKey authorization.AuthKey) baseclient.BaseClient

BaseClientFactory is a factory function type for creating base HTTP clients.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the concrete implementation of the WatcherClient interface.

func (*Client) AgentActivationTokenCreate

func (c *Client) AgentActivationTokenCreate(ctx context.Context, body model.AgentActivationTokenRequest) (model.AgentActivationToken, error)

AgentActivationTokenCreate Create activation token This method creates activation token for agent. This token used by mobile app in qr-code for wifi camera with agent for adding camera with agent in watcher.

func (*Client) AgentActivationTokenGet

func (c *Client) AgentActivationTokenGet(ctx context.Context, token string) (model.AgentActivationToken, error)

AgentActivationTokenGet Check activation token provisioned to watcher This method allows you to check that camera with agent was provisioned to watcher. If you got 404 on this method you - token not existing and you must create a new one to add camera with agent. If no camera_name field in response - camera not provisioned yet to watcher. If camera_name field in response - camera provisioned to watcher.

func (*Client) CameraAuthGet

func (c *Client) CameraAuthGet(ctx context.Context, name string) (model.Auth, error)

CameraAuthGet Get auth for camera Create or update a auth for camera by its name.

func (*Client) CameraAuthSave

func (c *Client) CameraAuthSave(ctx context.Context, name string) (model.Auth, error)

CameraAuthSave Save auth for camera Create or update a auth for camera by its name.

func (*Client) CameraConfigGet

func (c *Client) CameraConfigGet(ctx context.Context, name string) (model.CameraConfig, error)

CameraConfigGet Get one stream camera config This method allows to fetch a single stream camera config info.

func (*Client) CameraConfigSave

func (c *Client) CameraConfigSave(ctx context.Context, name string, body model.CameraConfig) (model.CameraConfig, error)

CameraConfigSave Save stream camera config Create or update a stream config by its name.

func (*Client) CameraReboot

func (c *Client) CameraReboot(ctx context.Context, name string) error

CameraReboot Reboot camera Reboot camera

func (*Client) DeleteOrganizationPreset

func (c *Client) DeleteOrganizationPreset(ctx context.Context, organization_id string, preset_id string) error

DeleteOrganizationPreset Delete preset from organization This method allows to remove a specific preset from organization.

func (*Client) DeviceTokenConfirm

func (c *Client) DeviceTokenConfirm(ctx context.Context, token string) (model.DeviceToken, error)

DeviceTokenConfirm Confirm notification received by device Should be called by a device when notification received

func (*Client) DeviceTokenDelete

func (c *Client) DeviceTokenDelete(ctx context.Context, token string) error

DeviceTokenDelete Delete device token Delete device token. Mobile application have to delete all expired device tokens, received from Firebase.

func (*Client) DeviceTokenGet

func (c *Client) DeviceTokenGet(ctx context.Context, token string) (model.DeviceToken, error)

DeviceTokenGet Get device token Returns a device token info

func (*Client) DeviceTokenSave

func (c *Client) DeviceTokenSave(ctx context.Context, token string, body model.DeviceToken) (model.DeviceToken, error)

DeviceTokenSave Save a new device token Save a new device token in Watcher. You can read how to create it here: https://firebase.google.com/docs/cloud-messaging/android/client?hl=en#sample-register You must save and refresh token if you want to receive notifications about [camera events](#tag/profile/operation/event_subscription_create).

func (*Client) EpisodeAddToFavorites

func (c *Client) EpisodeAddToFavorites(ctx context.Context, episode_id string) error

EpisodeAddToFavorites Add episode to the favorites This method allows you to add an episode to the favorites.

func (*Client) EpisodeDelete

func (c *Client) EpisodeDelete(ctx context.Context, episode_id string, query *EpisodeDeleteQuery) error

EpisodeDelete Delete episode This method allows you to delete a registered episode. Only manually created episodes can be deleted. Episodes created automatically by the system (e.g., by video analytics) cannot be deleted.

func (*Client) EpisodeDeleteFromFavorites

func (c *Client) EpisodeDeleteFromFavorites(ctx context.Context, episode_id string) error

EpisodeDeleteFromFavorites Delete episode from the favorites This method allows you to delete an episode from the favorites.

func (*Client) EpisodeGet

func (c *Client) EpisodeGet(ctx context.Context, episode_id string, query *EpisodeGetQuery) (model.WatcherEpisode, error)

EpisodeGet Get episode This method allows you to fetch a registered episode

func (*Client) EpisodesList

func (c *Client) EpisodesList(ctx context.Context, query *EpisodesListQuery) (model.EpisodesList, error)

EpisodesList List episodes This method allows you to fetch registered episodes

func (*Client) EpisodesListIterator

func (c *Client) EpisodesListIterator(ctx context.Context, query *EpisodesListQuery) iter.Seq2[model.WatcherEpisode, error]

EpisodesListIterator iterates through all WatcherEpisode items using cursor pagination.

func (*Client) EpisodesStreaming

func (c *Client) EpisodesStreaming(ctx context.Context, query *EpisodesListQuery, callback func(ctx context.Context, episode model.WatcherEpisode) error)

EpisodesStreaming streams episodes using long polling with poll_timeout and updated_at_gt.

func (*Client) EventSubscriptionCreate

func (c *Client) EventSubscriptionCreate(ctx context.Context, body model.SubscriptionRequest) (model.Subscription, error)

EventSubscriptionCreate Create a new event subscription on specific stream Create a new event subscription

func (*Client) EventSubscriptionDelete

func (c *Client) EventSubscriptionDelete(ctx context.Context, body model.SubscriptionRequest) error

EventSubscriptionDelete Unsubscribe from events on specific stream Delete subscription on events

func (*Client) FolderCreate

func (c *Client) FolderCreate(ctx context.Context, organization_id string, body model.Folder) (model.Folder, error)

FolderCreate Create folder Create folder.

func (*Client) FolderDelete

func (c *Client) FolderDelete(ctx context.Context, organization_id string, folder_id string) error

FolderDelete Delete folder This method allows to delete a folder.

func (*Client) FolderGet

func (c *Client) FolderGet(ctx context.Context, organization_id string, folder_id string) (model.Folder, error)

FolderGet Get folder info This method allows to fetch folder info.

func (*Client) FolderList

func (c *Client) FolderList(ctx context.Context, organization_id string, query *FolderListQuery) (model.FoldersList, error)

FolderList Get list of folders This method allows to fetch a list of folders info.

func (*Client) FolderListIterator

func (c *Client) FolderListIterator(ctx context.Context, organization_id string, query *FolderListQuery) iter.Seq2[model.Folder, error]

FolderListIterator iterates through all Folder items using cursor pagination.

func (*Client) FolderSave

func (c *Client) FolderSave(ctx context.Context, organization_id string, folder_id string, body model.Folder) (model.Folder, error)

FolderSave Save folder Save folder.

func (*Client) FolderUserDelete

func (c *Client) FolderUserDelete(ctx context.Context, organization_id string, folder_id string, user_id string) error

FolderUserDelete Delete user in a folder This method allows to delete user info in a folder.

func (*Client) FolderUserGet

func (c *Client) FolderUserGet(ctx context.Context, organization_id string, folder_id string, user_id string) (model.FolderUser, error)

FolderUserGet Get user in a folder This method allows to fetch user in a folder.

func (*Client) FolderUserSave

func (c *Client) FolderUserSave(ctx context.Context, organization_id string, folder_id string, user_id string, body model.FolderUser) (model.FolderUser, error)

FolderUserSave Save user in a folder Save user info in a folder.

func (*Client) FolderUsersList

func (c *Client) FolderUsersList(ctx context.Context, organization_id string, folder_id string, query *FolderUsersListQuery) (model.FolderUsersList, error)

FolderUsersList Get a list of users in a folder This method allows to fetch a list of users in a folder.

func (*Client) FolderUsersListIterator

func (c *Client) FolderUsersListIterator(ctx context.Context, organization_id string, folder_id string, query *FolderUsersListQuery) iter.Seq2[model.FolderUsers, error]

FolderUsersListIterator iterates through all FolderUsers items using cursor pagination.

func (*Client) GetInviteShortInfo

func (c *Client) GetInviteShortInfo(ctx context.Context, invite_key string) (model.OrganizationBase, error)

GetInviteShortInfo Get organization invite short info This method allows to get short info about organization invite.

func (*Client) LoginCreate

func (c *Client) LoginCreate(ctx context.Context) (model.LoginInfoAdditional, error)

LoginCreate Get an auth token The method creates a new temporary auth-token (JWT). The JTW token used as Bearer token in requests other than `/login`.

func (*Client) MessageDelete

func (c *Client) MessageDelete(ctx context.Context, message_id string) error

MessageDelete Delete a message This method allows you to delete a message

func (*Client) MessageGet

func (c *Client) MessageGet(ctx context.Context, message_id string) (model.Message, error)

MessageGet Get a message This method allows you to fetch the message by its identifier

func (*Client) MessageSend

func (c *Client) MessageSend(ctx context.Context, body model.MessageSend) (model.MessageResponse, error)

MessageSend Send a message This method allows you to send a message to a user

func (*Client) MessageUpdate

func (c *Client) MessageUpdate(ctx context.Context, message_id string, body model.MessageChangeRequest) (model.Message, error)

MessageUpdate Update message Update message by its id.

func (*Client) MessagesList

func (c *Client) MessagesList(ctx context.Context, query *MessagesListQuery) (model.Messages, error)

MessagesList List of messages List of messages

func (*Client) MessagesListIterator

func (c *Client) MessagesListIterator(ctx context.Context, query *MessagesListQuery) iter.Seq2[model.Message, error]

MessagesListIterator iterates through all Message items using cursor pagination.

func (*Client) MosaicCreate

func (c *Client) MosaicCreate(ctx context.Context, body any) (model.Mosaic, error)

MosaicCreate Create mosaic This method allows you to create a mosaic

func (*Client) MosaicDelete

func (c *Client) MosaicDelete(ctx context.Context, mosaic_id string) error

MosaicDelete Delete a mosaic This method allows you to delete a mosaic

func (*Client) MosaicGet

func (c *Client) MosaicGet(ctx context.Context, mosaic_id string) (model.Mosaic, error)

MosaicGet Get mosaic detail This method is used to get info about mosaic by its id.

func (*Client) MosaicSave

func (c *Client) MosaicSave(ctx context.Context, mosaic_id string, body model.MosaicSave) (model.Mosaic, error)

MosaicSave Save mosaic This method allows you to update mosaic data

func (*Client) MosaicsList

func (c *Client) MosaicsList(ctx context.Context, query *MosaicsListQuery) (model.MosaicsList, error)

MosaicsList List mosaics Returns the list of all mosaics. Mosaics allow you to combine multiple cameras to display on a single screen.

func (*Client) MosaicsListIterator

func (c *Client) MosaicsListIterator(ctx context.Context, query *MosaicsListQuery) iter.Seq2[model.Mosaic, error]

MosaicsListIterator iterates through all Mosaic items using cursor pagination.

func (*Client) NotificationSend

func (c *Client) NotificationSend(ctx context.Context, body any) error

NotificationSend Send an arbitrary push notification Send an arbitrary push notification. This method sends test push notification to user.

func (*Client) OrganizationCreate

func (c *Client) OrganizationCreate(ctx context.Context, body model.Organization) (model.Organization, error)

OrganizationCreate Create organization Create new organization

func (*Client) OrganizationDelete

func (c *Client) OrganizationDelete(ctx context.Context, organization_id string) error

OrganizationDelete Delete organization Delete organization by its id.

func (*Client) OrganizationGet

func (c *Client) OrganizationGet(ctx context.Context, organization_id string) (model.Organization, error)

OrganizationGet Get single organization info This method allows to fetch a single organization info. Refer to the `organizations_list` operation to find out what data will be returned in this method.

func (*Client) OrganizationInviteAccept

func (c *Client) OrganizationInviteAccept(ctx context.Context, invite_key string) error

OrganizationInviteAccept Accept organization invite This method allows to accept organization invite and add user to organization.

func (*Client) OrganizationInviteCreate

func (c *Client) OrganizationInviteCreate(ctx context.Context, organization_id string, body model.OrganizationInviteSetup) (model.OrganizationInviteKey, error)

OrganizationInviteCreate Create organization invite key This method allows to create a single organizations invite key. Using this key user can invite other users to the organization. Only organization owner can create invite key.

func (*Client) OrganizationPresetSave

func (c *Client) OrganizationPresetSave(ctx context.Context, organization_id string, body model.OrganizationPreset) (model.Preset, error)

OrganizationPresetSave Update organizations preset Save organization preset by its id or adds new preset to organization.

func (*Client) OrganizationSave

func (c *Client) OrganizationSave(ctx context.Context, organization_id string, body model.Organization) (model.Organization, error)

OrganizationSave Update organization Update organization by its id.

func (*Client) OrganizationUserDelete

func (c *Client) OrganizationUserDelete(ctx context.Context, organization_id string, user_id string) error

OrganizationUserDelete Delete user from organization Delete user from organization by its id.

func (*Client) OrganizationUserGet

func (c *Client) OrganizationUserGet(ctx context.Context, organization_id string, user_id string) (model.OrganizationUser, error)

OrganizationUserGet Get single organization user info This method allows to fetch a single organizations user info.

func (*Client) OrganizationUserSave

func (c *Client) OrganizationUserSave(ctx context.Context, organization_id string, user_id string, body model.OrganizationPermissions) (model.OrganizationUser, error)

OrganizationUserSave Update organizations user Update organization user by its id or adds new user to organization.

func (*Client) OrganizationUsersList

func (c *Client) OrganizationUsersList(ctx context.Context, organization_id string, query *OrganizationUsersListQuery) (model.OrganizationUsersList, error)

OrganizationUsersList List users in organization Users who are members of the organization

func (*Client) OrganizationUsersListIterator

func (c *Client) OrganizationUsersListIterator(ctx context.Context, organization_id string, query *OrganizationUsersListQuery) iter.Seq2[model.OrganizationUser, error]

OrganizationUsersListIterator iterates through all OrganizationUser items using cursor pagination.

func (*Client) OrganizationsList

func (c *Client) OrganizationsList(ctx context.Context, query *OrganizationsListQuery) (model.OrganizationsList, error)

OrganizationsList List organizations Organizations of which the user is member

func (*Client) OrganizationsListIterator

func (c *Client) OrganizationsListIterator(ctx context.Context, query *OrganizationsListQuery) iter.Seq2[model.Organization, error]

OrganizationsListIterator iterates through all Organization items using cursor pagination.

func (*Client) PasswordRecovery

func (c *Client) PasswordRecovery(ctx context.Context, body any) error

PasswordRecovery Send password recovery email Send user email with password recovery instructions. This method will return success regardless of whether there is a user with the specified email address or not

func (*Client) PersonDelete

func (c *Client) PersonDelete(ctx context.Context, person_id string) error

PersonDelete Delete person Delete person by its id.

func (*Client) PersonGet

func (c *Client) PersonGet(ctx context.Context, person_id string) (model.Person, error)

PersonGet Get the Person This method allows you to fetch the person by its identifier

func (*Client) PersonListsGet

func (c *Client) PersonListsGet(ctx context.Context, query *PersonListsGetQuery) (model.PersonListsList, error)

PersonListsGet Lists Person This method allows you to fetch the person lists

func (*Client) PersonListsGetIterator

func (c *Client) PersonListsGetIterator(ctx context.Context, query *PersonListsGetQuery) iter.Seq2[model.PersonLists, error]

PersonListsGetIterator iterates through all PersonLists items using cursor pagination.

func (*Client) PersonsList

func (c *Client) PersonsList(ctx context.Context, query *PersonsListQuery) (model.PersonsList, error)

PersonsList List Persons The list of registered videoanalytics persons

func (*Client) PersonsListIterator

func (c *Client) PersonsListIterator(ctx context.Context, query *PersonsListQuery) iter.Seq2[model.VisionPerson, error]

PersonsListIterator iterates through all VisionPerson items using cursor pagination.

func (*Client) PresetGet

func (c *Client) PresetGet(ctx context.Context, id string) (model.Preset, error)

PresetGet Get one preset This method is used to get info about preset by its id.

func (*Client) PresetsList

func (c *Client) PresetsList(ctx context.Context, query *PresetsListQuery) (model.PresetsList, error)

PresetsList List presets The presets in Watcher is a set of DVR and analytics parameters that you can use as a template when creating and configuring cameras. When you select a preset in the camera settings, the parameters from the preset are populated to the camera settings. A set of presets on the camera is defined by the set of presets selected for the camera's Organization. https://flussonic.com/doc/manage-presets-in-watcher-ui/ This method is used to get info about presets. If the `organization_id` is transferred this method will return presets only allowed in organization with that Id.

func (*Client) PresetsListIterator

func (c *Client) PresetsListIterator(ctx context.Context, query *PresetsListQuery) iter.Seq2[model.Preset, error]

PresetsListIterator iterates through all Preset items using cursor pagination.

func (*Client) ProfileGet

func (c *Client) ProfileGet(ctx context.Context) (model.Profile, error)

ProfileGet Get profile info Get profile info.

func (*Client) ProfileSave

func (c *Client) ProfileSave(ctx context.Context, body model.Profile) (model.Profile, error)

ProfileSave Update profile info Update profile info.

func (*Client) ResetPassword

func (c *Client) ResetPassword(ctx context.Context, body model.PasswordReset) error

ResetPassword Reset password Changes user password

func (*Client) StreamDelete

func (c *Client) StreamDelete(ctx context.Context, name string, query *StreamDeleteQuery) error

StreamDelete Delete the stream This method allows to delete a single stream. You can delete `config_override` by this API call if you want to remove all runtime overrides. If you do not specify any `part` parameter, this stream will be deleted from `config_on_disk` and if it was `named_by: config`, then it will immediately stop.

func (*Client) StreamFirmwareUpdate

func (c *Client) StreamFirmwareUpdate(ctx context.Context, name string, body model.FirmwareUpdate) error

StreamFirmwareUpdate Update camera firmware This method allows you to update camera firmware

func (*Client) StreamGet

func (c *Client) StreamGet(ctx context.Context, name string) (model.StreamConfig, error)

StreamGet Get one stream This method allows to fetch a single stream. Refer to the `streams_list` operation to find out what data will be returned in this method.

func (*Client) StreamPermissionUserDelete

func (c *Client) StreamPermissionUserDelete(ctx context.Context, name string, user_id string) error

StreamPermissionUserDelete Delete stream permissions Delete all permissions for a specific user to access a stream. Removes direct access permissions for a user to this stream. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners

func (*Client) StreamPermissionUserGet

func (c *Client) StreamPermissionUserGet(ctx context.Context, name string, user_id string) (model.StreamUserPermission, error)

StreamPermissionUserGet Get user permissions to a stream Returns the permissions that a specific user has for a specified stream via stream permissions. Shows detailed permissions a user has for this stream. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners

func (*Client) StreamPermissionUserSave

func (c *Client) StreamPermissionUserSave(ctx context.Context, name string, user_id string, body model.StreamPermissionsAccess) (model.StreamUserPermission, error)

StreamPermissionUserSave Update stream permissions Saves permissions for a specific user to access a stream. These permissions override folder-level permissions but are overridden by organization-level permissions. Updates or creates direct stream permissions for a user. These permissions override folder-level permissions but are overridden by organization-level permissions. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners

func (*Client) StreamPermissionsUsersList

func (c *Client) StreamPermissionsUsersList(ctx context.Context, name string, query *StreamPermissionsUsersListQuery) (model.StreamUsersPermissionsList, error)

StreamPermissionsUsersList List users with permissions to a stream Returns a list of users who have direct access to the specified stream via stream permissions. Lists all users with explicit permissions set for this stream. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners

func (*Client) StreamPermissionsUsersListIterator

func (c *Client) StreamPermissionsUsersListIterator(ctx context.Context, name string, query *StreamPermissionsUsersListQuery) iter.Seq2[model.StreamUserPermission, error]

StreamPermissionsUsersListIterator iterates through all StreamUserPermission items using cursor pagination.

func (*Client) StreamPtzExecute

func (c *Client) StreamPtzExecute(ctx context.Context, name string, body model.PtzCommand) error

StreamPtzExecute Execute a PTZ command Execute a PTZ command

func (*Client) StreamSave

func (c *Client) StreamSave(ctx context.Context, name string, query *StreamSaveQuery, body model.StreamConfig) (model.StreamConfig, error)

StreamSave Save stream Create or update a stream by its name. If the stream doesn't exists in the disk config, it will be created. If you try to update a stream that is started from a template by a user request having `named_by=user`, a new stream will be created in the disk config. If you pass only a partial stream configuration, this field will be updated, not the whole stream. To create a new stream the property `name` is required. Pass the `"$reset": true` option to replace the stream configuration with the provided one.

func (*Client) StreamsImport

func (c *Client) StreamsImport(ctx context.Context) (model.StreamsImportResponse, error)

StreamsImport Import of streams This method allows you to easily add or update camera configurations. If a camera with the specified name exists, its settings will be updated; otherwise, a new camera will be created. This is useful for making simultaneous changes to multiple cameras, such as integrating billing or setting up different user configurations. New cameras will be added or existing ones updated without affecting others. Requests can be sent in CSV format. Ensure the user has permission to edit cameras in the relevant organizations before submitting. If errors occur, no changes will be made, preserving the original configuration.

func (*Client) StreamsList

func (c *Client) StreamsList(ctx context.Context, query *StreamsListQuery) (model.StreamsList, error)

StreamsList List streams This API method is one of the most important in whole API, because it gives the list of all streams. `streams_list` in Watcher Admin API: * can list all streams within the Watcher. * admin is not allowed to watch content from any cameras for security reasons. `streams_list` in Watcher Client API: * return streams from organizations where you're member * prodives a playback token that allows play video from the camera.

func (*Client) StreamsListIterator

func (c *Client) StreamsListIterator(ctx context.Context, query *StreamsListQuery) iter.Seq2[model.StreamConfig, error]

StreamsListIterator iterates through all StreamConfig items using cursor pagination.

func (*Client) StreamsMultiedit

func (c *Client) StreamsMultiedit(ctx context.Context, body model.StreamsMultieditConfig) error

StreamsMultiedit Save streams settings Create or update settings for each stream. This operation does everything or nothing. If at least one stream has an invalid configuration or can't be processed, the request will fail.

func (*Client) UiSettingsGet

func (c *Client) UiSettingsGet(ctx context.Context) (model.UiSettingsConfig, error)

UiSettingsGet Get UI settings The method allows you to fetch UI settings including branding colors, logos, etc. It can work without authorization for the login page to be loaded.

func (*Client) UserApikeyCreate

func (c *Client) UserApikeyCreate(ctx context.Context) (model.Apikey, error)

UserApikeyCreate Create new apikey for user Create apikey for user

func (*Client) UserApikeyDelete

func (c *Client) UserApikeyDelete(ctx context.Context) error

UserApikeyDelete Delete apikey for user Delete apikey for user

func (*Client) UserApikeyGet

func (c *Client) UserApikeyGet(ctx context.Context) (model.Apikey, error)

UserApikeyGet Get users apikey Get users apikey

func (*Client) UserCreate

func (c *Client) UserCreate(ctx context.Context, body any) (model.User, error)

UserCreate Create user This method allows you to create a user

func (*Client) UserDelete

func (c *Client) UserDelete(ctx context.Context, user_id string) error

UserDelete Delete a user This method allows you to delete a user

func (*Client) UserGet

func (c *Client) UserGet(ctx context.Context, user_id string) (model.User, error)

UserGet Get a user This method allows you to fetch the user by its identifier

func (*Client) UserOrganizationFoldersList

func (c *Client) UserOrganizationFoldersList(ctx context.Context, user_id string, organization_id string, query *UserOrganizationFoldersListQuery) (model.UserFolders, error)

UserOrganizationFoldersList Get user's folders in organization Get list of folders available for user in specific organization

func (*Client) UserOrganizationFoldersListIterator

func (c *Client) UserOrganizationFoldersListIterator(ctx context.Context, user_id string, organization_id string, query *UserOrganizationFoldersListQuery) iter.Seq2[model.UserFolder, error]

UserOrganizationFoldersListIterator iterates through all UserFolder items using cursor pagination.

func (*Client) UserOrganizationsList

func (c *Client) UserOrganizationsList(ctx context.Context, user_id string, query *UserOrganizationsListQuery) (model.OrganizationsList, error)

UserOrganizationsList Get user's organizations Get list of organizations available for user

func (*Client) UserOrganizationsListIterator

func (c *Client) UserOrganizationsListIterator(ctx context.Context, user_id string, query *UserOrganizationsListQuery) iter.Seq2[model.Organization, error]

UserOrganizationsListIterator iterates through all Organization items using cursor pagination.

func (*Client) UserSave

func (c *Client) UserSave(ctx context.Context, user_id string, body model.User) (model.User, error)

UserSave Save user This method allows you to update user data

func (*Client) UserStreamPermissionDelete

func (c *Client) UserStreamPermissionDelete(ctx context.Context, user_id string, name string) error

UserStreamPermissionDelete Delete stream permissions Delete all permissions for the user to access a stream. Removes direct permissions for a user to access a specific stream. Note that the user may still have access via organization or folder permissions. This API is accessible to: - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners

func (*Client) UserStreamPermissionGet

func (c *Client) UserStreamPermissionGet(ctx context.Context, user_id string, name string) (model.UserStreamPermission, error)

UserStreamPermissionGet Get user permissions to a stream Returns the permissions that the user has for a specified stream via stream permissions. Allows viewing user-specific stream permissions. This API is accessible to: - The user themselves - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners

func (*Client) UserStreamPermissionSave

func (c *Client) UserStreamPermissionSave(ctx context.Context, user_id string, name string, body model.StreamPermissionsAccess) (model.UserStreamPermission, error)

UserStreamPermissionSave Update user's stream permissions Save permissions for the user to access a stream. These permissions override folder-level permissions but are overridden by organization-level permissions. Updates or creates permissions for a user to access a specific stream. This API is accessible to: - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners

func (*Client) UserStreamsPermissionsList

func (c *Client) UserStreamsPermissionsList(ctx context.Context, user_id string, query *UserStreamsPermissionsListQuery) (model.UserStreamsPermissionsList, error)

UserStreamsPermissionsList List streams accessible to a user Returns a list of streams to which the specified user has direct access via stream permissions. Lists all streams where a user has explicit permissions set. This API is accessible to: - The user themselves - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners

func (*Client) UserStreamsPermissionsListIterator

func (c *Client) UserStreamsPermissionsListIterator(ctx context.Context, user_id string, query *UserStreamsPermissionsListQuery) iter.Seq2[model.UserStreamPermission, error]

UserStreamsPermissionsListIterator iterates through all UserStreamPermission items using cursor pagination.

func (*Client) UsersApikeyCreate

func (c *Client) UsersApikeyCreate(ctx context.Context, user_id string) (model.Apikey, error)

UsersApikeyCreate Create new API key for user The API key is used for authentication in API requests, allowing access to protected resources without using a password.

func (*Client) UsersApikeyGet

func (c *Client) UsersApikeyGet(ctx context.Context, user_id string) (model.Apikey, error)

UsersApikeyGet Get user's API key The API key is used for authentication in API requests, allowing access to protected resources without using a password.

func (*Client) UsersList

func (c *Client) UsersList(ctx context.Context, query *UsersListQuery) (model.Users, error)

UsersList List of users List of available users

func (*Client) UsersListIterator

func (c *Client) UsersListIterator(ctx context.Context, query *UsersListQuery) iter.Seq2[model.User, error]

UsersListIterator iterates through all User items using cursor pagination.

func (*Client) WebPushSubscribe

func (c *Client) WebPushSubscribe(ctx context.Context, body model.WebPushSubscriptionCreate) error

WebPushSubscribe Create subscription Subscribes the client to Push Messages

func (*Client) WebPushSubscriptionExistenceGet

func (c *Client) WebPushSubscriptionExistenceGet(ctx context.Context, query *WebPushSubscriptionExistenceGetQuery) (any, error)

WebPushSubscriptionExistenceGet Subscription existence Checks for subscription on the backend

func (*Client) WebPushUnsubscribe

func (c *Client) WebPushUnsubscribe(ctx context.Context, body model.WebPushSubscription) error

WebPushUnsubscribe Delete subscription Deletes the subscription, so the client will no longer receive Push Messages on it

type EpisodeDeleteQuery

type EpisodeDeleteQuery struct {
	// Authorization token for unauthenticated access to the episode
	Token string
	Extra map[string]string
}

EpisodeDeleteQuery represents query parameters for EpisodeDelete method

func (*EpisodeDeleteQuery) ToQueryString

func (q *EpisodeDeleteQuery) ToQueryString() (string, error)

ToQueryString converts EpisodeDeleteQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type EpisodeGetQuery

type EpisodeGetQuery struct {
	// Authorization token for unauthenticated access to the episode
	Token string
	Extra map[string]string
}

EpisodeGetQuery represents query parameters for EpisodeGet method

func (*EpisodeGetQuery) ToQueryString

func (q *EpisodeGetQuery) ToQueryString() (string, error)

ToQueryString converts EpisodeGetQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type EpisodesListQuery

type EpisodesListQuery struct {
	Cursor string
	// Episode type
	EpisodeType string
	Limit       int
	// Filter the collection by media name on which the episode is registered
	Media string
	// Client may ask to delay a response if there are no episodes to fetch. This should be used as a long-poll mechanism for lightweight fetching episodes from origin.
	PollTimeout int
	// Request for the search across the streams being processed by the inference server. Query is a free-formed text that describes an object to search for and its attributes. Query may include color properties ("yellow"), appearance attributes ("beard"). Results may be inaccurate and should be reviewed by inspecting corresponding video fragments. In order to use "context search" feature packages [flussonic-vision](https://flussonic.com/doc/watcher-vision-installation/#watcher-vision-installation) and `vision-context-search` must be installed at the  inference server to make digital fingerprints of streams. In case you use the "q" parameter to get a list of episodes, the following collection filters are only supported: "media", "opened_at_gte", "opened_at_lte".
	Q      string
	Select []string
	Sort   []string
	// Filter the collection by episode update time. This field is rather specific because it allows to have an update stream with new/updated episodes
	UpdatedAtGt int
	Extra       map[string]string
}

EpisodesListQuery represents query parameters for EpisodesList method

func (*EpisodesListQuery) SetCursor

func (q *EpisodesListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*EpisodesListQuery) ToQueryString

func (q *EpisodesListQuery) ToQueryString() (string, error)

ToQueryString converts EpisodesListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type FolderListQuery

type FolderListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

FolderListQuery represents query parameters for FolderList method

func (*FolderListQuery) SetCursor

func (q *FolderListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*FolderListQuery) ToQueryString

func (q *FolderListQuery) ToQueryString() (string, error)

ToQueryString converts FolderListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type FolderUsersListQuery

type FolderUsersListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

FolderUsersListQuery represents query parameters for FolderUsersList method

func (*FolderUsersListQuery) SetCursor

func (q *FolderUsersListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*FolderUsersListQuery) ToQueryString

func (q *FolderUsersListQuery) ToQueryString() (string, error)

ToQueryString converts FolderUsersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type MessagesListQuery

type MessagesListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

MessagesListQuery represents query parameters for MessagesList method

func (*MessagesListQuery) SetCursor

func (q *MessagesListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*MessagesListQuery) ToQueryString

func (q *MessagesListQuery) ToQueryString() (string, error)

ToQueryString converts MessagesListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type MosaicsListQuery

type MosaicsListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

MosaicsListQuery represents query parameters for MosaicsList method

func (*MosaicsListQuery) SetCursor

func (q *MosaicsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*MosaicsListQuery) ToQueryString

func (q *MosaicsListQuery) ToQueryString() (string, error)

ToQueryString converts MosaicsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type OrganizationUsersListQuery

type OrganizationUsersListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

OrganizationUsersListQuery represents query parameters for OrganizationUsersList method

func (*OrganizationUsersListQuery) SetCursor

func (q *OrganizationUsersListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*OrganizationUsersListQuery) ToQueryString

func (q *OrganizationUsersListQuery) ToQueryString() (string, error)

ToQueryString converts OrganizationUsersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type OrganizationsListQuery

type OrganizationsListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

OrganizationsListQuery represents query parameters for OrganizationsList method

func (*OrganizationsListQuery) SetCursor

func (q *OrganizationsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*OrganizationsListQuery) ToQueryString

func (q *OrganizationsListQuery) ToQueryString() (string, error)

ToQueryString converts OrganizationsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type PersonListsGetQuery

type PersonListsGetQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

PersonListsGetQuery represents query parameters for PersonListsGet method

func (*PersonListsGetQuery) SetCursor

func (q *PersonListsGetQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*PersonListsGetQuery) ToQueryString

func (q *PersonListsGetQuery) ToQueryString() (string, error)

ToQueryString converts PersonListsGetQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type PersonsListQuery

type PersonsListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

PersonsListQuery represents query parameters for PersonsList method

func (*PersonsListQuery) SetCursor

func (q *PersonsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*PersonsListQuery) ToQueryString

func (q *PersonsListQuery) ToQueryString() (string, error)

ToQueryString converts PersonsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type PresetsListQuery

type PresetsListQuery struct {
	Cursor string
	Limit  int
	// Organization identifier to select presets only available for this organization. If the `organization_id` is not transferred, all available presets will be returned.
	OrganizationId int
	Select         []string
	Sort           []string
	Extra          map[string]string
}

PresetsListQuery represents query parameters for PresetsList method

func (*PresetsListQuery) SetCursor

func (q *PresetsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*PresetsListQuery) ToQueryString

func (q *PresetsListQuery) ToQueryString() (string, error)

ToQueryString converts PresetsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type StreamDeleteQuery

type StreamDeleteQuery struct {
	// part of config to delete
	Part  string
	Extra map[string]string
}

StreamDeleteQuery represents query parameters for StreamDelete method

func (*StreamDeleteQuery) ToQueryString

func (q *StreamDeleteQuery) ToQueryString() (string, error)

ToQueryString converts StreamDeleteQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type StreamPermissionsUsersListQuery

type StreamPermissionsUsersListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

StreamPermissionsUsersListQuery represents query parameters for StreamPermissionsUsersList method

func (*StreamPermissionsUsersListQuery) SetCursor

func (q *StreamPermissionsUsersListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*StreamPermissionsUsersListQuery) ToQueryString

func (q *StreamPermissionsUsersListQuery) ToQueryString() (string, error)

ToQueryString converts StreamPermissionsUsersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type StreamSaveQuery

type StreamSaveQuery struct {
	// The stream is configured by several origins of configuration. It may be `config_on_disk` or temporary runtime `config_override` that can be provided via `on_play` or `on_publish` backend, or edited via this API call if you pass `config_override` to this parameter.
	Part  string
	Extra map[string]string
}

StreamSaveQuery represents query parameters for StreamSave method

func (*StreamSaveQuery) ToQueryString

func (q *StreamSaveQuery) ToQueryString() (string, error)

ToQueryString converts StreamSaveQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type StreamsListQuery

type StreamsListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

StreamsListQuery represents query parameters for StreamsList method

func (*StreamsListQuery) SetCursor

func (q *StreamsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*StreamsListQuery) ToQueryString

func (q *StreamsListQuery) ToQueryString() (string, error)

ToQueryString converts StreamsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type UserOrganizationFoldersListQuery

type UserOrganizationFoldersListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

UserOrganizationFoldersListQuery represents query parameters for UserOrganizationFoldersList method

func (*UserOrganizationFoldersListQuery) SetCursor

func (q *UserOrganizationFoldersListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*UserOrganizationFoldersListQuery) ToQueryString

func (q *UserOrganizationFoldersListQuery) ToQueryString() (string, error)

ToQueryString converts UserOrganizationFoldersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type UserOrganizationsListQuery

type UserOrganizationsListQuery struct {
	// A parameter to filter organizations based on their edit availability for the current user
	CanEdit bool
	Cursor  string
	Limit   int
	Select  []string
	Sort    []string
	Extra   map[string]string
}

UserOrganizationsListQuery represents query parameters for UserOrganizationsList method

func (*UserOrganizationsListQuery) SetCursor

func (q *UserOrganizationsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*UserOrganizationsListQuery) ToQueryString

func (q *UserOrganizationsListQuery) ToQueryString() (string, error)

ToQueryString converts UserOrganizationsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type UserStreamsPermissionsListQuery

type UserStreamsPermissionsListQuery struct {
	Cursor string
	Limit  int
	Select []string
	Sort   []string
	Extra  map[string]string
}

UserStreamsPermissionsListQuery represents query parameters for UserStreamsPermissionsList method

func (*UserStreamsPermissionsListQuery) SetCursor

func (q *UserStreamsPermissionsListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*UserStreamsPermissionsListQuery) ToQueryString

func (q *UserStreamsPermissionsListQuery) ToQueryString() (string, error)

ToQueryString converts UserStreamsPermissionsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type UsersListQuery

type UsersListQuery struct {
	Cursor string
	Limit  int
	// Organization identifier to select users only available for this organization. If the `organization_id` is not transferred, all available users will be returned.
	OrganizationId int
	Select         []string
	Sort           []string
	Extra          map[string]string
}

UsersListQuery represents query parameters for UsersList method

func (*UsersListQuery) SetCursor

func (q *UsersListQuery) SetCursor(cursor *string)

SetCursor sets the cursor for pagination.

func (*UsersListQuery) ToQueryString

func (q *UsersListQuery) ToQueryString() (string, error)

ToQueryString converts UsersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.

type WatcherClient

type WatcherClient interface {
	// AgentActivationTokenCreate Create activation token
	// This method creates activation token for agent. This token used by mobile app in qr-code for wifi camera with agent for adding camera with agent in watcher.
	AgentActivationTokenCreate(ctx context.Context, body model.AgentActivationTokenRequest) (model.AgentActivationToken, error)
	// AgentActivationTokenGet Check activation token provisioned to watcher
	// This method allows you to check that camera with agent was provisioned to watcher. If you got 404 on this method you - token not existing and you must create a new one to add camera with agent. If no camera_name field in response - camera not provisioned yet to watcher. If camera_name field in response - camera provisioned to watcher.
	AgentActivationTokenGet(ctx context.Context, token string) (model.AgentActivationToken, error)
	// CameraAuthGet Get auth for camera
	// Create or update a auth for camera by its name.
	CameraAuthGet(ctx context.Context, name string) (model.Auth, error)
	// CameraAuthSave Save auth for camera
	// Create or update a auth for camera by its name.
	CameraAuthSave(ctx context.Context, name string) (model.Auth, error)
	// CameraConfigGet Get one stream camera config
	// This method allows to fetch a single stream camera config info.
	CameraConfigGet(ctx context.Context, name string) (model.CameraConfig, error)
	// CameraConfigSave Save stream camera config
	// Create or update a stream config by its name.
	CameraConfigSave(ctx context.Context, name string, body model.CameraConfig) (model.CameraConfig, error)
	// CameraReboot Reboot camera
	// Reboot camera
	CameraReboot(ctx context.Context, name string) error
	// DeleteOrganizationPreset Delete preset from organization
	// This method allows to remove a specific preset from organization.
	DeleteOrganizationPreset(ctx context.Context, organization_id string, preset_id string) error
	// DeviceTokenConfirm Confirm notification received by device
	// Should be called by a device when notification received
	DeviceTokenConfirm(ctx context.Context, token string) (model.DeviceToken, error)
	// DeviceTokenDelete Delete device token
	// Delete device token. Mobile application have to delete all expired device tokens, received from Firebase.
	DeviceTokenDelete(ctx context.Context, token string) error
	// DeviceTokenGet Get device token
	// Returns a device token info
	DeviceTokenGet(ctx context.Context, token string) (model.DeviceToken, error)
	// DeviceTokenSave Save a new device token
	// Save a new device token in Watcher. You can read how to create it here: https://firebase.google.com/docs/cloud-messaging/android/client?hl=en#sample-register You must save and refresh token if you want to receive notifications about [camera events](#tag/profile/operation/event_subscription_create).
	DeviceTokenSave(ctx context.Context, token string, body model.DeviceToken) (model.DeviceToken, error)
	// EpisodeAddToFavorites Add episode to the favorites
	// This method allows you to add an episode to the favorites.
	EpisodeAddToFavorites(ctx context.Context, episode_id string) error
	// EpisodeDelete Delete episode
	// This method allows you to delete a registered episode. Only manually created episodes can be deleted. Episodes created automatically by the system (e.g., by video analytics) cannot be deleted.
	EpisodeDelete(ctx context.Context, episode_id string, query *EpisodeDeleteQuery) error
	// EpisodeDeleteFromFavorites Delete episode from the favorites
	// This method allows you to delete an episode from the favorites.
	EpisodeDeleteFromFavorites(ctx context.Context, episode_id string) error
	// EpisodeGet Get episode
	// This method allows you to fetch a registered episode
	EpisodeGet(ctx context.Context, episode_id string, query *EpisodeGetQuery) (model.WatcherEpisode, error)
	// EpisodesList List episodes
	// This method allows you to fetch registered episodes
	EpisodesList(ctx context.Context, query *EpisodesListQuery) (model.EpisodesList, error)
	// EpisodesListIterator iterates through all items using cursor pagination
	EpisodesListIterator(ctx context.Context, query *EpisodesListQuery) iter.Seq2[model.WatcherEpisode, error]
	// EpisodesStreaming streams episodes using long polling with poll_timeout and updated_at_gt.
	EpisodesStreaming(ctx context.Context, query *EpisodesListQuery, callback func(ctx context.Context, episode model.WatcherEpisode) error)
	// EventSubscriptionCreate Create a new event subscription on specific stream
	// Create a new event subscription
	EventSubscriptionCreate(ctx context.Context, body model.SubscriptionRequest) (model.Subscription, error)
	// EventSubscriptionDelete Unsubscribe from events on specific stream
	// Delete subscription on events
	EventSubscriptionDelete(ctx context.Context, body model.SubscriptionRequest) error
	// FolderCreate Create folder
	// Create folder.
	FolderCreate(ctx context.Context, organization_id string, body model.Folder) (model.Folder, error)
	// FolderDelete Delete folder
	// This method allows to delete a folder.
	FolderDelete(ctx context.Context, organization_id string, folder_id string) error
	// FolderGet Get folder info
	// This method allows to fetch folder info.
	FolderGet(ctx context.Context, organization_id string, folder_id string) (model.Folder, error)
	// FolderList Get list of folders
	// This method allows to fetch a list of folders info.
	FolderList(ctx context.Context, organization_id string, query *FolderListQuery) (model.FoldersList, error)
	// FolderListIterator iterates through all items using cursor pagination
	FolderListIterator(ctx context.Context, organization_id string, query *FolderListQuery) iter.Seq2[model.Folder, error]
	// FolderSave Save folder
	// Save folder.
	FolderSave(ctx context.Context, organization_id string, folder_id string, body model.Folder) (model.Folder, error)
	// FolderUserDelete Delete user in a folder
	// This method allows to delete user info in a folder.
	FolderUserDelete(ctx context.Context, organization_id string, folder_id string, user_id string) error
	// FolderUserGet Get user in a folder
	// This method allows to fetch user in a folder.
	FolderUserGet(ctx context.Context, organization_id string, folder_id string, user_id string) (model.FolderUser, error)
	// FolderUserSave Save user in a folder
	// Save user info in a folder.
	FolderUserSave(ctx context.Context, organization_id string, folder_id string, user_id string, body model.FolderUser) (model.FolderUser, error)
	// FolderUsersList Get a list of users in a folder
	// This method allows to fetch a list of users in a folder.
	FolderUsersList(ctx context.Context, organization_id string, folder_id string, query *FolderUsersListQuery) (model.FolderUsersList, error)
	// FolderUsersListIterator iterates through all items using cursor pagination
	FolderUsersListIterator(ctx context.Context, organization_id string, folder_id string, query *FolderUsersListQuery) iter.Seq2[model.FolderUsers, error]
	// GetInviteShortInfo Get organization invite short info
	// This method allows to get short info about organization invite.
	GetInviteShortInfo(ctx context.Context, invite_key string) (model.OrganizationBase, error)
	// LoginCreate Get an auth token
	// The method creates a new temporary auth-token (JWT). The JTW token used as Bearer token in requests other than `/login`.
	LoginCreate(ctx context.Context) (model.LoginInfoAdditional, error)
	// MessageDelete Delete a message
	// This method allows you to delete a message
	MessageDelete(ctx context.Context, message_id string) error
	// MessageGet Get a message
	// This method allows you to fetch the message by its identifier
	MessageGet(ctx context.Context, message_id string) (model.Message, error)
	// MessageSend Send a message
	// This method allows you to send a message to a user
	MessageSend(ctx context.Context, body model.MessageSend) (model.MessageResponse, error)
	// MessageUpdate Update message
	// Update message by its id.
	MessageUpdate(ctx context.Context, message_id string, body model.MessageChangeRequest) (model.Message, error)
	// MessagesList List of messages
	// List of messages
	MessagesList(ctx context.Context, query *MessagesListQuery) (model.Messages, error)
	// MessagesListIterator iterates through all items using cursor pagination
	MessagesListIterator(ctx context.Context, query *MessagesListQuery) iter.Seq2[model.Message, error]
	// MosaicCreate Create mosaic
	// This method allows you to create a mosaic
	MosaicCreate(ctx context.Context, body any) (model.Mosaic, error)
	// MosaicDelete Delete a mosaic
	// This method allows you to delete a mosaic
	MosaicDelete(ctx context.Context, mosaic_id string) error
	// MosaicGet Get mosaic detail
	// This method is used to get info about mosaic by its id.
	MosaicGet(ctx context.Context, mosaic_id string) (model.Mosaic, error)
	// MosaicSave Save mosaic
	// This method allows you to update mosaic data
	MosaicSave(ctx context.Context, mosaic_id string, body model.MosaicSave) (model.Mosaic, error)
	// MosaicsList List mosaics
	// Returns the list of all mosaics. Mosaics allow you to combine multiple cameras to display on a single screen.
	MosaicsList(ctx context.Context, query *MosaicsListQuery) (model.MosaicsList, error)
	// MosaicsListIterator iterates through all items using cursor pagination
	MosaicsListIterator(ctx context.Context, query *MosaicsListQuery) iter.Seq2[model.Mosaic, error]
	// NotificationSend Send an arbitrary push notification
	// Send an arbitrary push notification. This method sends test push notification to user.
	NotificationSend(ctx context.Context, body any) error
	// OrganizationCreate Create organization
	// Create new organization
	OrganizationCreate(ctx context.Context, body model.Organization) (model.Organization, error)
	// OrganizationDelete Delete organization
	// Delete organization by its id.
	OrganizationDelete(ctx context.Context, organization_id string) error
	// OrganizationGet Get single organization info
	// This method allows to fetch a single organization info. Refer to the `organizations_list` operation to find out what data will be returned in this method.
	OrganizationGet(ctx context.Context, organization_id string) (model.Organization, error)
	// OrganizationInviteAccept Accept organization invite
	// This method allows to accept organization invite and add user to organization.
	OrganizationInviteAccept(ctx context.Context, invite_key string) error
	// OrganizationInviteCreate Create organization invite key
	// This method allows to create a single organizations invite key.  Using this key user can invite other users to the organization.  Only organization owner can create invite key.
	OrganizationInviteCreate(ctx context.Context, organization_id string, body model.OrganizationInviteSetup) (model.OrganizationInviteKey, error)
	// OrganizationPresetSave Update organizations preset
	// Save organization preset by its id or adds new preset to organization.
	OrganizationPresetSave(ctx context.Context, organization_id string, body model.OrganizationPreset) (model.Preset, error)
	// OrganizationSave Update organization
	// Update organization by its id.
	OrganizationSave(ctx context.Context, organization_id string, body model.Organization) (model.Organization, error)
	// OrganizationUserDelete Delete user from organization
	// Delete user from organization by its id.
	OrganizationUserDelete(ctx context.Context, organization_id string, user_id string) error
	// OrganizationUserGet Get single organization user info
	// This method allows to fetch a single organizations user info.
	OrganizationUserGet(ctx context.Context, organization_id string, user_id string) (model.OrganizationUser, error)
	// OrganizationUserSave Update organizations user
	// Update organization user by its id or adds new user to organization.
	OrganizationUserSave(ctx context.Context, organization_id string, user_id string, body model.OrganizationPermissions) (model.OrganizationUser, error)
	// OrganizationUsersList List users in organization
	// Users who are members of the organization
	OrganizationUsersList(ctx context.Context, organization_id string, query *OrganizationUsersListQuery) (model.OrganizationUsersList, error)
	// OrganizationUsersListIterator iterates through all items using cursor pagination
	OrganizationUsersListIterator(ctx context.Context, organization_id string, query *OrganizationUsersListQuery) iter.Seq2[model.OrganizationUser, error]
	// OrganizationsList List organizations
	// Organizations of which the user is member
	OrganizationsList(ctx context.Context, query *OrganizationsListQuery) (model.OrganizationsList, error)
	// OrganizationsListIterator iterates through all items using cursor pagination
	OrganizationsListIterator(ctx context.Context, query *OrganizationsListQuery) iter.Seq2[model.Organization, error]
	// PasswordRecovery Send password recovery email
	// Send user email with password recovery instructions. This method will return success  regardless of whether there is a user with the specified email address or not
	PasswordRecovery(ctx context.Context, body any) error
	// PersonDelete Delete person
	// Delete person by its id.
	PersonDelete(ctx context.Context, person_id string) error
	// PersonGet Get the Person
	// This method allows you to fetch the person by its identifier
	PersonGet(ctx context.Context, person_id string) (model.Person, error)
	// PersonListsGet Lists Person
	// This method allows you to fetch the person lists
	PersonListsGet(ctx context.Context, query *PersonListsGetQuery) (model.PersonListsList, error)
	// PersonListsGetIterator iterates through all items using cursor pagination
	PersonListsGetIterator(ctx context.Context, query *PersonListsGetQuery) iter.Seq2[model.PersonLists, error]
	// PersonsList List Persons
	// The list of registered videoanalytics persons
	PersonsList(ctx context.Context, query *PersonsListQuery) (model.PersonsList, error)
	// PersonsListIterator iterates through all items using cursor pagination
	PersonsListIterator(ctx context.Context, query *PersonsListQuery) iter.Seq2[model.VisionPerson, error]
	// PresetGet Get one preset
	// This method is used to get info about preset by its id.
	PresetGet(ctx context.Context, id string) (model.Preset, error)
	// PresetsList List presets
	// The presets in Watcher is a set of DVR and analytics parameters that you can use as a template when creating and configuring cameras. When you select a preset in the camera settings, the parameters from the preset are populated to the camera settings. A set of presets on the camera is defined by the set of presets selected for the camera's Organization. https://flussonic.com/doc/manage-presets-in-watcher-ui/  This method is used to get info about presets. If the `organization_id` is transferred this method will return presets only allowed in organization with that Id.
	PresetsList(ctx context.Context, query *PresetsListQuery) (model.PresetsList, error)
	// PresetsListIterator iterates through all items using cursor pagination
	PresetsListIterator(ctx context.Context, query *PresetsListQuery) iter.Seq2[model.Preset, error]
	// ProfileGet Get profile info
	// Get profile info.
	ProfileGet(ctx context.Context) (model.Profile, error)
	// ProfileSave Update profile info
	// Update profile info.
	ProfileSave(ctx context.Context, body model.Profile) (model.Profile, error)
	// ResetPassword Reset password
	// Changes user password
	ResetPassword(ctx context.Context, body model.PasswordReset) error
	// StreamDelete Delete the stream
	// This method allows to delete a single stream. You can delete `config_override` by this API call if you want to remove all runtime overrides.  If you do not specify any `part` parameter, this stream will be deleted from `config_on_disk` and if it was `named_by: config`, then it will immediately stop.
	StreamDelete(ctx context.Context, name string, query *StreamDeleteQuery) error
	// StreamFirmwareUpdate Update camera firmware
	// This method allows you to update camera firmware
	StreamFirmwareUpdate(ctx context.Context, name string, body model.FirmwareUpdate) error
	// StreamGet Get one stream
	// This method allows to fetch a single stream. Refer to the `streams_list` operation to find out what data will be returned in this method.
	StreamGet(ctx context.Context, name string) (model.StreamConfig, error)
	// StreamPermissionUserDelete Delete stream permissions
	// Delete all permissions for a specific user to access a stream. Removes direct access permissions for a user to this stream. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners
	StreamPermissionUserDelete(ctx context.Context, name string, user_id string) error
	// StreamPermissionUserGet Get user permissions to a stream
	// Returns the permissions that a specific user has for a specified stream via stream permissions. Shows detailed permissions a user has for this stream. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners
	StreamPermissionUserGet(ctx context.Context, name string, user_id string) (model.StreamUserPermission, error)
	// StreamPermissionUserSave Update stream permissions
	// Saves permissions for a specific user to access a stream.  These permissions override folder-level permissions but are overridden by organization-level permissions. Updates or creates direct stream permissions for a user. These permissions override folder-level permissions but are overridden by organization-level permissions. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners
	StreamPermissionUserSave(ctx context.Context, name string, user_id string, body model.StreamPermissionsAccess) (model.StreamUserPermission, error)
	// StreamPermissionsUsersList List users with permissions to a stream
	// Returns a list of users who have direct access to the specified stream via stream permissions. Lists all users with explicit permissions set for this stream. This API is accessible to: - Users with 'can_edit' permission for the stream - Organization admins with 'can_edit_streams' permission - Domain administrators - Organization owners
	StreamPermissionsUsersList(ctx context.Context, name string, query *StreamPermissionsUsersListQuery) (model.StreamUsersPermissionsList, error)
	// StreamPermissionsUsersListIterator iterates through all items using cursor pagination
	StreamPermissionsUsersListIterator(ctx context.Context, name string, query *StreamPermissionsUsersListQuery) iter.Seq2[model.StreamUserPermission, error]
	// StreamPtzExecute Execute a PTZ command
	// Execute a PTZ command
	StreamPtzExecute(ctx context.Context, name string, body model.PtzCommand) error
	// StreamSave Save stream
	// Create or update a stream by its name. If the stream doesn't exists in the disk config, it will be created.  If you try to update a stream that is started from a template by a user request having `named_by=user`, a new stream will be created in the disk config.  If you pass only a partial stream configuration, this field will be updated, not the whole stream.  To create a new stream the property `name` is required.  Pass the `"$reset": true` option to replace the stream configuration with the provided one.
	StreamSave(ctx context.Context, name string, query *StreamSaveQuery, body model.StreamConfig) (model.StreamConfig, error)
	// StreamsImport Import of streams
	// This method allows you to easily add or update camera configurations. If a camera with the specified name exists, its settings will be updated; otherwise, a new camera will be created. This is useful for making simultaneous changes to multiple cameras, such as integrating billing or setting up different user configurations.  New cameras will be added or existing ones updated without affecting others.  Requests can be sent in CSV format.  Ensure the user has permission to edit cameras in the relevant organizations before submitting.  If errors occur, no changes will be made, preserving the original configuration.
	StreamsImport(ctx context.Context) (model.StreamsImportResponse, error)
	// StreamsList List streams
	// This API method is one of the most important in whole API, because it gives the list of all streams.  `streams_list` in Watcher Admin API: * can list all streams within the Watcher. * admin is not allowed to watch content from any cameras for security reasons.  `streams_list` in Watcher Client API: * return streams from organizations where you're member * prodives a playback token that allows play video from the camera.
	StreamsList(ctx context.Context, query *StreamsListQuery) (model.StreamsList, error)
	// StreamsListIterator iterates through all items using cursor pagination
	StreamsListIterator(ctx context.Context, query *StreamsListQuery) iter.Seq2[model.StreamConfig, error]
	// StreamsMultiedit Save streams settings
	// Create or update settings for each stream. This operation does everything or nothing. If at least one stream has an invalid configuration or can't be processed, the request will fail.
	StreamsMultiedit(ctx context.Context, body model.StreamsMultieditConfig) error
	// UiSettingsGet Get UI settings
	// The method allows you to fetch UI settings including branding colors, logos, etc. It can work without authorization for the login page to be loaded.
	UiSettingsGet(ctx context.Context) (model.UiSettingsConfig, error)
	// UserApikeyCreate Create new apikey for user
	// Create apikey for user
	UserApikeyCreate(ctx context.Context) (model.Apikey, error)
	// UserApikeyDelete Delete apikey for user
	// Delete apikey for user
	UserApikeyDelete(ctx context.Context) error
	// UserApikeyGet Get users apikey
	// Get users apikey
	UserApikeyGet(ctx context.Context) (model.Apikey, error)
	// UserCreate Create user
	// This method allows you to create a user
	UserCreate(ctx context.Context, body any) (model.User, error)
	// UserDelete Delete a user
	// This method allows you to delete a user
	UserDelete(ctx context.Context, user_id string) error
	// UserGet Get a user
	// This method allows you to fetch the user by its identifier
	UserGet(ctx context.Context, user_id string) (model.User, error)
	// UserOrganizationFoldersList Get user's folders in organization
	// Get list of folders available for user in specific organization
	UserOrganizationFoldersList(ctx context.Context, user_id string, organization_id string, query *UserOrganizationFoldersListQuery) (model.UserFolders, error)
	// UserOrganizationFoldersListIterator iterates through all items using cursor pagination
	UserOrganizationFoldersListIterator(ctx context.Context, user_id string, organization_id string, query *UserOrganizationFoldersListQuery) iter.Seq2[model.UserFolder, error]
	// UserOrganizationsList Get user's organizations
	// Get list of organizations available for user
	UserOrganizationsList(ctx context.Context, user_id string, query *UserOrganizationsListQuery) (model.OrganizationsList, error)
	// UserOrganizationsListIterator iterates through all items using cursor pagination
	UserOrganizationsListIterator(ctx context.Context, user_id string, query *UserOrganizationsListQuery) iter.Seq2[model.Organization, error]
	// UserSave Save user
	// This method allows you to update user data
	UserSave(ctx context.Context, user_id string, body model.User) (model.User, error)
	// UserStreamPermissionDelete Delete stream permissions
	// Delete all permissions for the user to access a stream. Removes direct permissions for a user to access a specific stream. Note that the user may still have access via organization or folder permissions. This API is accessible to: - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners
	UserStreamPermissionDelete(ctx context.Context, user_id string, name string) error
	// UserStreamPermissionGet Get user permissions to a stream
	// Returns the permissions that the user has for a specified stream via stream permissions. Allows viewing user-specific stream permissions. This API is accessible to: - The user themselves - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners
	UserStreamPermissionGet(ctx context.Context, user_id string, name string) (model.UserStreamPermission, error)
	// UserStreamPermissionSave Update user's stream permissions
	// Save permissions for the user to access a stream. These permissions override folder-level permissions but are overridden by organization-level permissions. Updates or creates permissions for a user to access a specific stream. This API is accessible to: - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners
	UserStreamPermissionSave(ctx context.Context, user_id string, name string, body model.StreamPermissionsAccess) (model.UserStreamPermission, error)
	// UserStreamsPermissionsList List streams accessible to a user
	// Returns a list of streams to which the specified user has direct access via stream permissions. Lists all streams where a user has explicit permissions set. This API is accessible to: - The user themselves - Organization admins with 'can_edit_users' permission - Domain administrators - Organization owners
	UserStreamsPermissionsList(ctx context.Context, user_id string, query *UserStreamsPermissionsListQuery) (model.UserStreamsPermissionsList, error)
	// UserStreamsPermissionsListIterator iterates through all items using cursor pagination
	UserStreamsPermissionsListIterator(ctx context.Context, user_id string, query *UserStreamsPermissionsListQuery) iter.Seq2[model.UserStreamPermission, error]
	// UsersApikeyCreate Create new API key for user
	// The API key is used for authentication in API requests, allowing access to protected resources without using a password.
	UsersApikeyCreate(ctx context.Context, user_id string) (model.Apikey, error)
	// UsersApikeyGet Get user's API key
	// The API key is used for authentication in API requests, allowing access to protected resources without using a password.
	UsersApikeyGet(ctx context.Context, user_id string) (model.Apikey, error)
	// UsersList List of users
	// List of available users
	UsersList(ctx context.Context, query *UsersListQuery) (model.Users, error)
	// UsersListIterator iterates through all items using cursor pagination
	UsersListIterator(ctx context.Context, query *UsersListQuery) iter.Seq2[model.User, error]
	// WebPushSubscribe Create subscription
	// Subscribes the client to Push Messages
	WebPushSubscribe(ctx context.Context, body model.WebPushSubscriptionCreate) error
	// WebPushSubscriptionExistenceGet Subscription existence
	// Checks for subscription on the backend
	WebPushSubscriptionExistenceGet(ctx context.Context, query *WebPushSubscriptionExistenceGetQuery) (any, error)
	// WebPushUnsubscribe Delete subscription
	// Deletes the subscription, so the client will no longer receive Push Messages on it
	WebPushUnsubscribe(ctx context.Context, body model.WebPushSubscription) error
}

WatcherClient defines the interface for interacting with WatcherClient API.

func New

func New(cfg *config.Config) (WatcherClient, error)

New creates a new WatcherClient client with default settings.

func NewWithBaseFactory

func NewWithBaseFactory(cfg *config.Config, baseFactory BaseClientFactory) (WatcherClient, error)

NewWithBaseFactory creates a new WatcherClient client with a custom base client factory. This is primarily used for testing or when custom HTTP client behavior is needed.

type WebPushSubscriptionExistenceGetQuery

type WebPushSubscriptionExistenceGetQuery struct {
	// Subscription endpoint
	Endpoint string
	Extra    map[string]string
}

WebPushSubscriptionExistenceGetQuery represents query parameters for WebPushSubscriptionExistenceGet method

func (*WebPushSubscriptionExistenceGetQuery) ToQueryString

func (q *WebPushSubscriptionExistenceGetQuery) ToQueryString() (string, error)

ToQueryString converts WebPushSubscriptionExistenceGetQuery to a valid query string. It validates required parameters and returns an error if any are missing.

Directories

Path Synopsis
Code generated by cmd/main.
Code generated by cmd/main.

Jump to

Keyboard shortcuts

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