import { AxiosInstance } from 'axios'; import { CompanyResponse, UpdateCompanyRequest, GetSupportWidgetIdResponse, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, CompanyQueue, CompanyWithConfigsResponse, StrongPasswordOptionsResponse, CompanyConfigKey, CompanyConfigResponse, CompanyJsonConfigKey, UpdateCompanyJsonConfigRequest, CompanyBooleanConfigKey, UpdateCompanyBooleanConfigRequest, CompanyStringConfigKey, UpdateCompanyStringConfigRequest, User, ListUsersRequest, ListUsersResponse, WorkGroupListResponse, WorkGroupResponse, UserProfile, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetUserByIdResponse, UpdateCompanyUserRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UpdateCompanyUserAvatarResponse, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, AnnouncementListFilters, AnnouncementListResponse, Announcement, CreateAnnouncementRequest, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, AnnouncementType, ActiveAnnouncementQuery, ActiveAnnouncement } from './customer-service/contracts/index.mjs'; export { AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementVisualStatus, CompanyData, ListUsersInclude, ListUsersProfile, ListUsersStatus, ListUsersType, ManagedUser, StrongPasswordOptions, UserBond, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.mjs'; import { ProviderListResponse, Config, GetProviderConfigurationsParams, ProviderConfigurationsResponse, GetProviderDisplayInfoParams, ProviderDisplayInfoResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, GetServiceGroupsParams, ServiceGroupsResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs'; export { ConfigProvider, DistributionType, MetaTemplateButton, Provider, ProviderConfiguration, ProviderName, QueueListResponse, Rule, ServiceGroup, WhatsAppProviderSettings, WidgetProviderSettings } from './chat-config/contracts/index.mjs'; import { CampaignQueryParams, CampaignPaginatedResponse, Campaign, CreateCampaignRequest, PatchCampaignRequest, CampaignContactQueryParams, CampaignContactPaginatedResponse, CampaignContactResponse, CreateCampaignContactRequest, PatchCampaignContactRequest, CampaignContactsDashboardQueryParams, CampaignContactsDashboardData, CampaignUser, CampaignWorkGroupQueryParams, CampaignWorkGroupPaginatedResponse, CreateCampaignWorkGroupRequest, CampaignWorkGroup, CampaignCompanyQueryParams, CampaignCompanyPaginatedResponse, CampaignCompanyResponse, EnableCampaignCompanyRequest, CampaignAccessResponse } from './campaigns/contracts/index.mjs'; export { CampaignAccessReason, CampaignContactCampaignStatus, CampaignContactDispatchStatus, CampaignContactFilter, CampaignContactLikeQueryOperators, CampaignContactQueryOperators, CampaignContactQueryValue, CampaignContactSortDirection, CampaignContactSortParams, CampaignContactsDashboardChannelPerformance, CampaignContactsDashboardEvolutionItem, CampaignContactsDashboardExactQueryOperators, CampaignContactsDashboardFunnelItem, CampaignContactsDashboardInterval, CampaignContactsDashboardMetrics, CampaignContactsDashboardQueryValue, CampaignContactsDashboardRangeQueryOperators, CampaignContactsDashboardStatusDistribution, CampaignContactsDashboardStatusMetrics, CampaignContactsDashboardSummary, CampaignContactsDashboardTopCampaign, CampaignNameLikeQueryOperators, CampaignProvider, CampaignRetryConfig, CampaignSchedule, CampaignStatus, WhatsAppPayload, WhatsAppTemplateComponent } from './campaigns/contracts/index.mjs'; import { GetConfigTemplatesParams, GetConfigTemplatesResponse, FlowReadiness, FlowCatalogParams, FlowCatalogResponse, FlowDefinition } from './chat-adapter/contracts/index.mjs'; export { ConfigTemplatesPaging, FlowCatalogItem, MessageTemplate, MessageTemplateComponent } from './chat-adapter/contracts/index.mjs'; import { GetPresignedUrlRequest, UploadPresignedUrlResponse, AudioConvertResponse, GetAttachmentByIdRequest, AttachmentByIdResponse } from './assets/contracts/index.mjs'; export { IUploadPresignedUrlResponse } from './assets/contracts/index.mjs'; import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResponse, FindOrCreateContactRequest, ContactResponse } from './contact-list/contracts/index.mjs'; export { ContactPhoneResponse } from './contact-list/contracts/index.mjs'; import { GetIntegrationPartnersByCompanyRequest, IntegrationPartner, GetWebhooksByCompanyRequest as GetWebhooksByCompanyRequest$1, GetIntegrationHooksCatalogRequest, HookCatalogItem, ListAutomationPartnersRequest, AutomationPartner, ListAutomationActionsRequest, AutomationPartnerAction, GetAutomationPartnerRequest, CreateAutomationPartnerRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest as CreateWebhookRequest$1, DeleteIntegrationPartnerParams, CreateIntegrationActionRequest, IntegrationAction, UpdateIntegrationActionParams, CreateIntegrationFieldRequest, IntegrationField, UpdateIntegrationFieldParams, DeleteIntegrationFieldParams, DeleteIntegrationActionParams } from './integrations/contracts/index.mjs'; export { UpdateIntegrationActionRequest, UpdateIntegrationFieldRequest } from './integrations/contracts/index.mjs'; import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, CancelInvitationRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse, GetInitialContextRequest, GetInitialContextResponse, GetMessagesByCursorRequest, GetMessagesByCursorResponse, SendMessageRequest, MessageResponse, ForwardMessageRequest, SendAttachmentMessageResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, UpdateMemberInRoomRequest, RoomMemberResponse, ChatWebserviceCompanyUsageRequest, ChatWebserviceCompanyUsageResponse } from './chat-webservice/contracts/index.mjs'; export { ChatWebserviceChatUsageProvidersResponse, ChatWebserviceChatUsageResponse, ChatWebserviceCompanyUsageEntryResponse, ChatWebserviceEmailUsageProvidersResponse, ChatWebserviceEmailUsageResponse, ForwardMessageDestination, ForwardMessageForwardingMetadata, ForwardMessageMetadata, MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageStatusResponse, RoomActiveDates, RoomTagResponse } from './chat-webservice/contracts/index.mjs'; import { ListContactHistoryRequest, ContactHistoryResponse, CallReportCompanyUsageRequest, CallReportCompanyUsageResponse } from './call-report/contracts/index.mjs'; export { CallReportTelephonyUsageEntryResponse, CallReportTelephonyUsageProvidersResponse, CallReportTelephonyUsageResponse, ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs'; import { CallEndpoint } from './calls/contracts/index.mjs'; export { CallEndpointStatus } from './calls/contracts/index.mjs'; import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem, ListCasesRequest, ListCasesResponse, CloneCaseRequest, ClonedCase, CreateTimeEntryRequest, CaseTimeEntry, ListTimeEntriesRequest, ListTimeEntriesPage, UpdateTimeEntryRequest, DeleteTimeEntryRequest } from './cases/contracts/index.mjs'; export { CaseListItem, CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, ListCasesCursor, TimeEntryCursor } from './cases/contracts/index.mjs'; import { GetAccessPackagesParams, PaginatedResult, AccessPackage, GetCompanyAccessPackagesParams, CompanyAccessPackageItem, CreateCompanyAccessPackagePayload, UpdateCompanyAccessPackagePayload, GetCompanyResourcesParams, CompanyResource } from './access-hub/contracts/index.mjs'; export { AccessGroup, AccessPackageGroup } from './access-hub/contracts/index.mjs'; import { GetSystemNotificationsParams, GetSystemNotificationsResponse, GetUserDevicesParams, GetUserDevicesResponse, RegisterUserDeviceRequest, RegisterUserDeviceResponse, DeleteUserDeviceResponse, GetUserPreferencesParams, UserPreference, CreateUserPreferenceRequest, DeleteUserPreferenceParams, DeleteUserPreferenceResponse } from './notifications/contracts/index.mjs'; export { DeviceType, SystemNotification, SystemNotificationType, UserDevice, UserPreferenceDevice, UserPreferenceSystemNotification } from './notifications/contracts/index.mjs'; export { Event } from './rh/contracts/index.mjs'; /** * Gateway for interacting with the Customer Service API. */ declare class CustomerServiceGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves a company by its unique identifier. * @param companyId - The unique identifier of the company. * @returns The company data wrapped in a {@link CompanyResponse}. */ getCompanyById(companyId: string): Promise; /** * Updates the current company settings. * @param payload - The company fields to update. * @returns The updated company data wrapped in a {@link CompanyResponse}. */ updateCompany(payload: UpdateCompanyRequest): Promise; /** * Retrieves the support widget identifier for the current company. * @returns The support widget identifier. */ getSupportWidgetId(): Promise; /** * Updates the support widget identifier for the current company. * @param payload - The support widget identifier to set. * @returns The updated company support widget data. */ updateSupportWidgetId(payload: UpdateSupportWidgetIdRequest): Promise; /** * Retrieves the list of queues configured for the current company. * @returns The company queues. */ getCompanyQueues(): Promise; /** * Retrieves the current company data along with all its config entries. * @returns The company data with its configs. */ getCompanyConfigs(): Promise; /** * Retrieves a company config entry by key. * @param key - The config key to fetch. * @returns The company config entry. */ getCompanyConfig(key: 'strong-password-options'): Promise; getCompanyConfig(key: CompanyConfigKey): Promise; /** * Retrieves the strong password options config for a company. * @param companyId - The unique identifier of the company. * @returns The strong password options company config. */ getStrongPasswordOptions(companyId: string): Promise; /** * Updates a JSON company config by key. * @param key - The config key to update. * @param payload - The JSON value to set. * @returns The updated company config entry. */ updateCompanyJsonConfig(key: CompanyJsonConfigKey, payload: UpdateCompanyJsonConfigRequest): Promise; /** * Updates a boolean company config by key. * @param key - The config key to update. * @param payload - The boolean value to set. * @returns The updated company config entry. */ updateCompanyBooleanConfig(key: CompanyBooleanConfigKey, payload: UpdateCompanyBooleanConfigRequest): Promise; /** * Updates a string company config by key. * @param key - The config key to update. * @param payload - The string value to set. * @returns The updated company config entry. */ updateCompanyStringConfig(key: CompanyStringConfigKey, payload: UpdateCompanyStringConfigRequest): Promise; /** * Retrieves a user by login email. * @param email - The user email used as login identifier. * @returns The user data. */ getUserByLogin(email: string): Promise; /** * Lists company users with filters, pagination and optional associations. * Company is resolved from the authenticated token, or from `companyId` when the token has none. * @param query - Pagination, filters and `include` associations. * @returns Paginated users. */ listUsers(query?: ListUsersRequest): Promise; /** * Retrieves all work groups for a company. * @param companyId - The unique identifier of the company. * @returns The work groups for the given company. */ getWorkGroups(companyId: string): Promise; /** * Retrieves a work group by its unique identifier. * @param workGroupId - The unique identifier of the work group. * @param companyId - The unique identifier of the company (optional, sent as query parameter). * @returns The work group data wrapped in a {@link WorkGroupResponse}. */ getWorkGroupById(workGroupId: string, companyId?: string): Promise; /** * Retrieves the members of a work group by its identifier. * @param groupId - The unique identifier of the work group. * @param companyId - The unique identifier of the company (optional, sent as query parameter). * @param profile - Filter members by profile (optional). * @returns The members of the work group. */ getWorkGroupMembers(groupId: string, companyId?: string, profile?: UserProfile[]): Promise; getAllUsers(params?: GetAllUsersParams): Promise; getManagedUsers(managerId: string): Promise; /** * Retrieves a user by its unique identifier. * @param userId - The unique identifier of the user. * @returns The user data wrapped in a {@link GetUserByIdResponse}. */ getUserById(userId: string): Promise; /** * Updates a company user by its unique identifier. * @param userId - The unique identifier of the user. * @param payload - The user fields to update. * @returns The updated user data. */ updateCompanyUser(userId: string, payload: UpdateCompanyUserRequest): Promise; /** * Updates the current user's password. * @param payload - The current password and the new password. * @returns The updated user password data. */ updateUserPassword(payload: UpdateUserPasswordRequest): Promise; /** * Updates a company user's avatar image. * @param userId - The unique identifier of the user. * @param formData - Multipart form data containing the `avatar` file field. * @returns Whether the avatar was updated successfully. */ updateCompanyUserAvatar(userId: string, formData: any): Promise; /** * Generates a two-factor OTP secret URL for a user. * @param payload - The user identifier. * @returns The OTP provisioning URL. */ generateTwoFactorOtp(payload: GenerateTwoFactorOtpRequest): Promise; /** * Validates a two-factor OTP code for a user. * @param payload - The user identifier and OTP code. * @returns Whether the OTP code is valid. */ validateTwoFactorOtp(payload: ValidateTwoFactorOtpRequest): Promise; /** * Logs out the current user. */ logout(): Promise; /** * Retrieves a paginated list of announcements. * @param query - Optional filters and pagination parameters. * @returns The paginated announcements response. */ findAnnouncements(query?: AnnouncementListFilters): Promise; /** * Retrieves an announcement by its unique identifier. * @param announcementId - The unique identifier of the announcement. * @returns The announcement data. */ getAnnouncement(announcementId: string): Promise; /** * Creates a new announcement. * @param payload - The announcement data to create. * @returns The created announcement. */ createAnnouncement(payload: CreateAnnouncementRequest): Promise; /** * Updates an existing announcement. * @param announcementId - The unique identifier of the announcement. * @param payload - The announcement data to update. * @returns The updated announcement. */ updateAnnouncement(announcementId: string, payload: UpdateAnnouncementRequest): Promise; /** * Toggles the active status of an announcement. * @param announcementId - The unique identifier of the announcement. * @param payload - The new active status. * @returns The updated announcement. */ updateAnnouncementStatus(announcementId: string, payload: UpdateAnnouncementStatusRequest): Promise; /** * Removes an announcement by its unique identifier. * @param announcementId - The unique identifier of the announcement. */ deleteAnnouncement(announcementId: string): Promise; /** * Retrieves all available announcement types. * @returns Array of announcement types. */ getAnnouncementTypes(): Promise; /** * Retrieves active announcements tailored for the widget context. * @param query - The company and environment context. * @returns The active announcements for the widget. */ findActiveAnnouncements(query: ActiveAnnouncementQuery): Promise; } /** * Gateway for interacting with the Chat Config API. */ declare class ChatConfigGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves all available providers. * @returns The list of providers. */ getProviders(): Promise; getConfigById(configId: string): Promise; /** * Retrieves provider configurations filtered by configuration IDs. * @param params - Query parameters containing one or more configuration IDs. * @returns The provider configurations matching the given IDs. */ getProviderConfigurations(params?: GetProviderConfigurationsParams): Promise; /** * Retrieves normalized display info for a provider configuration. * Always returns the same shape across providers (`id`, `provider`, `name`, `channel`). * @param params - Query parameters with `provider` and `configId`. * @returns The display info for the given configuration. */ getProviderDisplayInfo(params: GetProviderDisplayInfoParams): Promise; /** * Retrieves configurations filtered by provider. * @param providerId - The unique identifier of the provider. * @param params - Optional query parameters for filtering configurations. * @returns The configurations for the given provider. */ getConfigsByProvider(providerId: string, params?: GetConfigsByProviderParams): Promise; /** * Retrieves a queue by its ID. * @param queueId - The unique identifier of the queue. * @returns The queue data. */ getQueueById(queueId: string): Promise; getQueues(): Promise; /** * Lists queue memberships for a member. * @param params - The member identifier and optional association filter. * @returns The queue memberships for the given member. */ getMemberQueues(params: GetMemberQueuesRequest): Promise; /** * Retrieves service groups filtered by service group IDs. * @param params - Query parameters containing one or more service group IDs. * @returns The service groups matching the given IDs. */ getServiceGroups(params?: GetServiceGroupsParams): Promise; /** * Retrieves a Meta template configuration by its ID. * @param templateId - The unique identifier of the template. * @returns The Meta template configuration. */ getMetaTemplateById(templateId: string): Promise; /** * Retrieves template configurations associated with a configuration ID. * @param configId - The configuration identifier. * @returns The list of template configurations. */ getTemplateConfigsByConfigId(configId: string): Promise; /** * Finds an existing queue rule or creates a new one if it does not exist. * @param payload - The payload containing companyId, queueId, and configId. * @returns The found or created queue rule. */ findOrCreateQueueRule(payload: FindOrCreateQueueRuleRequest): Promise; /** * @param params - The company and pagination parameters. * @returns The paginated initial service rules. */ getRootRules(params: GetRootRulesRequest): Promise; } /** * Gateway for interacting with the Campaigns API. */ declare class CampaignsGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves a paginated list of campaigns. * @param query - Optional query parameters for filtering and pagination. * @returns The paginated campaigns response. */ find(query?: CampaignQueryParams): Promise; /** * Retrieves a campaign by its unique identifier. * @param id - The unique identifier of the campaign. * @returns The campaign data. */ get(id: string): Promise; /** * Creates a new campaign. * @param payload - The campaign data to create. * @returns The created campaign. */ create(payload: CreateCampaignRequest): Promise; /** * Partially updates an existing campaign. * @param id - The unique identifier of the campaign. * @param payload - The fields to update. * @returns The updated campaign. */ patch(id: string, payload: PatchCampaignRequest): Promise; /** * Removes a campaign by its unique identifier. * @param id - The unique identifier of the campaign. * @returns The removed campaign. */ remove(id: string): Promise; /** * Retrieves a paginated list of campaign contacts. * @param query - Optional query parameters for filtering and pagination. * @returns The paginated campaign contacts response. */ findCampaignContacts(query?: CampaignContactQueryParams): Promise; /** * Retrieves a campaign contact by its unique identifier. * @param id - The unique identifier of the campaign contact. * @returns The campaign contact data. */ getCampaignContacts(id: string): Promise; /** * Creates a new campaign contact. * @param payload - The campaign contact data to create. * @returns The created campaign contact. */ createCampaignContact(payload: CreateCampaignContactRequest): Promise; /** * Adds multiple contacts to a campaign in a single request. * @param payload - The list of campaign contacts to create. * @returns The created campaign contacts. */ addContactsToCampaign(payload: CreateCampaignContactRequest[]): Promise; /** * Partially updates an existing campaign contact. * @param id - The unique identifier of the campaign contact. * @param payload - The fields to update. * @returns The updated campaign contact. */ patchCampaignContact(id: string, payload: PatchCampaignContactRequest): Promise; /** * Removes a campaign contact by its unique identifier. * @param id - The unique identifier of the campaign contact. * @returns The removed campaign contact. */ removeCampaignContact(id: string): Promise; getContactsDashboardData(query: CampaignContactsDashboardQueryParams): Promise; getUsers(): Promise; listWorkGroups(query?: CampaignWorkGroupQueryParams): Promise; createWorkGroup(payload: CreateCampaignWorkGroupRequest): Promise; deleteWorkGroup(id: string): Promise; /** * Lists company installations of the Campaigns module. * @param query - Optional query parameters (e.g. companyId, enabled). * @returns The paginated list of campaign company installations. */ findCampaignCompanies(query?: CampaignCompanyQueryParams): Promise; /** * Retrieves the Campaigns module installation for a given company. * @param companyId - The company identifier. * @returns The campaign company installation, or null when the module is not installed. */ getCampaignCompany(companyId: string): Promise; /** * Enables the Campaigns module for a given company. * @param payload - The enable request payload (companyId, optional enabledByUserId). * @returns The created campaign company installation. */ enableCampaignCompany(payload: EnableCampaignCompanyRequest): Promise; /** * Disables the Campaigns module for a given company by removing the installation record. * @param id - The campaign company installation id. * @returns The removed campaign company installation. */ disableCampaignCompany(id: string): Promise; /** * Checks whether the current caller has access to the Campaigns module. * @returns The access verdict for the authenticated user. */ getMyAccess(): Promise; } /** * Gateway for interacting with the Chat Adapter API. */ declare class ChatAdapterGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves message templates associated with a configuration. * @param configId - The unique identifier of the configuration. * @param params - Optional query parameters for filtering and pagination. * @returns A promise that resolves to the template list response. */ getConfigTemplates(configId: string, params?: GetConfigTemplatesParams): Promise; getFlowReadiness(configId: string): Promise; prepareFlowChannel(configId: string): Promise; getFlowCatalog(configId: string, params?: FlowCatalogParams): Promise; getFlowDefinition(configId: string, metaFlowId: string): Promise; } /** * Gateway for interacting with the Assets API. */ declare class AssetsGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves a presigned URL to upload a file to the Assets API. * @param params - The configuration options and parameters for the presigned URL. * @returns The presigned URL details wrapped in a {@link UploadPresignedUrlResponse}. */ getPresignedUrl(params: GetPresignedUrlRequest): Promise; /** * Converts an audio file to M4A format via the Assets API. * @param params - The audio file to convert. * @param params.file - The audio file to upload for conversion. * @returns The converted audio response with base64-encoded data, mimetype, extension and filename. */ convertAudioToM4A(formData: any): Promise; /** * Fetches an attachment by its file ID or storage key. * * When `key` is provided, the path is built from the key directly and no * `x-bucket-provider` header is sent. Otherwise, `fileId` and `provider` are * used to build the path and the provider header respectively. * * @param params - The parameters identifying the attachment. * @returns A signed URL to access the attachment. */ getAttachmentById(params: GetAttachmentByIdRequest): Promise; } /** * Gateway for interacting with the Contact List API. */ declare class ContactListGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Searches for contact phones with optional filtering and pagination. * @param params - The query parameters for the search. * @returns The paginated contact phones response. */ getContactsPhones(params: GetContactPhonesParams): Promise; /** * Retrieves all contact categories. * @returns An array of contact categories. */ getCategoryList(): Promise; /** * Finds an existing contact or creates a new one. * @param payload - The contact data sent as query parameters and in the request body. * @returns The existing or newly created contact. */ findOrCreateContact(payload: FindOrCreateContactRequest): Promise; } /** * Gateway for interacting with the Integrations API. */ declare class IntegrationsGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves all integration partners configured for a company. * @param companyId - The company identifier. */ getPartnersByCompany({ companyId, name, }: GetIntegrationPartnersByCompanyRequest): Promise; /** Retrieves the webhooks scenario for a company. */ getWebhooksByCompany(params: GetWebhooksByCompanyRequest$1): Promise; /** * Retrieves the hook catalog, optionally scoped by module. * @param module - The optional module identifier used by the Integrations API filter. */ getHooksCatalog({ module }?: GetIntegrationHooksCatalogRequest): Promise; /** * @param companyId - The optional company identifier. */ listAutomationPartners({ companyId }?: ListAutomationPartnersRequest): Promise; /** * Lists actions for an automation partner. * @param partnerId - The automation partner identifier. */ listAutomationActions({ partnerId }: ListAutomationActionsRequest): Promise; /** * Retrieves an automation partner by identifier. * @param id - The automation partner identifier. */ getAutomationPartner({ id }: GetAutomationPartnerRequest): Promise; /** * Creates an automation partner. * @param payload - The automation partner creation payload. */ createAutomationPartner(payload: CreateAutomationPartnerRequest): Promise; /** * Creates an integration partner. * @param payload - The partner creation payload. * @returns The created integration partner. */ createPartner(payload: CreateIntegrationPartnerRequest): Promise; /** Creates a webhook. */ createWebhook(payload: CreateWebhookRequest$1): Promise; /** * Deletes an integration partner. * @param partnerId - The partner identifier. * @returns A promise that resolves when the partner is deleted. */ deletePartner({ partnerId }: DeleteIntegrationPartnerParams): Promise; /** * Creates an integration action. * @param payload - The action creation payload. * @returns The created integration action. */ createAction(payload: CreateIntegrationActionRequest): Promise; /** * Updates an integration action. * @param actionId - The action identifier. * @param payload - The action update payload. * @returns The updated integration action. */ updateAction({ actionId, payload }: UpdateIntegrationActionParams): Promise; /** * Creates an integration action field/header. * @param payload - The field creation payload. * @returns The created integration field. */ createField(payload: CreateIntegrationFieldRequest): Promise; /** * Updates an integration action field/header. * @param fieldId - The field identifier. * @param payload - The field update payload. * @returns The updated integration field response. */ updateField({ fieldId, payload }: UpdateIntegrationFieldParams): Promise; /** * Deletes an integration action field/header. * @param fieldId - The field identifier. * @returns A promise that resolves when the field is deleted. */ deleteField({ fieldId }: DeleteIntegrationFieldParams): Promise; /** * Deletes an integration action. * @param actionId - The action identifier. * @returns A promise that resolves when the action is deleted. */ deleteAction({ actionId }: DeleteIntegrationActionParams): Promise; } /** * Gateway for interacting with the Chat Webservice API. */ declare class ChatWebserviceGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Lists chat invitations for a user within a company. * @param params - The user, company, and invitation status filters. * @returns The matching chat invitations. */ listInvitations(params: ListInvitationsRequest): Promise; /** * Replies to a chat invitation. * @param payload - The invitation identifier to reply to. * @returns The updated chat invitations. */ replyInvitation(payload: ReplyInvitationRequest): Promise; /** * Cancels a chat invitation for a room. * @param roomId - The chat room identifier. * @param payload - The delegator identifier used to cancel the invitation. */ cancelInvitation(roomId: number, payload: CancelInvitationRequest): Promise; /** * Lists live rooms assigned to a user. * @param params - The recipient, company, and open-status filters. * @returns The live room entries for the user. */ listLiveUserRooms(params: ListLiveUserRoomsRequest): Promise; /** * Retrieves a chat room by its identifier. * @param id - The unique identifier of the room. * @param params - Optional query parameters for scoping and member inclusion. * @returns The chat room data. */ getRoomById(id: number, params?: GetRoomByIdRequest): Promise; /** * Fetches the initial message context for a room member, centered around unread messages. * @param params - The room, member, and pagination filters. * @returns The initial page of messages with unread metadata. */ getInitialContext(params: GetInitialContextRequest): Promise; /** * Lists messages in a room using cursor-based pagination. * @param params - The room, cursor, and association filters. * @returns A page of messages with cursor metadata. */ getMessagesByCursor(params: GetMessagesByCursorRequest): Promise; /** * Sends a chat message to a room. * @param payload - The message content and routing metadata. * @returns The created message. */ sendMessage(payload: SendMessageRequest): Promise; /** * Creates a forwarded chat message. * @param payload - The message content and forwarding metadata. * @returns The created message. */ forwardMessage(payload: ForwardMessageRequest): Promise; /** * Sends a chat message that includes attachments. * @param payload - The message content, attachments, and routing metadata. * @returns The created message wrapped in a response object. */ sendAttachmentMessage(payload: SendMessageRequest): Promise; /** * Marks specific messages as read for a room member. * @param payload - The room, member, and message identifiers to update. * @returns The updated message status entries. */ markMessagesAsRead(payload: MarkMessagesAsReadRequest): Promise; /** * Marks all messages in a room as read for a given member. * @param memberId - The chat room member identifier. * @param roomId - The chat room identifier. * @returns The API response payload. */ markAllRoomMessagesAsRead(memberId: number, roomId: number): Promise; /** * Updates a room member's attributes. * @param memberId - The chat room member identifier. * @param payload - The member fields to update. * @returns The updated room member. */ updateMemberInRoom(memberId: number, payload: UpdateMemberInRoomRequest): Promise; /** * Fetches aggregated chat and email usage for a company. * @param companyId - The company identifier. * @param params - Optional date range filters. * @returns The aggregated chat and email usage totals. */ getCompanyUsage(companyId: string, params?: ChatWebserviceCompanyUsageRequest): Promise; } /** * Gateway for interacting with the Call Report API. */ declare class CallReportGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Lists contact interaction history across chat and CDR indexes. * @param params - Optional filters, pagination, and index selection. * @returns The paginated contact history response. */ listContactHistory(params?: ListContactHistoryRequest): Promise; /** * Fetches aggregated telephony usage for a company. * @param companyId - The company identifier. * @param params - Optional date range filters. * @returns The aggregated telephony usage totals. */ getCompanyUsage(companyId: string, params?: CallReportCompanyUsageRequest): Promise; } /** * Gateway for interacting with the Calls API. */ declare class CallsGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves all call endpoints and their current status. * @returns The list of call endpoints. */ getEndpoints(): Promise; } /** Request parameters for retrieving the webhooks scenario for a company. */ interface GetWebhooksByCompanyRequest { companyId: string; } /** Request payload for creating a webhooks scenario. */ interface CreateWebhookRequest { companyId: string; baseUrl: string; } /** * Gateway for interacting with the Cases API. */ declare class CasesGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** Retrieves the webhooks scenario for a company. */ getWebhooksByCompany(params: GetWebhooksByCompanyRequest): Promise; /** Creates a webhook. */ createWebhook(payload: CreateWebhookRequest): Promise; /** Retrieves one chronological page of the edit/delete history of a case comment. */ getCommentHistory(params: GetCommentHistoryRequest): Promise; /** Retrieves the Cases permission configuration for the current company. */ getCasePermissions(): Promise; /** Updates the Cases permission configuration for the current company. */ updateCasePermissions(payload: UpdateCasePermissionsRequest): Promise; /** * Retrieves case feed entries for a batch of action IDs. * @param payload - The action type and list of action IDs to look up. * @returns Array of case feed items linking each action to a case. */ getCaseFeedByActions(payload: GetCaseFeedByActionsRequest): Promise; /** Lists cases with the given filters. `workGroupId` accepts multiple ids (union of members across groups) and is sent in the body to avoid GET URL length limits. */ listCases(payload: ListCasesRequest): Promise; /** Clones a source case into a new one, server-side, optionally copying comments and/or attachments. */ cloneCase(payload: CloneCaseRequest): Promise; /** Creates a time entry (apontamento) on a case. */ createTimeEntry(payload: CreateTimeEntryRequest): Promise; /** Retrieves one page of time entries (apontamentos) for a case. */ listTimeEntries(params: ListTimeEntriesRequest): Promise; /** Updates a time entry (apontamento) on a case. */ updateTimeEntry(payload: UpdateTimeEntryRequest): Promise; /** Deletes (soft-delete) a time entry (apontamento) on a case. */ deleteTimeEntry(params: DeleteTimeEntryRequest): Promise; } /** * Gateway for interacting with the RH API. */ declare class RhGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); } /** * Gateway for interacting with the Access Hub API. */ declare class AccessHubGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Retrieves a paginated list of access packages. * @param params - Optional filters and pagination options. * @returns A paginated result of access packages. */ getAccessPackages(params?: GetAccessPackagesParams): Promise>; /** * Retrieves a paginated list of company access packages. * @param params - Optional filters and pagination options. * @returns A paginated result of company access package items. */ getCompanyAccessPackages(params?: GetCompanyAccessPackagesParams): Promise>; /** * Creates a new company access package. * @param payload - The company access package creation payload. * @returns The created company access package item. */ createCompanyAccessPackage(payload: CreateCompanyAccessPackagePayload): Promise; /** * Updates an existing company access package. * @param id - The ID of the company access package to update. * @param payload - The update payload. * @returns The updated company access package item. */ updateCompanyAccessPackage(id: string, payload: UpdateCompanyAccessPackagePayload): Promise; /** * Retrieves company resources. * @param params - Filters for company resources. * @returns A list of company resources. */ getCompanyResources(params: GetCompanyResourcesParams): Promise; } /** * Gateway for interacting with the Notifications API. */ declare class NotificationsGateway { private readonly httpClient; private readonly baseUrl; constructor(httpClient: AxiosInstance, baseUrl: string); /** * Returns the catalog of available system notifications with their types and metadata. * @param params - Optional filters by type slug or type ID. * @returns A list of system notifications and the total count. */ getSystemNotifications(params?: GetSystemNotificationsParams): Promise; /** * Lists push notification devices registered for the authenticated user. * @param params - Optional filters, pagination and service-token context. * @returns A list of user devices and the total count. */ getUserDevices(params?: GetUserDevicesParams): Promise; /** * Registers or updates a push notification token for a user device. * Idempotent via findOrCreate on deviceToken. * @param payload - Device token and either deviceSlug or deviceId. * @returns The registered device summary. */ registerUserDevice(payload: RegisterUserDeviceRequest): Promise; /** * Deletes a registered user device and its notification token. * @param id - UUID of the user device record. * @returns Confirmation of deletion. */ deleteUserDevice(id: string): Promise; /** * Lists active notification preferences for the user, optionally filtered by device. * @param params - Optional filters and service-token context. * @returns A list of user preferences. */ getUserPreferences(params?: GetUserPreferencesParams): Promise; /** * Creates or activates a notification preference for a user device. * Idempotent via findOrCreate on the user/device/notification combination. * @param payload - Device ID and either systemNotificationSlug or systemNotificationId. * @returns The created or existing preference. */ createUserPreference(payload: CreateUserPreferenceRequest): Promise; /** * Deletes a notification preference by its ID. * @param id - UUID of the preference in `user_notification_preferences`. * @param params - Optional companyId/userId for Service Token context. * @returns Confirmation of deletion. */ deleteUserPreference(id: string, params?: DeleteUserPreferenceParams): Promise; } /** * Maps service identifiers to their corresponding gateway types. * Used by the `gateway()` function to infer the correct return type * based on the service name passed as argument. * * When adding a new service, add an entry here with the service * identifier as the key and the gateway class as the value. */ type GatewayMap = { 'customer-service': CustomerServiceGateway; 'chat-config': ChatConfigGateway; campaigns: CampaignsGateway; 'chat-adapter': ChatAdapterGateway; assets: AssetsGateway; 'contact-list': ContactListGateway; integrations: IntegrationsGateway; 'chat-webservice': ChatWebserviceGateway; 'call-report': CallReportGateway; calls: CallsGateway; cases: CasesGateway; rh: RhGateway; 'access-hub': AccessHubGateway; notifications: NotificationsGateway; }; /** * Parameters required to configure the SDK client. * Each service configuration is optional, only provide the services you need. */ interface GatewayClientParams { /** An Axios instance used as the HTTP client for all gateway requests (optional). */ axiosClient?: AxiosInstance; /** API token used for authentication across all services. */ apiToken: string; /** Configuration for each service gateway. Only the services you configure will be available. */ services: { customerService?: { baseUrl: string; }; chatConfig?: { baseUrl: string; }; campaigns?: { baseUrl: string; }; chatAdapter?: { baseUrl: string; }; assets?: { baseUrl: string; }; contactList?: { baseUrl: string; }; integrations?: { baseUrl: string; }; chatWebservice?: { baseUrl: string; }; callReport?: { baseUrl: string; }; calls?: { baseUrl: string; }; cases?: { baseUrl: string; }; rh?: { baseUrl: string; }; accessHub?: { baseUrl: string; }; notifications?: { baseUrl: string; }; }; } declare const SERVICE_GATEWAYS: { readonly CUSTOMER_SERVICE: "customer-service"; readonly CHAT_CONFIG: "chat-config"; readonly CAMPAIGNS: "campaigns"; readonly CHAT_ADAPTER: "chat-adapter"; readonly ASSETS: "assets"; readonly CONTACT_LIST: "contact-list"; readonly INTEGRATIONS: "integrations"; readonly CHAT_WEBSERVICE: "chat-webservice"; readonly CALL_REPORT: "call-report"; readonly CALLS: "calls"; readonly CASES: "cases"; readonly RH: "rh"; readonly ACCESS_HUB: "access-hub"; readonly NOTIFICATIONS: "notifications"; }; type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS]; /** * Initializes the SDK with the required configuration parameters. * Must be called before using {@link gateway}. */ declare const configure: (params: GatewayClientParams) => void; /** * Returns the gateway instance for the specified service. * * @typeParam T - A service identifier key from {@link GatewayMap}. * @param service - The service identifier (e.g. `SERVICE_GATEWAYS.CUSTOMER_SERVICE`). * @returns The corresponding gateway instance with all its methods. * @throws {Error} If the SDK has not been configured via {@link configure}. * @throws {Error} If an unknown service identifier is provided. * * @example * ```ts * configure({ axiosClient, apiToken: '...', services: { customerService: { baseUrl: '...' } } }); * const customer = gateway('customer-service'); * const company = await customer.getCompanyById('123'); * ``` */ declare function gateway(service: T): GatewayMap[T]; export { AccessPackage, ActiveAnnouncement, ActiveAnnouncementQuery, Announcement, AnnouncementListFilters, AnnouncementListResponse, AnnouncementType, AttachmentByIdResponse, AudioConvertResponse, AutomationPartner, AutomationPartnerAction, CallEndpoint, CallReportCompanyUsageRequest, CallReportCompanyUsageResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, ChatWebserviceCompanyUsageRequest, ChatWebserviceCompanyUsageResponse, CloneCaseRequest, ClonedCase, CommentHistoryPage, CompanyAccessPackageItem, CompanyBooleanConfigKey, CompanyConfigKey, CompanyConfigResponse, CompanyJsonConfigKey, CompanyQueue, CompanyResource, CompanyResponse, CompanyStringConfigKey, CompanyWithConfigsResponse, Config, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, ContactResponse, CreateAnnouncementRequest, CreateAutomationPartnerRequest, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateTimeEntryRequest, CreateUserPreferenceRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, DeleteTimeEntryRequest, DeleteUserDeviceResponse, DeleteUserPreferenceParams, DeleteUserPreferenceResponse, EnableCampaignCompanyRequest, FindOrCreateContactRequest, FindOrCreateQueueRuleRequest, FlowCatalogParams, FlowCatalogResponse, FlowDefinition, FlowReadiness, ForwardMessageRequest, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, GetAccessPackagesParams, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetAutomationPartnerRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetSupportWidgetIdResponse, GetSystemNotificationsParams, GetSystemNotificationsResponse, GetUserByIdResponse, GetUserDevicesParams, GetUserDevicesResponse, GetUserPreferencesParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListAutomationActionsRequest, ListAutomationPartnersRequest, ListCasesRequest, ListCasesResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, ListTimeEntriesPage, ListTimeEntriesRequest, ListUsersRequest, ListUsersResponse, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PaginatedResult, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, RegisterUserDeviceRequest, RegisterUserDeviceResponse, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, StrongPasswordOptionsResponse, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, UpdateCasePermissionsRequest, UpdateCompanyAccessPackagePayload, UpdateCompanyBooleanConfigRequest, UpdateCompanyJsonConfigRequest, UpdateCompanyRequest, UpdateCompanyStringConfigRequest, UpdateCompanyUserAvatarResponse, UpdateCompanyUserRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, UpdateTimeEntryRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UploadPresignedUrlResponse, User, UserPreference, UserProfile, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };