import { AccountInfo, ExchangeRates, ResourcePrice, SubscriptionTemplate, GetMoneyAmountToChargeResult, ShortAccountInfo, AccountPlan, Plan, AccountDocuments, AccountVerifications, ApplicationInfo, UserInfo, CallList, CallListDetail, ScenarioInfo, RuleInfo, CallSessionInfo, HistoryReport, TransactionInfo, ACDSessionInfo, AuditLogInfo, CommonReport, NewAttachedPhoneInfo, AttachedPhoneInfo, NewPhoneInfo, PhoneNumberCountryInfo, PhoneNumberCountryStateInfo, PhoneNumberCountryRegionInfo, PstnBlackListInfo, SipWhiteListInfo, SIPRegistration, WABPhoneInfo, CallerIDInfo, OutboundTestPhonenumberInfo, QueueInfo, ACDState, ACDOperatorAggregationGroup, ACDQueueStatistics, ACDOperatorStatusAggregationGroup, SmartQueueMetricsResult, SmartQueueState, SQAddQueueResult, GetSQQueuesResult, SQAddSkillResult, GetSQSkillsResult, GetSQAgentsResult, SkillInfo, AuthorizedAccountIP, ZipCode, RegulationAddress, RegulationCountry, RegulationRegionRecord, PushCredentialInfo, DialogflowKeyInfo, SmsTransaction, FailedSms, SmsHistory, A2PSmsHistory, RecordStorageInfo, CustomRecordStorageInfo, AddCustomRecordStorageInfo, KeyInfo, KeyView, RoleView, SubUserID, SubUserView, RoleGroupView, KeyValueItems, KeyValueKeys, AccountInvoice, AddSecretResult, GetSecretValueResult, SecretListItem, APIError, } from './Structures'; export interface UtilsReturns { GetAccountInfo: GetAccountInfoResponse; SetAccountInfo: SetAccountInfoResponse; SetChildAccountInfo: SetChildAccountInfoResponse; GetCurrencyRate: GetCurrencyRateResponse; GetResourcePrice: GetResourcePriceResponse; GetSubscriptionPrice: GetSubscriptionPriceResponse; GetChildrenAccounts: GetChildrenAccountsResponse; GetMoneyAmountToCharge: GetMoneyAmountToChargeResponse; ChangeAccountPlan: ChangeAccountPlanResponse; GetAccountPlans: GetAccountPlansResponse; GetAvailablePlans: GetAvailablePlansResponse; GetAccountDocuments: GetAccountDocumentsResponse; GetAccountVerifications: GetAccountVerificationsResponse; AddApplication: AddApplicationResponse; DelApplication: DelApplicationResponse; SetApplicationInfo: SetApplicationInfoResponse; GetApplications: GetApplicationsResponse; AddUser: AddUserResponse; DelUser: DelUserResponse; SetUserInfo: SetUserInfoResponse; GetUsers: GetUsersResponse; CreateCallList: CreateCallListResponse; AppendToCallList: AppendToCallListResponse; CancelCallListBatch: CancelCallListBatchResponse; EditCallList: EditCallListResponse; EditCallListTasksPriority: EditCallListTasksPriorityResponse; DeleteCallList: DeleteCallListResponse; GetCallLists: GetCallListsResponse; GetCallListDetails: GetCallListDetailsResponse; EditCallListTask: EditCallListTaskResponse; CancelCallListTask: CancelCallListTaskResponse; StopCallListProcessing: StopCallListProcessingResponse; RecoverCallList: RecoverCallListResponse; AddScenario: AddScenarioResponse; DelScenario: DelScenarioResponse; BindScenario: BindScenarioResponse; GetScenarios: GetScenariosResponse; SetScenarioInfo: SetScenarioInfoResponse; ReorderScenarios: ReorderScenariosResponse; StartScenarios: StartScenariosResponse; StartConference: StartConferenceResponse; AddRule: AddRuleResponse; DelRule: DelRuleResponse; SetRuleInfo: SetRuleInfoResponse; GetRules: GetRulesResponse; ReorderRules: ReorderRulesResponse; GetCallHistory: GetCallHistoryResponse; GetCallHistoryAsync: GetCallHistoryAsyncResponse; GetBriefCallHistory: GetBriefCallHistoryResponse; GetHistoryReports: GetHistoryReportsResponse; DownloadHistoryReport: DownloadHistoryReportResponse; GetTransactionHistory: GetTransactionHistoryResponse; GetTransactionHistoryAsync: GetTransactionHistoryAsyncResponse; DeleteRecord: DeleteRecordResponse; GetACDHistory: GetACDHistoryResponse; GetAuditLog: GetAuditLogResponse; GetAuditLogAsync: GetAuditLogAsyncResponse; GetPhoneNumberReports: GetPhoneNumberReportsResponse; AttachPhoneNumber: AttachPhoneNumberResponse; BindPhoneNumberToApplication: BindPhoneNumberToApplicationResponse; DeactivatePhoneNumber: DeactivatePhoneNumberResponse; SetPhoneNumberInfo: SetPhoneNumberInfoResponse; GetPhoneNumbers: GetPhoneNumbersResponse; IsAccountPhoneNumber: IsAccountPhoneNumberResponse; GetPhoneNumbersAsync: GetPhoneNumbersAsyncResponse; GetNewPhoneNumbers: GetNewPhoneNumbersResponse; GetPhoneNumberCategories: GetPhoneNumberCategoriesResponse; GetPhoneNumberCountryStates: GetPhoneNumberCountryStatesResponse; GetPhoneNumberRegions: GetPhoneNumberRegionsResponse; GetActualPhoneNumberRegion: GetActualPhoneNumberRegionResponse; GetAccountPhoneNumberCountries: GetAccountPhoneNumberCountriesResponse; AddPstnBlackListItem: AddPstnBlackListItemResponse; SetPstnBlackListItem: SetPstnBlackListItemResponse; DelPstnBlackListItem: DelPstnBlackListItemResponse; GetPstnBlackList: GetPstnBlackListResponse; AddSipWhiteListItem: AddSipWhiteListItemResponse; DelSipWhiteListItem: DelSipWhiteListItemResponse; SetSipWhiteListItem: SetSipWhiteListItemResponse; GetSipWhiteList: GetSipWhiteListResponse; CreateSipRegistration: CreateSipRegistrationResponse; UpdateSipRegistration: UpdateSipRegistrationResponse; BindSipRegistration: BindSipRegistrationResponse; DeleteSipRegistration: DeleteSipRegistrationResponse; GetSipRegistrations: GetSipRegistrationsResponse; AddWABPhoneNumber: AddWABPhoneNumberResponse; DeleteWABPhoneNumber: DeleteWABPhoneNumberResponse; SetWABPhoneNumberInfo: SetWABPhoneNumberInfoResponse; GetWABPhoneNumbers: GetWABPhoneNumbersResponse; DelCallerID: DelCallerIDResponse; GetCallerIDs: GetCallerIDsResponse; AddOutboundTestPhoneNumber: AddOutboundTestPhoneNumberResponse; VerifyOutboundTestPhoneNumber: VerifyOutboundTestPhoneNumberResponse; ActivateOutboundTestPhoneNumber: ActivateOutboundTestPhoneNumberResponse; DelOutboundTestPhoneNumber: DelOutboundTestPhoneNumberResponse; GetOutboundTestPhoneNumbers: GetOutboundTestPhoneNumbersResponse; AddQueue: AddQueueResponse; BindUserToQueue: BindUserToQueueResponse; DelQueue: DelQueueResponse; SetQueueInfo: SetQueueInfoResponse; GetQueues: GetQueuesResponse; GetACDState: GetACDStateResponse; GetACDOperatorStatistics: GetACDOperatorStatisticsResponse; GetACDQueueStatistics: GetACDQueueStatisticsResponse; GetACDOperatorStatusStatistics: GetACDOperatorStatusStatisticsResponse; GetSmartQueueRealtimeMetrics: GetSmartQueueRealtimeMetricsResponse; GetSmartQueueDayHistory: GetSmartQueueDayHistoryResponse; RequestSmartQueueHistory: RequestSmartQueueHistoryResponse; GetSQState: GetSQStateResponse; SQ_SetAgentCustomStatusMapping: SQ_SetAgentCustomStatusMappingResponse; SQ_GetAgentCustomStatusMapping: SQ_GetAgentCustomStatusMappingResponse; SQ_DeleteAgentCustomStatusMapping: SQ_DeleteAgentCustomStatusMappingResponse; SQ_AddQueue: SQ_AddQueueResponse; SQ_SetQueueInfo: SQ_SetQueueInfoResponse; SQ_DelQueue: SQ_DelQueueResponse; SQ_GetQueues: SQ_GetQueuesResponse; SQ_AddSkill: SQ_AddSkillResponse; SQ_DelSkill: SQ_DelSkillResponse; SQ_SetSkillInfo: SQ_SetSkillInfoResponse; SQ_BindSkill: SQ_BindSkillResponse; SQ_UnbindSkill: SQ_UnbindSkillResponse; SQ_GetSkills: SQ_GetSkillsResponse; SQ_BindAgent: SQ_BindAgentResponse; SQ_UnbindAgent: SQ_UnbindAgentResponse; SQ_GetAgents: SQ_GetAgentsResponse; SQ_SetAgentInfo: SQ_SetAgentInfoResponse; AddSkill: AddSkillResponse; DelSkill: DelSkillResponse; SetSkillInfo: SetSkillInfoResponse; GetSkills: GetSkillsResponse; BindSkill: BindSkillResponse; AddAuthorizedAccountIP: AddAuthorizedAccountIPResponse; DelAuthorizedAccountIP: DelAuthorizedAccountIPResponse; GetAuthorizedAccountIPs: GetAuthorizedAccountIPsResponse; CheckAuthorizedAccountIP: CheckAuthorizedAccountIPResponse; LinkregulationAddress: LinkregulationAddressResponse; GetZIPCodes: GetZIPCodesResponse; GetRegulationsAddress: GetRegulationsAddressResponse; GetAvailableRegulations: GetAvailableRegulationsResponse; GetCountries: GetCountriesResponse; GetRegions: GetRegionsResponse; AddPushCredential: AddPushCredentialResponse; SetPushCredential: SetPushCredentialResponse; DelPushCredential: DelPushCredentialResponse; GetPushCredential: GetPushCredentialResponse; BindPushCredential: BindPushCredentialResponse; AddDialogflowKey: AddDialogflowKeyResponse; SetDialogflowKey: SetDialogflowKeyResponse; DelDialogflowKey: DelDialogflowKeyResponse; GetDialogflowKeys: GetDialogflowKeysResponse; BindDialogflowKeys: BindDialogflowKeysResponse; SendSmsMessage: SendSmsMessageResponse; A2PSendSms: A2PSendSmsResponse; ControlSms: ControlSmsResponse; GetSmsHistory: GetSmsHistoryResponse; A2PGetSmsHistory: A2PGetSmsHistoryResponse; GetRecordStorages: GetRecordStoragesResponse; GetCustomRecordStorages: GetCustomRecordStoragesResponse; AddCustomRecordStorage: AddCustomRecordStorageResponse; SetCustomRecordStorageInfo: SetCustomRecordStorageInfoResponse; CreateKey: CreateKeyResponse; GetKeys: GetKeysResponse; UpdateKey: UpdateKeyResponse; DeleteKey: DeleteKeyResponse; SetKeyRoles: SetKeyRolesResponse; GetKeyRoles: GetKeyRolesResponse; RemoveKeyRoles: RemoveKeyRolesResponse; AddSubUser: AddSubUserResponse; GetSubUsers: GetSubUsersResponse; SetSubUserInfo: SetSubUserInfoResponse; DelSubUser: DelSubUserResponse; SetSubUserRoles: SetSubUserRolesResponse; GetSubUserRoles: GetSubUserRolesResponse; RemoveSubUserRoles: RemoveSubUserRolesResponse; GetRoles: GetRolesResponse; GetRoleGroups: GetRoleGroupsResponse; SetKeyValueItem: SetKeyValueItemResponse; DelKeyValueItem: DelKeyValueItemResponse; GetKeyValueItem: GetKeyValueItemResponse; GetKeyValueItems: GetKeyValueItemsResponse; GetKeyValueKeys: GetKeyValueKeysResponse; GetAccountInvoices: GetAccountInvoicesResponse; DownloadInvoice: DownloadInvoiceResponse; AddSecret: AddSecretResponse; DelSecret: DelSecretResponse; GetSecretValue: GetSecretValueResponse; GetSecrets: GetSecretsResponse; SetSecretInfo: SetSecretInfoResponse; } export interface NewRegistrationInterface {} export interface AccountsAuthenticationInterface {} export interface GetAccountInfoRequest { /** * Whether to get the account's live balance */ returnLiveBalance?: boolean; } export interface GetAccountInfoResponse { /** * Account's info as the [AccountInfoType] object instance */ result: AccountInfo; /** * The preferred address for the Management API requests */ apiAddress: string; error?: APIError; } export interface SetAccountInfoRequest { /** * The new account email */ newAccountEmail?: string; /** * The new account password. Should be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character */ newAccountPassword?: string; /** * The notification language code (2 symbols, ISO639-1). The following values are available: aa (Afar), ab (Abkhazian), af (Afrikaans), am (Amharic), ar (Arabic), as (Assamese), ay (Aymara), az (Azerbaijani), ba (Bashkir), be (Belarusian), bg (Bulgarian), bh (Bihari), bi (Bislama), bn (Bengali), bo (Tibetan), br (Breton), ca (Catalan), co (Corsican), cs (Czech), cy (Welch), da (Danish), de (German), dz (Bhutani), el (Greek), en (English), eo (Esperanto), es (Spanish), et (Estonian), eu (Basque), fa (Persian), fi (Finnish), fj (Fiji), fo (Faeroese), fr (French), fy (Frisian), ga (Irish), gd (Scots Gaelic), gl (Galician), gn (Guarani), gu (Gujarati), ha (Hausa), hi (Hindi), he (Hebrew), hr (Croatian), hu (Hungarian), hy (Armenian), ia (Interlingua), id (Indonesian), ie (Interlingue), ik (Inupiak), in (Indonesian), is (Icelandic), it (Italian), iu (Inuktitut), iw (Hebrew), ja (Japanese), ji (Yiddish), jw (Javanese), ka (Georgian), kk (Kazakh), kl (Greenlandic), km (Cambodian), kn (Kannada), ko (Korean), ks (Kashmiri), ku (Kurdish), ky (Kirghiz), la (Latin), ln (Lingala), lo (Laothian), lt (Lithuanian), lv (Latvian), mg (Malagasy), mi (Maori), mk (Macedonian), ml (Malayalam), mn (Mongolian), mo (Moldavian), mr (Marathi), ms (Malay), mt (Maltese), my (Burmese), na (Nauru), ne (Nepali), nl (Dutch), no (Norwegian), oc (Occitan), om (Oromo), or (Oriya), pa (Punjabi), pl (Polish), ps (Pashto), pt (Portuguese), qu (Quechua), rm (Rhaeto-Romance), rn (Kirundi), ro (Romanian), ru (Russian), rw (Kinyarwanda), sa (Sanskrit), sd (Sindhi), sg (Sangro), sh (Serbo-Croatian), si (Singhalese), sk (Slovak), sl (Slovenian), sm (Samoan), sn (Shona), so (Somali), sq (Albanian), sr (Serbian), ss (Siswati), st (Sesotho), su (Sudanese), sv (Swedish), sw (Swahili), ta (Tamil), te (Tegulu), tg (Tajik), th (Thai), ti (Tigrinya), tk (Turkmen), tl (Tagalog), tn (Setswana), to (Tonga), tr (Turkish), ts (Tsonga), tt (Tatar), tw (Twi), ug (Uigur), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), vo (Volapuk), wo (Wolof), xh (Xhosa), yi (Yiddish), yo (Yoruba), za (Zhuang), zh (Chinese), zu (Zulu) */ languageCode?: string; /** * The account location (timezone). Examples: America/Los_Angeles, Etc/GMT-8, Etc/GMT+10 */ location?: string; /** * The first name */ accountFirstName?: string; /** * The last name */ accountLastName?: string; mobilePhone?: string; /** * The minimum balance value to notify by email or SMS */ minBalanceToNotify?: number; /** * Whether Voximplant notifications are required */ accountNotifications?: boolean; /** * Whether to receive the emails about the Voximplant plan changing */ tariffChangingNotifications?: boolean; /** * Whether to receive the emails about the Voximplant news */ newsNotifications?: boolean; /** * Whether to receive the emails about a JS scenario error */ sendJsError?: boolean; /** * The company or businessman name */ billingAddressName?: string; /** * The billing address country code (2 symbols, ISO 3166-1 alpha-2). The following values are available: AF (Afghanistan), AL (Albania), DZ (Algeria), AS (American Samoa), AD (Andorra), AO (Angola), AI (Anguilla), AQ (Antarctica), AG (Antigua and Barbuda), AR (Argentina), AM (Armenia), AW (Aruba), AU (Australia), AT (Austria), AZ (Azerbaijan), BH (Bahrain), BD (Bangladesh), BB (Barbados), BY (Belarus), BE (Belgium), BZ (Belize), BJ (Benin), BM (Bermuda), BT (Bhutan), BO (Bolivia), BA (Bosnia and Herzegovina), BW (Botswana), BV (Bouvet Island), BR (Brazil), IO (British Indian Ocean Territory), BN (Brunei), BG (Bulgaria), BF (Burkina Faso), BI (Burundi), KH (Cambodia), CM (Cameroon), CA (Canada), CV (Cape Verde), KY (Cayman Islands), CF (Central African Republic), TD (Chad), CL (Chile), CN (China), CX (Christmas Island), CO (Colombia), KM (Comoros), CG (Congo), CK (Cook Islands), CR (Costa Rica), HR (Croatia), CU (Cuba), CY (Cyprus), CZ (Czech Republic), DK (Denmark), DJ (Djibouti), DM (Dominica), DO (Dominican Republic), EC (Ecuador), EG (Egypt), SV (El Salvador), GQ (Equatorial Guinea), ER (Eritrea), EE (Estonia), ET (Ethiopia), FO (Faroe Islands), FJ (Fiji Islands), FI (Finland), FR (France), GF (French Guiana), PF (French Polynesia), TF (French Southern and Antarctic Lands), GA (Gabon), GE (Georgia), DE (Germany), GH (Ghana), GI (Gibraltar), GR (Greece), GL (Greenland), GD (Grenada), GP (Guadeloupe), GU (Guam), GT (Guatemala), GG (Guernsey), GN (Guinea), GY (Guyana), HT (Haiti), HM (Heard Island and McDonald Islands), HN (Honduras), HU (Hungary), IS (Iceland), IN (India), ID (Indonesia), IR (Iran), IQ (Iraq), IE (Ireland), IL (Israel), IT (Italy), JM (Jamaica), JP (Japan), JE (Jersey), JO (Jordan), KZ (Kazakhstan), KE (Kenya), KI (Kiribati), KR (Korea), KW (Kuwait), KG (Kyrgyzstan), LA (Laos), LV (Latvia), LB (Lebanon), LS (Lesotho), LR (Liberia), LY (Libya), LI (Liechtenstein), LT (Lithuania), LU (Luxembourg), MG (Madagascar), MW (Malawi), MY (Malaysia), MV (Maldives), ML (Mali), MT (Malta), MH (Marshall Islands), MQ (Martinique), MR (Mauritania), MU (Mauritius), YT (Mayotte), MX (Mexico), FM (Micronesia), MD (Moldova), MC (Monaco), MN (Mongolia), ME (Montenegro), MS (Montserrat), MA (Morocco), MZ (Mozambique), MM (Myanmar), NA (Namibia), NR (Nauru), NP (Nepal), NL (Netherlands), AN (Netherlands Antilles), NC (New Caledonia), NZ (New Zealand), NI (Nicaragua), NE (Niger), NG (Nigeria), NU (Niue), NF (Norfolk Island), KP (North Korea), MP (Northern Mariana Islands), NO (Norway), OM (Oman), PK (Pakistan), PW (Palau), PS (Palestinian Authority), PA (Panama), PG (Papua New Guinea), PY (Paraguay), PE (Peru), PH (Philippines), PN (Pitcairn Islands), PL (Poland), PT (Portugal), PR (Puerto Rico), QA (Qatar), RE (Reunion), RO (Romania), RU (Russia), RW (Rwanda), WS (Samoa), SM (San Marino), SA (Saudi Arabia), SN (Senegal), RS (Serbia), SC (Seychelles), SL (Sierra Leone), SG (Singapore), SK (Slovakia), SI (Slovenia), SB (Solomon Islands), SO (Somalia), ZA (South Africa), GS (South Georgia and the South Sandwich Islands), ES (Spain), LK (Sri Lanka), SD (Sudan), SR (Suriname), SZ (Swaziland), SE (Sweden), CH (Switzerland), SY (Syria), ST (Sao Tome and Principe), TW (Taiwan), TJ (Tajikistan), TZ (Tanzania), TH (Thailand), TG (Togo), TK (Tokelau), TO (Tonga), TT (Trinidad and Tobago), TN (Tunisia), TR (Turkey), TM (Turkmenistan), TC (Turks and Caicos Islands), TV (Tuvalu), UG (Uganda), UA (Ukraine), AE (United Arab Emirates), GB (United Kingdom), US (United States), UY (Uruguay), UZ (Uzbekistan), VU (Vanuatu), VA (Vatican City), VE (Venezuela), VN (Vietnam), VI (Virgin Islands), WF (Wallis and Futuna), EH (Western Sahara), YE (Yemen), ZM (Zambia), ZW (Zimbabwe), AX (Aland Islands) */ billingAddressCountryCode?: string; /** * The valid address that needs to be specified to pay for any services. You cannot delete it later, only change */ billingAddressAddress?: string; /** * The office ZIP */ billingAddressZip?: string; /** * The office phone number */ billingAddressPhone?: string; /** * The custom data */ accountCustomData?: string; /** * If URL is specified, Voximplant cloud makes HTTP POST requests to it when something happens. For a full list of reasons see the type field of the [AccountCallback] structure. The HTTP request has a JSON-encoded body that conforms to the [AccountCallbacks] structure */ callbackUrl?: string; /** * If salt string is specified, each HTTP request made by the Voximplant cloud toward the callback_url has a salt field set to MD5 hash of account information and salt. That hash can be used be a developer to ensure that HTTP request is made by the Voximplant cloud */ callbackSalt?: string; /** * Whether to store outgoing message texts. Default value is false */ storeOutboundSms?: boolean; /** * Whether to store incoming message texts. Default value is false */ storeInboundSms?: boolean; } export interface SetAccountInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetChildAccountInfoRequest { /** * The child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts. Required unless child_account_name or child_account_email is provided. */ childAccountId?: 'any' | number | number[]; /** * The child account name list separated by semicolons (;). Required unless child_account_id or child_account_email is provided. */ childAccountName?: string | string[]; /** * The child account email list separated by semicolons (;). Required unless child_account_id or child_account_name is provided. */ childAccountEmail?: string | string[]; /** * The new child account email */ newChildAccountEmail?: string; /** * Custom URL to send callbacks from this child account */ callbackUrl?: string; /** * If salt string is specified, each HTTP request made by the Voximplant cloud toward the callback_url has a salt field set to MD5 hash of account information and salt. That hash can be used be a developer to ensure that HTTP request is made by the Voximplant cloud */ callbackSalt?: string; /** * The new child account password. Should be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character */ newChildAccountPassword?: string; /** * Whether Voximplant notifications are required */ accountNotifications?: boolean; /** * Whether to receive the emails about the Voximplant plan changing */ tariffChangingNotifications?: boolean; /** * Whether to receive the emails about the Voximplant news */ newsNotifications?: boolean; /** * Whether to enable the child account */ active?: boolean; /** * The notification language code (2 symbols, ISO639-1). The following values are available: aa (Afar), ab (Abkhazian), af (Afrikaans), am (Amharic), ar (Arabic), as (Assamese), ay (Aymara), az (Azerbaijani), ba (Bashkir), be (Belarusian), bg (Bulgarian), bh (Bihari), bi (Bislama), bn (Bengali), bo (Tibetan), br (Breton), ca (Catalan), co (Corsican), cs (Czech), cy (Welch), da (Danish), de (German), dz (Bhutani), el (Greek), en (English), eo (Esperanto), es (Spanish), et (Estonian), eu (Basque), fa (Persian), fi (Finnish), fj (Fiji), fo (Faeroese), fr (French), fy (Frisian), ga (Irish), gd (Scots Gaelic), gl (Galician), gn (Guarani), gu (Gujarati), ha (Hausa), hi (Hindi), he (Hebrew), hr (Croatian), hu (Hungarian), hy (Armenian), ia (Interlingua), id (Indonesian), ie (Interlingue), ik (Inupiak), in (Indonesian), is (Icelandic), it (Italian), iu (Inuktitut), iw (Hebrew), ja (Japanese), ji (Yiddish), jw (Javanese), ka (Georgian), kk (Kazakh), kl (Greenlandic), km (Cambodian), kn (Kannada), ko (Korean), ks (Kashmiri), ku (Kurdish), ky (Kirghiz), la (Latin), ln (Lingala), lo (Laothian), lt (Lithuanian), lv (Latvian), mg (Malagasy), mi (Maori), mk (Macedonian), ml (Malayalam), mn (Mongolian), mo (Moldavian), mr (Marathi), ms (Malay), mt (Maltese), my (Burmese), na (Nauru), ne (Nepali), nl (Dutch), no (Norwegian), oc (Occitan), om (Oromo), or (Oriya), pa (Punjabi), pl (Polish), ps (Pashto), pt (Portuguese), qu (Quechua), rm (Rhaeto-Romance), rn (Kirundi), ro (Romanian), ru (Russian), rw (Kinyarwanda), sa (Sanskrit), sd (Sindhi), sg (Sangro), sh (Serbo-Croatian), si (Singhalese), sk (Slovak), sl (Slovenian), sm (Samoan), sn (Shona), so (Somali), sq (Albanian), sr (Serbian), ss (Siswati), st (Sesotho), su (Sudanese), sv (Swedish), sw (Swahili), ta (Tamil), te (Tegulu), tg (Tajik), th (Thai), ti (Tigrinya), tk (Turkmen), tl (Tagalog), tn (Setswana), to (Tonga), tr (Turkish), ts (Tsonga), tt (Tatar), tw (Twi), ug (Uigur), uk (Ukrainian), ur (Urdu), uz (Uzbek), vi (Vietnamese), vo (Volapuk), wo (Wolof), xh (Xhosa), yi (Yiddish), yo (Yoruba), za (Zhuang), zh (Chinese), zu (Zulu) */ languageCode?: string; /** * The child account location (timezone). Examples: America/Los_Angeles, Etc/GMT-8, Etc/GMT+10 */ location?: string; /** * The minimum balance value to notify by email or SMS */ minBalanceToNotify?: number; /** * Whether to allow the robokassa payments */ supportRobokassa?: boolean; /** * Whether to allow the bank card payments */ supportBankCard?: boolean; /** * Whether to allow the bank invoices */ supportInvoice?: boolean; /** * Whether to allow use restricted directions */ canUseRestricted?: boolean; } export interface SetChildAccountInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetCurrencyRateRequest { /** * The currency code list separated by semicolons (;). Examples: RUR, KZT, EUR, USD */ currency: string | string[]; /** * The date, format: YYYY-MM-DD */ date?: Date; } export interface GetCurrencyRateResponse { /** * The exchange rates */ result: ExchangeRates; error?: APIError; } export interface GetResourcePriceRequest { /** * The resource type list separated by semicolons (;). The possible values are: */ resourceType?: string | string[]; /** * The price group ID list separated by semicolons (;) */ priceGroupId?: 'any' | number | number[]; /** * The price group name template to filter */ priceGroupName?: string; /** * The resource parameter list separated by semicolons (;). Example: a phone number list */ resourceParam?: string | string[]; } export interface GetResourcePriceResponse { /** * The resource prices */ result: ResourcePrice[]; error?: APIError; } export interface GetSubscriptionPriceRequest { /** * The subscription template ID list separated by semicolons (;) */ subscriptionTemplateId?: 'any' | number | number[]; /** * The subscription template type. The following values are possible: PHONE_NUM, SIP_REGISTRATION */ subscriptionTemplateType?: string; /** * The subscription template name (example: SIP registration, Phone GB, Phone RU 495, ...) */ subscriptionTemplateName?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetSubscriptionPriceResponse { /** * The subscription template prices */ result: SubscriptionTemplate[]; error?: APIError; } export interface GetChildrenAccountsRequest { /** * The account ID list separated by semicolons (;). You need to specify at least one of the following parameters: `child_account_id`, `child_account_name`, `child_account_email` */ childAccountId?: 'any' | number | number[]; /** * The child account name to filter. You need to specify at least one of the following parameters: `child_account_id`, `child_account_name`, `child_account_email` */ childAccountName?: string; /** * The child account email to filter. You need to specify at least one of the following parameters: `child_account_id`, `child_account_name`, `child_account_email` */ childAccountEmail?: string; /** * Whether the filter is active */ active?: boolean; /** * Whether the filter is frozen */ frozen?: boolean; /** * Whether to ignore the invalid 'child_account_id' items */ ignoreInvalidAccounts?: boolean; /** * Whether to output the account_id only */ briefOutput?: boolean; /** * Whether to output the account_id, account_name, account_email only */ mediumOutput?: boolean; /** * The maximum returning record count. The default value applies to the full output only and is capped at 1000; with brief_output or medium_output all the records are returned unless this parameter is set */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The following values are available: 'child_account_id', 'child_account_name' and 'child_account_email' */ orderBy?: string; /** * Whether to get the user live balance */ returnLiveBalance?: boolean; } export interface GetChildrenAccountsResponse { result: AccountInfo[]; /** * The total found user count */ totalCount: number; /** * The returned user count */ count: number; error?: APIError; } export interface GetMoneyAmountToChargeRequest { /** * The currency name. Examples: USD, RUR, EUR */ currency?: string; /** * The next charge date, format: YYYY-MM-DD */ chargeDate?: Date; } export interface GetMoneyAmountToChargeResponse { /** * Result */ result: GetMoneyAmountToChargeResult; error?: APIError; } export interface ChangeAccountPlanRequest { /** * The new plan ID with a price larger than the current plan's (see [GetAvailablePlans]) */ planSubscriptionTemplateId: number; /** * The plan type to config. The possible values are IM, MAU */ planType?: string; } export interface ChangeAccountPlanResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The current account state */ accountInfo: ShortAccountInfo; error?: APIError; } export interface GetAccountPlansRequest { /** * The plan type list separated by semicolons (;). The possible values are IM, MAU */ planType?: string | string[]; /** * The plan ID list separated by semicolons (;) */ planSubscriptionTemplateId?: 'any' | number | number[]; } export interface GetAccountPlansResponse { result: AccountPlan[]; error?: APIError; } export interface GetAvailablePlansRequest { /** * The plan type list separated by semicolons (;). The possible values are IM, MAU */ planType?: string | string[]; /** * The plan ID list separated by semicolons (;) */ planSubscriptionTemplateId?: 'any' | number | number[]; } export interface GetAvailablePlansResponse { result: Plan[]; error?: APIError; } export interface GetAccountDocumentsRequest { /** * Whether to view the uploaded document statuses. (The flag is ignored with the child_account_id=all) */ withDetails?: boolean; /** * The required account verification name to filter */ verificationName?: string; /** * The account verification status list separated by semicolons (;). The following values are possible: REQUIRED, IN_PROGRESS, VERIFIED */ verificationStatus?: string | string[]; /** * Unverified subscriptions hold until the date (from ...) in the following format: YYYY-MM-DD */ fromUnverifiedHoldUntil?: Date; /** * Unverified subscriptions hold until the date (... to) in the following format: YYYY-MM-DD */ toUnverifiedHoldUntil?: Date; /** * The child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts */ childAccountId?: 'any' | number | number[]; /** * Whether to get the children account verifications only */ childrenVerificationsOnly?: boolean; } export interface GetAccountDocumentsResponse { /** * The account documents with verification states */ result: AccountDocuments[]; error?: APIError; } export interface GetAccountVerificationsRequest { /** * Account ID to check verifications for */ accountId: number; /** * Whether to return the active verification only */ activeVerificationOnly?: boolean; } export interface GetAccountVerificationsResponse { /** * Account verifications */ result: AccountVerifications[]; error?: APIError; } export interface AccountsInterface { getAccountInfo: (request: GetAccountInfoRequest) => Promise; setAccountInfo: (request: SetAccountInfoRequest) => Promise; setChildAccountInfo: ( request: SetChildAccountInfoRequest ) => Promise; getCurrencyRate: (request: GetCurrencyRateRequest) => Promise; getResourcePrice: (request: GetResourcePriceRequest) => Promise; getSubscriptionPrice: ( request: GetSubscriptionPriceRequest ) => Promise; getChildrenAccounts: ( request: GetChildrenAccountsRequest ) => Promise; getMoneyAmountToCharge: ( request: GetMoneyAmountToChargeRequest ) => Promise; changeAccountPlan: (request: ChangeAccountPlanRequest) => Promise; getAccountPlans: (request: GetAccountPlansRequest) => Promise; getAvailablePlans: (request: GetAvailablePlansRequest) => Promise; getAccountDocuments: ( request: GetAccountDocumentsRequest ) => Promise; getAccountVerifications: ( request: GetAccountVerificationsRequest ) => Promise; } export interface AddApplicationRequest { /** * Short application name in the \[a-z\]\[a-z0-9-\]{1,64} format */ applicationName: string; /** * Whether to enable secure storage for all logs and records of the application */ secureRecordStorage?: boolean; } export interface AddApplicationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The application ID */ applicationId: number; /** * The full application name */ applicationName: string; /** * Whether a secure storage for logs and records is enabled or not */ secureRecordStorage: boolean; error?: APIError; } export interface DelApplicationRequest { /** * The application ID list separated by semicolons (;). Use the 'all' value to select all applications. Required unless application_name is provided. */ applicationId?: 'any' | number | number[]; /** * The application name list separated by semicolons (;). Required unless application_id is provided. */ applicationName?: string | string[]; } export interface DelApplicationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetApplicationInfoRequest { /** * The application ID. Required unless required_application_name is provided. */ applicationId?: number; /** * The application name. Required unless application_id is provided. */ requiredApplicationName?: string; /** * The new short application name in format [a-z][a-z0-9-]{1,79} */ applicationName?: string; /** * Whether to enable secure storage for all logs and records of the application */ secureRecordStorage?: boolean; } export interface SetApplicationInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The new full application name */ applicationName: string; /** * Whether a secure storage for logs and records is enabled or not */ secureRecordStorage: boolean; error?: APIError; } export interface GetApplicationsRequest { /** * The application ID to filter */ applicationId?: number; /** * The application name part to filter */ applicationName?: string; /** * Whether to get bound rules info */ withRules?: boolean; /** * Whether to get bound rules and scenarios info */ withScenarios?: boolean; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetApplicationsResponse { result: ApplicationInfo[]; /** * The total found application count */ totalCount: number; /** * The returned application count */ count: number; error?: APIError; } export interface ApplicationsInterface { addApplication: (request: AddApplicationRequest) => Promise; delApplication: (request: DelApplicationRequest) => Promise; setApplicationInfo: (request: SetApplicationInfoRequest) => Promise; getApplications: (request: GetApplicationsRequest) => Promise; } export interface AddUserRequest { /** * The user name in format [a-z0-9][a-z0-9_-]{2,49} */ userName: string; /** * The user display name. The length should be less than 256 */ userDisplayName: string; /** * The user password. Should be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character */ userPassword: string; /** * The application ID which a new user is to be bound to. Required unless application_name is provided. */ applicationId?: number; /** * The application name which a new user is to be bound to. Required unless application_id is provided. */ applicationName?: string; /** * Whether the user uses the parent account's money, 'false' if the user has a separate balance */ parentAccounting?: boolean; mobilePhone?: string; /** * Whether the user is active. Inactive users cannot log in to applications */ userActive?: boolean; /** * Any string */ userCustomData?: string; } export interface AddUserResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The new user ID */ userId: number; error?: APIError; } export interface DelUserRequest { /** * The user ID list separated by semicolons (;). Use the 'all' value to select all users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * The user name list separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * Delete the specified users bound to the application ID. It is required if the user_name is specified */ applicationId?: number; /** * Delete the specified users bound to the application name. Can be used instead of the application_id parameter */ applicationName?: string; } export interface DelUserResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetUserInfoRequest { /** * The user to edit. Required unless user_name is provided. */ userId?: number; /** * The user name. Required unless user_id is provided. */ userName?: string; /** * The application ID. It is required if the user_name is specified */ applicationId?: number; /** * The application name that can be used instead of application_id */ applicationName?: string; /** * The new user name in format [a-z0-9][a-z0-9_-]{2,49} */ newUserName?: string; /** * The new user display name. The length should be less than 256 */ userDisplayName?: string; /** * The new user password. Should be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character */ userPassword?: string; /** * Whether to use the parent account's money, 'false' to use a separate user balance */ parentAccounting?: boolean; /** * Whether the user is active. Inactive users cannot log in to applications */ userActive?: boolean; /** * Any string */ userCustomData?: string; mobilePhone?: string; } export interface SetUserInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetUsersRequest { /** * The application ID to filter */ applicationId: number; /** * The application name part to filter */ applicationName: string; /** * The skill ID to filter */ skillId?: number; /** * The excluded skill ID to filter */ excludedSkillId?: number; /** * The ACD queue ID to filter */ acdQueueId?: number; /** * The excluded ACD queue ID to filter */ excludedAcdQueueId?: number; /** * The user ID to filter */ userId?: number; /** * The user name part to filter */ userName?: string; /** * Whether the user is active to filter. Inactive users cannot log in to applications */ userActive?: boolean; /** * The user display name part to filter */ userDisplayName?: string; /** * Whether to get the bound skills */ withSkills?: boolean; /** * Whether to get the bound queues */ withQueues?: boolean; /** * The ACD status list separated by semicolons (;) to filter. The following values are possible: OFFLINE, ONLINE, READY, BANNED, IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND */ acdStatus?: string | string[]; /** * The skill to show in the 'skills' field output */ showingSkillId?: number; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The following values are available: 'user_id', 'user_name' and 'user_display_name' */ orderBy?: string; /** * Whether to get the user live balance */ returnLiveBalance?: boolean; } export interface GetUsersResponse { /** * The UserInfoType records */ result: UserInfo[]; /** * The total found user count */ totalCount: number; /** * The returned user count */ count: number; error?: APIError; } export interface UsersInterface { addUser: (request: AddUserRequest) => Promise; delUser: (request: DelUserRequest) => Promise; setUserInfo: (request: SetUserInfoRequest) => Promise; getUsers: (request: GetUsersRequest) => Promise; } export interface CreateCallListRequest { /** * Rule ID. It is specified in the Applications section of the Control Panel */ ruleId: number; /** * Call list priority. The value is in the range of [0 ... 2^31] where zero is the highest priority */ priority: number; /** * Number of simultaneously processed tasks */ maxSimultaneous: number; /** * Number of attempts. Minimum is 1, maximum is 5 */ numAttempts: number; /** * File name, up to 255 characters and cannot contain the '/' and '\' symbols */ name: string; /** * Send as the "body" part of the HTTP request or as multiform. The sending "file_content" via URL is at its own risk because the network devices tend to drop HTTP requests with large headers. Refer to the Call lists guide to learn about file syntax */ fileContent: Buffer; /** * Custom data string for the call list */ listCustomData?: string; /** * Interval between call attempts in seconds. The default value is 0 */ intervalSeconds?: number; /** * Encoding file. The default value is UTF-8 */ encoding?: string; /** * Separator values. The default value is ';' */ delimiter?: string; /** * Escape character for parsing csv */ escape?: string; /** * Location of the server where the scenario needs to be executed. Has higher priority than `ip_address`. Request [getServerLocations](https://api.voximplant.com/getServerLocations) for possible values */ serverLocation?: string; /** * Optional. Whether to prioritize first calling attempts or repeated ones. The possible values are: first_attempts, repeated_attempts. The default values is first_attempts. */ taskPriorityStrategy?: string; /** * IP from the geolocation of the call list subscribers. It allows selecting the nearest server for serving subscribers. If not specified, the client IP of the request is used */ ipAddress?: string; /** * Call list type. The possible values are: automatic, predictive, progressive. The value is case-insensitive */ callListType?: string; /** * The ACD queue ID. Required if call_list_type is predictive or progressive, and should be omitted otherwise */ queueId?: number; /** * Time when the call list should start, as a Unix timestamp in seconds (UTC). The default value is the current time. The value cannot be in the past */ startAt?: number; /** * Whether to create the call list in the cancelled state */ isCancelled?: boolean; /** * Quote character for parsing csv */ quote?: string; /** * The ACD version. The possible values are: V1, V2. Applies only if call_list_type is predictive or progressive */ acdVersion?: string; /** * The predictive dialing algorithm. The possible values are: DEFAULT_PREDICTIVE_TYPE, AR_OPTIMIZED, BF_OPTIMIZED, AR_SMALL_GROUP, AR_AUTO_BALANCED. Applies only if call_list_type is predictive */ predictiveType?: string; /** * The maximum abandoned call rate for predictive dialing, from 0 to 1. Applies only if call_list_type is predictive or progressive */ maximumErrorRate?: number; /** * The minimum agent busy factor for predictive dialing, from 0 to 1. Applies only if call_list_type is predictive or progressive */ minimumBusyFactor?: number; /** * The task multiplier for progressive dialing. The minimum value is 1. Applies only if call_list_type is progressive */ taskMultiplier?: number; /** * Whether the call list is a personal campaign. Applies only if call_list_type is progressive */ isPersonalCampaign?: boolean; /** * The personal campaign mode. The possible values are: smart, strict. Allowed only if is_personal_campaign is true; the default value in that case is smart */ personalCampaignType?: string; /** * The PDS buffer size target. The possible values are: VALUE, OPERATOR, AGENT. Applies only if call_list_type is predictive or progressive */ bufferSizeTarget?: string; /** * The PDS buffer size, from 20 to 500. Applies only if buffer_size_target is VALUE */ bufferSizeValue?: number; /** * The PDS buffer threshold factor. Cannot be negative. Applies only if buffer_size_target is specified */ bufferThresholdFactor?: number; /** * The initial average dial time in seconds for the dialing statistics. Applies only if call_list_type is predictive or progressive */ avgDialTimeSec?: number; /** * The initial average talk time in seconds for the dialing statistics. Applies only if call_list_type is predictive or progressive */ avgTimeTalkSec?: number; /** * The initial average total call time in seconds for the dialing statistics. Applies only if call_list_type is predictive or progressive */ avgTotalTimeSec?: number; /** * The initial successful call ratio for the dialing statistics. Applies only if call_list_type is predictive or progressive */ percentSuccessful?: number; } export interface CreateCallListResponse { /** * Whether the request completed successfully */ result: boolean; /** * Number of stored records */ count: number; /** * List ID */ listId: number; /** * Batch UUID */ batchId: string; error?: APIError; } export interface AppendToCallListRequest { /** * Send as the request body or multiform. Refer to the Call lists guide to learn about file syntax */ fileContent: Buffer; /** * Call list ID. Required unless list_name is provided. */ listId?: number; listName?: string; /** * Encoding file. The default value is UTF-8 */ encoding?: string; /** * Escape character for parsing csv */ escape?: string; /** * Separator values. The default value is ';' */ delimiter?: string; /** * Quote character for parsing csv */ quote?: string; } export interface AppendToCallListResponse { /** * Whether the request completed successfully */ result: boolean; /** * Number of stored records */ count: number; /** * List ID */ listId: number; /** * Batch UUID */ batchId: number; error?: APIError; } export interface CancelCallListBatchRequest { /** * Call list ID */ listId: number; /** * Batch UUIDs of the tasks to cancel, separated by semicolon (;) */ batchIds: string; } export interface CancelCallListBatchResponse { /** * Whether the request completed successfully */ result: boolean; error?: APIError; } export interface EditCallListRequest { /** * Call list ID. If the ID is non existing, the 251 error returns */ listId: number; /** * Custom data string for the call list */ listCustomData?: string; /** * Minimum interval between call attempts. Cannot be a negative value */ intervalSeconds?: number; /** * Maximum call attempt number. Cannot be less than 1 */ numAttempts?: number; /** * Maximum simultaneous call attempts for this call list. Cannot be less than 1 */ maxSimultaneous?: number; /** * IP address in the `Inet4Address` format */ ipAddress?: string; /** * Call list name. Cannot be bigger than 255 characters, cannot contain slash symbol */ name?: string; /** * Call list's priority among other call list. The lower the value, the higher is the call list's priority */ priority?: number; /** * Time when the call list should start, as a Unix timestamp in seconds (UTC) */ startAt?: number; /** * Optional. Whether to prioritize first calling attempts or repeated ones. The possible values are: first_attempts, repeated_attempts. The default values is first_attempts */ taskPriorityStrategy?: string; /** * Location of the server processing the call list. If the ID is non existing, the 496 error returns: The 'server_location' parameter is invalid. */ serverLocation?: string; /** * Call list type. The possible values are: automatic, manual, predictive, progressive. The value is case-insensitive */ callListType?: string; /** * Alias for call_list_type. Applies only if call_list_type is not specified */ callType?: string; /** * The predictive dialing algorithm. The possible values are: AR_OPTIMIZED, BF_OPTIMIZED, AR_SMALL_GROUP, AR_AUTO_BALANCED. If omitted while call_list_type is set to predictive, the value becomes AR_OPTIMIZED; for progressive the value is reset */ predictiveType?: string; /** * The maximum abandoned call rate for predictive dialing, from 0 to 1. If omitted while call_list_type is set to predictive, the value becomes 0.02 */ maximumErrorRate?: number; /** * The minimum agent busy factor for predictive dialing. Cannot be negative. If omitted while call_list_type is set to predictive, the value becomes 0.8 */ minimumBusyFactor?: number; /** * The task multiplier for progressive dialing. Cannot be negative. If omitted while call_list_type is set to progressive, the value becomes 1 */ taskMultiplier?: number; /** * Whether the call list is a personal campaign. Required if personal_campaign_type is specified */ isPersonalCampaign?: boolean; /** * The personal campaign mode. The possible values are: smart, strict. Allowed only if is_personal_campaign is true; the default value in that case is smart */ personalCampaignType?: string; /** * The average dial time in seconds for the dialing statistics. Cannot be negative */ avgDialTimeSec?: number; /** * The average talk time in seconds for the dialing statistics. Cannot be negative */ avgTimeTalkSec?: number; /** * The average total call time in seconds for the dialing statistics. Cannot be negative */ avgTotalTimeSec?: number; /** * The successful call ratio for the dialing statistics. Cannot be negative */ percentSuccessful?: number; } export interface EditCallListResponse { /** * Whether the request completed successfully */ result: boolean; error?: APIError; } export interface EditCallListTasksPriorityRequest { /** * Call list ID. If the ID does not exist, the 251 error returns. */ listId: number; /** * JSON-encoded array of task objects. Each object should contain either 'task_id' (number) or 'task_uuid' (string), and 'task_priority' (number). */ tasks: string; } export interface EditCallListTasksPriorityResponse { /** * JSON-encoded array of each task update. */ results: string; error?: APIError; } export interface DeleteCallListRequest { /** * Account's ID */ accountId: number; /** * Call list's ID to delete */ listId: number; } export interface DeleteCallListResponse { /** * Result */ result: boolean; /** * Text description */ msg: string; error?: APIError; } export interface GetCallListsRequest { /** * The list ID to filter. Can be a list separated by semicolons (;). Use the 'all' value to select all lists */ listId?: 'any' | number | number[]; /** * Find call lists by name */ name?: string; /** * Whether to find only active call lists */ isActive?: boolean; /** * The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ fromDate?: Date; /** * The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ toDate?: Date; /** * The type of the call list. The possible values are AUTOMATIC and MANUAL */ typeList?: string; /** * The maximum returning record count. The maximum value is 1000 */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The application ID to filter. Can be a list separated by semicolons (;). Use the 'all' value to select all applications. Can be used instead of the application_name parameter */ applicationId?: 'any' | number | number[]; /** * The application name list separated by semicolons (;). Can be used instead of the application_id parameter */ applicationName?: string | string[]; /** * The rule ID to filter. Can be a list separated by semicolons (;). Use the 'all' value to select all rules. Can be used instead of the rule_name parameter */ ruleId?: 'any' | number | number[]; /** * The rule name list separated by semicolons (;). Can be used instead of the rule_id parameter */ ruleName?: string | string[]; /** * The call list status to filter. The possible values are: In progress, Canceled, Completed, Suspended */ status?: string; } export interface GetCallListsResponse { /** * Array of lists */ result: CallList[]; /** * Returned call list count */ count: number; /** * Total found call list count */ totalCount: number; error?: APIError; } export interface GetCallListDetailsRequest { /** * The list ID */ listId: number; /** * Maximum number of entries in the result. If output is json, the default and maximum value is 1000; for csv and xls no limit is applied unless the parameter is specified */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The output format. The following values available: **json**, **csv**, **xls**. The default value is **csv** */ output?: string; /** * Encoding of the output file. Default UTF-8 */ encoding?: string; /** * Separator values. The default value is ';' */ delimiter?: string; /** * Batch UUID to filter the tasks */ batchId?: string; /** * Whether to create an asynchronous report instead of returning the data immediately. Requires output to be csv or xls */ isAsync?: boolean; /** * Whether to use the new csv layout. Applies to asynchronous reports; for xls the value is always true */ newCsvStyle?: boolean; } export interface GetCallListDetailsResponse { /** * Array of tasks for the roll call */ result: CallListDetail[]; /** * The number of tasks */ count: number; error?: APIError; } export interface EditCallListTaskRequest { /** * Call list's ID */ listId: number; /** * Call list's task ID. Please specify either the task's ID or the task's UUID to edit the task */ taskId?: number; /** * Call list schedule in the JSON format. Refer to the Call lists guide for more information. */ callSchedule?: string; /** * Call list's task ID. Please specify either the task's ID or the task's UUID to edit the task. The UUID is unique within the call list */ taskUuid?: string; /** * Next calling attempts timestamp in the yyyy-MM-dd HH:mm:ss format */ startAt?: Date; /** * Number of remaining calling attempts */ attemptsLeft?: number; /** * Custom data string */ customData?: string; /** * Optional. Start time for the daily calling attempts in the UTC+0 24-h format: HH:mm:ss format. If spefied, please specify `max_execution_time` as well */ minExecutionTime?: Date; /** * Optional. End time for the daily calling attempts in the UTC+0 24-h format: HH:mm:ss format. If spefied, please specify `min_execution_time` as well */ maxExecutionTime?: Date; /** * Time of the next calling attempt. One of the editable fields: at least one of them should be specified */ nextAttemptTime?: string; /** * The user ID to bind to the task. One of the editable fields: at least one of them should be specified */ userId?: number; /** * The skill ID list separated by semicolons (;). Up to 5 IDs. One of the editable fields: at least one of them should be specified */ skillId?: 'any' | number | number[]; } export interface EditCallListTaskResponse { /** * Whether the request completed successfully */ result: boolean; error?: APIError; } export interface CancelCallListTaskRequest { /** * Account's ID */ accountId: string; /** * Call list's ID */ listId: number; /** * Task IDs separated by a semicolon. Specify either `tasks_ids` or `tasks_uuids`. The method returns an error if none of the parameters is specified */ tasksIds?: 'any' | number | number[]; /** * Task UUIDs separated by a semicolon. Specify either `tasks_ids` or `tasks_uuids`. The method returns an error if none of the parameters is specified */ tasksUuids?: string | string[]; } export interface CancelCallListTaskResponse { /** * Task's ID */ taskId: number; /** * Task's UUID */ taskUuid: string; /** * Result of the operation */ result: boolean; /** * Reason for the error */ errorMsg: string; error?: APIError; } export interface StopCallListProcessingRequest { /** * The list Id */ listId: number; } export interface StopCallListProcessingResponse { /** * Whether the request completed successfully */ result: boolean; /** * Result message */ msg: string; error?: APIError; } export interface RecoverCallListRequest { /** * The list Id */ listId: number; } export interface RecoverCallListResponse { /** * Whether the request completed successfully */ result: boolean; /** * Number restored tasks */ countRecovery: number; error?: APIError; } export interface CallListsInterface { createCallList: (request: CreateCallListRequest) => Promise; appendToCallList: (request: AppendToCallListRequest) => Promise; cancelCallListBatch: ( request: CancelCallListBatchRequest ) => Promise; editCallList: (request: EditCallListRequest) => Promise; editCallListTasksPriority: ( request: EditCallListTasksPriorityRequest ) => Promise; deleteCallList: (request: DeleteCallListRequest) => Promise; getCallLists: (request: GetCallListsRequest) => Promise; getCallListDetails: (request: GetCallListDetailsRequest) => Promise; editCallListTask: (request: EditCallListTaskRequest) => Promise; cancelCallListTask: (request: CancelCallListTaskRequest) => Promise; stopCallListProcessing: ( request: StopCallListProcessingRequest ) => Promise; recoverCallList: (request: RecoverCallListRequest) => Promise; } export interface AddScenarioRequest { /** * The scenario name. The length should be less than 30 */ scenarioName: string; /** * The scenario text. Use the application/x-www-form-urlencoded content type with UTF-8 encoding. The length should be less than 128 KB */ scenarioScript?: string; /** * The rule ID. The new scenario binds to the specified rule. Please note, if you do not bind the scenario to any rule, you cannot execute the scenario. Can be used instead of the rule_name parameter */ ruleId?: number; /** * The rule name. Can be used instead of the rule_id parameter */ ruleName?: string; /** * Whether to rewrite the existing scenario */ rewrite?: boolean; /** * Application ID to bind the scenario to */ applicationId?: number; /** * Application name to bind the scenario to */ applicationName?: string; } export interface AddScenarioResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The new scenario ID */ scenarioId: number; error?: APIError; } export interface DelScenarioRequest { /** * The scenario ID list separated by semicolons (;). Use the 'all' value to delete all scenarios in all applications. Required unless scenario_name is provided. */ scenarioId?: 'any' | number | number[]; /** * The scenario name list separated by semicolons (;). Required unless scenario_id is provided. */ scenarioName?: string | string[]; } export interface DelScenarioResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface BindScenarioRequest { /** * The scenario ID list separated by semicolons (;). Required unless scenario_name is provided. */ scenarioId?: 'any' | number | number[]; /** * The scenario name list separated by semicolons (;). Required unless scenario_id is provided. */ scenarioName?: string | string[]; /** * The rule ID to bind the scenario. The rule and the scenario need to be in the same application. Required unless rule_name is provided. */ ruleId?: number; /** * The rule name. Required unless rule_id is provided. */ ruleName?: string; /** * The application ID. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * Whether to bind or unbind (set true or false respectively) */ bind?: boolean; } export interface BindScenarioResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetScenariosRequest { /** * The scenario ID to filter */ scenarioId?: number; /** * The scenario name to filter. Exact match. Combines with scenario_id when both are passed. Use with application_id or application_name to limit the result to one application */ scenarioName?: string; /** * Whether to get the scenario text. You should specify the 'scenario_id' too! */ withScript?: boolean; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * ID of the scenario's application */ applicationId?: number; /** * Name of the scenario's application */ applicationName?: string; } export interface GetScenariosResponse { result: ScenarioInfo[]; /** * The total found scenario count */ totalCount: number; /** * The returned scenario count */ count: number; /** * ID of the scenario's application */ applicationId: number; /** * Name of the scenario's application */ applicationName: string; /** * Application name including the node name */ extendedApplicationName: string; error?: APIError; } export interface SetScenarioInfoRequest { /** * Scenario ID. Required unless required_scenario_name is provided. */ scenarioId?: number; /** * Name of the scenario to edit. Required unless scenario_id is provided. */ requiredScenarioName?: string; /** * New scenario name. The length should be less than 30 */ scenarioName?: string; /** * New scenario text. Use the application/x-www-form-urlencoded content type with UTF-8 encoding. The length should be less than 128 KB */ scenarioScript?: string; } export interface SetScenarioInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface ReorderScenariosRequest { /** * The scenario ID list separated by semicolons (;) */ scenarioId: 'any' | number | number[]; /** * The rule ID. Required unless rule_name is provided. */ ruleId?: number; /** * The rule name. Required unless rule_id is provided. */ ruleName?: string; } export interface ReorderScenariosResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface StartScenariosRequest { /** * The user ID. Run the scripts from the user if set. Can be used instead of the user_name parameter */ userId?: number; /** * The user name. Run the scripts from the user if set. Can be used instead of the user_id parameter */ userName?: string; /** * The application ID. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * The rule ID that needs to be launched. Please note, the necessary scenario needs to be attached to the rule. Required unless rule_name is provided. */ ruleId?: number; /** * The rule name. Required unless rule_id is provided. */ ruleName?: string; /** * The script custom data, that can be accessed in the scenario via the VoxEngine.customData() method. Use the application/x-www-form-urlencoded content type with UTF-8 encoding */ scriptCustomData?: string; /** * Specifies the IP from the geolocation of predicted subscribers. It allows selecting the nearest server for serving subscribers. If not specified, the IP address of the HTTP request is used */ referenceIp?: string; /** * Specifies the location of the server where the scenario needs to be executed. Has higher priority than `reference_ip`. Request [getServerLocations](https://api.voximplant.com/getServerLocations) for possible values */ serverLocation?: string; withCheckUrl?: boolean; } export interface StartScenariosResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The URL to control a created media session. You can use it for arbitrary tasks such as stopping scenario or passing additional data to it. Making HTTP request on this URL results in the [AppEvents.HttpRequest](/docs/references/voxengine/appevents#httprequest) VoxEngine event being triggered for scenario, with HTTP request data passed to it */ mediaSessionAccessUrl: string; /** * The URL to control a created media session. You can use it for arbitrary tasks such as stopping scenario or passing additional data to it. Making HTTPS request on this URL results in the [AppEvents.HttpRequest](/docs/references/voxengine/appevents#httprequest) VoxEngine event being triggered for scenario, with HTTP request data passed to it */ mediaSessionAccessSecureUrl: string; mediaSessionCheckUrl: string; /** * The call session history ID. To search a call session result, paste the ID to the GetCallHistory method's call_session_history_id parameter */ callSessionHistoryId: number; error?: APIError; } export interface StartConferenceRequest { /** * The conference name. The name length should be less than 50 symbols */ conferenceName: string; /** * The rule ID that needs to be launched. Please note, the necessary scenario needs to be attached to the rule. Required unless rule_name is provided. */ ruleId?: number; /** * The rule name. Required unless rule_id is provided. */ ruleName?: string; /** * The user ID. Run the scripts from the user if set. Can be used instead of the user_name parameter */ userId?: number; /** * The user name. Run the scripts from the user if set. Can be used instead of the user_id parameter */ userName?: string; /** * The application ID. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * The script custom data, that can be accessed in the scenario via the VoxEngine.customData() method. Use the application/x-www-form-urlencoded content type with UTF-8 encoding. */ scriptCustomData?: string; /** * Specifies the IP from the geolocation of predicted subscribers. It allows selecting the nearest server for serving subscribers. If not specified, the IP address of the HTTP request is used */ referenceIp?: string; /** * Specifies the location of the server where the scenario needs to be executed. Has higher priority than `reference_ip`. Request [getServerLocations](https://api.voximplant.com/getServerLocations) for possible values */ serverLocation?: string; } export interface StartConferenceResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The URL to control a created media session. It can be used for arbitrary tasks such as stopping scenario or passing additional data to it. Making HTTP request on this URL results in the [AppEvents.HttpRequest](/docs/references/voxengine/appevents#httprequest) VoxEngine event being triggered for a scenario, with an HTTP request data passed to it */ mediaSessionAccessUrl: string; /** * The URL to control a created media session. It can be used for arbitrary tasks such as stopping scenario or passing additional data to it. Making HTTPS request on this URL results in the [AppEvents.HttpRequest](/docs/references/voxengine/appevents#httprequest) VoxEngine event being triggered for a scenario, with an HTTP request data passed to it */ mediaSessionAccessSecureUrl: string; /** * The call session history ID. To search a call session result, paste the ID to the GetCallHistory method's call_session_history_id parameter */ callSessionHistoryId: number; error?: APIError; } export interface ScenariosInterface { addScenario: (request: AddScenarioRequest) => Promise; delScenario: (request: DelScenarioRequest) => Promise; bindScenario: (request: BindScenarioRequest) => Promise; getScenarios: (request: GetScenariosRequest) => Promise; setScenarioInfo: (request: SetScenarioInfoRequest) => Promise; reorderScenarios: (request: ReorderScenariosRequest) => Promise; startScenarios: (request: StartScenariosRequest) => Promise; startConference: (request: StartConferenceRequest) => Promise; } export interface AddRuleRequest { /** * The rule name. The length should be less than 100 */ ruleName: string; /** * The rule pattern regex. The length should be less than 64 KB */ rulePattern: string; /** * The application ID. Required unless application_name is provided. */ applicationId?: number; /** * The application name. Required unless application_id is provided. */ applicationName?: string; /** * The exclude pattern regex. The length should be less than 64 KB */ rulePatternExclude?: string; /** * Whether video conference is required */ videoConference?: boolean; /** * The service account ID to bind to the rule. Read more in the [guide](/docs/guides/voxengine/management-api) */ bindKeyId?: string; /** * The scenario ID list separated by semicolons (;). Required unless scenario_name is provided. */ scenarioId?: 'any' | number | number[]; /** * The scenario name list separated by semicolons (;). Required unless scenario_id is provided. */ scenarioName?: string | string[]; } export interface AddRuleResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The new rule ID */ ruleId: number; error?: APIError; } export interface DelRuleRequest { /** * The rule ID list separated by semicolons (;). Use the 'all' value to select all rules. Required unless rule_name is provided. */ ruleId?: 'any' | number | number[]; /** * The rule name list separated by semicolons (;). Required unless rule_id is provided. */ ruleName?: string | string[]; /** * The application ID list separated by semicolons (;). Use the 'all' value to select all applications. Required unless application_name is provided. */ applicationId?: 'any' | number | number[]; /** * The application name list separated by semicolons (;). Required unless application_id is provided. */ applicationName?: string | string[]; } export interface DelRuleResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetRuleInfoRequest { /** * The rule ID */ ruleId: number; /** * The new rule name. The length should be less than 100 */ ruleName?: string; /** * The new rule pattern regex. The length should be less than 64 KB */ rulePattern?: string; /** * The new exclude pattern regex. The length should be less than 64 KB */ rulePatternExclude?: string; /** * Whether video conference is required */ videoConference?: boolean; /** * The service account ID to bind to the rule. Read more in the [guide](/docs/guides/voxengine/management-api) */ bindKeyId?: string; } export interface SetRuleInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetRulesRequest { /** * The application ID. Required unless application_name is provided. */ applicationId?: number; /** * The application name. Required unless application_id is provided. */ applicationName?: string; /** * The rule ID to filter */ ruleId?: number; /** * The rule name part to filter */ ruleName?: string; /** * Whether it is a video conference to filter */ videoConference?: boolean; /** * The service account ID bound to the rule. Read more in the [guide](/docs/guides/voxengine/management-api) */ attachedKeyId?: string; /** * Search for template matching */ template?: string; /** * Whether to get bound scenarios info */ withScenarios?: boolean; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetRulesResponse { result: RuleInfo[]; /** * The total found rule count */ totalCount: number; /** * The returned rule count */ count: number; error?: APIError; } export interface ReorderRulesRequest { /** * The rule ID list separated by semicolons (;) */ ruleId: 'any' | number | number[]; } export interface ReorderRulesResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface RulesInterface { addRule: (request: AddRuleRequest) => Promise; delRule: (request: DelRuleRequest) => Promise; setRuleInfo: (request: SetRuleInfoRequest) => Promise; getRules: (request: GetRulesRequest) => Promise; reorderRules: (request: ReorderRulesRequest) => Promise; } export interface GetCallHistoryRequest { /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted, a server-configured default interval is used (default is one month) */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted, a server-configured default interval is used (default is one month) */ toDate?: Date; /** * The minimum call duration in seconds to filter. You can restrict the allowed date range via duration filters */ minDuration?: number; /** * The maximum call duration in seconds to filter. You can restrict the allowed date range via duration filters */ maxDuration?: number; /** * Whether to create an asynchronous history report instead of returning the data immediately. Has the same effect as calling GetCallHistoryAsync and requires the output=csv */ isAsync?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; timezone?: string; /** * To get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). The maximum number of records is 1000. You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods */ callSessionHistoryId?: 'any' | number | number[]; /** * To receive the call history for a specific application, pass the application ID to this parameter. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * To receive the call history for a specific users, pass the user ID list separated by semicolons (;). If it is specified, the output contains the calls from the listed users only */ userId?: 'any' | number | number[]; /** * To receive the call history for a specific routing rule, pass the rule name to this parameter. Applies only if you set application_id or application_name */ ruleName?: string; /** * To receive a call history for a specific remote numbers, pass the number list separated by semicolons (;). A remote number is a number on the client side. Ignored if the `remote_number_list` parameter is not empty */ remoteNumber?: string | string[]; /** * A JSON array of strings of specific remote phone numbers to sort the call history. Has higher priority than the `remote_number` parameter. If the array is empty, the `remote_number` parameter is used instead */ remoteNumberList?: string; /** * To receive a call history for a specific local numbers, pass the number list separated by semicolons (;). A local number is a number on the platform side */ localNumber?: string | string[]; /** * To filter the call history by the custom_data passed to the call sessions, pass the custom data to this parameter */ callSessionHistoryCustomData?: string; /** * Whether to receive a list of sessions with all calls within the sessions, including phone numbers, call cost and other information */ withCalls?: boolean; /** * Whether to get the calls' records */ withRecords?: boolean; /** * Whether to get other resources usage (see [ResourceUsageType]) */ withOtherResources?: boolean; /** * The child account ID list separated by semicolons (;) */ childAccountId?: 'any' | number | number[]; /** * Whether to get the children account calls only */ childrenCallsOnly?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to include the 'total_count' and increase performance */ withTotalCount?: boolean; /** * The number of returning records. The maximum value is 1000 */ count?: number; /** * The number of records to skip in the output. The maximum value of 10000 */ offset?: number; } export interface GetCallHistoryResponse { /** * The CallSessionInfoType records */ result: CallSessionInfo[]; /** * The total found call session count */ totalCount: number; /** * The returned call session count */ count: number; /** * The used timezone */ timezone: string; error?: APIError; } export interface GetCallHistoryAsyncRequest { /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted, a server-configured default interval is used (default is one month) */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted, a server-configured default interval is used (default is one month) */ toDate?: Date; /** * The minimum call duration in seconds to filter. You can restrict the allowed date range via duration filters */ minDuration?: number; /** * The maximum call duration in seconds to filter. You can restrict the allowed date range via duration filters */ maxDuration?: number; /** * A JSON-formatted list of strings containing phone numbers for history filtering. Has a higher priority than the remote_number parameter. If the array is empty, the remote_number parameter is used instead */ remoteNumberList?: string; /** * The maximum number of records to include in the report. If omitted, the report service applies its own limit. Unlike GetCallHistory, there is no default of 20 and no cap of 1000 on the Management API side */ count?: number; /** * The number of records to skip in the output */ offset?: number; timezone?: string; /** * To get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods */ callSessionHistoryId?: 'any' | number | number[]; /** * To receive the call history for a specific application, pass the application ID to this parameter. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * To receive the call history for a specific users, pass the user ID list separated by semicolons (;). If it is specified, the output contains the calls from the listed users only */ userId?: 'any' | number | number[]; /** * To receive the call history for a specific routing rule, pass the rule name to this parameter. Applies only if you set application_id or application_name */ ruleName?: string; /** * To receive a call history for a specific remote numbers, pass the number list separated by semicolons (;). A remote number is a number on the client side */ remoteNumber?: string | string[]; /** * To receive a call history for a specific local numbers, pass the number list separated by semicolons (;). A local number is a number on the platform side */ localNumber?: string | string[]; /** * To filter the call history by the custom_data passed to the call sessions, pass the custom data to this parameter */ callSessionHistoryCustomData?: string; /** * Whether to receive a list of sessions with all calls within the sessions, including phone numbers, call cost and other information */ withCalls?: boolean; /** * Whether to get the calls' records */ withRecords?: boolean; /** * Whether to get other resources usage (see [ResourceUsageType]) */ withOtherResources?: boolean; /** * The child account ID list separated by semicolons (;) */ childAccountId?: 'any' | number | number[]; /** * Whether to get the children account calls only */ childrenCallsOnly?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The output format. The following values available: **csv**. The default value is **csv** */ output?: string; } export interface GetCallHistoryAsyncResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The history report ID */ historyReportId: number; error?: APIError; } export interface GetBriefCallHistoryRequest { /** * The output format. The following values available: **csv**. */ output: string; /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss */ toDate?: Date; timezone?: string; /** * To get the call history for the specific sessions, pass the session IDs to this parameter separated by a semicolon (;). You can find the session ID in the AppEvents.Started event's sessionID property in a scenario, or retrieve it from the call_session_history_id value returned from the StartScenarios or StartConference methods */ callSessionHistoryId?: 'any' | number | number[]; /** * To receive the call history for a specific application, pass the application ID to this parameter. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * To receive the call history for a specific routing rule, pass the rule name to this parameter. Applies only if you set application_id or application_name */ ruleName?: string; /** * To receive a call history for a specific remote numbers, pass the number list separated by semicolons (;). A remote number is a number on the client side */ remoteNumber?: string | string[]; /** * To receive a call history for a specific local numbers, pass the number list separated by semicolons (;). A local number is a number on the platform side */ localNumber?: string | string[]; /** * To filter the call history by the custom_data passed to the call sessions, pass the custom data to this parameter */ callSessionHistoryCustomData?: string; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; } export interface GetBriefCallHistoryResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The history report ID */ historyReportId: number; error?: APIError; } export interface GetHistoryReportsRequest { /** * The history report ID to filter */ historyReportId?: number; /** * The history report type list separated by semicolons (;). Use the 'all' value to select all history report types. The following values are possible: calls, calls_brief, transactions, audit, call_list, transactions_on_hold */ historyType?: string | string[]; /** * The UTC creation from date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ createdFrom?: Date; /** * The UTC creation to date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ createdTo?: Date; /** * Whether the report is completed */ isCompleted?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The application ID to filter. Can be a list separated by semicolons (;). Use the 'all' value to select all applications. Can be used instead of the application_name parameter */ applicationId?: 'any' | number | number[]; /** * The application name list separated by semicolons (;). Can be used instead of the application_id parameter */ applicationName?: string | string[]; } export interface GetHistoryReportsResponse { result: HistoryReport[]; /** * The total found reports count */ totalCount: number; /** * The returned reports count */ count: number; error?: APIError; } export interface DownloadHistoryReportRequest { /** * The history report ID */ historyReportId: number; } export interface DownloadHistoryReportResponse { /** * The method returns a raw data, there is no 'file_content' parameter in fact */ fileContent: Buffer; error?: APIError; } export interface GetTransactionHistoryRequest { /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted and is_uncommitted is false, a server-configured default interval is used (default is one month) */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted and is_uncommitted is false, a server-configured default interval is used (default is one month) */ toDate?: Date; /** * The application ID to filter. Can be used together with or instead of the application_name parameter */ applicationId?: number; /** * The application name to filter. Can be used together with or instead of the application_id parameter */ applicationName?: string; /** * The subscription ID list separated by semicolons (;) to filter */ subscriptionId?: 'any' | number | number[]; /** * The subscription name list separated by semicolons (;) to filter */ subscriptionName?: string | string[]; /** * The resource type list separated by semicolons (;) to filter */ resourceType?: string | string[]; /** * The price group name list separated by semicolons (;) to filter */ priceGroupName?: string | string[]; /** * Whether to filter by the accounting dates instead of the transaction's `performed_at` timestamps */ useAccountingDates?: boolean; /** * Whether to include the extended transaction fields, such as the application, subscription, resource type and price group, in the response */ withExtendedInfo?: boolean; /** * Whether to create an asynchronous history report instead of returning the data immediately. Has the same effect as calling `GetTransactionHistoryAsync` and requires the output=csv */ isAsync?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The decimal mark for the CSV numbers if the output=csv. If omitted, the account locale setting is used */ decimalSeparator?: string; timezone?: string; /** * The transaction ID list separated by semicolons (;) */ transactionId?: 'any' | number | number[]; paymentReference?: string; /** * The transaction type list separated by semicolons (;). The following values are possible: gift_revoke, resource_charge, money_distribution, subscription_charge, subscription_installation_charge, card_periodic_payment, card_overrun_payment, card_payment, rub_card_periodic_payment, rub_card_overrun_payment, rub_card_payment, robokassa_payment, gift, promo, adjustment, wire_transfer, us_wire_transfer, refund, discount, mgp_charge, mgp_startup, mgp_business, mgp_big_business, mgp_enterprise, mgp_large_enterprise, techsupport_charge, tax_charge, monthly_fee_charge, grace_credit_payment, grace_credit_provision, mau_charge, mau_overrun, im_charge, im_overrun, fmc_charge, sip_registration_charge, development_fee, money_transfer_to_child, money_transfer_to_parent, money_acceptance_from_child, money_acceptance_from_parent, phone_number_installation, phone_number_charge, toll_free_phone_number_installation, toll_free_phone_number_charge, services, user_money_transfer, paypal_payment, paypal_overrun_payment, paypal_periodic_payment */ transactionType?: string | string[]; /** * The user ID list separated by semicolons (;) */ userId?: 'any' | number | number[]; /** * The child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts */ childAccountId?: 'any' | number | number[]; /** * Whether to get the children account transactions only */ childrenTransactionsOnly?: boolean; /** * Whether to get the users' transactions only */ usersTransactionsOnly?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to include the 'total_count' and increase performance */ withTotalCount?: boolean; /** * The number of returning records. The maximum value is 1000 */ count?: number; /** * The number of records to skip in the output with a maximum value of 10000 */ offset?: number; /** * Whether to get transactions on hold (transactions for which money is reserved but not yet withdrawn from the account) */ isUncommitted?: boolean; } export interface GetTransactionHistoryResponse { result: TransactionInfo[]; /** * The total found transaction count */ totalCount: number; /** * The used timezone. 'Etc/GMT' for example */ timezone: string; /** * The returned transaction count */ count: number; error?: APIError; } export interface GetTransactionHistoryAsyncRequest { /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted and is_uncommitted is false, a server-configured default interval is used (default is one month) */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. If both dates are omitted and is_uncommitted is false, a server-configured default interval is used (default is one month) */ toDate?: Date; /** * The application ID to filter. Can be used together with or instead of the application_name parameter */ applicationId?: number; /** * The application name to filter. Can be used together with or instead of the application_id parameter */ applicationName?: string; /** * The subscription ID list separated by semicolons (;) to filter */ subscriptionId?: 'any' | number | number[]; /** * The subscription name list separated by semicolons (;) to filter */ subscriptionName?: string | string[]; /** * The resource type list separated by semicolons (;) to filter */ resourceType?: string | string[]; /** * The price group name list separated by semicolons (;) to filter */ priceGroupName?: string | string[]; /** * Whether to filter by the accounting dates instead of the transaction's `performed_at` timestamps */ useAccountingDates?: boolean; /** * The maximum number of records to include in the report. If omitted, the report service applies its own limit. Unlike GetTransactionHistory, there is no default of 20 and no cap of 1000 on the Management API side */ count?: number; /** * The number of records to skip in the output */ offset?: number; timezone?: string; /** * The transaction ID list separated by semicolons (;) */ transactionId?: 'any' | number | number[]; paymentReference?: string; /** * The transaction type list separated by semicolons (;). The following values are possible: gift_revoke, resource_charge, money_distribution, subscription_charge, subscription_installation_charge, card_periodic_payment, card_overrun_payment, card_payment, rub_card_periodic_payment, rub_card_overrun_payment, rub_card_payment, robokassa_payment, gift, promo, adjustment, wire_transfer, us_wire_transfer, refund, discount, mgp_charge, mgp_startup, mgp_business, mgp_big_business, mgp_enterprise, mgp_large_enterprise, techsupport_charge, tax_charge, monthly_fee_charge, grace_credit_payment, grace_credit_provision, mau_charge, mau_overrun, im_charge, im_overrun, fmc_charge, sip_registration_charge, development_fee, money_transfer_to_child, money_transfer_to_parent, money_acceptance_from_child, money_acceptance_from_parent, phone_number_installation, phone_number_charge, toll_free_phone_number_installation, toll_free_phone_number_charge, services, user_money_transfer, paypal_payment, paypal_overrun_payment, paypal_periodic_payment */ transactionType?: string | string[]; /** * The user ID list separated by semicolons (;) */ userId?: 'any' | number | number[]; /** * The child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts */ childAccountId?: 'any' | number | number[]; /** * Whether to get the children account transactions only */ childrenTransactionsOnly?: boolean; /** * Whether to get the users' transactions only */ usersTransactionsOnly?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get transactions on hold (transactions for which money is reserved but not yet withdrawn from the account) */ isUncommitted?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The output format. The following values available: **csv**. The default value is **csv** */ output?: string; } export interface GetTransactionHistoryAsyncResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The history report ID */ historyReportId: number; error?: APIError; } export interface DeleteRecordRequest { /** * The record URL to remove. You can retrieve the record URL via the CallSessionInfoType.records method */ recordUrl?: string; /** * The record ID to remove. You can retrieve the record ID via the CallSessionInfoType.records method */ recordId?: number; } export interface DeleteRecordResponse { result: number; error?: APIError; } export interface GetACDHistoryRequest { /** * The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ fromDate?: Date; /** * The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ toDate?: Date; /** * The caller phone number to filter */ callerid?: string; /** * The ACD session custom data to filter. The match is exact */ customData?: string; /** * The decimal mark for the CSV numbers if the output=csv. If omitted, the account locale setting is used */ decimalSeparator?: string; /** * The ACD session history ID list separated by semicolons (;) */ acdSessionHistoryId?: 'any' | number | number[]; /** * The ACD request ID list separated by semicolons (;) */ acdRequestId?: string | string[]; /** * The ACD queue ID list to filter separated by semicolons (;) */ acdQueueId?: 'any' | number | number[]; /** * The user ID list to filter separated by semicolons (;) */ userId?: 'any' | number | number[]; /** * Whether to get the calls terminated by the operator */ operatorHangup?: boolean; /** * Whether the call is unserviced by the operator */ unserviced?: boolean; /** * The minimum waiting time filter */ minWaitingTime?: number; /** * Whether the call is rejected calls by the 'max_queue_size', 'max_waiting_time' threshold */ rejected?: boolean; /** * Whether to get the bound events */ withEvents?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The output format. The following values available: **json**, **csv**, **xls**. The default value is **json** */ output?: string; } export interface GetACDHistoryResponse { result: ACDSessionInfo[]; /** * The total found ACD session count */ totalCount: number; /** * The returned ACD session count */ count: number; error?: APIError; } export interface GetAuditLogRequest { /** * The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ fromDate?: Date; /** * The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ toDate?: Date; timezone?: string; /** * The audit history ID list separated by semicolons (;) */ auditLogId?: 'any' | number | number[]; /** * The admin user ID list separated by semicolons (;) to filter */ filteredAdminUserId?: 'any' | number | number[]; /** * Whether to create an asynchronous history report instead of returning the data immediately. Has the same effect as calling GetAuditLogAsync and requires the output=csv */ isAsync?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The decimal mark for the CSV numbers if the output=csv. If omitted, the account locale setting is used */ decimalSeparator?: string; /** * The IP list separated by semicolons (;) to filter */ filteredIp?: string | string[]; /** * The function list separated by semicolons (;) to filter */ filteredCmd?: string | string[]; /** * A relation ID to filter (for example: a phone_number value, a user_id value, an application_id value) */ advancedFilters?: string; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to include the 'total_count' and increase performance */ withTotalCount?: boolean; /** * The maximum returning number of records. If omitted, the report service applies its own limit */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetAuditLogResponse { result: AuditLogInfo[]; /** * The total found item count */ totalCount: number; /** * The returned item count */ count: number; /** * The used timezone */ timezone: string; error?: APIError; } export interface GetAuditLogAsyncRequest { /** * The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ fromDate?: Date; /** * The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ toDate?: Date; timezone?: string; /** * The audit history ID list separated by semicolons (;) */ auditLogId?: 'any' | number | number[]; /** * The admin user ID list separated by semicolons (;) to filter */ filteredAdminUserId?: 'any' | number | number[]; /** * The maximum number of records to include in the report. If omitted, the report service applies its own limit */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The IP list separated by semicolons (;) to filter */ filteredIp?: string | string[]; /** * The function list separated by semicolons (;) to filter */ filteredCmd?: string | string[]; /** * A relation ID to filter (for example: a phone_number value, a user_id value, an application_id value) */ advancedFilters?: string; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The output format. The following values available: **csv**. The default value is **csv** */ output?: string; } export interface GetAuditLogAsyncResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The history report ID */ historyReportId: number; error?: APIError; } export interface HistoryInterface { getCallHistory: (request: GetCallHistoryRequest) => Promise; getCallHistoryAsync: ( request: GetCallHistoryAsyncRequest ) => Promise; getBriefCallHistory: ( request: GetBriefCallHistoryRequest ) => Promise; getHistoryReports: (request: GetHistoryReportsRequest) => Promise; downloadHistoryReport: ( request: DownloadHistoryReportRequest ) => Promise; getTransactionHistory: ( request: GetTransactionHistoryRequest ) => Promise; getTransactionHistoryAsync: ( request: GetTransactionHistoryAsyncRequest ) => Promise; deleteRecord: (request: DeleteRecordRequest) => Promise; getACDHistory: (request: GetACDHistoryRequest) => Promise; getAuditLog: (request: GetAuditLogRequest) => Promise; getAuditLogAsync: (request: GetAuditLogAsyncRequest) => Promise; } export interface GetPhoneNumberReportsRequest { /** * The phone number report ID to filter */ reportId?: number; /** * The phone number report type list separated by semicolons (;). The possible values are: phone_numbers, phone_numbers_awaiting_configuration */ reportType?: string | string[]; /** * The UTC creation from date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ createdFrom?: Date; /** * The UTC creation to date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ createdTo?: Date; /** * Whether the report is completed */ isCompleted?: boolean; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetPhoneNumberReportsResponse { result: CommonReport[]; /** * The total found reports count */ totalCount: number; /** * The returned reports count */ count: number; error?: APIError; } export interface AttachPhoneNumberRequest { /** * Quantity of phone numbers you want to attach. If neither this parameter nor phone_number is specified, one phone number is attached from the catalog */ phoneCount?: number; /** * The phone numbers to attach, separated by semicolons (;). See the [GetNewPhoneNumbers] method. If neither this parameter nor phone_count is specified, one phone number is attached from the catalog */ phoneNumber?: string | string[]; /** * The country code. Required together with phone_category_name and phone_region_id to purchase from the catalog; not needed when attaching a specific phone number via phone_number */ countryCode?: string; /** * The phone category name. See the [GetPhoneNumberCategories] method. Required together with country_code and phone_region_id to purchase from the catalog; not needed when attaching a specific phone number via phone_number */ phoneCategoryName?: string; /** * The country state. See the [GetPhoneNumberCategories] and [GetPhoneNumberCountryStates] methods */ countryState?: string; /** * The phone region ID. See the [GetPhoneNumberRegions] method. Required together with country_code and phone_category_name to purchase from the catalog; not needed when attaching a specific phone number via phone_number */ phoneRegionId?: number; /** * The phone regulation address ID */ regulationAddressId?: number; } export interface AttachPhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The attached phone numbers */ phoneNumbers: NewAttachedPhoneInfo[]; error?: APIError; } export interface BindPhoneNumberToApplicationRequest { /** * The phone ID list separated by semicolons (;). Use the 'all' value to select all phone ids. Required unless phone_number is provided. */ phoneId?: 'any' | number | number[]; /** * The phone number list separated by semicolons (;). Required unless phone_id is provided. */ phoneNumber?: string | string[]; /** * The application ID. Required unless application_name is provided. */ applicationId?: number; /** * The application name. Required unless application_id is provided. */ applicationName?: string; /** * The rule ID. Can be used instead of the rule_name parameter */ ruleId?: number; /** * The rule name. Can be used instead of the rule_id parameter */ ruleName?: string; /** * Whether to bind or unbind (set true or false respectively) */ bind?: boolean; } export interface BindPhoneNumberToApplicationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DeactivatePhoneNumberRequest { /** * The phone ID list separated by semicolons (;). Use the 'all' value to select all phone ids. Required unless phone_number is provided. */ phoneId?: 'any' | number | number[]; /** * The phone number list separated by semicolons (;). Required unless phone_id is provided. */ phoneNumber?: string | string[]; } export interface DeactivatePhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetPhoneNumberInfoRequest { /** * The phone ID list separated by semicolons (;). Use the 'all' value to select all phone ids. Required unless phone_number is provided. */ phoneId?: 'any' | number | number[]; /** * The phone number list separated by semicolons (;). Required unless phone_id is provided. */ phoneNumber?: string | string[]; /** * If set, the callback of an incoming SMS is sent to this url, otherwise, it is sent to the general account URL */ incomingSmsCallbackUrl?: string; autoCharge?: boolean; } export interface SetPhoneNumberInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetPhoneNumbersRequest { /** * Particular phone ID to filter */ phoneId?: 'any' | number | number[]; /** * Phone number list separated by semicolons (;) that can be used instead of phone_id */ phoneNumber?: string | string[]; /** * Phone number activation statuses to filter, separated by semicolons (;).

The possible values are: ACTIVE, ACTIVATING, DEACTIVATED, PROVISIONING, AWAITING_BUSINESS_PHONE_NUMBER_CONFIGURATION, LEGAL_OWNERSHIP_LIMIT_REACHED, GOSUSLUGI_DECLINED, SELF_BAN_ENABLED */ activationStatus?: string | string[]; /** * Application ID. Can be used instead of the application_name parameter */ applicationId?: 'any' | number | number[]; /** * Application name. Can be used instead of the application_id parameter */ applicationName?: string | string[]; /** * Whether the phone number bound to an application */ isBoundToApplication?: boolean; /** * Phone number start to filter */ phoneTemplate?: string; /** * Country code list separated by semicolons (;) */ countryCode?: string | string[]; /** * Phone category name. See the [GetPhoneNumberCategories] method */ phoneCategoryName?: string | string[]; /** * Whether the subscription is cancelled to filter */ canceled?: boolean; /** * Whether the subscription is frozen to filter */ deactivated?: boolean; /** * Whether the auto_charge flag is enabled */ autoCharge?: boolean; /** * UTC 'from' date filter in the following format: YYYY-MM-DD */ fromPhoneNextRenewal?: Date; /** * UTC 'to' date filter in the following format: YYYY-MM-DD */ toPhoneNextRenewal?: Date; /** * UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ fromPhonePurchaseDate?: Date; /** * UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss */ toPhonePurchaseDate?: Date; /** * Child account ID list separated by semicolons (;). Use the 'all' value to select all child accounts */ childAccountId?: 'any' | number | number[]; /** * Whether to get the children phones only */ childrenPhonesOnly?: boolean; /** * Required account verification name to filter */ verificationName?: string; /** * Account verification status list separated by semicolons (;). The following values are possible: REQUIRED, IN_PROGRESS, VERIFIED */ verificationStatus?: string | string[]; /** * Unverified phone hold until the date (from ...) in the following format: YYYY-MM-DD */ fromUnverifiedHoldUntil?: Date; /** * Unverified phone hold until the date (... to) in the following format: YYYY-MM-DD */ toUnverifiedHoldUntil?: Date; /** * Whether a not verified account can use the phone */ canBeUsed?: boolean; /** * Following values are available: 'phone_number' (ascent order), 'phone_price' (ascent order), 'phone_country_code' (ascent order), 'deactivated' (deactivated first, active last), 'purchase_date' (descent order), 'phone_next_renewal' (ascent order), 'verification_status', 'unverified_hold_until' (ascent order), 'verification_name' */ orderBy?: string; /** * Flag allows you to display only the numbers of the sandbox, real numbers, or all numbers. The following values are possible: 'all', 'true', 'false' */ sandbox?: string; /** * Maximum returning record count */ count?: number; /** * First N records are skipped in the output */ offset?: number; isSmsSupported?: boolean; /** * Region names list separated by semicolons (;) */ phoneRegionName?: string | string[]; /** * Rule ID list separated by semicolons (;) */ ruleId?: 'any' | number | number[]; /** * Rule names list separated by semicolons (;). Can be used only if __application_id__ or __application_name__ is specified */ ruleName?: string | string[]; /** * Whether the phone number is bound to some rule */ isBoundToRule?: boolean; } export interface GetPhoneNumbersResponse { /** * Phone numbers info */ result: AttachedPhoneInfo[]; /** * Total found phone count */ totalCount: number; /** * Returned phone count */ count: number; error?: APIError; } export interface IsAccountPhoneNumberRequest { /** * Phone number to check in the international format without `+` */ phoneNumber: string; } export interface IsAccountPhoneNumberResponse { /** * Whether the number belongs to the account */ result: boolean; error?: APIError; } export interface GetPhoneNumbersAsyncRequest { /** * Whether to get a CSV file with the column names */ withHeader?: boolean; } export interface GetPhoneNumbersAsyncResponse { /** * The report ID (async mode) */ result: number; error?: APIError; } export interface GetNewPhoneNumbersRequest { /** * The country code. Required together with phone_category_name and phone_region_id to search the catalog; omit all three to get the phone numbers available locally */ countryCode?: string; /** * The phone category name. See the [GetPhoneNumberCategories] function. Required together with country_code and phone_region_id to search the catalog; omit all three to get the phone numbers available locally */ phoneCategoryName?: string; /** * The country state. See the GetPhoneNumberCategories and GetPhoneNumberCountryStates functions */ countryState?: string; /** * The phone region ID. See the [GetPhoneNumberRegions] method. Required together with country_code and phone_category_name to search the catalog; omit all three to get the phone numbers available locally */ phoneRegionId?: number; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The phone number searching mask. Asterisk represents zero or more occurrences of any character */ phoneNumberMask?: string; } export interface GetNewPhoneNumbersResponse { result: NewPhoneInfo[]; /** * The total found phone count */ totalCount: number; /** * The returned phone count */ count: number; error?: APIError; } export interface GetPhoneNumberCategoriesRequest { /** * Country code list separated by semicolons (;) */ countryCode?: string | string[]; /** * Flag allows you to display phone number categories only of the sandbox, real or all .The following values are possible: 'all', 'true', 'false' */ sandbox?: string; /** * The 2-letter locale code. Supported values are EN, RU */ locale?: string; } export interface GetPhoneNumberCategoriesResponse { result: PhoneNumberCountryInfo[]; error?: APIError; } export interface GetPhoneNumberCountryStatesRequest { /** * The country code */ countryCode: string; /** * The phone category name. See the GetPhoneNumberCategories function */ phoneCategoryName?: string; /** * The country state code (example: AL, CA, ... ) */ countryState?: string; } export interface GetPhoneNumberCountryStatesResponse { result: PhoneNumberCountryStateInfo[]; error?: APIError; } export interface GetPhoneNumberRegionsRequest { /** * The country code */ countryCode: string; /** * The phone category name. See the [GetPhoneNumberCategories] method */ phoneCategoryName: string; /** * The country state code (example: AL, CA, ... ) */ countryState?: string; /** * Whether not to show all the regions (with and without phone numbers in stock) */ omitEmpty?: boolean; /** * The phone region ID to filter */ phoneRegionId?: number; /** * The phone region name to filter */ phoneRegionName?: string; /** * The region phone prefix to filter */ phoneRegionCode?: string; /** * The 2-letter locale code. Supported values are EN, RU */ locale?: string; } export interface GetPhoneNumberRegionsResponse { result: PhoneNumberCountryRegionInfo[]; error?: APIError; } export interface GetActualPhoneNumberRegionRequest { /** * The country code */ countryCode: string; /** * The phone category name. See the [GetPhoneNumberCategories] method */ phoneCategoryName: string; /** * The phone region ID to filter */ phoneRegionId: number; /** * The country state code (example: AL, CA, ... ) */ countryState?: string; /** * The 2-letter locale code. Supported values are EN, RU */ locale?: string; } export interface GetActualPhoneNumberRegionResponse { result: PhoneNumberCountryRegionInfo; error?: APIError; } export interface GetAccountPhoneNumberCountriesRequest { /** * The application ID list separated by semicolons (;) to filter */ applicationId?: 'any' | number | number[]; } export interface GetAccountPhoneNumberCountriesResponse { /** * Array of country codes */ result: string[]; error?: APIError; } export interface PhoneNumbersInterface { getPhoneNumberReports: ( request: GetPhoneNumberReportsRequest ) => Promise; attachPhoneNumber: (request: AttachPhoneNumberRequest) => Promise; bindPhoneNumberToApplication: ( request: BindPhoneNumberToApplicationRequest ) => Promise; deactivatePhoneNumber: ( request: DeactivatePhoneNumberRequest ) => Promise; setPhoneNumberInfo: (request: SetPhoneNumberInfoRequest) => Promise; getPhoneNumbers: (request: GetPhoneNumbersRequest) => Promise; isAccountPhoneNumber: ( request: IsAccountPhoneNumberRequest ) => Promise; getPhoneNumbersAsync: ( request: GetPhoneNumbersAsyncRequest ) => Promise; getNewPhoneNumbers: (request: GetNewPhoneNumbersRequest) => Promise; getPhoneNumberCategories: ( request: GetPhoneNumberCategoriesRequest ) => Promise; getPhoneNumberCountryStates: ( request: GetPhoneNumberCountryStatesRequest ) => Promise; getPhoneNumberRegions: ( request: GetPhoneNumberRegionsRequest ) => Promise; getActualPhoneNumberRegion: ( request: GetActualPhoneNumberRegionRequest ) => Promise; getAccountPhoneNumberCountries: ( request: GetAccountPhoneNumberCountriesRequest ) => Promise; } export interface AddPstnBlackListItemRequest { /** * The phone number in format e164 or regex pattern */ pstnBlacklistPhone: string; } export interface AddPstnBlackListItemResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The PSTN black list item ID */ pstnBlacklistId: number; error?: APIError; } export interface SetPstnBlackListItemRequest { /** * The PSTN black list item ID */ pstnBlacklistId: number; /** * The new phone number in format e164 */ pstnBlacklistPhone: string; } export interface SetPstnBlackListItemResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DelPstnBlackListItemRequest { /** * The PSTN black list item ID */ pstnBlacklistId: number; } export interface DelPstnBlackListItemResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetPstnBlackListRequest { /** * The PSTN black list item ID for filter */ pstnBlacklistId?: number; /** * The phone number in format e164 for filter */ pstnBlacklistPhone?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetPstnBlackListResponse { result: PstnBlackListInfo[]; /** * The total found phone numbers count */ totalCount: number; /** * The returned phone numbers count */ count: number; error?: APIError; } export interface PSTNBlacklistInterface { addPstnBlackListItem: ( request: AddPstnBlackListItemRequest ) => Promise; setPstnBlackListItem: ( request: SetPstnBlackListItemRequest ) => Promise; delPstnBlackListItem: ( request: DelPstnBlackListItemRequest ) => Promise; getPstnBlackList: (request: GetPstnBlackListRequest) => Promise; } export interface AddSipWhiteListItemRequest { /** * The network address in format A.B.C.D/L or A.B.C.D/a.b.c.d (example 192.168.1.5/16) */ sipWhitelistNetwork: string; /** * The network address description */ description?: string; } export interface AddSipWhiteListItemResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The SIP white list item ID */ sipWhitelistId: number; error?: APIError; } export interface DelSipWhiteListItemRequest { /** * The SIP white list item ID to delete */ sipWhitelistId: number; } export interface DelSipWhiteListItemResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetSipWhiteListItemRequest { /** * The SIP white list item ID */ sipWhitelistId: number; /** * The new network address in format A.B.C.D/L or A.B.C.D/a.b.c.d (example 192.168.1.5/16) */ sipWhitelistNetwork: string; /** * The network address description */ description?: string; } export interface SetSipWhiteListItemResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetSipWhiteListRequest { /** * The SIP white list item ID to filter */ sipWhitelistId?: number; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetSipWhiteListResponse { result: SipWhiteListInfo[]; /** * The total found networks count */ totalCount: number; /** * The returned networks count */ count: number; error?: APIError; } export interface SIPWhiteListInterface { addSipWhiteListItem: ( request: AddSipWhiteListItemRequest ) => Promise; delSipWhiteListItem: ( request: DelSipWhiteListItemRequest ) => Promise; setSipWhiteListItem: ( request: SetSipWhiteListItemRequest ) => Promise; getSipWhiteList: (request: GetSipWhiteListRequest) => Promise; } export interface CreateSipRegistrationRequest { /** * The user name */ sipUsername: string; /** * The SIP proxy */ proxy: string; /** * The SIP authentications user */ authUser?: string; /** * The outgoing SIP proxy */ outboundProxy?: string; /** * The SIP password */ password?: string; /** * Whether SIP registration is persistent. Set false to activate it only on the user login */ isPersistent?: boolean; /** * The application ID which a new SIP registration is to be bound to. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name which a new SIP registration is to be bound to. Can be used instead of the application_id parameter */ applicationName?: string; /** * The rule ID which a new SIP registration is to be bound to. Can be used instead of the rule_name parameter */ ruleId?: number; /** * The rule name which a new SIP registration is to be bound to. Can be used instead of the rule_id parameter */ ruleName?: string; /** * The user ID which a new SIP registration is to be bound to. Can be used instead of the user_name parameter */ userId?: number; /** * The user name which a new SIP registration is to be bound to. Can be used instead of the user_id parameter */ userName?: string; } export interface CreateSipRegistrationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The sip registration id */ sipRegistrationId: number; /** * The current account state */ accountInfo: ShortAccountInfo; error?: APIError; } export interface UpdateSipRegistrationRequest { /** * The registration ID */ sipRegistrationId: number; /** * The user name */ sipUsername?: string; /** * The SIP proxy */ proxy?: string; /** * The SIP authentications user */ authUser?: string; /** * The outgoing SIP proxy */ outboundProxy?: string; /** * The SIP password */ password?: string; /** * The application ID which the SIP registration is to be bound to. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name which the SIP registration is to be bound to. Can be used instead of the application_id parameter */ applicationName?: string; /** * The rule ID which the SIP registration is to be bound to. Can be used instead of the rule_name parameter */ ruleId?: number; /** * The rule name which the SIP registration is to be bound to. Can be used instead of the rule_id parameter */ ruleName?: string; /** * The user ID which the SIP registration is to be bound to. Can be used instead of the user_name parameter */ userId?: number; /** * The user name which the SIP registration is to be bound to. Can be used instead of the user_id parameter */ userName?: string; } export interface UpdateSipRegistrationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface BindSipRegistrationRequest { /** * The registration ID */ sipRegistrationId?: number; /** * The application ID which the SIP registration is to be bound to. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name which the SIP registration is to be bound to. Can be used instead of the application_id parameter */ applicationName?: string; /** * The rule ID which the SIP registration is to be bound to. Can be used instead of the rule_name parameter */ ruleId?: number; /** * The rule name which the SIP registration is to be bound to. Can be used instead of the rule_id parameter */ ruleName?: string; /** * The user ID which the SIP registration is to be bound to. Can be used instead of the user_name parameter */ userId?: number; /** * The user name which the SIP registration is to be bound to. Can be used instead of the user_id parameter */ userName?: string; /** * Whether to bind or unbind (set true or false respectively) */ bind?: boolean; } export interface BindSipRegistrationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DeleteSipRegistrationRequest { /** * The registration ID */ sipRegistrationId: number; } export interface DeleteSipRegistrationResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetSipRegistrationsRequest { /** * The SIP registration ID */ sipRegistrationId?: number; /** * The SIP user name to filter */ sipUsername?: string; /** * Whether to show the frozen SIP registrations only */ deactivated?: boolean; /** * Whether to show the successful SIP registrations only */ successful?: boolean; /** * Whether the SIP registration is persistent to filter */ isPersistent?: boolean; /** * The application ID list separated by semicolons (;) to filter. Can be used instead of application_name */ applicationId?: 'any' | number | number[]; /** * The application name list separated by semicolons (;) to filter. Can be used instead of application_id */ applicationName?: string | string[]; /** * Whether SIP registration bound to an application */ isBoundToApplication?: boolean; /** * The rule ID list separated by semicolons (;) to filter. Required unless rule_name is provided. */ ruleId?: 'any' | number | number[]; /** * The rule name list separated by semicolons (;) to filter. Required unless rule_id is provided. */ ruleName?: string | string[]; /** * The user ID list separated by semicolons (;) to filter. Required unless user_name is provided. */ userId?: 'any' | number | number[]; userName?: string | string[]; /** * The list of proxy servers to use, divided by semicolon (;) */ proxy?: string | string[]; /** * Whether SIP registration is still in progress */ inProgress?: boolean; /** * The list of SIP response codes. The __code1:code2__ means a range from __code1__ to __code2__ including; the __code1;code2__ meanse either __code1__ or __code2__. You can combine ranges, e.g., __code1;code2:code3__ */ statusCode?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetSipRegistrationsResponse { /** * Active SIP registrations */ result: SIPRegistration[]; /** * Count rows */ count: number; error?: APIError; } export interface SIPRegistrationInterface { createSipRegistration: ( request: CreateSipRegistrationRequest ) => Promise; updateSipRegistration: ( request: UpdateSipRegistrationRequest ) => Promise; bindSipRegistration: ( request: BindSipRegistrationRequest ) => Promise; deleteSipRegistration: ( request: DeleteSipRegistrationRequest ) => Promise; getSipRegistrations: ( request: GetSipRegistrationsRequest ) => Promise; } export interface AddWABPhoneNumberRequest { /** * WhatsApp Business phone number */ wabPhoneNumber: string; /** * WhatsApp Business SIP password */ voicePassword: string; /** * WhatsApp Business phone number description */ description?: string; /** * Bound application ID */ applicationId?: number; /** * Bound application name that can be used instead of application_id */ applicationName?: string; /** * Bound rule ID */ ruleId?: number; /** * Bound rule name that can be used instead of rule_id */ ruleName?: string; } export interface AddWABPhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DeleteWABPhoneNumberRequest { /** * WhatsApp Business phone number to delete */ wabPhoneNumber: string; } export interface DeleteWABPhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetWABPhoneNumberInfoRequest { /** * WhatsApp Business phone number to change details for */ wabPhoneNumber: string; /** * New WhatsApp Business SIP password */ voicePassword?: string; /** * New WhatsApp Business phone number description */ description?: string; /** * Bound application ID */ applicationId?: number; /** * Bound application name that can be used instead of application_id */ applicationName?: string; /** * Bound rule ID */ ruleId?: number; /** * Bound rule name that can be used instead of rule_id */ ruleName?: string; } export interface SetWABPhoneNumberInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetWABPhoneNumbersRequest { /** * WhatsApp Business phone number */ wabPhoneNumber?: string; /** * Application ID that is bound to the WhatsApp Business phone number */ applicationId?: number; /** * Bound application name that can be used instead of application_id */ applicationName?: string; /** * Country code filter (2 symbols) for the WhatsApp Business phone number */ countryCode?: string; /** * Maximum returning records count */ count?: number; /** * Number of records to be skipped in the result */ offset?: number; } export interface GetWABPhoneNumbersResponse { /** * WhatsApp Business phone numbers info */ result: WABPhoneInfo[]; /** * Number of total records found */ totalCount: number; /** * Number of returned records */ count: number; error?: APIError; } export interface WABPhoneNumbersInterface { addWABPhoneNumber: (request: AddWABPhoneNumberRequest) => Promise; deleteWABPhoneNumber: ( request: DeleteWABPhoneNumberRequest ) => Promise; setWABPhoneNumberInfo: ( request: SetWABPhoneNumberInfoRequest ) => Promise; getWABPhoneNumbers: (request: GetWABPhoneNumbersRequest) => Promise; } export interface DelCallerIDRequest { /** * ID of the callerID object. Required unless callerid_number is provided. */ calleridId?: number; /** * The callerID number. Required unless callerid_id is provided. */ calleridNumber?: string; } export interface DelCallerIDResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetCallerIDsRequest { /** * ID of the callerID object to filter */ calleridId?: number; /** * The phone number to filter */ calleridNumber?: string; /** * Whether the account is active to filter */ active?: boolean; /** * The following values are available: 'caller_number' (ascent order), 'verified_until' (ascent order) */ orderBy?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetCallerIDsResponse { result: CallerIDInfo[]; /** * The total found record count */ totalCount: number; /** * The returned record count */ count: number; error?: APIError; } export interface CallerIDsInterface { delCallerID: (request: DelCallerIDRequest) => Promise; getCallerIDs: (request: GetCallerIDsRequest) => Promise; } export interface AddOutboundTestPhoneNumberRequest { /** * The personal phone number in the E.164 format */ phoneNumber: string; } export interface AddOutboundTestPhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface VerifyOutboundTestPhoneNumberRequest {} export interface VerifyOutboundTestPhoneNumberResponse { /** * The number of attempts left for the day. The number is reset every day at 00:00 UTC */ dailyAttemptsLeft: number; error?: APIError; } export interface ActivateOutboundTestPhoneNumberRequest { /** * The verification code, see the [VerifyOutboundTestPhoneNumber] function */ verificationCode: string; } export interface ActivateOutboundTestPhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DelOutboundTestPhoneNumberRequest {} export interface DelOutboundTestPhoneNumberResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetOutboundTestPhoneNumbersRequest {} export interface GetOutboundTestPhoneNumbersResponse { result: OutboundTestPhonenumberInfo[]; error?: APIError; } export interface OutboundTestNumbersInterface { addOutboundTestPhoneNumber: ( request: AddOutboundTestPhoneNumberRequest ) => Promise; verifyOutboundTestPhoneNumber: ( request: VerifyOutboundTestPhoneNumberRequest ) => Promise; activateOutboundTestPhoneNumber: ( request: ActivateOutboundTestPhoneNumberRequest ) => Promise; delOutboundTestPhoneNumber: ( request: DelOutboundTestPhoneNumberRequest ) => Promise; getOutboundTestPhoneNumbers: ( request: GetOutboundTestPhoneNumbersRequest ) => Promise; } export interface AddQueueRequest { /** * The queue name. The length should be less than 100 */ acdQueueName: string; /** * The application ID. Required unless application_name is provided. */ applicationId?: number; /** * The application name. Required unless application_id is provided. */ applicationName?: string; /** * The integer queue priority. The highest priority is 0 */ acdQueuePriority?: number; /** * Whether to enable the auto binding of operators to a queue by skills comparing */ autoBinding?: boolean; /** * The value in the range of [0.5 ... 1.0]. The value 1.0 means the service probability 100% in challenge with a lower priority queue */ serviceProbability?: number; /** * The maximum queue size */ maxQueueSize?: number; /** * The maximum predicted waiting time in minutes. The client is rejected if the predicted waiting time is greater than the maximum predicted waiting time */ maxWaitingTime?: number; /** * The average service time in seconds. Specify the parameter to correct or initialize the waiting time prediction */ averageServiceTime?: number; } export interface AddQueueResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The ACD queue ID */ acdQueueId: number; error?: APIError; } export interface BindUserToQueueRequest { /** * Whether to bind or unbind users */ bind?: boolean; /** * The application ID. Required unless application_name is provided. */ applicationId?: number; /** * The application name. Required unless application_id is provided. */ applicationName?: string; /** * The user ID list separated by semicolons (;). Use the 'all' value to specify all users bound to the application. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * The user name list separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * The ACD queue ID list separated by semicolons (;). Use the 'all' value to specify all queues bound to the application. Required unless acd_queue_name is provided. */ acdQueueId?: 'any' | number | number[]; /** * The queue name. The queue name list separated by semicolons (;). Required unless acd_queue_id is provided. */ acdQueueName?: string | string[]; } export interface BindUserToQueueResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DelQueueRequest { /** * The ACD queue ID list separated by semicolons (;). Required unless acd_queue_name is provided. */ acdQueueId?: 'any' | number | number[]; /** * The ACD queue name. The ACD queue name list separated by semicolons (;). Required unless acd_queue_id is provided. */ acdQueueName?: string | string[]; } export interface DelQueueResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetQueueInfoRequest { /** * The ACD queue ID. Required unless acd_queue_name is provided. */ acdQueueId?: number; /** * The ACD queue name. Required unless acd_queue_id is provided. */ acdQueueName?: string; /** * The new queue name. The length should be less than 100 */ newAcdQueueName?: string; /** * The integer queue priority. The highest priority is 0 */ acdQueuePriority?: number; /** * Whether to enable the auto binding of operators to a queue by skills comparing */ autoBinding?: boolean; /** * The value in the range of [0.5 ... 1.0]. The value 1.0 means the service probability 100% in challenge with a lower priority queue */ serviceProbability?: number; /** * The maximum queue size */ maxQueueSize?: number; /** * The maximum predicted waiting time in minutes. The client is rejected if the predicted waiting time is greater than the maximum predicted waiting time */ maxWaitingTime?: number; /** * The average service time in seconds. Specify the parameter to correct or initialize the waiting time prediction */ averageServiceTime?: number; /** * The new application ID. Can be used instead of the application_name parameter */ applicationId?: number; /** * The new application name. Can be used instead of the application_id parameter */ applicationName?: string; } export interface SetQueueInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetQueuesRequest { /** * The ACD queue ID to filter */ acdQueueId?: number; /** * The ACD queue name part to filter */ acdQueueName?: string; /** * The application ID to filter. Can be used instead of the application_name parameter */ applicationId?: number; /** * The application name. Can be used instead of the application_id parameter */ applicationName?: string; /** * The skill ID to filter. Can be used instead of the skill_name parameter */ skillId?: number; /** * The skill name. Can be used instead of the skill_id parameter */ skillName?: string; /** * The excluded skill ID to filter. Can be used instead of the excluded_skill_name parameter */ excludedSkillId?: number; /** * The excluded skill name. Can be used instead of the excluded_skill_id parameter */ excludedSkillName?: string; /** * Whether to get the bound skills */ withSkills?: boolean; /** * The skill to show in the 'skills' field output */ showingSkillId?: number; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * Whether to include the number of agents bound to the queue */ withOperatorcount?: boolean; /** * Whether to include the deleted queues */ showDeleted?: boolean; } export interface GetQueuesResponse { result: QueueInfo[]; /** * The total found queue count */ totalCount: number; /** * The returned queue count */ count: number; error?: APIError; } export interface GetACDStateRequest { /** * The ACD queue ID list separated by semicolons (;). Use the 'all' value to select all ACD queues */ acdQueueId?: 'any' | number | number[]; } export interface GetACDStateResponse { result: ACDState; error?: APIError; } export interface GetACDOperatorStatisticsRequest { /** * Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss' */ fromDate: Date; /** * The user ID list separated by semicolons (;). Use the 'all' value to select all users */ userId: 'any' | number | number[]; /** * Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss' */ toDate?: Date; /** * The ACD queue ID list separated by semicolons (;). Use the 'all' value to select all ACD queues */ acdQueueId?: 'any' | number | number[]; /** * Whether key names in returned JSON are abbreviated to reduce response byte size. The abbreviations are: 'SA' for 'SpeedOfAnswer', 'HT' for 'HandlingTime', 'TT' for 'TalkTime', 'ACW' for 'AfterCallWork', 'TDT' for 'TotalDialingTime', 'THT' for 'TotalHandlingTime', 'TTT' for 'TotalTalkTime', 'TACW' for 'TotalAfterCallWork', 'AC' for 'AnsweredCalls', 'UAC' for 'UnansweredCalls' */ abbreviation?: boolean; /** * List of item names abbreviations separated by semicolons (;). Returned JSON includes keys only for the selected items. Special 'all' value defines all possible items, see [ACDOperatorStatisticsType] for a complete list. See 'abbreviation' description for complete abbreviation list */ report?: string | string[]; /** * Specifies how records are grouped by date and time. If set to 'day', the criteria is a day number. If set to 'hour_of_day', the criteria is a 60-minute interval within a day. If set to 'hour', the criteria is both day number and 60-minute interval within that day. If set to 'none', records are not grouped by date and time */ aggregation?: string; /** * If set to 'user', first-level array in the resulting JSON groups records by the user ID, and second-level array groups them by date according to the 'aggregation' parameter. If set to 'aggregation', first-level array in the resulting JSON groups records according to the 'aggregation' parameter, and second-level array groups them by the user ID */ group?: string; } export interface GetACDOperatorStatisticsResponse { /** * List of groups, grouped by user ID or date according to the 'group' method call argument */ result: ACDOperatorAggregationGroup[]; error?: APIError; } export interface GetACDQueueStatisticsRequest { /** * Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss' */ fromDate: Date; /** * The ACD queue ID list separated by semicolons (;). Use the 'all' value to select all ACD queues */ acdQueueId: 'any' | number | number[]; /** * Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss' */ toDate?: Date; /** * Whether key names in returned JSON are abbreviated to reduce response byte size. The abbreviations are: 'WT' for 'WaitingTime', 'SA' for 'SpeedOfAnswer', 'AT' is for 'AbandonmentTime', 'HT' is for 'HandlingTime', 'TT' is for 'TalkTime', 'ACW' is for 'AfterCallWork', 'QL' is for 'QueueLength', 'TC' is for 'TotalCalls', 'AC' is for 'AnsweredCalls', 'UAC' is for 'UnansweredCalls', 'RC' is for 'RejectedCalls', 'SL' is for 'ServiceLevel', 'TWT' is for 'TotalWaitingTime', 'TST' is for 'TotalSubmissionTime', 'TAT' is for 'TotalAbandonmentTime', 'THT' is for 'TotalHandlingTime', 'TTT' is for 'TotalTalkTime', 'TACW' is for 'TotalAfterCallWork' */ abbreviation?: boolean; /** * List of item names abbreviations separated by semicolons (;). Returned JSON includes keys only for the selected items. Special 'all' value defines all possible items, see [ACDQueueStatisticsType] for a complete list. See 'abbreviation' description for complete abbreviation list */ report?: string | string[]; /** * Specifies how records are grouped by date and time. If set to 'day', the criteria is a day number. If set to 'hour_of_day', the criteria is a 60-minute interval within a day. If set to 'hour', the criteria is both day number and 60-minute interval within that day. If set to 'none', records are not grouped by date and time */ aggregation?: string; } export interface GetACDQueueStatisticsResponse { /** * List of records grouped grouped by date according to the 'aggregation' method call argument */ result: ACDQueueStatistics[]; error?: APIError; } export interface GetACDOperatorStatusStatisticsRequest { /** * Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss' */ fromDate: Date; /** * The user ID list separated by semicolons (;). Use the 'all' value to select all users */ userId: string | string[]; /** * Date and time of statistics interval begin. Time zone is UTC, format is 24-h 'YYYY-MM-DD HH:mm:ss' */ toDate?: Date; /** * The ACD status list separated by semicolons (;). The following values are possible: OFFLINE, ONLINE, READY, BANNED, IN_SERVICE, AFTER_SERVICE, TIMEOUT, DND. If omitted, the statistics include all the statuses */ acdStatus?: string | string[]; /** * Specifies how records are grouped by date and time. If set to 'day', the criteria is a day number. If set to 'hour_of_day', the criteria is a 60-minute interval within a day. If set to 'hour', the criteria is both day number and 60-minute interval within that day. If set to 'none', records are not grouped by date and time */ aggregation?: string; /** * If set to 'user', first-level array in the resulting JSON groups records by the user ID, and second-level array groups them by date according to the 'aggregation' parameter. If set to 'aggregation', first-level array in the resulting JSON groups records according to the 'aggregation' parameter, and second-level array groups them by the user ID */ group?: string; } export interface GetACDOperatorStatusStatisticsResponse { /** * List of groups, grouped by user ID or date according to the 'group' method call argument */ result: ACDOperatorStatusAggregationGroup[]; error?: APIError; } export interface QueuesInterface { addQueue: (request: AddQueueRequest) => Promise; bindUserToQueue: (request: BindUserToQueueRequest) => Promise; delQueue: (request: DelQueueRequest) => Promise; setQueueInfo: (request: SetQueueInfoRequest) => Promise; getQueues: (request: GetQueuesRequest) => Promise; getACDState: (request: GetACDStateRequest) => Promise; getACDOperatorStatistics: ( request: GetACDOperatorStatisticsRequest ) => Promise; getACDQueueStatistics: ( request: GetACDQueueStatisticsRequest ) => Promise; getACDOperatorStatusStatistics: ( request: GetACDOperatorStatusStatisticsRequest ) => Promise; } export interface GetSmartQueueRealtimeMetricsRequest { /** * The report type. Possible values are: calls_blocked_percentage, count_blocked_calls, im_blocked_chats_percentage, im_count_blocked_chats, im_answered_chats_rate, average_abandonment_rate, count_abandonment_calls, service_level, im_service_level, occupancy_rate, im_agent_occupancy_rate, agent_utilization_rate, im_agent_utilization_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_in_service_incoming_time, sum_agents_in_service_outcoming_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_custom_1_time, sum_agents_custom_2_time, sum_agents_custom_3_time, sum_agents_custom_4_time, sum_agents_custom_5_time, sum_agents_custom_6_time, sum_agents_custom_7_time, sum_agents_custom_8_time, sum_agents_custom_9_time, sum_agents_custom_10_time, sum_agents_banned_time, im_sum_agents_online_time, im_sum_agents_ready_time, im_sum_agents_in_service_time, im_sum_agents_dnd_time, im_sum_agents_custom_1_time, im_sum_agents_custom_2_time, im_sum_agents_custom_3_time, im_sum_agents_custom_4_time, im_sum_agents_custom_5_time, im_sum_agents_custom_6_time, im_sum_agents_custom_7_time, im_sum_agents_custom_8_time, im_sum_agents_custom_9_time, im_sum_agents_custom_10_time, im_sum_agents_banned_time, average_agents_idle_time, max_agents_idle_time, min_agents_idle_time, percentile_0_25_agents_idle_time, percentile_0_50_agents_idle_time, percentile_0_75_agents_idle_time, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, im_min_answer_speed, im_max_answer_speed, im_average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime, count_agent_unanswered_calls, im_count_agent_unanswered_chats, min_reaction_time, max_reaction_time, average_reaction_time, im_min_reaction_time, im_max_reaction_time, im_average_reaction_time, im_count_abandonment_chats, im_count_lost_chats, im_lost_chats_rate, call_count_assigned_to_queue, im_count_assigned_to_queue */ reportType: string | string[]; /** * The application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * The application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * The user ID list with a maximum of 5 values separated by semicolons (;). Use the 'all' value to select all users. Can operate as a filter for the **occupancy_rate**, **sum_agents_online_time**, **sum_agents_ready_time**, **sum_agents_dialing_time**, **sum_agents_in_service_time**, **sum_agents_afterservice_time**, **sum_agents_dnd_time**, **sum_agents_banned_time**, **min_handle_time**, **max_handle_time**, **average_handle_time**, **count_handled_calls**, **min_after_call_worktime**, **max_after_call_worktime**, **average_after_call_worktime** report types. Can be used instead of the user_name parameter */ userId?: 'any' | number | number[]; /** * The user name list separated by semicolons (;). Can be used instead of the user_id parameter */ userName?: string | string[]; /** * The SmartQueue ID list with a maximum of 5 values separated by semicolons (;). Can operate as filter for the **calls_blocked_percentage**, **count_blocked_calls**, **average_abandonment_rate**, **count_abandonment_calls**, **service_level**, **occupancy_rate**, **min_time_in_queue**, **max_time_in_queue**, **average_time_in_queue**, **min_answer_speed**, **max_answer_speed**, **average_answer_speed**, **min_handle_time**, **max_handle_time**, **average_handle_time**, **count_handled_calls**, **min_after_call_worktime**, **max_after_call_worktime**, **average_after_call_worktime** report types. Required unless sq_queue_name is provided or all the requested report types are agent reports. */ sqQueueId?: 'any' | number | number[]; /** * The SmartQueue name list separated by semicolons (;). Required unless sq_queue_id is provided or all the requested report types are agent reports. */ sqQueueName?: string | string[]; /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time minus 30 minutes */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time */ toDate?: Date; /** * The selected timezone or the 'auto' value (the account location) */ timezone?: string; /** * Interval format: YYYY-MM-DD HH:mm:ss. Default is 30 minutes */ interval?: string; /** * Group the result by **agent** or *queue*. The **agent** grouping is allowed for 1 queue and for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types. The **queue** grouping allowed for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types */ groupBy?: string; /** * Maximum waiting time. Required for the **service_level** report type */ maxWaitingSec?: number; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The decimal mark for CSV numbers: a dot or a comma. If omitted, the account setting is used */ decimalSeparator?: string; /** * Whether to omit the empty metric values from the result */ omitEmpty?: boolean; } export interface GetSmartQueueRealtimeMetricsResponse { result: SmartQueueMetricsResult[]; /** * The used timezone, e.g., 'Etc/GMT' */ timezone: string; error?: APIError; } export interface GetSmartQueueDayHistoryRequest { /** * The report type. Possible values are: calls_blocked_percentage, count_blocked_calls, im_blocked_chats_percentage, im_count_blocked_chats, im_answered_chats_rate, average_abandonment_rate, count_abandonment_calls, service_level, im_service_level, occupancy_rate, im_agent_occupancy_rate, agent_utilization_rate, im_agent_utilization_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_in_service_incoming_time, sum_agents_in_service_outcoming_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_custom_1_time, sum_agents_custom_2_time, sum_agents_custom_3_time, sum_agents_custom_4_time, sum_agents_custom_5_time, sum_agents_custom_6_time, sum_agents_custom_7_time, sum_agents_custom_8_time, sum_agents_custom_9_time, sum_agents_custom_10_time, sum_agents_banned_time, im_sum_agents_online_time, im_sum_agents_ready_time, im_sum_agents_in_service_time, im_sum_agents_dnd_time, im_sum_agents_custom_1_time, im_sum_agents_custom_2_time, im_sum_agents_custom_3_time, im_sum_agents_custom_4_time, im_sum_agents_custom_5_time, im_sum_agents_custom_6_time, im_sum_agents_custom_7_time, im_sum_agents_custom_8_time, im_sum_agents_custom_9_time, im_sum_agents_custom_10_time, im_sum_agents_banned_time, average_agents_idle_time, max_agents_idle_time, min_agents_idle_time, percentile_0_25_agents_idle_time, percentile_0_50_agents_idle_time, percentile_0_75_agents_idle_time, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, im_min_answer_speed, im_max_answer_speed, im_average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime, count_agent_unanswered_calls, im_count_agent_unanswered_chats, min_reaction_time, max_reaction_time, average_reaction_time, im_min_reaction_time, im_max_reaction_time, im_average_reaction_time, im_count_abandonment_chats, im_count_lost_chats, im_lost_chats_rate, call_count_assigned_to_queue, im_count_assigned_to_queue */ reportType: string | string[]; /** * The application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * The application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * The user ID list with a maximum of 5 values separated by semicolons (;). Use the 'all' value to select all users. Can operate as a filter for the **occupancy_rate**, **sum_agents_online_time**, **sum_agents_ready_time**, **sum_agents_dialing_time**, **sum_agents_in_service_time**, **sum_agents_afterservice_time**, **sum_agents_dnd_time**, **sum_agents_banned_time**, **min_handle_time**, **max_handle_time**, **average_handle_time**, **count_handled_calls**, **min_after_call_worktime**, **max_after_call_worktime**, **average_after_call_worktime** report types. Can be used instead of the user_name parameter */ userId?: 'any' | number | number[]; /** * The user name list separated by semicolons (;). Can be used instead of the user_id parameter */ userName?: string | string[]; /** * The SmartQueue ID list with a maximum of 5 values separated by semicolons (;). Can operate as filter for the **calls_blocked_percentage**, **count_blocked_calls**, **average_abandonment_rate**, **count_abandonment_calls**, **service_level**, **occupancy_rate**, **min_time_in_queue**, **max_time_in_queue**, **average_time_in_queue**, **min_answer_speed**, **max_answer_speed**, **average_answer_speed**, **min_handle_time**, **max_handle_time**, **average_handle_time**, **count_handled_calls**, **min_after_call_worktime**, **max_after_call_worktime**, **average_after_call_worktime** report types. Required unless sq_queue_name is provided or all the requested report types are agent reports. */ sqQueueId?: 'any' | number | number[]; /** * The SmartQueue name list separated by semicolons (;). Required unless sq_queue_id is provided or all the requested report types are agent reports. */ sqQueueName?: string | string[]; /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time minus 1 day */ fromDate?: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time */ toDate?: Date; /** * The selected timezone or the 'auto' value (the account location) */ timezone?: string; /** * Interval format: YYYY-MM-DD HH:mm:ss. Default is 1 day */ interval?: string; /** * Group the result by **agent** or *queue*. The **agent** grouping is allowed only for 1 queue and for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types. The **queue** grouping allowed for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types */ groupBy?: string; /** * Maximum waiting time. Required for the **service_level** report type */ maxWaitingSec?: number; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The decimal mark for CSV numbers: a dot or a comma. If omitted, the account setting is used */ decimalSeparator?: string; /** * Whether to omit the empty metric values from the result */ omitEmpty?: boolean; } export interface GetSmartQueueDayHistoryResponse { result: SmartQueueMetricsResult[]; /** * The used timezone, e.g., 'Etc/GMT' */ timezone: string; error?: APIError; } export interface RequestSmartQueueHistoryRequest { /** * The from date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time minus 1 day */ fromDate: Date; /** * The to date in the selected timezone in 24-h format: YYYY-MM-DD HH:mm:ss. Default is the current time */ toDate: Date; /** * The report type. Possible values are: calls_blocked_percentage, count_blocked_calls, im_blocked_chats_percentage, im_count_blocked_chats, im_answered_chats_rate, average_abandonment_rate, count_abandonment_calls, service_level, im_service_level, occupancy_rate, im_agent_occupancy_rate, agent_utilization_rate, im_agent_utilization_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_in_service_incoming_time, sum_agents_in_service_outcoming_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_custom_1_time, sum_agents_custom_2_time, sum_agents_custom_3_time, sum_agents_custom_4_time, sum_agents_custom_5_time, sum_agents_custom_6_time, sum_agents_custom_7_time, sum_agents_custom_8_time, sum_agents_custom_9_time, sum_agents_custom_10_time, sum_agents_banned_time, im_sum_agents_online_time, im_sum_agents_ready_time, im_sum_agents_in_service_time, im_sum_agents_dnd_time, im_sum_agents_custom_1_time, im_sum_agents_custom_2_time, im_sum_agents_custom_3_time, im_sum_agents_custom_4_time, im_sum_agents_custom_5_time, im_sum_agents_custom_6_time, im_sum_agents_custom_7_time, im_sum_agents_custom_8_time, im_sum_agents_custom_9_time, im_sum_agents_custom_10_time, im_sum_agents_banned_time, average_agents_idle_time, max_agents_idle_time, min_agents_idle_time, percentile_0_25_agents_idle_time, percentile_0_50_agents_idle_time, percentile_0_75_agents_idle_time, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, im_min_answer_speed, im_max_answer_speed, im_average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime, count_agent_unanswered_calls, im_count_agent_unanswered_chats, min_reaction_time, max_reaction_time, average_reaction_time, im_min_reaction_time, im_max_reaction_time, im_average_reaction_time, im_count_abandonment_chats, im_count_lost_chats, im_lost_chats_rate, call_count_assigned_to_queue, im_count_assigned_to_queue */ reportType: string | string[]; /** * The application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * The application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * The user ID list with a maximum of 5 values separated by semicolons (;). Use the 'all' value to select all users. Can operate as a filter for the **occupancy_rate**, **sum_agents_online_time**, **sum_agents_ready_time**, **sum_agents_dialing_time**, **sum_agents_in_service_time**, **sum_agents_afterservice_time**, **sum_agents_dnd_time**, **sum_agents_banned_time**, **min_handle_time**, **max_handle_time**, **average_handle_time**, **count_handled_calls**, **min_after_call_worktime**, **max_after_call_worktime**, **average_after_call_worktime** report types. Can be used instead of the user_name parameter */ userId?: 'any' | number | number[]; /** * The user name list separated by semicolons (;). Can be used instead of the user_id parameter */ userName?: string | string[]; /** * The SmartQueue ID list with a maximum of 5 values separated by semicolons (;). Can operate as filter for the **calls_blocked_percentage**, **count_blocked_calls**, **average_abandonment_rate**, **count_abandonment_calls**, **service_level**, **occupancy_rate**, **min_time_in_queue**, **max_time_in_queue**, **average_time_in_queue**, **min_answer_speed**, **max_answer_speed**, **average_answer_speed**, **min_handle_time**, **max_handle_time**, **average_handle_time**, **count_handled_calls**, **min_after_call_worktime**, **max_after_call_worktime**, **average_after_call_worktime** report types. Required unless sq_queue_name is provided or all the requested report types are agent reports. */ sqQueueId?: 'any' | number | number[]; /** * The SmartQueue name list separated by semicolons (;). Required unless sq_queue_id is provided or all the requested report types are agent reports. */ sqQueueName?: string | string[]; /** * The selected timezone or the 'auto' value (the account location) */ timezone?: string; /** * Interval format: YYYY-MM-DD HH:mm:ss. Default is 1 day */ interval?: string; /** * Group the result by **agent** or *queue*. The **agent** grouping is allowed only for 1 queue and for the occupancy_rate, sum_agents_online_time, sum_agents_ready_time, sum_agents_dialing_time, sum_agents_in_service_time, sum_agents_afterservice_time, sum_agents_dnd_time, sum_agents_banned_time, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types. The **queue** grouping allowed for the calls_blocked_percentage, count_blocked_calls, average_abandonment_rate, count_abandonment_calls, service_level, occupancy_rate, min_time_in_queue, max_time_in_queue, average_time_in_queue, min_answer_speed, max_answer_speed, average_answer_speed, min_handle_time, max_handle_time, average_handle_time, count_handled_calls, min_after_call_worktime, max_after_call_worktime, average_after_call_worktime report types */ groupBy?: string; /** * Maximum waiting time. Required for the **service_level** report type */ maxWaitingSec?: number; /** * Whether to get records in the descent order */ descOrder?: boolean; /** * Whether to get a CSV file with the column names if the output=csv */ withHeader?: boolean; /** * The decimal mark for CSV numbers: a dot or a comma. If omitted, the account setting is used */ decimalSeparator?: string; /** * Whether to omit the empty metric values from the result */ omitEmpty?: boolean; } export interface RequestSmartQueueHistoryResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * History report ID */ historyReportId: number; error?: APIError; } export interface GetSQStateRequest { /** * The application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * The application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * The SmartQueue ID list separated by semicolons (;). Use the 'all' value to select all SmartQueues. Required unless sq_queue_name is provided. */ sqQueueId?: 'any' | number | number[]; /** * The SmartQueue name list separated by semicolons (;). Required unless sq_queue_id is provided. */ sqQueueName?: string | string[]; /** * The selected timezone or the 'auto' value (the account location) */ timezone?: string; } export interface GetSQStateResponse { result: SmartQueueState[]; error?: APIError; } export interface SQ_SetAgentCustomStatusMappingRequest { /** * Status name */ sqStatusName: string; /** * Custom status name */ customStatusName: string; /** * Application ID. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; } export interface SQ_SetAgentCustomStatusMappingResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_GetAgentCustomStatusMappingRequest { /** * Application ID. Can be used instead of the application_name parameter */ applicationId?: number; /** * Application name. Can be used instead of the application_id parameter */ applicationName?: string; } export interface SQ_GetAgentCustomStatusMappingResponse { /** * Status name */ sqStatusName: string; /** * Custom status name */ customStatusName: string; error?: APIError; } export interface SQ_DeleteAgentCustomStatusMappingRequest { /** * Status name */ sqStatusName: string; /** * Application ID. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; } export interface SQ_DeleteAgentCustomStatusMappingResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_AddQueueRequest { /** * Unique SmartQueue name within the application, up to 100 characters */ sqQueueName: string; /** * Agent selection strategy for calls. Accepts one of the following values: "MOST_QUALIFIED", "LEAST_QUALIFIED", "MAX_WAITING_TIME" */ callAgentSelection: string; /** * Call type requests prioritizing strategy. Accepts one of the [SQTaskSelectionStrategies] enum values */ callTaskSelection: string; /** * Application ID to bind to. Required unless application_name is provided. */ applicationId?: number; /** * Application name to bind to. Required unless application_id is provided. */ applicationName?: string; /** * Whether to add the task to the queue if there are no available agents */ holdImIfInactiveAgents?: boolean; /** * Agent selection strategy for messages. Accepts one of the following values: "MOST_QUALIFIED", "LEAST_QUALIFIED", "MAX_WAITING_TIME". The default value is **call_agent_selection** */ imAgentSelection?: string; /** * IM type requests prioritizing strategy. Accepts one of the [SQTaskSelectionStrategies] enum values. The default value is **call_task_selection** */ imTaskSelection?: string; /** * Whether to keep the call task in the queue if all agents are in the DND/BANNED/OFFLINE statuses. */ holdCallsIfInactiveAgents?: boolean; /** * Comment, up to 200 characters */ description?: string; /** * Maximum time in minutes that a CALL-type request can remain in the queue without being assigned to an agent. Specify either this parameter or `call_max_waiting_time_in_seconds`. Specifying both parameters simultaniously leads to an error */ callMaxWaitingTime?: number; /** * Maximum time in minutes that an IM-type request can remain in the queue without being assigned to an agent. Specify either this parameter or `im_max_waiting_time_in_seconds`. Specifying both parameters simultaniously leads to an error */ imMaxWaitingTime?: number; /** * Maximum size of the queue with CALL-type requests */ callMaxQueueSize?: number; /** * Maximum size of the queue with IM-type requests */ imMaxQueueSize?: number; /** * The queue's priority from 1 to 100 */ priority?: number; /** * Maximum call waiting time in seconds. Specify either this parameter or `call_max_waiting_time`. Specifying both parameters simultaniously leads to an error */ callMaxWaitingTimeInSeconds?: number; /** * Maximum chat message waiting time in seconds. Specify either this parameter or `im_max_waiting_time`. Specifying both parameters simultaniously leads to an error */ imMaxWaitingTimeInSeconds?: number; } export interface SQ_AddQueueResponse { /** * Result with ID of the added queue */ result: SQAddQueueResult; error?: APIError; } export interface SQ_SetQueueInfoRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * Whether to add the task to the queue if there are no available agents */ holdImIfInactiveAgents?: boolean; /** * ID of the SmartQueue to search for. Required unless sq_queue_name is provided. */ sqQueueId?: number; /** * Name of the SmartQueue to search for. Required unless sq_queue_id is provided. */ sqQueueName?: string; /** * Whether to keep the call task in the queue if all agents are in the DND/BANNED statuses. */ holdCallsIfInactiveAgents?: boolean; /** * New SmartQueue name within the application, up to 100 characters */ newSqQueueName?: string; /** * Agent selection strategy for calls. Accepts one of the following values: "MOST_QUALIFIED", "LEAST_QUALIFIED", "MAX_WAITING_TIME" */ callAgentSelection?: string; /** * Agent selection strategy for messages. Accepts one of the following values: "MOST_QUALIFIED", "LEAST_QUALIFIED", "MAX_WAITING_TIME". The default value is **call_agent_selection** */ imAgentSelection?: string; /** * Strategy of prioritizing CALL-type requests for service. Accepts one of the following values: "MAX_PRIORITY", "MAX_WAITING_TIME" */ callTaskSelection?: string; /** * Strategy of prioritizing IM-type requests for service. Accepts one of the following values: "MAX_PRIORITY", "MAX_WAITING_TIME". The default value is **call_task_selection** */ imTaskSelection?: string; /** * Comment, up to 200 characters */ description?: string; /** * Maximum time in minutes that a CALL-type request can remain in the queue without being assigned to an agent. Specify either this parameter or `call_max_waiting_time_in_seconds`. Specifying both parameters simultaniously leads to an error */ callMaxWaitingTime?: number; /** * Maximum time in minutes that an IM-type request can remain in the queue without being assigned to an agent. Specify either this parameter or `im_max_waiting_time_in_seconds`. Specifying both parameters simultaniously leads to an error */ imMaxWaitingTime?: number; /** * Maximum size of the queue with CALL-type requests */ callMaxQueueSize?: number; /** * Maximum size of the queue with IM-type requests */ imMaxQueueSize?: number; /** * The queue's priority from 1 to 100 */ priority?: number; /** * Maximum call waiting time in seconds. Specify either this parameter or `call_max_waiting_time`. Specifying both parameters simultaniously leads to an error */ callMaxWaitingTimeInSeconds?: number; /** * Maximum chat message waiting time in seconds. Specify either this parameter or `im_max_waiting_time`. Specifying both parameters simultaniously leads to an error */ imMaxWaitingTimeInSeconds?: number; } export interface SQ_SetQueueInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_DelQueueRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of SmartQueue IDs separated by semicolons (;). Use 'all' to delete all the queues. Required unless sq_queue_name is provided. */ sqQueueId?: 'any' | number | number[]; /** * List of SmartQueue names separated by semicolons (;). Required unless sq_queue_id is provided. */ sqQueueName?: string | string[]; } export interface SQ_DelQueueResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_GetQueuesRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of SmartQueue IDs separated by semicolons (;). Can be used instead of the sq_queue_name parameter */ sqQueueId?: 'any' | number | number[]; /** * List of SmartQueue names separated by semicolons (;). Can be used instead of the sq_queue_id parameter */ sqQueueName?: string | string[]; /** * Substring of the SmartQueue name to filter */ sqQueueNameTemplate?: string; /** * List of user IDs separated by semicolons (;). Queues bound to these users are returned. Can be used instead of the user_name parameter */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Can be used instead of the user_id parameter */ userName?: string | string[]; /** * List of user IDs separated by semicolons (;). Queues bound to these users are excluded. Can be used instead of the excluded_user_name parameter */ excludedUserId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Can be used instead of the excluded_user_id parameter */ excludedUserName?: string | string[]; /** * Number of items to show in the output */ count?: number; /** * Number of items to skip in the output */ offset?: number; /** * Whether to include the number of agents bound to the queue */ withAgentcount?: boolean; } export interface SQ_GetQueuesResponse { /** * The found queue(s) */ result: GetSQQueuesResult; error?: APIError; } export interface SQ_AddSkillRequest { /** * Unique skill name within the application */ sqSkillName: string; /** * Application ID to bind to. Required unless application_name is provided. */ applicationId?: number; /** * Application name to bind to. Required unless application_id is provided. */ applicationName?: string; /** * Comment, up to 200 characters */ description?: string; } export interface SQ_AddSkillResponse { /** * Result with ID of the added skill */ result: SQAddSkillResult; error?: APIError; } export interface SQ_DelSkillRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of skill IDs separated by semicolons (;). Use 'all' to delete all the skills. Required unless sq_skill_name is provided. */ sqSkillId?: 'any' | number | number[]; /** * List of skill names separated by semicolons (;). Required unless sq_skill_id is provided. */ sqSkillName?: string | string[]; } export interface SQ_DelSkillResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_SetSkillInfoRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * ID of the skill. Required unless sq_skill_name is provided. */ sqSkillId?: number; /** * Name of the skill. Required unless sq_skill_id is provided. */ sqSkillName?: string; /** * New unique skill name within the application */ newSqSkillName?: string; /** * Comment, up to 200 characters */ description?: string; } export interface SQ_SetSkillInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_BindSkillRequest { /** * Skills to be bound to agents in the JSON array format. The array should contain objects with the sq_skill_id/sq_skill_name and sq_skill_level keys where skill levels range from 1 to 5 */ sqSkills: string; /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of user IDs separated by semicolons (;). Use 'all' to select all the users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * Binding mode. Accepts one of the [SQSkillBindingModes] enum values */ bindMode?: string; } export interface SQ_BindSkillResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_UnbindSkillRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of user IDs separated by semicolons (;). Use 'all' to select all the users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * List of skill IDs separated by semicolons (;). Use 'all' to unbind all the skills. Required unless sq_skill_name is provided. */ sqSkillId?: 'any' | number | number[]; /** * List of skill names separated by semicolons (;). Required unless sq_skill_id is provided. */ sqSkillName?: string | string[]; } export interface SQ_UnbindSkillResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_GetSkillsRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of user IDs separated by semicolons (;). Can be used instead of the user_name parameter */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Can be used instead of the user_id parameter */ userName?: string | string[]; /** * List of skill IDs separated by semicolons (;). Can be used instead of the sq_skill_name parameter */ sqSkillId?: 'any' | number | number[]; /** * List of skill names separated by semicolons (;). Can be used instead of the sq_skill_id parameter */ sqSkillName?: string | string[]; /** * Substring of the skill name to filter, case-insensitive */ sqSkillNameTemplate?: string; /** * List of user IDs separated by semicolons (;). Skills bound to these users are excluded. Can be used instead of the excluded_user_name parameter */ excludedUserId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Can be used instead of the excluded_user_id parameter */ excludedUserName?: string | string[]; /** * Number of items to show in the output */ count?: number; /** * Number of items to skip in the output */ offset?: number; } export interface SQ_GetSkillsResponse { /** * The found skill(s). */ result: GetSQSkillsResult; error?: APIError; } export interface SQ_BindAgentRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of SmartQueue IDs separated by semicolons (;). Use 'all' to select all the queues. Required unless sq_queue_name is provided. */ sqQueueId?: 'any' | number | number[]; /** * List of SmartQueue names separated by semicolons (;). Required unless sq_queue_id is provided. */ sqQueueName?: string | string[]; /** * List of user IDs separated by semicolons (;). Use 'all' to select all the users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * Binding mode. Accepts one of the [SQAgentBindingModes] enum values */ bindMode?: string; } export interface SQ_BindAgentResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_UnbindAgentRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of SmartQueue IDs separated by semicolons (;). Use 'all' to select all the queues. Required unless sq_queue_name is provided. */ sqQueueId?: 'any' | number | number[]; /** * List of SmartQueue names separated by semicolons (;). Required unless sq_queue_id is provided. */ sqQueueName?: string | string[]; /** * List of user IDs separated by semicolons (;). Use 'all' to select all the users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; } export interface SQ_UnbindAgentResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SQ_GetAgentsRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of SmartQueue IDs separated by semicolons (;). Use 'all' to select all the queues. Can be used instead of the sq_queue_name parameter */ sqQueueId?: 'any' | number | number[]; /** * List of SmartQueue names separated by semicolons (;). Can be used instead of the sq_queue_id parameter */ sqQueueName?: string | string[]; /** * List of SmartQueue IDs separated by semicolons (;). Agents bound to these queues are excluded. Use 'all' to select all the queues. Can be used instead of the excluded_sq_queue_name parameter */ excludedSqQueueId?: 'any' | number | number[]; /** * List of SmartQueue names separated by semicolons (;). Can be used instead of the excluded_sq_queue_id parameter */ excludedSqQueueName?: string | string[]; /** * Skills to filter in the JSON array format. The array should contain objects with the sq_skill_id/sq_skill_name, min_sq_skill_level, and max_sq_skill_level keys where skill levels range from 1 to 5 */ sqSkills?: string; /** * List of user IDs separated by semicolons (;). Can be used instead of the user_name parameter */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Can be used instead of the user_id parameter */ userName?: string | string[]; /** * Substring of the user name to filter */ userNameTemplate?: string; /** * Filter statuses in the JSON array format. The array should contain objects with the sq_status_type and sq_status_name keys. Possible values for sq_status_type are 'CALL' and 'IM'. Possible values for sq_status_name are 'OFFLINE', 'ONLINE', 'READY', 'IN_SERVICE', 'AFTER_SERVICE', 'DND' */ sqStatuses?: string; /** * Whether to display agent skills */ withSqSkills?: boolean; /** * Whether to display agent queues */ withSqQueues?: boolean; /** * Whether to display agent current statuses */ withSqStatuses?: boolean; /** * Number of items to show in the output */ count?: number; /** * Number of items to skip in the output */ offset?: number; } export interface SQ_GetAgentsResponse { /** * The found agent(s) */ result: GetSQAgentsResult; error?: APIError; } export interface SQ_SetAgentInfoRequest { /** * Application ID to search by. Required unless application_name is provided. */ applicationId?: number; /** * Application name to search by. Required unless application_id is provided. */ applicationName?: string; /** * List of user IDs separated by semicolons (;). Use 'all' to select all the users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * List of user names separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * Maximum number of chats that the user processes simultaneously. Required unless handle_calls is provided. */ maxSimultaneousConversations?: number; /** * Whether the agent can handle calls. When set to false, the agent is excluded from the CALL-request distribution. Required unless max_simultaneous_conversations is provided. */ handleCalls?: boolean; } export interface SQ_SetAgentInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SmartQueueInterface { getSmartQueueRealtimeMetrics: ( request: GetSmartQueueRealtimeMetricsRequest ) => Promise; getSmartQueueDayHistory: ( request: GetSmartQueueDayHistoryRequest ) => Promise; requestSmartQueueHistory: ( request: RequestSmartQueueHistoryRequest ) => Promise; getSQState: (request: GetSQStateRequest) => Promise; sQ_SetAgentCustomStatusMapping: ( request: SQ_SetAgentCustomStatusMappingRequest ) => Promise; sQ_GetAgentCustomStatusMapping: ( request: SQ_GetAgentCustomStatusMappingRequest ) => Promise; sQ_DeleteAgentCustomStatusMapping: ( request: SQ_DeleteAgentCustomStatusMappingRequest ) => Promise; sQ_AddQueue: (request: SQ_AddQueueRequest) => Promise; sQ_SetQueueInfo: (request: SQ_SetQueueInfoRequest) => Promise; sQ_DelQueue: (request: SQ_DelQueueRequest) => Promise; sQ_GetQueues: (request: SQ_GetQueuesRequest) => Promise; sQ_AddSkill: (request: SQ_AddSkillRequest) => Promise; sQ_DelSkill: (request: SQ_DelSkillRequest) => Promise; sQ_SetSkillInfo: (request: SQ_SetSkillInfoRequest) => Promise; sQ_BindSkill: (request: SQ_BindSkillRequest) => Promise; sQ_UnbindSkill: (request: SQ_UnbindSkillRequest) => Promise; sQ_GetSkills: (request: SQ_GetSkillsRequest) => Promise; sQ_BindAgent: (request: SQ_BindAgentRequest) => Promise; sQ_UnbindAgent: (request: SQ_UnbindAgentRequest) => Promise; sQ_GetAgents: (request: SQ_GetAgentsRequest) => Promise; sQ_SetAgentInfo: (request: SQ_SetAgentInfoRequest) => Promise; } export interface AddSkillRequest { /** * The ACD operator skill name. The length should be less than 512 */ skillName: string; } export interface AddSkillResponse { /** * Returns 1 if the request has been completed successfully */ result: number; /** * The skill ID */ skillId: number; error?: APIError; } export interface DelSkillRequest { /** * The skill ID. Required unless skill_name is provided. */ skillId?: number; /** * The skill name. Required unless skill_id is provided. */ skillName?: string; } export interface DelSkillResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SetSkillInfoRequest { /** * The new skill name. The length should be less than 512 */ newSkillName: string; /** * The skill ID. Required unless skill_name is provided. */ skillId?: number; /** * The skill name. Required unless skill_id is provided. */ skillName?: string; } export interface SetSkillInfoResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface GetSkillsRequest { /** * The skill ID to filter */ skillId?: number; /** * The skill name part to filter */ skillName?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetSkillsResponse { result: SkillInfo[]; /** * The total found skill count */ totalCount: number; /** * The returned skill count */ count: number; error?: APIError; } export interface BindSkillRequest { /** * The skill ID list separated by semicolons (;). Use the 'all' value to select all skills. Required unless skill_name is provided. */ skillId?: 'any' | number | number[]; /** * The skill name list separated by semicolons (;). Required unless skill_id is provided. */ skillName?: string | string[]; /** * The user ID list separated by semicolons (;). Use the 'all' value to select all users. Required unless user_name is provided. */ userId?: 'any' | number | number[]; /** * The user name list separated by semicolons (;). Required unless user_id is provided. */ userName?: string | string[]; /** * The ACD queue ID list separated by semicolons (;). Use the 'all' value to select all ACD queues. Required unless acd_queue_name is provided. */ acdQueueId?: 'any' | number | number[]; /** * The ACD queue name. The ACD queue name list separated by semicolons (;). Required unless acd_queue_id is provided. */ acdQueueName?: string | string[]; /** * The application ID. It is required if the user_name is specified */ applicationId?: number; /** * The application name that can be used instead of application_id */ applicationName?: string; /** * Whether to bind or unbind (set true or false respectively) */ bind?: boolean; } export interface BindSkillResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface SkillsInterface { addSkill: (request: AddSkillRequest) => Promise; delSkill: (request: DelSkillRequest) => Promise; setSkillInfo: (request: SetSkillInfoRequest) => Promise; getSkills: (request: GetSkillsRequest) => Promise; bindSkill: (request: BindSkillRequest) => Promise; } export interface RobokassaPaymentSystemInterface {} export interface CreditCardsInterface {} export interface AgreementsInterface {} export interface AdminUsersInterface {} export interface AdminRolesInterface {} export interface AddAuthorizedAccountIPRequest { /** * The authorized IP4 or network */ authorizedIp: string; /** * Whether to remove the IP from the blacklist */ allowed?: boolean; /** * The IP address description */ description?: string; } export interface AddAuthorizedAccountIPResponse { /** * Returns 1 if the request has been completed successfully */ result: number; error?: APIError; } export interface DelAuthorizedAccountIPRequest { /** * The authorized IP4 or network to remove. Set to 'all' to remove all items. Required unless contains_ip is provided. */ authorizedIp?: string; /** * Specify the parameter to remove the networks that contains the particular IP4. Required unless authorized_ip is provided. */ containsIp?: string; /** * Whether to remove the network from the white list. Set false to remove the network from the black list. Omit the parameter to remove the network from all lists */ allowed?: boolean; } export interface DelAuthorizedAccountIPResponse { /** * The removed network count */ result: number; error?: APIError; } export interface GetAuthorizedAccountIPsRequest { /** * The authorized IP4 or network to filter */ authorizedIp?: string; /** * Whether the IP is allowed */ allowed?: boolean; /** * Specify the parameter to filter the networks that contains the particular IP4 */ containsIp?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * The IP address description */ description?: string; } export interface GetAuthorizedAccountIPsResponse { result: AuthorizedAccountIP[]; /** * The total found network count */ totalCount: number; /** * The returned network count */ count: number; error?: APIError; } export interface CheckAuthorizedAccountIPRequest { /** * The IP4 to test */ authorizedIp: string; } export interface CheckAuthorizedAccountIPResponse { /** * Whether the IP is allowed */ result: boolean; /** * The matched authorized IP or network (if found) */ authorizedIp?: string; error?: APIError; } export interface AuthorizedIPsInterface { addAuthorizedAccountIP: ( request: AddAuthorizedAccountIPRequest ) => Promise; delAuthorizedAccountIP: ( request: DelAuthorizedAccountIPRequest ) => Promise; getAuthorizedAccountIPs: ( request: GetAuthorizedAccountIPsRequest ) => Promise; checkAuthorizedAccountIP: ( request: CheckAuthorizedAccountIPRequest ) => Promise; } export interface ContractorsInterface {} export interface ContactsInterface {} export interface LinkregulationAddressRequest { /** * The regulation address ID */ regulationAddressId: number; /** * The phone ID for link */ phoneId: number; /** * The phone number for link */ phoneNumber: string; } export interface LinkregulationAddressResponse { result: boolean; error?: APIError; } export interface GetZIPCodesRequest { /** * The country code according to the ISO 3166-1 alpha-2 */ countryCode: string; /** * The phone region code */ phoneRegionCode?: string; /** * The maximum returning record count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetZIPCodesResponse { /** * The ZipCode records */ result: ZipCode[]; /** * The returned zip codes count */ count: number; error?: APIError; } export interface GetRegulationsAddressRequest { /** * The country code according to the ISO 3166-1 alpha-2 */ countryCode?: string; /** * The phone category name. See the [GetPhoneNumberCategories] method */ phoneCategoryName?: string; /** * The phone region code. See the [GetRegions] method */ phoneRegionCode?: string; /** * The regulation address ID */ regulationAddressId?: number; verificationId?: number; /** * Whether to show only verified regulation address */ verified?: boolean; /** * Whether to show only in progress regulation address */ inProgress?: boolean; withRegionCode?: boolean; } export interface GetRegulationsAddressResponse { /** * The RegulationAddress records */ result: RegulationAddress[]; /** * The returned regulation address count */ count: number; error?: APIError; } export interface GetAvailableRegulationsRequest { /** * The country code according to the ISO 3166-1 alpha-2 */ countryCode: string; /** * The phone category name. See the [GetPhoneNumberCategories] method */ phoneCategoryName: string; /** * The phone region code. See the [GetRegions] method */ phoneRegionCode?: string; } export interface GetAvailableRegulationsResponse { /** * Whether the user has at least one regulation address which is appropriate for verification or the verification is not required. If result is false, the regulations address needs to be created */ result: boolean; /** * The available RegulationAddress records */ availableAddress: RegulationAddress[]; /** * The number of RegulationAddress in progress status */ countInProgress: number; error?: APIError; } export interface GetCountriesRequest { /** * The country code according to the ISO 3166-1 alpha-2 */ countryCode?: string; } export interface GetCountriesResponse { result: RegulationCountry[]; count: number; error?: APIError; } export interface GetRegionsRequest { /** * The country code according to the ISO 3166-1 alpha-2 */ countryCode: string; /** * The phone category name. See the [GetPhoneNumberCategories] method */ phoneCategoryName: string; /** * The pattern of city's name */ cityName?: string; /** * The returned regions count */ count?: number; /** * The first N records are skipped in the output */ offset?: number; } export interface GetRegionsResponse { result: RegulationRegionRecord[]; count: number; error?: APIError; } export interface RegulationAddressInterface { linkregulationAddress: ( request: LinkregulationAddressRequest ) => Promise; getZIPCodes: (request: GetZIPCodesRequest) => Promise; getRegulationsAddress: ( request: GetRegulationsAddressRequest ) => Promise; getAvailableRegulations: ( request: GetAvailableRegulationsRequest ) => Promise; getCountries: (request: GetCountriesRequest) => Promise; getRegions: (request: GetRegionsRequest) => Promise; } export interface AddPushCredentialRequest { /** * The push provider name. The possible values are APPLE, APPLE_VOIP, GOOGLE, HUAWEI. Required unless push_provider_id is provided. */ pushProviderName?: string; /** * The push provider id. The possible values are: 1 — APPLE, 2 — GOOGLE, 3 — APPLE_VOIP, 5 — HUAWEI. Required unless push_provider_name is provided. */ pushProviderId?: number; /** * The application id */ applicationId?: number; /** * The application name that can be used instead of application_id */ applicationName?: string; /** * The bundle of Android/iOS/Huawei application */ credentialBundle?: string; /** * Public and private keys in PKCS12 format. Credentials for APPLE push */ certContent?: Buffer; /** * The parameter is required, when set 'cert_content' as POST body. Credentials for APPLE push */ certFileName?: string; /** * The secret password for private key. Credentials for APPLE push */ certPassword?: string; /** * Whether to use this certificate in apple's sandbox environment. Credentials for APPLE push */ isDevMode?: boolean; /** * The sender id, provided by Google. Credentials for GOOGLE push */ senderId?: string; /** * The server key, provided by Google. Credentials for GOOGLE push */ serverKey?: string; /** * The service account key file, provided by Google. Can be used instead of server_key. Credentials for GOOGLE push */ serviceAccountFile?: Buffer; /** * The client id, provided by Huawei. Credentials for HUAWEI push */ huaweiClientId?: string; /** * The client secret, provided by Huawei. Credentials for HUAWEI push */ huaweiClientSecret?: string; /** * The application id, provided by Huawei. Credentials for HUAWEI push */ huaweiApplicationId?: string; } export interface AddPushCredentialResponse { result: number; pushCredentialId: number; error?: APIError; } export interface SetPushCredentialRequest { /** * The push credentials id */ pushCredentialId: number; /** * Public and private keys in PKCS12 format. Credentials for APPLE push */ certContent?: Buffer; /** * The secret password for private key. Credentials for APPLE push */ certPassword?: string; /** * Whether to use this certificate in apple's sandbox environment. Credentials for APPLE push */ isDevMode?: boolean; /** * The sender id, provided by Google. Credentials for GOOGLE push */ senderId?: string; /** * The server key, provided by Google. Credentials for GOOGLE push */ serverKey?: string; /** * The service account key file, provided by Google. Can be used instead of server_key. Credentials for GOOGLE push */ serviceAccountFile?: Buffer; /** * The client id, provided by Huawei. Credentials for HUAWEI push */ huaweiClientId?: string; /** * The client secret, provided by Huawei. Credentials for HUAWEI push */ huaweiClientSecret?: string; /** * The application id, provided by Huawei. Credentials for HUAWEI push */ huaweiApplicationId?: string; } export interface SetPushCredentialResponse { result: number; error?: APIError; } export interface DelPushCredentialRequest { /** * The push credentials id */ pushCredentialId: number; } export interface DelPushCredentialResponse { result: number; error?: APIError; } export interface GetPushCredentialRequest { /** * The push credentials id */ pushCredentialId?: number; /** * The push provider name. The possible values are APPLE, APPLE_VOIP, GOOGLE, HUAWEI */ pushProviderName?: string; /** * The push provider id. Can be used instead of push_provider_name. The possible values are: 1 — APPLE, 2 — GOOGLE, 3 — APPLE_VOIP, 5 — HUAWEI. */ pushProviderId?: number; /** * Name of the bound application */ applicationName?: string; /** * ID of the bound application */ applicationId?: number; /** * Whether to get the user's certificate */ withCert?: boolean; withSecretInfo?: boolean; } export interface GetPushCredentialResponse { result: PushCredentialInfo[]; error?: APIError; } export interface BindPushCredentialRequest { /** * The push credentials ID list separated by semicolons (;) */ pushCredentialId: 'any' | number | number[]; /** * The application ID list separated by semicolons (;). Use the 'all' value to select all applications */ applicationId: 'any' | number | number[]; /** * Whether to bind or unbind (set true or false respectively) */ bind?: boolean; } export interface BindPushCredentialResponse { result: number; error?: APIError; } export interface PushCredentialsInterface { addPushCredential: (request: AddPushCredentialRequest) => Promise; setPushCredential: (request: SetPushCredentialRequest) => Promise; delPushCredential: (request: DelPushCredentialRequest) => Promise; getPushCredential: (request: GetPushCredentialRequest) => Promise; bindPushCredential: (request: BindPushCredentialRequest) => Promise; } export interface AddDialogflowKeyRequest { /** * The application ID */ applicationId: string; /** * Dialogflow credentials, provided by JWK (Json web key) */ jsonCredentials: string; /** * The application name. Can be used instead of application_id */ applicationName?: string; /** * The Dialogflow key's description */ description?: string; } export interface AddDialogflowKeyResponse { result: number; dialogflowKeyId: number; error?: APIError; } export interface SetDialogflowKeyRequest { /** * The Dialogflow key's ID */ dialogflowKeyId: number; /** * The Dialogflow key's description. To clear previously set description leave the parameter blank or put whitespaces only */ description: string; } export interface SetDialogflowKeyResponse { result: number; error?: APIError; } export interface DelDialogflowKeyRequest { /** * The Dialogflow key's ID */ dialogflowKeyId: number; } export interface DelDialogflowKeyResponse { result: number; error?: APIError; } export interface GetDialogflowKeysRequest { /** * Dialogflow key's ID */ dialogflowKeyId?: number; /** * Name of the bound application */ applicationName?: string; /** * ID of the bound application */ applicationId?: number; withSecretInfo?: boolean; } export interface GetDialogflowKeysResponse { result: DialogflowKeyInfo[]; error?: APIError; } export interface BindDialogflowKeysRequest { /** * The Dialogflow key's ID */ dialogflowKeyId: number; /** * The application ID list separated by semicolons (;). Use the 'all' value to select all applications */ applicationId: 'any' | number | number[]; /** * Whether to bind or unbind (set true or false respectively) */ bind?: boolean; } export interface BindDialogflowKeysResponse { result: number; error?: APIError; } export interface DialogflowCredentialsInterface { addDialogflowKey: (request: AddDialogflowKeyRequest) => Promise; setDialogflowKey: (request: SetDialogflowKeyRequest) => Promise; delDialogflowKey: (request: DelDialogflowKeyRequest) => Promise; getDialogflowKeys: (request: GetDialogflowKeysRequest) => Promise; bindDialogflowKeys: (request: BindDialogflowKeysRequest) => Promise; } export interface SendSmsMessageRequest { /** * The source phone number */ source: string; /** * The destination phone number */ destination: string; /** * The message text, up to 765 characters. We split long messages greater than 160 GSM-7 characters or 70 UTF-16 characters into multiple segments. Each segment is charged as one message */ smsBody: string; /** * Whether to store outgoing message texts. Default value is false */ storeBody?: boolean; } export interface SendSmsMessageResponse { result: number; /** * Message ID */ messageId: number; /** * The number of fragments the message is divided into */ fragmentsCount: number; error?: APIError; } export interface A2PSendSmsRequest { /** * The SenderID for outgoing SMS. Please contact support for installing a SenderID */ srcNumber: string; /** * The destination phone numbers separated by semicolons (;). The maximum number of these phone numbers is 100 */ dstNumbers: string | string[]; /** * The message text, up to 1600 characters. We split long messages greater than 160 GSM-7 characters or 70 UTF-16 characters into multiple segments. Each segment is charged as one message */ text: string; /** * Whether to store outgoing message texts. Default value is false */ storeBody?: boolean; } export interface A2PSendSmsResponse { result: SmsTransaction[]; failed: FailedSms[]; /** * The number of fragments the message is divided into */ fragmentsCount: number; error?: APIError; } export interface ControlSmsRequest { /** * The phone number */ phoneNumber: string; /** * The SMS control command. The following values are possible: enable, disable */ command: string; } export interface ControlSmsResponse { result: number; error?: APIError; } export interface GetSmsHistoryRequest { /** * Message id list separated by semicolons (;) */ messageId?: 'any' | number | number[]; /** * The source phone number */ sourceNumber?: string; /** * The destination phone number */ destinationNumber?: string; /** * Sent or received SMS. Possible values: 'IN', 'OUT', 'in, 'out'. Leave blank to get both incoming and outgoing messages */ direction?: string; timezone?: string; /** * Maximum number of resulting rows fetched. Should be not bigger than 1000. If left blank, then the default value of 1000 is used */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * Date from which to perform search. Format is 'yyyy-MM-dd HH:mm:ss', time zone is UTC */ fromDate?: Date; /** * Date until which to perform search. Format is 'yyyy-MM-dd HH:mm:ss', time zone is UTC */ toDate?: Date; /** * The output format. The following values available: **json**, **csv**, **xls**. The default value is **json** */ output?: string; } export interface GetSmsHistoryResponse { result: SmsHistory[]; /** * Total number of messages matching the query parameters */ totalCount: number; error?: APIError; } export interface A2PGetSmsHistoryRequest { /** * Message id list separated by semicolons (;) */ messageId?: 'any' | number | number[]; /** * The source phone number */ sourceNumber?: string; /** * The destination phone number */ destinationNumber?: string; /** * Maximum number of resulting rows fetched. Should be not bigger than 1000. If left blank, then the default value of 1000 is used */ count?: number; /** * The first N records are skipped in the output */ offset?: number; /** * Date from which the search is to start. Format is 'yyyy-MM-dd HH:mm:ss', time zone is UTC */ fromDate?: Date; /** * Date from which the search is to end. Format is 'yyyy-MM-dd HH:mm:ss', time zone is UTC */ toDate?: Date; /** * The output format. The following values available: **json**, **csv**, **xls**. The default value is **json** */ output?: string; /** * The delivery status ID: QUEUED - 1, DISPATCHED - 2, ABORTED - 3, REJECTED - 4, DELIVERED - 5, FAILED - 6, EXPIRED - 7, UNKNOWN - 8 */ deliveryStatus?: number; } export interface A2PGetSmsHistoryResponse { result: A2PSmsHistory[]; /** * Total number of messages matching the query parameters */ totalCount: number; error?: APIError; } export interface SMSInterface { sendSmsMessage: (request: SendSmsMessageRequest) => Promise; a2PSendSms: (request: A2PSendSmsRequest) => Promise; controlSms: (request: ControlSmsRequest) => Promise; getSmsHistory: (request: GetSmsHistoryRequest) => Promise; a2PGetSmsHistory: (request: A2PGetSmsHistoryRequest) => Promise; } export interface GetRecordStoragesRequest { /** * The record storage ID list separated by semicolons (;) */ recordStorageId?: 'any' | number | number[]; /** * The record storage name list separated by semicolons (;) */ recordStorageName?: string | string[]; withPrivate?: boolean; } export interface GetRecordStoragesResponse { result: RecordStorageInfo; error?: APIError; } export interface GetCustomRecordStoragesRequest { /** * Unique identifier of the custom record storage configuration. */ customRecordStorageId?: number; /** * Whether to include attached applications in the response or execution. */ withApplicationsAttached?: boolean; } export interface GetCustomRecordStoragesResponse { result: CustomRecordStorageInfo; error?: APIError; } export interface AddCustomRecordStorageRequest { /** * Host endpoint for the custom storage. */ host: string; /** * Access key ID used to authenticate requests. */ accessKeyId: string; /** * Secret access key used to authenticate requests. */ secretAccessKey: string; /** * Name of the storage bucket. */ bucket: string; /** * Geographic region where the bucket is located. */ region?: string; /** * Signature version to use for signing requests. */ signatureVersion?: string; /** * Whether the bucket name should be treated as a domain. */ bucketIsDomain?: boolean; /** * Storage class to assign to newly uploaded objects. */ storageClass?: string; /** * Access Control List rule applied to objects. */ acl?: string; /** * Cross-Origin Resource Sharing configuration. */ cors?: string; /** * Whether to enable large file multipart uploading. */ multipartUpload?: boolean; /** * Set of application IDs attached to this storage configuration. */ attachedApplicationId?: string; } export interface AddCustomRecordStorageResponse { result: AddCustomRecordStorageInfo; error?: APIError; } export interface SetCustomRecordStorageInfoRequest { /** * Host endpoint for the custom storage. */ host: string; /** * Access key ID used to authenticate requests. */ accessKeyId: string; /** * Secret access key used to authenticate requests. */ secretAccessKey: string; /** * Name of the storage bucket. */ bucket: string; /** * The unique identifier of the custom record storage configuration. */ customRecordStorageId: number; /** * Geographic region where the bucket is located. */ region?: string; /** * Signature version to use for signing requests. */ signatureVersion?: string; /** * Whether the bucket name should be treated as a domain. */ bucketIsDomain?: boolean; /** * Storage class to assign to newly uploaded objects. */ storageClass?: string; /** * Access Control List rule applied to objects. */ acl?: string; /** * Cross-Origin Resource Sharing configuration. */ cors?: string; /** * Whether to enable large file multipart uploading. */ multipartUpload?: boolean; /** * Set of application IDs attached to this storage configuration. */ attachedApplicationId?: string; } export interface SetCustomRecordStorageInfoResponse { result: number; error?: APIError; } export interface RecordStoragesInterface { getRecordStorages: (request: GetRecordStoragesRequest) => Promise; getCustomRecordStorages: ( request: GetCustomRecordStoragesRequest ) => Promise; addCustomRecordStorage: ( request: AddCustomRecordStorageRequest ) => Promise; setCustomRecordStorageInfo: ( request: SetCustomRecordStorageInfoRequest ) => Promise; } export interface MGPInterface {} export interface CreateKeyRequest { /** * The key's description */ description?: string; /** * The key's name, up to 50 characters. Cannot be empty */ keyName?: string; /** * The role ID list separated by semicolons (;). Use it instead of **role_name**, but not combine with */ roleId?: 'any' | number | number[]; /** * The role name list separated by semicolons (;). Use it instead of **role_id**, but not combine with */ roleName?: string | string[]; } export interface CreateKeyResponse { result: KeyInfo[]; error?: APIError; } export interface GetKeysRequest { /** * The key's ID */ keyId?: string; /** * Whether to show roles for the key */ withRoles?: boolean; /** * The first N records are skipped in the output */ offset?: number; /** * The maximum returning record count */ count?: number; } export interface GetKeysResponse { result: KeyView[]; error?: APIError; } export interface UpdateKeyRequest { /** * The key's ID */ keyId: string; /** * The key's description */ description: string; /** * The key's name, up to 50 characters. Cannot be empty */ keyName?: string; } export interface UpdateKeyResponse { result: number; error?: APIError; } export interface DeleteKeyRequest { /** * The key's ID */ keyId: string; } export interface DeleteKeyResponse { result: number; error?: APIError; } export interface SetKeyRolesRequest { /** * The key's ID */ keyId: string; /** * The role id list separated by semicolons (;) */ roleId: 'any' | number | number[]; /** * The role name list separated by semicolons (;) */ roleName: string | string[]; } export interface SetKeyRolesResponse { result: number; error?: APIError; } export interface GetKeyRolesRequest { /** * The key's ID */ keyId: string; /** * Whether to show the roles' additional properties */ withExpandedRoles?: boolean; } export interface GetKeyRolesResponse { result: RoleView[]; error?: APIError; } export interface RemoveKeyRolesRequest { /** * The key's ID */ keyId: string; /** * The role id list separated by semicolons (;) */ roleId: 'any' | number | number[]; /** * The role name list separated by semicolons (;) */ roleName: string | string[]; } export interface RemoveKeyRolesResponse { result: number; error?: APIError; } export interface AddSubUserRequest { /** * The new subuser login for management api authentication, should be unique within the Voximplant account. The login specified is always converted to lowercase */ newSubuserName: string; /** * The new subuser password. Should be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character */ newSubuserPassword: string; /** * The role id list separated by semicolons (;) */ roleId?: 'any' | number | number[]; /** * The role name list separated by semicolons (;) */ roleName?: string | string[]; /** * Description of a new subuser */ description?: string; } export interface AddSubUserResponse { result: SubUserID; error?: APIError; } export interface GetSubUsersRequest { /** * The subuser's ID */ subuserId?: number; /** * Whether to show subuser's roles */ withRoles?: boolean; /** * The first N records are skipped in the output */ offset?: number; /** * The maximum returning record count */ count?: number; } export interface GetSubUsersResponse { result: SubUserView[]; error?: APIError; } export interface SetSubUserInfoRequest { /** * The subuser's ID */ subuserId: number; /** * The subuser old password. It is required if __new_subuser_password__ is specified */ oldSubuserPassword?: string; /** * The new user password. Should be at least 8 characters long and contain at least one uppercase and lowercase letter, one number, and one special character */ newSubuserPassword?: string; /** * The new subuser description */ description?: string; } export interface SetSubUserInfoResponse { result: number; error?: APIError; } export interface DelSubUserRequest { /** * The subuser's ID */ subuserId: number; } export interface DelSubUserResponse { result: number; error?: APIError; } export interface SetSubUserRolesRequest { /** * The subuser's ID */ subuserId: number; /** * The role id list separated by semicolons (;) */ roleId: 'any' | number | number[]; /** * The role name list separated by semicolons (;) */ roleName: string | string[]; } export interface SetSubUserRolesResponse { result: number; error?: APIError; } export interface GetSubUserRolesRequest { /** * The subuser's ID */ subuserId: number; /** * Whether to show the roles' additional properties */ withExpandedRoles?: boolean; } export interface GetSubUserRolesResponse { result: RoleView[]; error?: APIError; } export interface RemoveSubUserRolesRequest { /** * The subuser's ID */ subuserId: number; /** * The role id list separated by semicolons (;) */ roleId: 'any' | number | number[]; /** * The role name list separated by semicolons (;) */ roleName: string | string[]; /** * Whether to remove roles from all subuser keys */ force?: boolean; } export interface RemoveSubUserRolesResponse { result: number; error?: APIError; } export interface GetRolesRequest { /** * The role group */ groupName?: string; } export interface GetRolesResponse { result: RoleView[]; error?: APIError; } export interface GetRoleGroupsRequest {} export interface GetRoleGroupsResponse { result: RoleGroupView[]; error?: APIError; } export interface RoleSystemInterface { createKey: (request: CreateKeyRequest) => Promise; getKeys: (request: GetKeysRequest) => Promise; updateKey: (request: UpdateKeyRequest) => Promise; deleteKey: (request: DeleteKeyRequest) => Promise; setKeyRoles: (request: SetKeyRolesRequest) => Promise; getKeyRoles: (request: GetKeyRolesRequest) => Promise; removeKeyRoles: (request: RemoveKeyRolesRequest) => Promise; addSubUser: (request: AddSubUserRequest) => Promise; getSubUsers: (request: GetSubUsersRequest) => Promise; setSubUserInfo: (request: SetSubUserInfoRequest) => Promise; delSubUser: (request: DelSubUserRequest) => Promise; setSubUserRoles: (request: SetSubUserRolesRequest) => Promise; getSubUserRoles: (request: GetSubUserRolesRequest) => Promise; removeSubUserRoles: (request: RemoveSubUserRolesRequest) => Promise; getRoles: (request: GetRolesRequest) => Promise; getRoleGroups: (request: GetRoleGroupsRequest) => Promise; } export interface SetKeyValueItemRequest { /** * Key, up to 200 characters. A key can contain a namespace that is written before the ':' symbol, for example, test:1234. Thus, namespace 'test' can be used as a pattern in the [GetKeyValueItems](/docs/references/httpapi/keyvaluestorage#getkeyvalueitems) and [GetKeyValueKeys](/docs/references/httpapi/keyvaluestorage#getkeyvaluekeys) methods to find the keys with the same namespace.

The key should match the following regular expression: `^[a-zA-Z0-9а-яА-ЯёЁ_\-:;.#+]*$` */ key: string; /** * Value for the specified key, up to 2000 characters */ value: string; /** * Application ID */ applicationId: number; /** * Application name */ applicationName?: string; /** * Key expiry time in seconds. The value is in range of 0..7,776,000 (90 days), the default value is 30 days (2,592,000 seconds). The TTL is converted to an **expires_at** Unix timestamp field as part of the storage object. Note that one of the two parameters (ttl or expires_at) should be set */ ttl?: number; /** * Expiration date based on **ttl** (timestamp without milliseconds). Note that one of the two parameters (ttl or expires_at) should be set */ expiresAt?: number; } export interface SetKeyValueItemResponse { /** * The key-value item */ result: KeyValueItems; error?: APIError; } export interface DelKeyValueItemRequest { /** * Key, up to 200 characters */ key: string; /** * The application ID */ applicationId: number; /** * The application name */ applicationName?: string; } export interface DelKeyValueItemResponse { result: number; error?: APIError; } export interface GetKeyValueItemRequest { /** * Key, up to 200 characters */ key: string; /** * The application ID */ applicationId: number; /** * The application name */ applicationName?: string; } export interface GetKeyValueItemResponse { /** * The key-value item */ result: KeyValueItems; error?: APIError; } export interface GetKeyValueItemsRequest { /** * Namespace that keys should contain, up to 200 characters */ key: string; /** * The application ID */ applicationId: number; /** * Number of items to show per page with a maximum value of 50. Default value is 10 */ count?: number; /** * Number of items to skip (e.g. if you set count = 20 and offset = 0 the first time, the next time, offset has to be equal to 20 to skip the items shown earlier). Default value is 0 */ offset?: number; /** * The application name */ applicationName?: string; } export interface GetKeyValueItemsResponse { /** * The key-value pairs */ result: KeyValueItems; error?: APIError; } export interface GetKeyValueKeysRequest { /** * The application ID */ applicationId: number; /** * Namespace that keys should contain, up to 200 characters */ key?: string; /** * Number of items to show per page with a maximum value of 50. Default value is 10 */ count?: number; /** * Number of items to skip (e.g. if you set count = 20 and offset = 0 the first time, the next time, offset has to be equal to 20 to skip the items shown earlier). Default value is 0 */ offset?: number; /** * The application name */ applicationName?: string; } export interface GetKeyValueKeysResponse { /** * The key-value keys */ result: KeyValueKeys; error?: APIError; } export interface KeyValueStorageInterface { setKeyValueItem: (request: SetKeyValueItemRequest) => Promise; delKeyValueItem: (request: DelKeyValueItemRequest) => Promise; getKeyValueItem: (request: GetKeyValueItemRequest) => Promise; getKeyValueItems: (request: GetKeyValueItemsRequest) => Promise; getKeyValueKeys: (request: GetKeyValueKeysRequest) => Promise; } export interface GetAccountInvoicesRequest { status?: string; /** * Number of invoices to show per page. Default value is 20 */ count?: number; /** * Number of invoices to skip (e.g. if you set count = 20 and offset = 0 the first time, the next time, offset has to be equal to 20 to skip the items shown earlier). Default value is 0 */ offset?: number; } export interface GetAccountInvoicesResponse { /** * Array of the account invoices */ result: AccountInvoice; /** * Total number of invoices matching the query parameters */ totalCount: number; /** * Number of returned invoices matching the query parameters */ count: number; error?: APIError; } export interface DownloadInvoiceRequest { /** * Invoice ID */ invoiceId: number; } export interface DownloadInvoiceResponse { /** * The method returns a raw data, there is no 'file_content' parameter in fact */ fileContent: Buffer; error?: APIError; } export interface InvoicesInterface { getAccountInvoices: (request: GetAccountInvoicesRequest) => Promise; downloadInvoice: (request: DownloadInvoiceRequest) => Promise; } export interface ChildAccountsInterface {} export interface AddSecretRequest { /** * Secret name. The name should start with a Latin letter and can contain up to 64 characters, including Latin letters, digits and underscores */ secretName: string; /** * Secret value. Maximum length is 8192 characters */ secretValue: string; /** * Application ID to add the secret to. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; /** * Optional. Secret description. When processing, the length is truncated to the first 200 characters */ description?: string; } export interface AddSecretResponse { /** * Result with the added secret ID */ result: AddSecretResult[]; error?: APIError; } export interface DelSecretRequest { /** * IDs to delete. A list separated by semicolons (;). Use the 'all' value to delete all secrets */ secretId: 'any' | number | number[]; /** * Secret names to delete. List separated by semicolons (;) */ secretName: string | string[]; /** * Application ID. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; } export interface DelSecretResponse { /** * Returns 1 if the secret has been deleted successfully */ result: number; error?: APIError; } export interface GetSecretValueRequest { /** * Application ID. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; /** * Secret ID. Required unless secret_name is provided. */ secretId?: number; /** * Secret name. Required unless secret_id is provided. */ secretName?: string; } export interface GetSecretValueResponse { /** * The full secret info (with value) */ result: GetSecretValueResult[]; error?: APIError; } export interface GetSecretsRequest { /** * Application ID. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; /** * Filter by the secret name part */ secretNamePart?: string; /** * Maximum returning number of records */ count?: number; /** * First N records to be skipped in the output */ offset?: number; } export interface GetSecretsResponse { /** * Secrets list */ result: SecretListItem[]; /** * Returned secrets number */ count: number; /** * Total found secrets number */ totalCount: number; error?: APIError; } export interface SetSecretInfoRequest { /** * Application ID. Required unless application_name is provided. */ applicationId?: number; /** * Application name. Required unless application_id is provided. */ applicationName?: string; /** * Secret ID to edit. Required unless secret_name is provided. */ secretId?: number; /** * Secret name. Required unless secret_id is provided. */ secretName?: string; /** * New secret name. The name should start with a Latin letter and can contain up to 64 characters, including Latin letters, digits and underscores */ newSecretName?: string; /** * Secret value. Maximum length is 8192 characters */ secretValue?: string; /** * Secret description. When processing, the length is truncated to the first 200 characters */ description?: string; } export interface SetSecretInfoResponse { /** * Returns 1 if the secret has been updated successfully */ result: number; error?: APIError; } export interface SecretsInterface { addSecret: (request: AddSecretRequest) => Promise; delSecret: (request: DelSecretRequest) => Promise; getSecretValue: (request: GetSecretValueRequest) => Promise; getSecrets: (request: GetSecretsRequest) => Promise; setSecretInfo: (request: SetSecretInfoRequest) => Promise; }