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