├── .gitignore ├── LICENSE ├── NOTICE ├── README.md ├── examples ├── Accounts │ ├── changeAccountPlan_1.js │ ├── chargeAccount_1.js │ ├── chargeAccount_2.js │ ├── getAccountDocuments_1.js │ ├── getAccountInfo_1.js │ ├── getAccountPlans_1.js │ ├── getAvailablePlans_1.js │ ├── getChildrenAccounts_1.js │ ├── getChildrenAccounts_2.js │ ├── getCurrencyRate_1.js │ ├── getCurrencyRate_2.js │ ├── getCurrencyRate_3.js │ ├── getMoneyAmountToCharge_1.js │ ├── getResourcePrice_1.js │ ├── getResourcePrice_2.js │ ├── getResourcePrice_3.js │ ├── getSubscriptionPrice_1.js │ ├── getSubscriptionPrice_2.js │ ├── setAccountInfo_1.js │ ├── setAccountInfo_2.js │ ├── setAccountInfo_3.js │ ├── setAccountInfo_4.js │ └── setChildAccountInfo_1.js ├── AdminRoles │ ├── addAdminRole_1.js │ ├── delAdminRole_1.js │ ├── getAdminRoles_1.js │ ├── getAvailableAdminRoleEntries_1.js │ └── setAdminRoleInfo_1.js ├── AdminUsers │ ├── addAdminUser_1.js │ ├── attachAdminRole_1.js │ ├── delAdminUser_1.js │ ├── getAdminUsers_1.js │ └── setAdminUserInfo_1.js ├── Applications │ ├── addApplication_1.js │ ├── delApplication_1.js │ ├── delApplication_2.js │ ├── getApplications_1.js │ └── setApplicationInfo_1.js ├── AuthorizedIPs │ ├── addAuthorizedAccountIP_1.js │ ├── checkAuthorizedAccountIP_1.js │ ├── delAuthorizedAccountIP_1.js │ └── getAuthorizedAccountIPs_1.js ├── CallLists │ ├── editCallListTask_1.js │ ├── getCallListDetails_1.js │ ├── getCallLists_1.js │ ├── recoverCallList_1.js │ └── stopCallListProcessing_1.js ├── CallerIDs │ ├── activateCallerID_1.js │ ├── addCallerID_1.js │ ├── delCallerID_1.js │ ├── getCallerIDs_1.js │ ├── getCallerIDs_2.js │ └── verifyCallerID_1.js ├── DialogflowCredentials │ ├── bindDialogflowKeys_1.js │ ├── delDialogflowKey_1.js │ └── getDialogflowKeys_1.js ├── History │ ├── deleteRecord_1.js │ ├── downloadHistoryReport_1.js │ ├── getACDHistory_1.js │ ├── getAuditLogAsync_1.js │ ├── getAuditLog_1.js │ ├── getBriefCallHistory_1.js │ ├── getCallHistoryAsync_1.js │ ├── getCallHistory_1.js │ ├── getHistoryReports_1.js │ ├── getPhoneNumberReports_1.js │ ├── getTransactionHistoryAsync_1.js │ └── getTransactionHistory_1.js ├── Invoices │ ├── downloadInvoice_1.js │ └── getAccountInvoices_1.js ├── KeyValueStorage │ ├── delKeyValueItem_1.js │ ├── getKeyValueItem_1.js │ ├── getKeyValueItems_1.js │ ├── getKeyValueKeys_1.js │ └── setKeyValueItem_1.js ├── OutboundTestNumbers │ ├── activateOutboundTestPhoneNumber_1.js │ ├── addOutboundTestPhoneNumber_1.js │ ├── delOutboundTestPhoneNumber_1.js │ ├── getOutboundTestPhoneNumbers_1.js │ └── verifyOutboundTestPhoneNumber_1.js ├── PSTNBlacklist │ ├── addPstnBlackListItem_1.js │ ├── delPstnBlackListItem_1.js │ ├── getPstnBlackList_1.js │ └── setPstnBlackListItem_1.js ├── PhoneNumbers │ ├── attachPhoneNumber_1.js │ ├── attachPhoneNumber_2.js │ ├── bindPhoneNumberToApplication_1.js │ ├── deactivatePhoneNumber_1.js │ ├── getAccountPhoneNumberCountries_1.js │ ├── getActualPhoneNumberRegion_1.js │ ├── getNewPhoneNumbers_1.js │ ├── getPhoneNumberCategories_1.js │ ├── getPhoneNumberCategories_2.js │ ├── getPhoneNumberCountryStates_1.js │ ├── getPhoneNumberCountryStates_2.js │ ├── getPhoneNumberRegions_1.js │ ├── getPhoneNumbersAsync_1.js │ ├── getPhoneNumbers_1.js │ ├── isAccountPhoneNumber_1.js │ └── setPhoneNumberInfo_1.js ├── PushCredentials │ ├── addPushCredential_1.js │ ├── bindPushCredential_1.js │ ├── delPushCredential_1.js │ ├── getPushCredential_1.js │ └── setPushCredential_1.js ├── Queues │ ├── addQueue_1.js │ ├── bindUserToQueue_1.js │ ├── delQueue_1.js │ ├── getACDOperatorStatistics_1.js │ ├── getACDOperatorStatusStatistics_1.js │ ├── getACDQueueStatistics_1.js │ ├── getACDState_1.js │ ├── getQueues_1.js │ └── setQueueInfo_1.js ├── RecordStorages │ ├── getRecordStorages_1.js │ └── getRecordStorages_2.js ├── RegulationAddress │ ├── getAvailableRegulations_1.js │ ├── getCountries_1.js │ ├── getRegions_1.js │ ├── getRegulationsAddress_1.js │ ├── getZIPCodes_1.js │ └── linkRegulationAddress_1.js ├── RoleSystem │ ├── addSubUser_1.js │ ├── createKey_1.js │ ├── delSubUser_1.js │ ├── deleteKey_1.js │ ├── getKeyRoles_1.js │ ├── getKeys_1.js │ ├── getRoleGroups_1.js │ ├── getRoles_1.js │ ├── getSubUserRoles_1.js │ ├── getSubUsers_1.js │ ├── removeKeyRoles_1.js │ ├── removeSubUserRoles_1.js │ ├── setKeyRoles_1.js │ ├── setSubUserInfo_1.js │ ├── setSubUserRoles_1.js │ └── updateKey_1.js ├── Rules │ ├── addRule_1.js │ ├── delRule_1.js │ ├── delRule_2.js │ ├── delRule_3.js │ ├── getRules_1.js │ ├── reorderRules_1.js │ └── setRuleInfo_1.js ├── SIPRegistration │ ├── bindSipRegistration_1.js │ ├── bindSipRegistration_2.js │ ├── createSipRegistration_1.js │ ├── deleteSipRegistration_1.js │ ├── getSipRegistrations_1.js │ ├── updateSipRegistration_1.js │ └── updateSipRegistration_2.js ├── SIPWhiteList │ ├── addSipWhiteListItem_1.js │ ├── delSipWhiteListItem_1.js │ ├── getSipWhiteList_1.js │ └── setSipWhiteListItem_1.js ├── SMS │ ├── a2PGetSmsHistory_1.js │ ├── a2PSendSms_1.js │ ├── controlSms_1.js │ ├── controlSms_2.js │ ├── getSmsHistory_1.js │ └── sendSmsMessage_1.js ├── Scenarios │ ├── addScenario_1.js │ ├── bindScenario_1.js │ ├── delScenario_1.js │ ├── delScenario_2.js │ ├── getScenarios_1.js │ ├── reorderScenarios_1.js │ ├── setScenarioInfo_1.js │ ├── startConference_1.js │ ├── startConference_2.js │ ├── startScenarios_1.js │ └── startScenarios_2.js ├── Skills │ ├── addSkill_1.js │ ├── bindSkill_1.js │ ├── bindSkill_2.js │ ├── bindSkill_3.js │ ├── delSkill_1.js │ ├── getSkills_1.js │ └── setSkillInfo_1.js ├── SmartQueue │ ├── getSQState_1.js │ ├── getSmartQueueDayHistory_1.js │ ├── getSmartQueueRealtimeMetrics_1.js │ ├── requestSmartQueueHistory_1.js │ ├── sQ_AddQueue_1.js │ ├── sQ_AddSkill_1.js │ ├── sQ_BindAgent_1.js │ ├── sQ_BindSkill_1.js │ ├── sQ_DelQueue_1.js │ ├── sQ_DelSkill_1.js │ ├── sQ_DeleteAgentCustomStatusMapping_1.js │ ├── sQ_GetAgentCustomStatusMapping_1.js │ ├── sQ_GetAgents_1.js │ ├── sQ_GetQueues_1.js │ ├── sQ_GetSkills_1.js │ ├── sQ_SetAgentCustomStatusMapping_1.js │ ├── sQ_SetAgentInfo_1.js │ ├── sQ_SetQueueInfo_1.js │ ├── sQ_SetSkillInfo_1.js │ ├── sQ_UnbindAgent_1.js │ └── sQ_UnbindSkill_1.js └── Users │ ├── addUser_1.js │ ├── delUser_1.js │ ├── delUser_2.js │ ├── getUsers_1.js │ └── setUserInfo_1.js ├── package.json ├── src ├── Enums.ts ├── Interfaces.ts ├── Structures.ts ├── TypeTransformer.ts └── index.ts ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | .npmrc 3 | node_modules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | voximplant/apiclient-nodejs 2 | 3 | Copyright 2019-2025 Voximplant, Inc. All Rights Reserved 4 | 5 | Licensed under the Apache License, Version 2.0. (the "License"). 6 | You may not use the file except in compliance with the License. 7 | You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Voximplant API client library 2 | 3 | #### Version 4.2.0 4 | 5 | ## Prerequisites 6 | 7 | In order to use Voximplant Node.js SDK, you need the following: 8 | 9 | 1. A developer account. If you don't have one, [sign up here](https://voximplant.com/sign-up/). 10 | 1. A private API key. There are 2 options to obtain it: 11 | 1. Generate it in the [Voximplant Control panel](https://manage.voximplant.com/settings/service_accounts) 12 | 1. Call the [CreateKey](https://voximplant.com/docs/references/httpapi/managing_role_system#createkey) HTTP API 13 | method with the 14 | specified [authentication parameters](https://voximplant.com/docs/references/httpapi/auth_parameters). You'll 15 | receive a response with the **result** field in it. Save the **result** value in a file (since we don't store the 16 | keys, save it securely on your side). 17 | 1. Node.js >= 11 18 | 19 | ## How to use 20 | 21 | Go to your project folder and install the SDK using `npm`: 22 | 23 | ```bash 24 | npm i --save @voximplant/apiclient-nodejs 25 | ``` 26 | 27 | Then import the SDK in your script 28 | 29 | ```js 30 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 31 | ``` 32 | 33 | Next, specify the path to the file with the **result** value either in the constructor or using the environment. 34 | 35 | **constructor**: 36 | 37 | ```js 38 | const client = new VoximplantApiClient('/path/to/credentials.json'); 39 | ``` 40 | 41 | **env**: 42 | 43 | ```bash 44 | export VOXIMPLANT_CREDENTIALS=/path/to/credentials.json 45 | ``` 46 | 47 | ## Examples 48 | 49 | ### Start a scenario 50 | 51 | ```js 52 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 53 | const client = new VoximplantApiClient(); 54 | client.onReady = function () { 55 | // Start the scripts from the account. 56 | client.Scenarios.startScenarios({ruleId: '1', scriptCustomData: 'mystr'}) 57 | .then((ev) => console.log(ev)) 58 | .catch((err) => console.error(err)); 59 | }; 60 | ``` 61 | 62 | ### Send an SMS 63 | 64 | ```js 65 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 66 | const client = new VoximplantApiClient(); 67 | client.onReady = function () { 68 | // Send the SMS message with text "Test message" from the phone number 447443332211 to the phone number 447443332212. 69 | client.SMS.sendSmsMessage({ 70 | source: '447443332211', 71 | destination: '447443332212', 72 | smsBody: 'Test message', 73 | }) 74 | .then((ev) => console.log(ev)) 75 | .catch((err) => console.error(err)); 76 | }; 77 | ``` 78 | 79 | ### Get a call history item 80 | 81 | ```js 82 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 83 | const client = new VoximplantApiClient(); 84 | client.onReady = function () { 85 | // Get the first call session history record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC 86 | client.History.getCallHistory({ 87 | fromDate: new Date('2012-01-01 00:00:00 GMT'), 88 | toDate: new Date('2014-01-01 00:00:00 GMT'), 89 | count: '1', 90 | timezone: 'Etc/GMT', 91 | }) 92 | .then((ev) => console.log(ev)) 93 | .catch((err) => console.error(err)); 94 | }; 95 | ``` 96 | -------------------------------------------------------------------------------- /examples/Accounts/changeAccountPlan_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Change the IM plan. 5 | client.Accounts.changeAccountPlan({ planType: 'IM', planSubscriptionTemplateId: '3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/chargeAccount_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Charge the frozen phone number: 79993330011. 5 | client.Accounts.chargeAccount({ phoneNumber: '79993330011' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/chargeAccount_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Charge the all frozen phone numbers. 5 | client.Accounts.chargeAccount({ phoneNumber: 'all' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getAccountDocuments_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.Accounts.getAccountDocuments({ withDetails: 'true' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getAccountInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the account's info. 5 | client.Accounts.getAccountInfo({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getAccountPlans_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all account plans with packages. 5 | client.Accounts.getAccountPlans({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getAvailablePlans_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get allowed IM plans to change. 5 | client.Accounts.getAvailablePlans({ planType: 'IM' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getChildrenAccounts_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the all children. 5 | client.Accounts.getChildrenAccounts({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getChildrenAccounts_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the particular child. 5 | client.Accounts.getChildrenAccounts({ childAccountEmail: 'mychild@gmail.com' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getCurrencyRate_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the current currency rate: RUR/USD. 5 | client.Accounts.getCurrencyRate({ currency: 'RUR' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getCurrencyRate_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the old currency rate: RUR/USD. 5 | client.Accounts.getCurrencyRate({ currency: 'RUR', date: new Date('2014-03-17 GMT') }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getCurrencyRate_3.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the current currency rates: RUR/USD and EUR/USD. 5 | client.Accounts.getCurrencyRate({ currency: 'RUR;EUR' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getMoneyAmountToCharge_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the recommended money amount to charge in USD. 5 | client.Accounts.getMoneyAmountToCharge({ currency: 'USD' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getResourcePrice_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // 5 | client.Accounts.getResourcePrice({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getResourcePrice_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // 5 | client.Accounts.getResourcePrice({ resourceType: 'VOIPIN;VOIPOUT' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getResourcePrice_3.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the price to call to the phone number 79263332211. 5 | client.Accounts.getResourcePrice({ resourceType: 'PSTNOUT', resourceParam: '79263332211' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getSubscriptionPrice_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the all subscription template prices. 5 | client.Accounts.getSubscriptionPrice({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/getSubscriptionPrice_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the SIP registration subscription template. 5 | client.Accounts.getSubscriptionPrice({ subscriptionTemplateType: 'SIP_REGISTRATION' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/setAccountInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Change the account's password. 5 | client.Accounts.setAccountInfo({ newAccountPassword: '7654321' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/setAccountInfo_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Change the account's email. 5 | client.Accounts.setAccountInfo({ newAccountEmail: 'superman@mail.ru' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Accounts/setAccountInfo_3.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Set the billing address. 5 | client.Accounts.setAccountInfo({ 6 | billingAddressName: 'Acme_Corp', 7 | billingAddressCountryCode: 'US', 8 | billingAddressZip: '94086', 9 | billingAddressAddress: '900, Kifer Road, Sunnyvale, CA', 10 | billingAddressPhone: '14445557777', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/Accounts/setAccountInfo_4.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Set the notification settings. 5 | client.Accounts.setAccountInfo({ 6 | languageCode: 'en', 7 | location: 'GMT-8', 8 | minBalanceToNotify: '1.50', 9 | tariffChangingNotifications: 'true', 10 | newsNotifications: 'true', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/Accounts/setChildAccountInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Disable the child account. 5 | client.Accounts.setChildAccountInfo({ childAccountId: '1321', active: 'false' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AdminRoles/addAdminRole_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new admin role with the GetAccountInfo and GetCallHistory permissions. 5 | client.AdminRoles.addAdminRole({ 6 | adminRoleName: 'read_only', 7 | allowedEntries: 'GetAccountInfo;GetCallHistory', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/AdminRoles/delAdminRole_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the admin role. 5 | client.AdminRoles.delAdminRole({ adminRoleId: '10' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AdminRoles/getAdminRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two admin roles attached to the admin_user_id=22. 5 | client.AdminRoles.getAdminRoles({ 6 | withEntries: 'true', 7 | showingAdminUserId: '11', 8 | includedAdminUserId: '22', 9 | count: '2', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/AdminRoles/getAvailableAdminRoleEntries_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the all available admin role entries. 5 | client.AdminRoles.getAvailableAdminRoleEntries({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AdminRoles/setAdminRoleInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Allow the all permissions except the DelUser and DelApplication. 5 | client.AdminRoles.setAdminRoleInfo({ 6 | adminRoleId: '1', 7 | entryModificationMode: 'set', 8 | allowedEntries: 'all', 9 | deniedEntries: 'DelUser;DelApplication', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/AdminUsers/addAdminUser_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new admin user. 5 | client.AdminUsers.addAdminUser({ 6 | newAdminUserName: 'Overseer_Campbell', 7 | adminUserDisplayName: 'Overseer_Campbell', 8 | newAdminUserPassword: '1234567', 9 | adminRoleId: '1', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/AdminUsers/attachAdminRole_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the all admin users with the admin roles 1, 2 and 3. 5 | client.AdminUsers.attachAdminRole({ requiredAdminUserId: 'all', adminRoleId: '1;2;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AdminUsers/delAdminUser_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the admin user. 5 | client.AdminUsers.delAdminUser({ requiredAdminUserId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AdminUsers/getAdminUsers_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two first admin users. 5 | client.AdminUsers.getAdminUsers({ withAccessEntries: 'true', count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AdminUsers/setAdminUserInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Edit the admin user password. 5 | client.AdminUsers.setAdminUserInfo({ requiredAdminUserId: '1', newAdminUserPassword: '7654321' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Applications/addApplication_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new application. 5 | client.Applications.addApplication({ applicationName: 'myapp1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Applications/delApplication_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the application 1 and 3. 5 | client.Applications.delApplication({ applicationId: '1;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Applications/delApplication_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the all applications. 5 | client.Applications.delApplication({ applicationId: 'all' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Applications/getApplications_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two applications, but skip the first one. 5 | client.Applications.getApplications({ offset: '1', count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Applications/setApplicationInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Change the application name. 5 | client.Applications.setApplicationInfo({ applicationId: '1', applicationName: 'myapp11' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AuthorizedIPs/addAuthorizedAccountIP_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add the 92.255.220.0/24 network to the white list. 5 | client.AuthorizedIPs.addAuthorizedAccountIP({ authorizedIp: '92.255.220.0/24' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AuthorizedIPs/checkAuthorizedAccountIP_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.AuthorizedIPs.checkAuthorizedAccountIP({ authorizedIp: '92.255.220.0/24' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AuthorizedIPs/delAuthorizedAccountIP_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the 92.255.220.0/24 network from all the lists. 5 | client.AuthorizedIPs.delAuthorizedAccountIP({ authorizedIp: '92.255.220.0/24' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/AuthorizedIPs/getAuthorizedAccountIPs_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Show the all items. 5 | client.AuthorizedIPs.getAuthorizedAccountIPs({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallLists/editCallListTask_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Set attempts_left, start_at, and custom_data the task with id=1 in the call list with id=1. 5 | client.CallLists.editCallListTask({ 6 | listId: '1', 7 | taskId: '1', 8 | attemptsLeft: '2', 9 | startAt: new Date('2023-11-13 18:00:00 GMT'), 10 | customData: '{"phone":"555111222333","name":"Mr.Fate"}', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/CallLists/getCallListDetails_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all lists registered by user. 5 | client.CallLists.getCallListDetails({ listId: '1', output: 'json' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallLists/getCallLists_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all lists registered by user. 5 | client.CallLists.getCallLists({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallLists/recoverCallList_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Restore list with id = 1. 5 | client.CallLists.recoverCallList({ listId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallLists/stopCallListProcessing_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Cancel list with id = 1. 5 | client.CallLists.stopCallListProcessing({ listId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallerIDs/activateCallerID_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Activate the callerID by the verification code. 5 | client.CallerIDs.activateCallerID({ calleridId: '1', verificationCode: '12345' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallerIDs/addCallerID_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.CallerIDs.addCallerID({ calleridNumber: '74953331122' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallerIDs/delCallerID_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the callerID 1. 5 | client.CallerIDs.delCallerID({ calleridId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallerIDs/getCallerIDs_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the two callerIDs. 5 | client.CallerIDs.getCallerIDs({ count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallerIDs/getCallerIDs_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Try to find the 79997770044 CID. 5 | client.CallerIDs.getCallerIDs({ calleridNumber: '79997770044' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/CallerIDs/verifyCallerID_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Verify the callerID 1. 5 | client.CallerIDs.verifyCallerID({ calleridId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/DialogflowCredentials/bindDialogflowKeys_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind a Dialogflow key to the application. 5 | client.DialogflowCredentials.bindDialogflowKeys({ dialogflowKeyId: '1', applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/DialogflowCredentials/delDialogflowKey_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Remove key. 5 | client.DialogflowCredentials.delDialogflowKey({ dialogflowKeyId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/DialogflowCredentials/getDialogflowKeys_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get push credentials. 5 | client.DialogflowCredentials.getDialogflowKeys({ dialogflowKeyId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/History/deleteRecord_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Try remove link with record_id is 1. 5 | client.History.deleteRecord({ recordId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/History/downloadHistoryReport_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Download the completed history report with id = 1. 5 | client.History.downloadHistoryReport({ historyReportId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/History/getACDHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the two ACD session history records from the 2012-01-01 00:00:00 to the 2014-04-01 00:00:00. 5 | client.History.getACDHistory({ 6 | fromDate: new Date('2012-01-01 00:00:00 GMT'), 7 | toDate: new Date('2014-01-01 00:00:00 GMT'), 8 | withEvents: 'true', 9 | count: '2', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/History/getAuditLogAsync_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the three log items from the 2018-02-01 00:00:00 to the 2018-03-01 00:00:00 and filter. 5 | client.History.getAuditLogAsync({ 6 | fromDate: new Date('2018-02-01 00:00:00 GMT'), 7 | toDate: new Date('2018-03-01 00:00:00 GMT'), 8 | filteredCmd: 'BindSkill;AddSkill;DelSkill', 9 | advancedFilters: '152', 10 | output: 'csv', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/History/getAuditLog_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the three log items from the 2018-02-01 00:00:00 to the 2018-03-01 00:00:00 and filter. 5 | client.History.getAuditLog({ 6 | fromDate: new Date('2018-02-01 00:00:00 GMT'), 7 | toDate: new Date('2018-03-01 00:00:00 GMT'), 8 | filteredCmd: 'BindSkill;AddSkill;DelSkill', 9 | advancedFilters: '152', 10 | count: '3', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/History/getBriefCallHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the brief call session history from the 2020-02-25 00:00:00 UTC to the 2020-02-26 00:00:00 UTC. 5 | client.History.getBriefCallHistory({ 6 | fromDate: new Date('2020-02-25 00:00:00 GMT'), 7 | toDate: new Date('2020-02-26 00:00:00 GMT'), 8 | timezone: 'Etc/GMT', 9 | output: 'cvs', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/History/getCallHistoryAsync_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the first call session history record with calls and record URLs from the 2020-02-25 00:00:00 UTC to the 2020-02-26 00:00:00 UTC. 5 | client.History.getCallHistoryAsync({ 6 | fromDate: new Date('2020-02-25 00:00:00 GMT'), 7 | toDate: new Date('2020-02-26 00:00:00 GMT'), 8 | timezone: 'Etc/GMT', 9 | withCalls: 'true', 10 | withRecords: 'true', 11 | output: 'csv', 12 | }) 13 | .then((ev) => console.log(ev)) 14 | .catch((err) => console.error(err)); 15 | }; 16 | -------------------------------------------------------------------------------- /examples/History/getCallHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the first call session history record with calls and record URLs from the 2020-02-25 00:00:00 UTC to the 2020-02-26 00:00:00 UTC. 5 | client.History.getCallHistory({ 6 | fromDate: new Date('2020-02-25 00:00:00 GMT'), 7 | toDate: new Date('2020-02-26 00:00:00 GMT'), 8 | count: '1', 9 | timezone: 'Etc/GMT', 10 | withCalls: 'true', 11 | withRecords: 'true', 12 | }) 13 | .then((ev) => console.log(ev)) 14 | .catch((err) => console.error(err)); 15 | }; 16 | -------------------------------------------------------------------------------- /examples/History/getHistoryReports_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all the reports. 5 | client.History.getHistoryReports({ historyType: 'all' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/History/getPhoneNumberReports_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all the reports. 5 | client.History.getPhoneNumberReports({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/History/getTransactionHistoryAsync_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the three transactions record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC with the 'gift' or 'money_distribution' types. 5 | client.History.getTransactionHistoryAsync({ 6 | fromDate: new Date('2012-01-01 00:00:00 GMT'), 7 | toDate: new Date('2014-01-01 00:00:00 GMT'), 8 | transactionType: 'gift;money_distribution', 9 | timezone: 'Etc/GMT', 10 | output: 'csv', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/History/getTransactionHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the three transactions record from the 2012-01-01 00:00:00 UTC to the 2014-01-01 00:00:00 UTC with the 'gift' or 'money_distribution' types. 5 | client.History.getTransactionHistory({ 6 | fromDate: new Date('2012-01-01 00:00:00 GMT'), 7 | toDate: new Date('2014-01-01 00:00:00 GMT'), 8 | count: '3', 9 | transactionType: 'gift;money_distribution', 10 | timezone: 'Etc/GMT', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/Invoices/downloadInvoice_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Download the invoice with id = 1. 5 | client.Invoices.downloadInvoice({ invoiceId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Invoices/getAccountInvoices_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // GetAccountInvoices example. 5 | client.Invoices.getAccountInvoices({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/KeyValueStorage/delKeyValueItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // DelKeyValueItem example. 5 | client.KeyValueStorage.delKeyValueItem({ applicationId: '1', key: 'key1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/KeyValueStorage/getKeyValueItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // GetKeyValueItem example. 5 | client.KeyValueStorage.getKeyValueItem({ applicationId: '1', key: 'key1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/KeyValueStorage/getKeyValueItems_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // GetKeyValueItems example. 5 | client.KeyValueStorage.getKeyValueItems({ applicationId: '1', key: 'test' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/KeyValueStorage/getKeyValueKeys_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // GetKeyValueKeys example. 5 | client.KeyValueStorage.getKeyValueKeys({ applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/KeyValueStorage/setKeyValueItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // SetKeyValueItem example. 5 | client.KeyValueStorage.setKeyValueItem({ 6 | applicationId: '1', 7 | key: 'key1', 8 | value: 'value1', 9 | ttl: '864000', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/OutboundTestNumbers/activateOutboundTestPhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Activate the personal phone number by the verification code. 5 | client.OutboundTestNumbers.activateOutboundTestPhoneNumber({ verificationCode: '12345' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/OutboundTestNumbers/addOutboundTestPhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a personal phone number. 5 | client.OutboundTestNumbers.addOutboundTestPhoneNumber({ phoneNumber: '12223334444' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/OutboundTestNumbers/delOutboundTestPhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the phone number. 5 | client.OutboundTestNumbers.delOutboundTestPhoneNumber({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/OutboundTestNumbers/getOutboundTestPhoneNumbers_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the phone number info. 5 | client.OutboundTestNumbers.getOutboundTestPhoneNumbers({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/OutboundTestNumbers/verifyOutboundTestPhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the verification code. 5 | client.OutboundTestNumbers.verifyOutboundTestPhoneNumber({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PSTNBlacklist/addPstnBlackListItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.PSTNBlacklist.addPstnBlackListItem({ pstnBlacklistPhone: '123456789' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PSTNBlacklist/delPstnBlackListItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.PSTNBlacklist.delPstnBlackListItem({ pstnBlacklistId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PSTNBlacklist/getPstnBlackList_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.PSTNBlacklist.getPstnBlackList({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PSTNBlacklist/setPstnBlackListItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.PSTNBlacklist.setPstnBlackListItem({ 6 | pstnBlacklistPhone: '123456789', 7 | pstnBlacklistId: '1', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/attachPhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Attach a US phone number to the account 1. 5 | client.PhoneNumbers.attachPhoneNumber({ 6 | countryCode: 'US', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | countryState: 'CA', 9 | phoneRegionId: '1100', 10 | phoneCount: '1', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/attachPhoneNumber_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Attach the '74953332211' and '74953332299' phone numbers to the account 1. 5 | client.PhoneNumbers.attachPhoneNumber({ 6 | countryCode: 'RU', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | phoneRegionId: '4', 9 | phoneNumber: '74953332211;74953332211', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/bindPhoneNumberToApplication_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the phone 1 to the application 1. 5 | client.PhoneNumbers.bindPhoneNumberToApplication({ phoneId: '1', applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/deactivatePhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Deactivate the phone 1. 5 | client.PhoneNumbers.deactivatePhoneNumber({ phoneId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getAccountPhoneNumberCountries_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the countries where the account with id = 1 has phone numbers attached to the application with id = 1. 5 | client.PhoneNumbers.getAccountPhoneNumberCountries({ applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getActualPhoneNumberRegion_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the Germany region of the phone numbers. 5 | client.PhoneNumbers.getActualPhoneNumberRegion({ 6 | countryCode: 'DE', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | phoneRegionId: '1', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getNewPhoneNumbers_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the two new fixed Russian phone numbers at max. 5 | client.PhoneNumbers.getNewPhoneNumbers({ 6 | countryCode: 'RU', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | phoneRegionId: '1', 9 | count: '2', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumberCategories_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the all phone number categories. 5 | client.PhoneNumbers.getPhoneNumberCategories({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumberCategories_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the phone number categories in Russia. 5 | client.PhoneNumbers.getPhoneNumberCategories({ countryCode: 'RU' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumberCountryStates_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the USA states. 5 | client.PhoneNumbers.getPhoneNumberCountryStates({ 6 | countryCode: 'US', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumberCountryStates_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the AL (Alabama) state info. 5 | client.PhoneNumbers.getPhoneNumberCountryStates({ 6 | countryCode: 'US', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | countryState: 'AL', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumberRegions_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the Russian regions of the phone numbers. 5 | client.PhoneNumbers.getPhoneNumberRegions({ countryCode: 'RU', phoneCategoryName: 'GEOGRAPHIC' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumbersAsync_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two attached phone numbers. 5 | client.PhoneNumbers.getPhoneNumbersAsync({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/getPhoneNumbers_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two attached phone numbers. 5 | client.PhoneNumbers.getPhoneNumbers({ count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/isAccountPhoneNumber_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Check if the phone number belongs to the account. 5 | client.PhoneNumbers.isAccountPhoneNumber({ phoneNumber: '79991234567' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PhoneNumbers/setPhoneNumberInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Enable the auto charging. 5 | client.PhoneNumbers.setPhoneNumberInfo({ phoneId: '1', autoCharge: 'true' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PushCredentials/addPushCredential_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add new Google credentials. 5 | client.PushCredentials.addPushCredential({ pushProviderName: 'GOOGLE' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PushCredentials/bindPushCredential_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the push credential to the application. 5 | client.PushCredentials.bindPushCredential({ pushCredentialId: '1', applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PushCredentials/delPushCredential_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Remove credentials. 5 | client.PushCredentials.delPushCredential({ pushCredentialId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PushCredentials/getPushCredential_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get push credentials. 5 | client.PushCredentials.getPushCredential({ pushCredentialId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/PushCredentials/setPushCredential_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Modify credentials. 5 | client.PushCredentials.setPushCredential({ pushCredentialId: '1', certPassword: '1234567' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Queues/addQueue_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new ACD queue for the application 1. 5 | client.Queues.addQueue({ applicationId: '1', acdQueueName: 'myqueue' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Queues/bindUserToQueue_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind three users to one queue. 5 | client.Queues.bindUserToQueue({ 6 | applicationId: '1', 7 | userId: '12;987;456', 8 | acdQueueName: 'myqueue', 9 | bind: 'true', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/Queues/delQueue_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the ACD queue 1. 5 | client.Queues.delQueue({ acdQueueId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Queues/getACDOperatorStatistics_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get AC and TT statistics for two operators and the queue from the specified date. 5 | client.Queues.getACDOperatorStatistics({ 6 | fromDate: new Date('2021-04-08 00:00:00 GMT'), 7 | toDate: new Date('2021-04-10 00:00:00 GMT'), 8 | acdQueueId: '54', 9 | userId: '1768;1769', 10 | report: 'AC;TT', 11 | aggregation: 'day', 12 | }) 13 | .then((ev) => console.log(ev)) 14 | .catch((err) => console.error(err)); 15 | }; 16 | -------------------------------------------------------------------------------- /examples/Queues/getACDOperatorStatusStatistics_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get statistics for the 'READY' and 'ONLINE' statuses of all operators; grouped by operators. 5 | client.Queues.getACDOperatorStatusStatistics({ 6 | fromDate: new Date('2019-05-20 11:00:00 GMT'), 7 | toDate: new Date('2019-05-20 13:00:00 GMT'), 8 | acdStatus: 'READY;ONLINE', 9 | userId: 'all', 10 | aggregation: 'hour', 11 | group: 'user', 12 | }) 13 | .then((ev) => console.log(ev)) 14 | .catch((err) => console.error(err)); 15 | }; 16 | -------------------------------------------------------------------------------- /examples/Queues/getACDQueueStatistics_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get WT and TT statistics for the queue from the specified date. 5 | client.Queues.getACDQueueStatistics({ 6 | fromDate: new Date('2021-04-08 00:00:00 GMT'), 7 | toDate: new Date('2021-04-10 00:00:00 GMT'), 8 | acdQueueId: '54', 9 | report: 'WT;TT', 10 | aggregation: 'day', 11 | }) 12 | .then((ev) => console.log(ev)) 13 | .catch((err) => console.error(err)); 14 | }; 15 | -------------------------------------------------------------------------------- /examples/Queues/getACDState_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the state of the queue 1. 5 | client.Queues.getACDState({ acdQueueId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Queues/getQueues_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the two queues. 5 | client.Queues.getQueues({ count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Queues/setQueueInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Change the queue name. 5 | client.Queues.setQueueInfo({ acdQueueId: '1', newAcdQueueName: 'support' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RecordStorages/getRecordStorages_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all record storages. 5 | client.RecordStorages.getRecordStorages({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RecordStorages/getRecordStorages_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the record storage with name = ru1. 5 | client.RecordStorages.getRecordStorages({ recordStorageName: 'ru1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RegulationAddress/getAvailableRegulations_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Search available regulation address. 5 | client.RegulationAddress.getAvailableRegulations({ 6 | countryCode: 'DE', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | phoneRegionCode: '643', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/RegulationAddress/getCountries_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get Germany. 5 | client.RegulationAddress.getCountries({ countryCode: 'DE' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RegulationAddress/getRegions_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get regions with city AACHEN. 5 | client.RegulationAddress.getRegions({ 6 | countryCode: 'DE', 7 | phoneCategoryName: 'GEOGRAPHIC', 8 | cityName: 'AACHEN', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/RegulationAddress/getRegulationsAddress_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Search regulation address with ID = 1. 5 | client.RegulationAddress.getRegulationsAddress({ regulationAddressId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RegulationAddress/getZIPCodes_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Search for zip codes in Germany. 5 | client.RegulationAddress.getZIPCodes({ countryCode: 'DE', count: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RegulationAddress/linkRegulationAddress_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Link the regulation address to a phone number. 5 | client.RegulationAddress.linkRegulationAddress({ regulationAddressId: '1', phoneId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/addSubUser_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Create a new subuser for account_id = 1. 5 | client.RoleSystem.addSubUser({ newSubuserName: 'John_McClane', newSubuserPassword: 'pssw0rd' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/createKey_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Create a key pair. 5 | client.RoleSystem.createKey({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/delSubUser_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the subuser with id = 12 from account_id = 1. 5 | client.RoleSystem.delSubUser({ subuserId: '12' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/deleteKey_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.RoleSystem.deleteKey({ keyId: 'ab81c66e-570e-4446-9af9-105269dfafca' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/getKeyRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get roles of the key. 5 | client.RoleSystem.getKeyRoles({ keyId: 'ab81c50e-573e-4446-9af9-105269dfafca' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/getKeys_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get keys info of the specified account. 5 | client.RoleSystem.getKeys({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/getRoleGroups_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all role groups. 5 | client.RoleSystem.getRoleGroups({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/getRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all roles. 5 | client.RoleSystem.getRoles({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/getSubUserRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get subuser's roles. 5 | client.RoleSystem.getSubUserRoles({ subuserId: '12' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/getSubUsers_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get subusers info. 5 | client.RoleSystem.getSubUsers({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/removeKeyRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Remove the roles 1, 2, 3 from the key. 5 | client.RoleSystem.removeKeyRoles({ 6 | keyId: 'ab81c90e-543e-4446-9af9-105269dfafca', 7 | roleId: '1;2;3', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/RoleSystem/removeSubUserRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Remove roles 1,2,3 from the subuser with id = 12. 5 | client.RoleSystem.removeSubUserRoles({ subuserId: '12', roleId: '1;2;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/setKeyRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Set roles 1, 2, 3 for the key. 5 | client.RoleSystem.setKeyRoles({ keyId: 'ab81c76e-573e-4046-9af9-105269dfafca', roleId: '1;2;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/setSubUserInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Edit the password and description for the subuser with id = 12 from account_id = 1. 5 | client.RoleSystem.setSubUserInfo({ 6 | subuserId: '12', 7 | oldSubuserPassword: 'old_test_password', 8 | newSubuserPassword: 'test_pass', 9 | description: 'test_desc', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/RoleSystem/setSubUserRoles_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add the roles 1, 2, 3 to the subuser with id = 12. 5 | client.RoleSystem.setSubUserRoles({ subuserId: '12', roleId: '1;2;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/RoleSystem/updateKey_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Create a new subuser for account_id = 1. 5 | client.RoleSystem.updateKey({ 6 | keyId: 'ab98c70e-573e-4446-9af9-105269dfafca', 7 | description: 'test_desc', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/Rules/addRule_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new rule. 5 | client.Rules.addRule({ applicationId: '1', ruleName: 'allowall', rulePattern: '.*' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Rules/delRule_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the rule 1 and 3. 5 | client.Rules.delRule({ ruleId: '1;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Rules/delRule_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the all rules from the application 1. 5 | client.Rules.delRule({ ruleId: 'all', applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Rules/delRule_3.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the all rules from the all applications. 5 | client.Rules.delRule({ ruleId: 'all', applicationId: 'all' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Rules/getRules_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the first rule for the template 74951234567. 5 | client.Rules.getRules({ 6 | applicationId: '1', 7 | template: '74951234567', 8 | withScenarios: 'true', 9 | count: '1', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/Rules/reorderRules_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Set the rule selection order: 1, 7, 3. 5 | client.Rules.reorderRules({ ruleId: '1;7;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Rules/setRuleInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Deny all. 5 | client.Rules.setRuleInfo({ ruleId: '1', ruleName: 'denyall', rulePatternExclude: '.*' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPRegistration/bindSipRegistration_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind SIP registration with id 1 to application with id 123. 5 | client.SIPRegistration.bindSipRegistration({ 6 | applicationId: '123', 7 | sipRegistrationId: '1', 8 | bind: 'true', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SIPRegistration/bindSipRegistration_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Unbind the user with id 123 from all SIP registrations. 5 | client.SIPRegistration.bindSipRegistration({ userId: '123', bind: 'false' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPRegistration/createSipRegistration_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Create SIP registration. 5 | client.SIPRegistration.createSipRegistration({ sipUsername: 'JohnGalt', proxy: 'localhost' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPRegistration/deleteSipRegistration_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete SIP registration with id 1. 5 | client.SIPRegistration.deleteSipRegistration({ sipRegistrationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPRegistration/getSipRegistrations_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all active sip registrations. 5 | client.SIPRegistration.getSipRegistrations({}) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPRegistration/updateSipRegistration_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Update SIP registration with id 1. 5 | client.SIPRegistration.updateSipRegistration({ 6 | sipRegistrationId: '1', 7 | sipUsername: 'HedyLamarr', 8 | outboundProxy: '12', 9 | password: '123456', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/SIPRegistration/updateSipRegistration_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind SIP registration with id 1 to the application with id 123. 5 | client.SIPRegistration.updateSipRegistration({ sipRegistrationId: '1', applicationId: '123' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPWhiteList/addSipWhiteListItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.SIPWhiteList.addSipWhiteListItem({ sipWhitelistNetwork: '192.168.1.5/16' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPWhiteList/delSipWhiteListItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.SIPWhiteList.delSipWhiteListItem({ sipWhitelistId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPWhiteList/getSipWhiteList_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two networks, but skip the first one. 5 | client.SIPWhiteList.getSipWhiteList({ offset: '1', count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SIPWhiteList/setSipWhiteListItem_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // undefined 5 | client.SIPWhiteList.setSipWhiteListItem({ 6 | sipWhitelistId: '1', 7 | sipWhitelistNetwork: '192.168.1.5/16', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/SMS/a2PGetSmsHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get messages that had been sent to number 12345678222 starting from March 1, 2019. Number of resulting rows is limited to 2. 5 | client.SMS.a2PGetSmsHistory({ 6 | destinationNumber: '12345678222', 7 | fromDate: new Date('2019-03-01 00:00:00 GMT'), 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/SMS/a2PSendSms_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Send the SMS message with the text "Test message" from the phone number 447443332211 to the phone numbers 447443332212 and 447443332213. 5 | client.SMS.a2PSendSms({ 6 | srcNumber: '447443332211', 7 | dstNumbers: '447443332212;447443332213', 8 | text: 'Test message', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SMS/controlSms_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Enable work with SMS for phone number 447443332211. 5 | client.SMS.controlSms({ phoneNumber: '447443332211', command: 'enable' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SMS/controlSms_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Disable work with SMS for phone number 447443332211. 5 | client.SMS.controlSms({ phoneNumber: '447443332211', command: 'disable' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SMS/getSmsHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get messages that had been sent to number 12345678222 starting from March 1, 2019. Number of resulting rows is limited to 2. 5 | client.SMS.getSmsHistory({ 6 | destinationNumber: '12345678222', 7 | fromDate: new Date('2019-03-01 00:00:00 GMT'), 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/SMS/sendSmsMessage_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Send the SMS message with the text "Test message" from the phone number 447443332211 to the phone number 447443332212. 5 | client.SMS.sendSmsMessage({ 6 | source: '447443332211', 7 | destination: '447443332212', 8 | smsBody: 'Test message', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/Scenarios/addScenario_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new scenario: var s='hello'; 5 | client.Scenarios.addScenario({ scenarioName: 'call_scenario', scenarioScript: 'var s="hello";' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/bindScenario_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the scenarios 1, 2 and 3 with the rule 1. 5 | client.Scenarios.bindScenario({ scenarioId: '1;2;3', ruleId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/delScenario_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the scenario 1 and 3. 5 | client.Scenarios.delScenario({ scenarioId: '1;3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/delScenario_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the all scenarios. 5 | client.Scenarios.delScenario({ scenarioId: 'all' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/getScenarios_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two scenarios, but skip the first one. 5 | client.Scenarios.getScenarios({ offset: '1', count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/reorderScenarios_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Set the scenario loading order: 17, 15, 20. 5 | client.Scenarios.reorderScenarios({ ruleId: '2', scenarioId: '17;15;20' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/setScenarioInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new scenario: var s='hello'; 5 | client.Scenarios.setScenarioInfo({ 6 | scenarioId: '1', 7 | scenarioName: 'call_scenario', 8 | scenarioScript: 'var s="hello world";', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/Scenarios/startConference_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Start the conference from the account. 5 | client.Scenarios.startConference({ 6 | conferenceName: 'boss', 7 | ruleId: '1', 8 | scriptCustomData: 'mystr', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/Scenarios/startConference_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Start the conference from the user 1. 5 | client.Scenarios.startConference({ 6 | conferenceName: 'boss', 7 | ruleId: '1', 8 | scriptCustomData: 'mystr', 9 | userId: '1', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/Scenarios/startScenarios_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Start the scripts from the account. 5 | client.Scenarios.startScenarios({ ruleId: '1', scriptCustomData: 'mystr' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Scenarios/startScenarios_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Start the scripts from the user 1. 5 | client.Scenarios.startScenarios({ ruleId: '1', scriptCustomData: 'mystr', userId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/addSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new skill. 5 | client.Skills.addSkill({ skillName: 'English' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/bindSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the skills 1, 5 to the users 5, 6, 10. 5 | client.Skills.bindSkill({ skillId: '1;3', userId: '5;6;10' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/bindSkill_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the all skill to the queues 11, 12. 5 | client.Skills.bindSkill({ skillId: 'all', acdQueueId: '11;12', bind: 'true' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/bindSkill_3.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Unbind the skills 1, 6 from the all users and the queues 11, 12. 5 | client.Skills.bindSkill({ skillId: '1;6', acdQueueId: '11;12', userId: 'all' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/delSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the skill 1. 5 | client.Skills.delSkill({ skillId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/getSkills_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two skills, but skip the first one. 5 | client.Skills.getSkills({ offset: '1', count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Skills/setSkillInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Change the skill name. 5 | client.Skills.setSkillInfo({ skillId: '1', newSkillName: 'Support' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/getSQState_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the current state of the SmartQueue with id = 1. 5 | client.SmartQueue.getSQState({ applicationId: '1', sqQueueId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/getSmartQueueDayHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the time agents spent in the ONLINE status for all SmartQueues within one application. 5 | client.SmartQueue.getSmartQueueDayHistory({ 6 | applicationId: '1', 7 | reportType: 'sum_agents_online_time', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/SmartQueue/getSmartQueueRealtimeMetrics_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the time agents spent in the DIALING status for all SmartQueues within one application. 5 | client.SmartQueue.getSmartQueueRealtimeMetrics({ 6 | applicationId: '1', 7 | reportType: 'sum_agents_dialing_time', 8 | }) 9 | .then((ev) => console.log(ev)) 10 | .catch((err) => console.error(err)); 11 | }; 12 | -------------------------------------------------------------------------------- /examples/SmartQueue/requestSmartQueueHistory_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Generate a service_level report file in csv format for the period from 2021-03-17 00:00:00 to 2021-03-17 22:00:00. 5 | client.SmartQueue.requestSmartQueueHistory({ 6 | applicationId: '1', 7 | sqQueueId: '1', 8 | reportType: 'service_level', 9 | maxWaitingSec: '6', 10 | fromDate: new Date('2021-03-17 00:00:00 GMT'), 11 | toDate: new Date('2021-03-17 22:00:00 GMT'), 12 | }) 13 | .then((ev) => console.log(ev)) 14 | .catch((err) => console.error(err)); 15 | }; 16 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_AddQueue_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new queue. 5 | client.SmartQueue.sQ_AddQueue({ 6 | applicationId: '1', 7 | sqQueueName: 'smartQueue1', 8 | callAgentSelection: 'MOST_QUALIFIED', 9 | callTaskSelection: 'MAX_WAITING_TIME', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_AddSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new skill. 5 | client.SmartQueue.sQ_AddSkill({ applicationId: '1', sqSkillName: 'mySkill' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_BindAgent_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the agent with id 1 and 2 to the queue with id = 1. 5 | client.SmartQueue.sQ_BindAgent({ applicationId: '1', sqQueueId: '1', userId: '1;2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_BindSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Bind the skills with id 1 and 2 to all users. 5 | client.SmartQueue.sQ_BindSkill({ 6 | applicationId: '1', 7 | userId: 'all', 8 | sqSkills: '[{"sq_skill_id":1,"sq_skill_level":1},{"sq_skill_id":2,"sq_skill_level":5}]', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_DelQueue_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the queue with id = 3. 5 | client.SmartQueue.sQ_DelQueue({ applicationId: '1', sqQueueId: '3' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_DelSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete the skill with id = 5. 5 | client.SmartQueue.sQ_DelSkill({ applicationId: '1', sqSkillId: '5' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_DeleteAgentCustomStatusMapping_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Remove a mapping for sq_status_name = READY. 5 | client.SmartQueue.sQ_DeleteAgentCustomStatusMapping({ sqStatusName: 'READY', applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_GetAgentCustomStatusMapping_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the status mappings. 5 | client.SmartQueue.sQ_GetAgentCustomStatusMapping({ applicationId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_GetAgents_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all agents with their current statuses. 5 | client.SmartQueue.sQ_GetAgents({ 6 | applicationId: '1', 7 | withSqStatuses: 'true', 8 | handleCalls: 'false', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_GetQueues_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get all the queues. 5 | client.SmartQueue.sQ_GetQueues({ applicationId: '1', sqQueueId: '1;2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_GetSkills_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get the skills with id 2 and 4 5 | client.SmartQueue.sQ_GetSkills({ applicationId: '1', sqSkillId: '2;4' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_SetAgentCustomStatusMapping_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add/rename a status depending on the presence of an internal status in agent_status_mapping. 5 | client.SmartQueue.sQ_SetAgentCustomStatusMapping({ 6 | sqStatusName: 'READY', 7 | customStatusName: 'ReadyForCall', 8 | applicationId: '1', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_SetAgentInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Edit settings of the agent with id = 2. 5 | client.SmartQueue.sQ_SetAgentInfo({ applicationId: '1', userId: '2', handleCalls: 'true' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_SetQueueInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Edit the queue with id = 1. 5 | client.SmartQueue.sQ_SetQueueInfo({ 6 | applicationId: '1', 7 | sqQueueId: '1', 8 | newSqQueueName: 'myNewSmartQueue', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_SetSkillInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Edit a skill. 5 | client.SmartQueue.sQ_SetSkillInfo({ 6 | applicationId: '1', 7 | sqSkillId: '1', 8 | newSqSkillName: 'newSkill', 9 | }) 10 | .then((ev) => console.log(ev)) 11 | .catch((err) => console.error(err)); 12 | }; 13 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_UnbindAgent_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Unbind the agent with id 1 from all queues. 5 | client.SmartQueue.sQ_UnbindAgent({ applicationId: '1', sqQueueId: 'all', userId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/SmartQueue/sQ_UnbindSkill_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Unbind the skill with id = 1 from the user with id = 1. 5 | client.SmartQueue.sQ_UnbindSkill({ applicationId: '1', userId: '1', sqSkillId: '1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Users/addUser_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Add a new user. 5 | client.Users.addUser({ 6 | userName: 'GordonFreeman', 7 | userDisplayName: 'GordonFreeman', 8 | userPassword: '1234567', 9 | applicationId: '1', 10 | }) 11 | .then((ev) => console.log(ev)) 12 | .catch((err) => console.error(err)); 13 | }; 14 | -------------------------------------------------------------------------------- /examples/Users/delUser_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete two users with ID 3 and 55. 5 | client.Users.delUser({ userId: '3;55' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Users/delUser_2.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Delete all the users bound to the 'myapp1' application. 5 | client.Users.delUser({ userId: 'all', applicationName: 'myapp1' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Users/getUsers_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Get two first identities. 5 | client.Users.getUsers({ applicationId: '1', count: '2' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Users/setUserInfo_1.js: -------------------------------------------------------------------------------- 1 | const VoximplantApiClient = require('@voximplant/apiclient-nodejs').default; 2 | const client = new VoximplantApiClient(); 3 | client.onReady = function () { 4 | // Edit the user password. 5 | client.Users.setUserInfo({ userId: '1', userPassword: '7654321' }) 6 | .then((ev) => console.log(ev)) 7 | .catch((err) => console.error(err)); 8 | }; 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@voximplant/apiclient-nodejs", 3 | "version": "4.2.0", 4 | "description": "Voximplant API client library", 5 | "main": "dist/index.js", 6 | "files": [ 7 | "dist", 8 | "src", 9 | "examples", 10 | "NOTICE" 11 | ], 12 | "scripts": { 13 | "prebuild": "rimraf dist ", 14 | "build": "tsc", 15 | "format": "prettier --write './dist/*.{js,ts}' './src/**/*.{js,ts}' './examples/**/*.{js,ts}'" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/voximplant/apiclient-nodejs.git" 20 | }, 21 | "homepage": "https://voximplant.com/", 22 | "bugs": { 23 | "url": "https://github.com/voximplant/apiclient-nodejs/issues", 24 | "email": "support@voximplant.com" 25 | }, 26 | "author": { 27 | "email": "info@voximplant.com", 28 | "name": "Voximplant, Inc.", 29 | "url": "https://voximplant.com" 30 | }, 31 | "license": "Apache-2.0", 32 | "devDependencies": { 33 | "@types/node": "11.11.5", 34 | "prettier": "2.8.8", 35 | "rimraf": "2.7.1", 36 | "typescript": "3.9.10" 37 | }, 38 | "dependencies": { 39 | "axios": "0.21.4", 40 | "form-data": "2.5.1", 41 | "jsonwebtoken": "9.0.2" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Enums.ts: -------------------------------------------------------------------------------- 1 | export enum APIErrorCode { 2 | /** 3 | * Fatal error 4 | */ 5 | FATAL_ERROR = 1, 6 | /** 7 | * Internal error 8 | */ 9 | INTERNAL_ERROR = 2, 10 | /** 11 | * DB error 12 | */ 13 | DB_ERROR = 4, 14 | /** 15 | * Billing failed 16 | */ 17 | BILLING_ERROR = 5, 18 | /** 19 | * Cannot generate the unique 'api_key' 20 | */ 21 | API_KEY_GENERATION_FAILURE = 6, 22 | /** 23 | * Activation mail error 24 | */ 25 | ACTIVATION_MAIL_ERROR = 9, 26 | /** 27 | * Cannot generate the unique 'session_id' 28 | */ 29 | SESSION_ID_GENERATION_ERROR = 10, 30 | /** 31 | * Invalid 'func_name' parameter 32 | */ 33 | INVALID_FUNC_NAME = 12, 34 | /** 35 | * The 'config' table error 36 | */ 37 | INTERNAL_CONFIGURATION_ERROR = 13, 38 | /** 39 | * SMS gateway error 40 | */ 41 | SMS_GATEWAY_ERROR = 14, 42 | /** 43 | * Media server error 44 | */ 45 | MEDIA_SERVER_ERROR = 15, 46 | /** 47 | * Media balancer error 48 | */ 49 | MEDIA_BALANCER_ERROR = 16, 50 | /** 51 | * Paypoint failed 52 | */ 53 | PAYPOINT_ERROR = 17, 54 | /** 55 | * CallerID verification server error 56 | */ 57 | CALLERID_VERIFICATION_ERROR = 18, 58 | /** 59 | * ACD failed 60 | */ 61 | ACD_FAILED = 19, 62 | /** 63 | * Phone provider failed 64 | */ 65 | PHONE_PROVIDER_FAILED = 20, 66 | /** 67 | * Call service failed 68 | */ 69 | CALL_SERVICE_FAILED = 21, 70 | /** 71 | * Conference balancer error 72 | */ 73 | CONFERENCE_BALANCER_ERROR = 22, 74 | /** 75 | * Conference server error 76 | */ 77 | CONFERENCE_SERVER_ERROR = 23, 78 | /** 79 | * Authorization failed 80 | */ 81 | AUTHORIZATION_FAILED = 100, 82 | /** 83 | * Invalid arguments 84 | */ 85 | INVALID_ARGUMENTS = 101, 86 | /** 87 | * Missing 'cmd' parameter 88 | */ 89 | MISSING_CMD = 102, 90 | /** 91 | * Unknown command 92 | */ 93 | UNKNOWN_COMMAND = 103, 94 | /** 95 | * Forbidden command 96 | */ 97 | FORBIDDEN_COMMAND = 104, 98 | /** 99 | * The required output format type is not supported 100 | */ 101 | REQUIRED_OUTPUT_FORMAT_TYPE_IS_NOT_SUPPORTED = 105, 102 | /** 103 | * Account's name is not unique 104 | */ 105 | ACCOUNTS_NAME_ALREADY_USED = 106, 106 | /** 107 | * Invalid application name 108 | */ 109 | INVALID_APPLICATION_NAME = 107, 110 | /** 111 | * Exceeded the application count limit per account 112 | */ 113 | APPLICATION_COUNT_EXCEEDED = 108, 114 | /** 115 | * Exceeded the user count limit per account 116 | */ 117 | USER_COUNT_EXCEEDED = 109, 118 | /** 119 | * Invalid plan 120 | */ 121 | INVALID_PLAN = 110, 122 | /** 123 | * Invalid date format 124 | */ 125 | INVALID_DATE_FORMAT = 111, 126 | /** 127 | * The password must be at least 6 characters long 128 | */ 129 | PASSWORD_LENGTH = 112, 130 | /** 131 | * Account's name must be at least 5 and up to 20 characters long 132 | */ 133 | ACCOUNT_NAME_LENGTH = 113, 134 | /** 135 | * Account's name should start with a letter and can contain latin characters, digits, hyphen 136 | */ 137 | ACCOUNT_NAME_INITIAL_LETTER = 114, 138 | /** 139 | * The 'account_id' parameter is invalid 140 | */ 141 | INVALID_ACCOUNT_ID = 115, 142 | /** 143 | * The 'application_id' parameter is invalid 144 | */ 145 | INVALID_APPLICATION_ID = 116, 146 | /** 147 | * The 'user_id' parameter is invalid 148 | */ 149 | INVALID_USER_ID = 117, 150 | /** 151 | * The user name is not unique 152 | */ 153 | USER_NAME_ISNT_UNIQUE = 118, 154 | /** 155 | * Invalid phone number 156 | */ 157 | INVALID_PHONE_NUMBER = 121, 158 | /** 159 | * The user name should start with a letter or digit and can contain latin characters, digits, hyphen and must be at least 5 characters long 160 | */ 161 | USER_NAME_RESTRICTIONS = 122, 162 | /** 163 | * Invalid date range 164 | */ 165 | INVALID_DATE_RANGE = 123, 166 | /** 167 | * Invalid money amount 168 | */ 169 | INVALID_MONEY_AMOUNT = 125, 170 | /** 171 | * Insufficient money 172 | */ 173 | INSUFFICIENT_MONEY = 127, 174 | /** 175 | * Account's email is not unique 176 | */ 177 | ACCOUNTS_EMAIL_ISNT_UNIQUE = 128, 178 | /** 179 | * Application name is not unique 180 | */ 181 | APPLICATION_NAME_ISNT_UNIQUE = 129, 182 | /** 183 | * The script text is too long 184 | */ 185 | SCRIPT_TEXT_IS_TOO_LONG = 130, 186 | /** 187 | * The account is not activated 188 | */ 189 | ACCOUNT_ISNT_ACTIVATED = 131, 190 | /** 191 | * The 'scenario_id' parameter is invalid 192 | */ 193 | INVALID_SCENARIO_ID = 132, 194 | /** 195 | * The scenario name is not unique 196 | */ 197 | SCENARIO_NAME_ISNT_UNIQUE = 133, 198 | /** 199 | * Required parameter is empty 200 | */ 201 | REQUIRED_IS_EMPTY = 134, 202 | /** 203 | * Session timeout 204 | */ 205 | SESSION_TIMEOUT = 135, 206 | /** 207 | * Invalid email 208 | */ 209 | INVALID_EMAIL = 136, 210 | /** 211 | * The account is not logged 212 | */ 213 | ACCOUNT_ISNT_LOGGED = 137, 214 | /** 215 | * Activation is over for the phone number 216 | */ 217 | ACTIVATION_IS_OVER_FOR_THE_PHONE_NUMBER = 139, 218 | /** 219 | * Exceeded the max SMS code entering attempts 220 | */ 221 | EXCEEDED_THE_MAX_SMS_CODE_ENTERING_ATTEMPTS = 140, 222 | /** 223 | * The 'sms_code' parameter is invalid 224 | */ 225 | INVALID_SMS_CODE = 141, 226 | /** 227 | * Activation is not required 228 | */ 229 | ACTIVATION_IS_NOT_REQUIRED = 142, 230 | /** 231 | * The 'rule_id' parameter is invalid 232 | */ 233 | INVALID_RULE_ID = 147, 234 | /** 235 | * The 'rule_pattern' parameter is invalid 236 | */ 237 | INVALID_RULE_PATTERN = 148, 238 | /** 239 | * The 'rule_pattern_exclude' parameter is invalid 240 | */ 241 | INVALID_RULE_PATTERN_EXCLUDE = 149, 242 | /** 243 | * The 'call_session_history_id' parameter is invalid 244 | */ 245 | INVALID_CALL_SESSION_HISTORY_ID = 150, 246 | /** 247 | * Rejected payment request 248 | */ 249 | REJECTED_PAYMENT_REQUEST = 151, 250 | /** 251 | * No bank card 252 | */ 253 | NO_BANK_CARD = 152, 254 | /** 255 | * The card payment amount must be greater than 10$ 256 | */ 257 | CARD_PAYMENT_AMOUNT_MUST_BE_GREATER_THAN_10 = 153, 258 | /** 259 | * The 'min_balance' must be greater than 1 $ 260 | */ 261 | MIN_BALANCE_MUST_BE_GREATER_THAN_1 = 154, 262 | /** 263 | * The 'card_overrun_value' must be greater than 10$ 264 | */ 265 | CARD_OVERRUN_VALUE_MUST_BE_GREATER_THAN_10 = 155, 266 | /** 267 | * The 'rule_name' parameter is invalid 268 | */ 269 | INVALID_RULE_NAME = 156, 270 | /** 271 | * The 'user_display_name' parameter is invalid 272 | */ 273 | INVALID_USER_DISPLAY_NAME = 157, 274 | /** 275 | * The 'card_holder' parameter is invalid 276 | */ 277 | INVALID_CARD_HOLDER = 158, 278 | /** 279 | * The 'acct' parameter is invalid 280 | */ 281 | INVALID_ACCT = 159, 282 | /** 283 | * The 'cvv' parameter is invalid 284 | */ 285 | INVALID_CVV = 160, 286 | /** 287 | * The 'session_id' parameter is invalid 288 | */ 289 | INVALID_SESSION_ID = 161, 290 | /** 291 | * try later.. 292 | */ 293 | TRY_LATER = 162, 294 | /** 295 | * The 'account_first_name' parameter length must be less than 50 296 | */ 297 | ACCOUNT_FIRST_NAME_TOO_LONG = 163, 298 | /** 299 | * The 'account_last_name' parameter length must be less than 50 300 | */ 301 | ACCOUNT_LAST_NAME_TOO_LONG = 164, 302 | /** 303 | * Exceeded the max SMS sending attempts 304 | */ 305 | EXCEEDED_THE_MAX_SMS_SENDING_ATTEMPTS = 165, 306 | /** 307 | * Repeat SMS sending after 3 minutes 308 | */ 309 | REPEAT_SMS_SENDING_AFTER_3_MINUTES = 166, 310 | /** 311 | * The 'activation_method' parameter is invalid 312 | */ 313 | INVALID_ACTIVATION_METHOD = 167, 314 | /** 315 | * The 'scenario_name' parameter is invalid 316 | */ 317 | INVALID_SCENARIO_NAME = 168, 318 | /** 319 | * The 'sip_whitelist_id' parameter is invalid 320 | */ 321 | INVALID_SIP_WHITELIST_ID = 169, 322 | /** 323 | * The 'sip_whitelist_network' parameter is invalid 324 | */ 325 | INVALID_SIP_WHITELIST_NETWORK = 170, 326 | /** 327 | * The 'min_balance' must be less than 50 $ 328 | */ 329 | MIN_BALANCE_MUST_BE_LESS_THAN_50 = 171, 330 | /** 331 | * Exceeded the SIP white list network count limit per account 332 | */ 333 | SIP_WHITE_LIST_NETWORK_COUNT_EXCEEDED = 172, 334 | /** 335 | * The account name is forbidden by the black list. Try another name 336 | */ 337 | ACCOUNT_NAME_FORBIDDEN = 173, 338 | /** 339 | * The 'rule_name' is not unique 340 | */ 341 | DUPLICATE_RULE_NAME = 175, 342 | /** 343 | * The 'parent_account_id' parameter is invalid 344 | */ 345 | INVALID_PARENT_ACCOUNT_ID = 177, 346 | /** 347 | * The 'excluded_user_id' parameter is invalid 348 | */ 349 | INVALID_EXCLUDED_USER_ID = 180, 350 | /** 351 | * The 'phone_id' parameter is invalid 352 | */ 353 | INVALID_PHONE_ID = 181, 354 | /** 355 | * Occupied phone number 356 | */ 357 | OCCUPIED_PHONE_NUMBER = 182, 358 | /** 359 | * The 'callerid_id' parameter is invalid 360 | */ 361 | INVALID_CALLERID_ID = 183, 362 | /** 363 | * The 'callerid_number' parameter is invalid 364 | */ 365 | INVALID_CALLERID_NUMBER = 184, 366 | /** 367 | * Forbidden CallerID 368 | */ 369 | FORBIDDEN_CALLERID = 185, 370 | /** 371 | * The 'verification_code' parameter is invalid 372 | */ 373 | INVALID_VERIFICATION_CODE = 414, 374 | /** 375 | * The 'callerid_number' is not unique 376 | */ 377 | DUPLICATE_CALLERID_NUMBER = 188, 378 | /** 379 | * The 'mobile_phone' parameter is invalid 380 | */ 381 | INVALID_MOBILE_PHONE = 203, 382 | /** 383 | * The 'to_number' parameter is invalid 384 | */ 385 | INVALID_TO_NUMBER = 190, 386 | /** 387 | * The 'from_number' parameter is invalid 388 | */ 389 | INVALID_FROM_NUMBER = 191, 390 | /** 391 | * The 'sms_id' parameter is invalid 392 | */ 393 | INVALID_SMS_ID = 192, 394 | /** 395 | * The 'child_account_id' parameter is invalid 396 | */ 397 | INVALID_CHILD_ACCOUNT_ID = 194, 398 | /** 399 | * Unsupported batch command 400 | */ 401 | UNSUPPORTED_BATCH_COMMAND = 195, 402 | /** 403 | * Too many batch commands. The max command count is 50 per batch 404 | */ 405 | TOO_MANY_BATCH_COMMANDS = 196, 406 | /** 407 | * The 'transaction_id' parameter is invalid 408 | */ 409 | INVALID_TRANSACTION_ID = 197, 410 | /** 411 | * The 'child_account_name' parameter is invalid 412 | */ 413 | INVALID_CHILD_ACCOUNT_NAME = 198, 414 | /** 415 | * The 'child_account_email' parameter is invalid 416 | */ 417 | INVALID_CHILD_ACCOUNT_EMAIL = 199, 418 | /** 419 | * The 'new_child_account_email' parameter is invalid 420 | */ 421 | INVALID_NEW_CHILD_ACCOUNT_EMAIL = 201, 422 | /** 423 | * The 'language_code' parameter is invalid 424 | */ 425 | INVALID_LANGUAGE_CODE = 202, 426 | /** 427 | * The 'billing_address_country_code' parameter is invalid 428 | */ 429 | INVALID_BILLING_ADDRESS_COUNTRY_CODE = 204, 430 | /** 431 | * The 'billing_address_name' parameter length must be less than 200 432 | */ 433 | BILLING_ADDRESS_NAME_TOO_LONG = 205, 434 | /** 435 | * The 'billing_address_address' parameter length must be less than 512 436 | */ 437 | BILLING_ADDRESS_ADDRESS_TOO_LONG = 206, 438 | /** 439 | * The 'billing_address_zip' parameter length must be less than 30 440 | */ 441 | BILLING_ADDRESS_ZIP_TOO_LONG = 207, 442 | /** 443 | * The 'billing_address_phone' parameter length must be less than 30 444 | */ 445 | BILLING_ADDRESS_PHONE_TOO_LONG = 208, 446 | /** 447 | * The 'transaction_type' parameter is invalid 448 | */ 449 | INVALID_TRANSACTION_TYPE = 209, 450 | /** 451 | * The 'currency' parameter is invalid 452 | */ 453 | INVALID_CURRENCY = 210, 454 | /** 455 | * The 'account_custom_data' parameter length must be less than 8192 456 | */ 457 | ACCOUNT_CUSTOM_DATA_TOO_LONG = 211, 458 | /** 459 | * The 'user_custom_data' parameter length must be less than 8192 460 | */ 461 | USER_CUSTOM_DATA_TOO_LONG = 212, 462 | /** 463 | * The 'acd_queue_name' parameter length must be less than 100 464 | */ 465 | ACD_QUEUE_NAME_TOO_LONG = 213, 466 | /** 467 | * The 'service_probability' parameter value must be in range [0.5 ... 1] 468 | */ 469 | INVALID_SERVICE_PROBABILITY = 214, 470 | /** 471 | * The 'max_queue_size' parameter is invalid 472 | */ 473 | INVALID_MAX_QUEUE_SIZE = 215, 474 | /** 475 | * The 'max_waiting_time' parameter is invalid 476 | */ 477 | INVALID_MAX_WAITING_TIME = 216, 478 | /** 479 | * The 'average_service_time' parameter is invalid 480 | */ 481 | INVALID_AVERAGE_SERVICE_TIME = 217, 482 | /** 483 | * The 'acd_queue_id' parameter is invalid 484 | */ 485 | INVALID_ACD_QUEUE_ID = 218, 486 | /** 487 | * Queue's name is not unique 488 | */ 489 | DUPLICATE_QUEUES_NAME = 219, 490 | /** 491 | * The 'skill_name' parameter length must be less than 512 492 | */ 493 | SKILL_NAME_TOO_LONG = 220, 494 | /** 495 | * Skill's name is not unique 496 | */ 497 | DUPLICATE_SKILL_NAME = 221, 498 | /** 499 | * The 'skill_id' parameter is invalid 500 | */ 501 | INVALID_SKILL_ID = 222, 502 | /** 503 | * The 'acd_queue_priority' parameter should be positive 504 | */ 505 | INVALID_ACD_QUEUE_PRIORITY = 223, 506 | /** 507 | * The 'excluded_skill_id' parameter is invalid 508 | */ 509 | INVALID_EXCLUDED_SKILL_ID = 224, 510 | /** 511 | * The 'amount' parameter is invalid 512 | */ 513 | INVALID_AMOUNT = 225, 514 | /** 515 | * The payment amount is very low. The amount must be greater than N 516 | */ 517 | PAYMENT_AMOUNT_TOO_LOW = 226, 518 | /** 519 | * The 'acd_status' parameter is invalid 520 | */ 521 | INVALID_ACD_STATUS = 227, 522 | /** 523 | * The 'aggregation' parameter is invalid 524 | */ 525 | INVALID_AGGREGATION = 228, 526 | /** 527 | * The 'report' parameter is invalid 528 | */ 529 | INVALID_REPORT = 229, 530 | /** 531 | * Account password change is over. Try later 532 | */ 533 | ACCOUNT_PASSWORD_CHANGE_TEMPORARY_BLOCKED = 230, 534 | /** 535 | * No more attempts to enter code 536 | */ 537 | CODE_ENTRY_ATTEMPTS_EXHAUSTED = 231, 538 | /** 539 | * The 'code' parameter is invalid 540 | */ 541 | INVALID_CODE = 232, 542 | /** 543 | * The 'date' parameter is invalid 544 | */ 545 | INVALID_DATE = 233, 546 | /** 547 | * The 'account_transaction_description' parameter length must be less than 120 548 | */ 549 | ACCOUNT_TRANSACTION_DESCRIPTION_TOO_LONG = 234, 550 | /** 551 | * The 'user_transaction_description' parameter length must be less than 120 552 | */ 553 | USER_TRANSACTION_DESCRIPTION_TOO_LONG = 235, 554 | /** 555 | * The 'parent_transaction_description' parameter length must be less than 120 556 | */ 557 | PARENT_TRANSACTION_DESCRIPTION_TOO_LONG = 236, 558 | /** 559 | * The 'child_transaction_description' parameter length must be less than 120 560 | */ 561 | CHILD_TRANSACTION_DESCRIPTION_TOO_LONG = 237, 562 | /** 563 | * The 'country_code' parameter is invalid 564 | */ 565 | INVALID_COUNTRY_CODE = 239, 566 | /** 567 | * The 'phone_category_name' parameter is invalid 568 | */ 569 | INVALID_PHONE_CATEGORY_NAME = 240, 570 | /** 571 | * The 'phone_region_id' parameter is invalid 572 | */ 573 | INVALID_PHONE_REGION_ID = 241, 574 | /** 575 | * The 'country_state' parameter is invalid 576 | */ 577 | INVALID_COUNTRY_STATE = 242, 578 | /** 579 | * The 'phone_count' parameter is invalid 580 | */ 581 | INVALID_PHONE_COUNT = 243, 582 | /** 583 | * The 'subscription_template_id' parameter is invalid 584 | */ 585 | INVALID_SUBSCRIPTION_TEMPLATE_ID = 244, 586 | /** 587 | * The 'subscription_template_name' parameter is invalid 588 | */ 589 | INVALID_SUBSCRIPTION_TEMPLATE_NAME = 245, 590 | /** 591 | * The 'subscription_template_type' parameter is invalid 592 | */ 593 | INVALID_SUBSCRIPTION_TEMPLATE_TYPE = 246, 594 | /** 595 | * The 'priority' parameter is invalid 596 | */ 597 | INVALID_PRIORIITY = 247, 598 | /** 599 | * The 'max_simultaneous' parameter is invalid 600 | */ 601 | INVALID_MAX_SIMULTANEOUS = 248, 602 | /** 603 | * The 'num_attempts' parameter is invalid 604 | */ 605 | INVALID_NUM_ATTEMPTS = 249, 606 | /** 607 | * Invalid CSV file 608 | */ 609 | INVALID_CSV_FILE = 250, 610 | /** 611 | * Call service error 612 | */ 613 | CALL_SERVICE_ERROR = 251, 614 | /** 615 | * Error response from call service 616 | */ 617 | ERROR_RESPONSE_FROM_CALL_SERVICE = 252, 618 | /** 619 | * The 'name' parameter is invalid 620 | */ 621 | INVALID_NAME = 253, 622 | /** 623 | * The 'group' parameter is invalid 624 | */ 625 | INVALID_GROUP = 254, 626 | /** 627 | * The 'list_id' parameter is invalid 628 | */ 629 | INVALID_LIST_ID = 255, 630 | /** 631 | * The 'reference_ip' parameter is invalid 632 | */ 633 | INVALID_REFERENCE_IP = 257, 634 | /** 635 | * The 'to_phone_next_renewal' parameter is invalid 636 | */ 637 | INVALID_TO_PHONE_NEXT_RENEWAL = 258, 638 | /** 639 | * The 'media_url' parameter is invalid 640 | */ 641 | INVALID_MEDIA_URL = 259, 642 | /** 643 | * Access to the media link is denied 644 | */ 645 | MEDIA_LINK_ACCESS_DENIED = 260, 646 | /** 647 | * The 'record_id' parameter is invalid 648 | */ 649 | INVALID_RECORD_ID = 261, 650 | /** 651 | * The 'PaRes' parameter is invalid 652 | */ 653 | INVALID_PARES = 262, 654 | /** 655 | * The 'MD' parameter is invalid 656 | */ 657 | INVALID_MD = 263, 658 | /** 659 | * The 'private' parameter is invalid 660 | */ 661 | INVALID_PRIVATE = 264, 662 | /** 663 | * The 'promo_code' parameter is invalid 664 | */ 665 | INVALID_PROMO_CODE = 265, 666 | /** 667 | * The promo code is expired 668 | */ 669 | PROMO_CODE_IS_EXPIRED = 266, 670 | /** 671 | * The promo code has been already redeemed 672 | */ 673 | PROMO_CODE_HAS_BEEN_ALREADY_REDEEMED = 267, 674 | /** 675 | * The second promo code activation is forbidden 676 | */ 677 | PROMO_CODE_ALREADY_USED = 268, 678 | /** 679 | * The 'conference_name' parameter is invalid 680 | */ 681 | INVALID_CONFERENCE_NAME = 269, 682 | /** 683 | * The 'conference_name' parameter length must be less than 50 684 | */ 685 | CONFERENCE_NAME_TOO_LONG = 270, 686 | /** 687 | * The service level threshold count must be less than 5 688 | */ 689 | SERVICE_LEVEL_THRESHOLD_COUNT_TOO_BIG = 271, 690 | /** 691 | * Exceeded the maximum possible number of SIP registrations 692 | */ 693 | SIP_REGISTRATIONS_COUNT_EXCEEDED = 272, 694 | /** 695 | * The 'username' parameter is invalid 696 | */ 697 | INVALID_USERNAME = 273, 698 | /** 699 | * The 'proxy' parameter is invalid 700 | */ 701 | INVALID_PROXY = 274, 702 | /** 703 | * The 'registration_id' parameter is invalid 704 | */ 705 | INVALID_REGISTRATION_ID = 275, 706 | /** 707 | * The 'account_document' parameter is invalid 708 | */ 709 | INVALID_ACCOUNT_DOCUMENT = 278, 710 | /** 711 | * Repeat an account document sending after 2 minutes 712 | */ 713 | RESEND_DOCUMENTS = 280, 714 | /** 715 | * Account verification required 716 | */ 717 | ACCOUNT_VERIFICATION_REQUIRED = 281, 718 | /** 719 | * Account verification in progress 720 | */ 721 | ACCOUNT_VERIFICATION_IN_PROGRESS = 282, 722 | /** 723 | * The 'to_purchase_date' parameter is invalid 724 | */ 725 | INVALID_TO_PURCHASE_DATE = 283, 726 | /** 727 | * The 'admin_user_id' parameter is invalid 728 | */ 729 | INVALID_ADMIN_USER_ID = 284, 730 | /** 731 | * The 'required_admin_user_id' parameter is invalid 732 | */ 733 | INVALID_REQUIRED_ADMIN_USER_ID = 285, 734 | /** 735 | * The 'required_admin_user_name' parameter is invalid 736 | */ 737 | INVALID_REQUIRED_ADMIN_USER_NAME = 286, 738 | /** 739 | * The admin user name length must be less than 50 740 | */ 741 | ADMIN_USER_NAME_TOO_LONG = 287, 742 | /** 743 | * The 'admin_user_display_name' parameter length must be less than 255 744 | */ 745 | ADMIN_USER_DISPLAY_NAME_TOO_LONG = 288, 746 | /** 747 | * Exceeded the admin user count limit per account 748 | */ 749 | ADMIN_USER_COUNT_LIMIT_EXCEEDED = 289, 750 | /** 751 | * The admin_user_name is not unique 752 | */ 753 | DUPLICATE_ADMIN_USER_NAME = 290, 754 | /** 755 | * The 'admin_role_id' parameter is invalid 756 | */ 757 | INVALID_ADMIN_ROLE_ID = 291, 758 | /** 759 | * The 'admin_role_name' parameter is invalid 760 | */ 761 | INVALID_ADMIN_ROLE_NAME = 292, 762 | /** 763 | * The admin role name length must be less than 160 764 | */ 765 | ADMIN_ROLE_NAME_TOO_LONG = 293, 766 | /** 767 | * The admin_role_name is not unique 768 | */ 769 | DUPLICATE_ADMIN_ROLE_NAME = 294, 770 | /** 771 | * Exceeded the admin role count limit per account 772 | */ 773 | ADMIN_ROLE_COUNT_LIMIT_IS_EXCEEDED = 295, 774 | /** 775 | * The 'allowed_entries' parameter is invalid 776 | */ 777 | INVALID_ALLOWED_ENTRIES = 296, 778 | /** 779 | * The 'denied_entries' parameter is invalid 780 | */ 781 | INVALID_DENIED_ENTRIES = 297, 782 | /** 783 | * The 'like_admin_role_id' parameter is invalid 784 | */ 785 | INVALID_LIKE_ADMIN_ROLE_ID = 300, 786 | /** 787 | * The 'included_admin_role_id' parameter is invalid 788 | */ 789 | INVALID_INCLUDED_ADMIN_ROLE_ID = 301, 790 | /** 791 | * The 'excluded_admin_role_id' parameter is invalid 792 | */ 793 | INVALID_EXCLUDED_ADMIN_ROLE_ID = 302, 794 | /** 795 | * The 'payment_reference' parameter is ambiguous 796 | */ 797 | PAYMENT_REFERENCE_IS_AMBIGUOUS = 303, 798 | /** 799 | * The 'payment_reference' parameter length must be less than 127 800 | */ 801 | PAYMENT_REFERENCE_TOO_LONG = 304, 802 | /** 803 | * The 'inn' parameter is invalid 804 | */ 805 | INVALID_INN = 305, 806 | /** 807 | * The 'kpp' parameter is invalid 808 | */ 809 | INVALID_KPP = 306, 810 | /** 811 | * The 'company_name' parameter length must be less than 512 812 | */ 813 | COMPANY_NAME_TOO_LONG = 307, 814 | /** 815 | * The 'company_address' parameter length must be less than 512 816 | */ 817 | COMPANY_ADDRESS_TOO_LONG = 308, 818 | /** 819 | * The 'company_phone' parameter length must be less than 20 820 | */ 821 | COMPANY_PHONE_TOO_LONG = 309, 822 | /** 823 | * Forbidden to edit the contractor. Please send an email to the Voximplant team instead 824 | */ 825 | CONTRACTOR_EDIT_FORBIDDEN = 310, 826 | /** 827 | * Please set the contractor info first 828 | */ 829 | CONTRACTOR_INFO_NOT_SET = 311, 830 | /** 831 | * The 'old_invoice_number' parameter is invalid 832 | */ 833 | INVALID_OLD_INVOICE_NUMBER = 319, 834 | /** 835 | * Concurrent resource limit exceeded 836 | */ 837 | CONCURRENT_RESOURCE_LIMIT_EXCEEDED = 314, 838 | /** 839 | * The requested resource parameter is invalid 840 | */ 841 | INVALID_REQUESTED_RESOURCE = 315, 842 | /** 843 | * The requested resource parameter is forbidden 844 | */ 845 | REQUESTED_RESOURCE_IS_FORBIDDEN = 316, 846 | /** 847 | * Upgrade to a paid account to use the requested resource parameter 848 | */ 849 | ACCOUNT_UPGRADE_REQUIRED = 317, 850 | /** 851 | * The money amount must be greater than N RUR 852 | */ 853 | MONEY_AMOUNT_TOO_LOW = 318, 854 | /** 855 | * The 'authorized_ip' parameter is invalid 856 | */ 857 | INVALID_AUTHORIZED_IP = 320, 858 | /** 859 | * The authorized IP is not found 860 | */ 861 | AUTHORIZED_IP_NOT_FOUND = 321, 862 | /** 863 | * The 'contains_ip' parameter is invalid 864 | */ 865 | INVALID_CONTAINS_IP = 322, 866 | /** 867 | * Exceeded the authorized IP count limit per account 868 | */ 869 | IP_WHITELIST_EXCEEDED = 323, 870 | /** 871 | * The 'verification_name' parameter is invalid 872 | */ 873 | INVALID_VERIFICATION_NAME = 324, 874 | /** 875 | * The 'to_unverified_hold_until' parameter is invalid 876 | */ 877 | INVALID_TO_UNVERIFIED_HOLD_UNTIL = 325, 878 | /** 879 | * The 'verification_status' parameter is invalid 880 | */ 881 | INVALID_VERIFICATION_STATUS = 326, 882 | /** 883 | * Error parsing XLS file 884 | */ 885 | ERROR_PARSING_XLS_FILE = 327, 886 | /** 887 | * No phones in the stock 888 | */ 889 | NO_PHONES_IN_STOCK = 331, 890 | /** 891 | * Insufficient phones in the stock, available N 892 | */ 893 | INSUFFICIENT_PHONES = 332, 894 | /** 895 | * Country's region is not found by code 896 | */ 897 | NOT_FOUND_COUNTRYS_REGION_BY_CODE = 334, 898 | /** 899 | * Phone number already exists 900 | */ 901 | PHONE_NUMBER_ALREADY_EXISTS = 335, 902 | /** 903 | * Ambiguous region 904 | */ 905 | AMBIGUOUS_REGION = 336, 906 | /** 907 | * User documents are not found 908 | */ 909 | USER_DOCUMENTS_NOT_FOUND = 337, 910 | /** 911 | * Verification user's document already complete 912 | */ 913 | VERIFICATION_USERS_DOCUMENT_ALREADY_COMPLETE = 338, 914 | /** 915 | * User documents do not exist 916 | */ 917 | NO_USER_DOCUMENTS = 339, 918 | /** 919 | * Rate limit exceed 920 | */ 921 | RATE_LIMIT_EXCEED = 340, 922 | /** 923 | * Record is not found by ID 924 | */ 925 | RECORD_NOT_FOUND = 341, 926 | /** 927 | * The 'individual_full_name' parameter is invalid 928 | */ 929 | INVALID_INDIVIDUAL_FULL_NAME = 343, 930 | /** 931 | * The 'individual_birth_date' parameter is invalid 932 | */ 933 | INVALID_INDIVIDUAL_BIRTH_DATE = 344, 934 | /** 935 | * The 'individual_passport_series' parameter is invalid 936 | */ 937 | INVALID_INDIVIDUAL_PASSPORT_SERIES = 345, 938 | /** 939 | * The 'individual_passport_number' parameter is invalid 940 | */ 941 | INVALID_INDIVIDUAL_PASSPORT_NUMBER = 346, 942 | /** 943 | * The 'individual_passport_issue_date' parameter is invalid 944 | */ 945 | INVALID_INDIVIDUAL_PASSPORT_ISSUE_DATE = 347, 946 | /** 947 | * The 'individual_passport_issued_by' parameter is invalid 948 | */ 949 | INVALID_INDIVIDUAL_PASSPORT_ISSUED_BY = 348, 950 | /** 951 | * The 'individual_registration_address' parameter is invalid 952 | */ 953 | INVALID_INDIVIDUAL_REGISTRATION_ADDRESS = 349, 954 | /** 955 | * The 'legal_entry_full_name' parameter is invalid 956 | */ 957 | INVALID_LEGAL_ENTRY_FULL_NAME = 350, 958 | /** 959 | * The 'legal_entry_phone' parameter is invalid 960 | */ 961 | INVALID_LEGAL_ENTRY_PHONE = 351, 962 | /** 963 | * The 'legal_entry_address' parameter is invalid 964 | */ 965 | INVALID_LEGAL_ENTRY_ADDRESS = 352, 966 | /** 967 | * The 'legal_entry_actual_address' parameter is invalid 968 | */ 969 | INVALID_LEGAL_ENTRY_ACTUAL_ADDRESS = 353, 970 | /** 971 | * The 'ogrn' parameter is invalid 972 | */ 973 | INVALID_OGRN = 354, 974 | /** 975 | * The 'call_history_report_id' parameter is invalid 976 | */ 977 | INVALID_CALL_HISTORY_REPORT_ID = 355, 978 | /** 979 | * The call history report is not ready yet 980 | */ 981 | CALL_HISTORY_REPORT_IN_PROGRESS = 356, 982 | /** 983 | * The call history report generation failed 984 | */ 985 | CALL_HISTORY_REPORT_GENERATION_FAILED = 357, 986 | /** 987 | * Invalid verification type 988 | */ 989 | INVALID_VERIFICATION_TYPE = 358, 990 | /** 991 | * Invalid salutation 992 | */ 993 | INVALID_SALUTATION = 359, 994 | /** 995 | * Voxbone verification type is not found 996 | */ 997 | VERIFICATION_TYPE_NOT_FOUND = 360, 998 | /** 999 | * Proof of address is not found 1000 | */ 1001 | PROOF_OF_ADDRESS_NOT_FOUND = 361, 1002 | /** 1003 | * The 'new_admin_user_name' parameter is invalid 1004 | */ 1005 | INVALID_NEW_ADMIN_USER_NAME = 362, 1006 | /** 1007 | * The 'code' parameter (access token) is invalid 1008 | */ 1009 | INVALID_CODE_OR_ACCESS_TOKEN = 363, 1010 | /** 1011 | * The current account password is missing 1012 | */ 1013 | CURRENT_ACCOUNT_PASSWORD_NOT_SPECIFIED = 364, 1014 | /** 1015 | * Purchase info is not found 1016 | */ 1017 | PURCHASE_INFO_NOT_FOUND = 365, 1018 | /** 1019 | * Pending address validation 1020 | */ 1021 | PENDING_ADDRESS_VALIDATION = 366, 1022 | /** 1023 | * The 'callback_type' parameter is invalid 1024 | */ 1025 | INVALID_CALLBACK_TYPE = 367, 1026 | /** 1027 | * Phone provider error 1028 | */ 1029 | PHONE_PROVIDER_ERROR = 368, 1030 | /** 1031 | * Incorrect parameter 'phone_owner_region_code' 1032 | */ 1033 | INVALID_PHONE_OWNER_REGION_CODE = 369, 1034 | /** 1035 | * Incorrect parameter 'phone_owner_region_code' or 'phone_owner_zip_code' 1036 | */ 1037 | INVALID_REGION_CODE = 370, 1038 | /** 1039 | * The 'history_type' parameter is invalid 1040 | */ 1041 | INVALID_HISTORY_TYPE = 371, 1042 | /** 1043 | * The 'pstn_blacklist_phone' parameter length must be less than 100 1044 | */ 1045 | INVALID_PSTN_BLACKLIST_PHONE = 425, 1046 | /** 1047 | * Exceeded the PSTN blacklist phones count limit per account 1048 | */ 1049 | PSTN_BLACKLIST_SIZE_IS_EXCEEDED = 373, 1050 | /** 1051 | * The 'carrier_id' parameter is invalid 1052 | */ 1053 | INVALID_CARRIER_ID = 374, 1054 | /** 1055 | * No scenario is bound to the rule 1056 | */ 1057 | RULE_NO_SCENARIO_BOUND = 375, 1058 | /** 1059 | * The 'subscription_id' parameter is invalid 1060 | */ 1061 | INVALID_SUBSCRIPTION_ID = 376, 1062 | /** 1063 | * The phone group is incomplete 1064 | */ 1065 | PHONE_GROUP_INCOMPLETE = 377, 1066 | /** 1067 | * The 'push_id' parameter is invalid 1068 | */ 1069 | INVALID_PUSH_ID = 378, 1070 | /** 1071 | * Forbidden to change the account plan 1072 | */ 1073 | ACCOUNT_PLAN_CHANGE_FORBIDDEN = 379, 1074 | /** 1075 | * The push provider is invalid 1076 | */ 1077 | INVALID_PUSH_PROVIDER = 380, 1078 | /** 1079 | * No application is bound to the queue 1080 | */ 1081 | QUEUE_APPLICATION_NOT_BOUND = 381, 1082 | /** 1083 | * The 'server_type' parameter is invalid 1084 | */ 1085 | INVALID_SERVER_TYPE = 382, 1086 | /** 1087 | * The 'server_ip' parameter is invalid 1088 | */ 1089 | INVALID_SERVER_IP = 383, 1090 | /** 1091 | * Push credential has already been attached to an application 1092 | */ 1093 | PUSH_CREDENTIAL_ALREADY_ATTACHED = 384, 1094 | /** 1095 | * Sending sms error 1096 | */ 1097 | SENDING_SMS_ERROR = 385, 1098 | /** 1099 | * SMS disabled for number 1100 | */ 1101 | SMS_DISABLED_FOR_NUMBER = 386, 1102 | /** 1103 | * No bank card order 1104 | */ 1105 | NO_BANK_CARD_ORDER = 389, 1106 | /** 1107 | * The card payment amount must be less than N 1108 | */ 1109 | CARD_PAYMENT_AMOUNT_TOO_LARGE = 390, 1110 | /** 1111 | * Exceeded the card payment limit 1112 | */ 1113 | CARD_PAYMENT_LIMIT_IS_EXCEEDED = 391, 1114 | /** 1115 | * Please enter the captcha! 1116 | */ 1117 | CAPTCHA_ERROR = 392, 1118 | /** 1119 | * The user is not bound to the application 1120 | */ 1121 | USER_NOT_BOUND_TO_THE_APPLICATION = 393, 1122 | /** 1123 | * The SIP registration is persistent 1124 | */ 1125 | SIP_REGISTRATION_IS_PERSISTENT = 394, 1126 | /** 1127 | * The phone number is yours 1128 | */ 1129 | PHONE_NUMBER_UNUSABLE = 395, 1130 | /** 1131 | * The 'record_storage_id' parameter is invalid 1132 | */ 1133 | INVALID_RECORD_STORAGE_ID = 396, 1134 | /** 1135 | * Exceeded the children account count limit per day 1136 | */ 1137 | CHILDREN_ACCOUNT_COUNT_LIMIT_PER_DAY_IS_EXCEEDED = 397, 1138 | /** 1139 | * The 'callback_url' parameter is invalid 1140 | */ 1141 | INVALID_CALLBACK_URL = 398, 1142 | /** 1143 | * The 'callback_salt' parameter length must be less than 40 1144 | */ 1145 | CALLBACK_SALT_INVALID = 399, 1146 | /** 1147 | * The 'pstn_blacklist_id' parameter is invalid 1148 | */ 1149 | INVALID_PSTN_BLACKLIST_ID = 400, 1150 | /** 1151 | * The 'advanced_filters' parameter is invalid 1152 | */ 1153 | INVALID_ADVANCED_FILTERS = 401, 1154 | /** 1155 | * The 'contact_id' parameter is invalid 1156 | */ 1157 | INVALID_CONTACT_ID = 405, 1158 | /** 1159 | * The 'contact_data' parameter is invalid 1160 | */ 1161 | INVALID_CONTACT_DATA = 406, 1162 | /** 1163 | * The contact is not unique 1164 | */ 1165 | DUPLICATE_CONTACT = 407, 1166 | /** 1167 | * The contact data must be at least 1 and up to 1024 characters long 1168 | */ 1169 | CONTACT_DATA_INVALID = 408, 1170 | /** 1171 | * The 'contact_type' parameter is invalid 1172 | */ 1173 | INVALID_CONTACT_TYPE = 409, 1174 | /** 1175 | * The 'notification_group' parameter is invalid 1176 | */ 1177 | INVALID_NOTIFICATION_GROUP = 410, 1178 | /** 1179 | * Exceeded the contact count limit per account 1180 | */ 1181 | CONTACT_COUNT_LIMIT_PER_ACCOUNT_IS_EXCEEDED = 411, 1182 | /** 1183 | * The 'new_contact_data' parameter is invalid 1184 | */ 1185 | INVALID_NEW_CONTACT_DATA = 412, 1186 | /** 1187 | * The 'new_contact_type' parameter is invalid 1188 | */ 1189 | INVALID_NEW_CONTACT_TYPE = 413, 1190 | /** 1191 | * The contact is already verified 1192 | */ 1193 | CONTACT_IS_ALREADY_VERIFIED = 415, 1194 | /** 1195 | * Repeat after N seconds 1196 | */ 1197 | RETRY_LATER = 416, 1198 | /** 1199 | * The contact description must be at least 1 and up to 1024 characters long 1200 | */ 1201 | INVALID_CONTACT_DESCRIPTION_LENGTH = 417, 1202 | /** 1203 | * The scenario count limit is exceeded 1204 | */ 1205 | SCENARIO_COUNT_LIMIT_IS_EXCEEDED = 418, 1206 | /** 1207 | * The scenario count limit per rule is exceeded 1208 | */ 1209 | SCENARIO_COUNT_LIMIT_PER_RULE_IS_EXCEEDED = 419, 1210 | /** 1211 | * Multi subscription does not exist 1212 | */ 1213 | MULTI_SUBSCRIPTION_DOESNT_EXISTS = 420, 1214 | /** 1215 | * Multi subscription does not exist for the specified numbers 1216 | */ 1217 | MULTI_SUBSCRIPTION_DOESNT_EXIST_FOR_NUMBERS = 421, 1218 | /** 1219 | * The 'source' parameter is invalid 1220 | */ 1221 | INVALID_SOURCE = 422, 1222 | /** 1223 | * The 'destination' parameter is invalid 1224 | */ 1225 | INVALID_DESTINATION = 423, 1226 | /** 1227 | * Provided regulation address cannot be used for numbers in the specified region 1228 | */ 1229 | REGULATION_ADDRESS_AND_REGION_MISMATCH = 424, 1230 | /** 1231 | * The 'plan_type' parameter is invalid 1232 | */ 1233 | INVALID_PLAN_TYPE = 426, 1234 | /** 1235 | * Invalid list type. Possible values are 'automatic' and 'manual' 1236 | */ 1237 | INVALID_LIST_TYPE = 427, 1238 | /** 1239 | * Invalid status. Possible values are 'in progress', 'canceled' and 'completed' 1240 | */ 1241 | INVALID_STATUS = 428, 1242 | /** 1243 | * The 'resource_type' parameter is invalid. 1244 | */ 1245 | INVALID_RESOURCE_TYPE = 429, 1246 | /** 1247 | * The 'price_group_name' parameter is invalid. 1248 | */ 1249 | INVALID_PRICE_GROUP_NAME = 430, 1250 | /** 1251 | * Invalid key id. 1252 | */ 1253 | INVALID_KEY_ID = 433, 1254 | /** 1255 | * Invalid subuser id. 1256 | */ 1257 | INVALID_SUB_USER_ID = 434, 1258 | /** 1259 | * Invalid role set. 1260 | */ 1261 | INVALID_ROLE_SET = 435, 1262 | /** 1263 | * Sub user login is not unique. 1264 | */ 1265 | SUB_USER_LOGIN_NOT_UNIQUE = 436, 1266 | /** 1267 | * Max number of keys exceeded. 1268 | */ 1269 | MAX_NUMBER_OF_KEYS_EXCEEDED = 437, 1270 | /** 1271 | * Max number of subusers exceeded. 1272 | */ 1273 | MAX_NUMBER_OF_SUB_USERS_EXCEEDED = 438, 1274 | /** 1275 | * Subuser has at least one key with this roles. 1276 | */ 1277 | SUB_USER_HAS_KEYS_WITH_ROLES_TO_REMOVE = 439, 1278 | /** 1279 | * The 'role_id' parameter is invalid. 1280 | */ 1281 | INVALID_ROLE_ID = 440, 1282 | /** 1283 | * The 'role_name' parameter is invalid. 1284 | */ 1285 | INVALID_ROLE_NAME = 441, 1286 | /** 1287 | * The 'resource_discount_id' parameter is invalid. 1288 | */ 1289 | INVALID_RESOURCE_DISCOUNT_ID = 442, 1290 | /** 1291 | * The 'subscription_discount_id' parameter is invalid. 1292 | */ 1293 | INVALID_SUBSCRIPTION_DISCOUNT_ID = 443, 1294 | /** 1295 | * The 'target_price_calculation_account_id' is forbidden for user. 1296 | */ 1297 | INVALID_TARGET_PRICE_CALCULATION_ACCOUNT_ID = 444, 1298 | /** 1299 | * The 'subscription_periodic_fixed' must be greater than the base price. 1300 | */ 1301 | INVALID_SUBSCRIPTION_PERIODIC_FIXED = 445, 1302 | /** 1303 | * The 'subscription_installation_fixed' must be greater than the base price. 1304 | */ 1305 | INVALID_SUBSCRIPTION_INSTALLATION_FIXED = 446, 1306 | /** 1307 | * Invalid token format. 1308 | */ 1309 | INVALID_TOKEN_FORMAT = 447, 1310 | /** 1311 | * Current subuser password is missing. 1312 | */ 1313 | CURRENT_SUB_USER_PASSWORD_MISSING = 448, 1314 | /** 1315 | * Using 'role_id' and 'role_name' at the same_time. 1316 | */ 1317 | ROLE_ID_AND_ROLE_NAME_AT_THE_SAME_TIME = 449, 1318 | /** 1319 | * The 'mgp_template_id' parameter is invalid. 1320 | */ 1321 | INVALID_MGP_TEMPLATE_ID = 450, 1322 | /** 1323 | * The account's tax rate ID must be the same as the MGP tax rate ID. 1324 | */ 1325 | INVALID_ACCOUNT_TAX_RATE_ID = 451, 1326 | /** 1327 | * Subuser name must be at least 5 and up to 20 characters long. 1328 | */ 1329 | INVALID_SUB_USER_NAME_LEN = 452, 1330 | /** 1331 | * Subuser name should start with a letter and can contain latin characters 1332 | */ 1333 | INVALID_SUB_USER_NAME_SYMBOLS = 453, 1334 | /** 1335 | * The token TTL exceeds the maximum limit. 1336 | */ 1337 | INVALID_TOKEN_TTL = 454, 1338 | /** 1339 | * Token issued in the future. 1340 | */ 1341 | TOKEN_ISSUED_IN_FUTURE = 455, 1342 | /** 1343 | * The token has expired. 1344 | */ 1345 | TOKEN_EXPIRED = 456, 1346 | /** 1347 | * The 'min_payment_amount' parameter is invalid. 1348 | */ 1349 | INVALID_MIN_PAYMENT_AMOUNT = 457, 1350 | /** 1351 | * Specify only one of the following parameters: %1$s 1352 | */ 1353 | ONLY_ONE_OF_PARAMETERS = 458, 1354 | /** 1355 | * Unknown report type. 1356 | */ 1357 | UNKNOWN_REPORT_TYPE = 459, 1358 | /** 1359 | * The 'per_time' parameter is invalid. 1360 | */ 1361 | UNKNOWN_PERIOD = 460, 1362 | /** 1363 | * The 'resource id' parameter is invalid. 1364 | */ 1365 | INVALID_RESOURCE_ID = 461, 1366 | /** 1367 | * New user name should start with a letter or digit and can contain latin characters 1368 | */ 1369 | INVALID_NEW_USER_NAME = 462, 1370 | /** 1371 | * Blank password is not allowed. Please specify a new password at least 8 characters long. 1372 | */ 1373 | EMPTY_NEW_PASSWORD = 463, 1374 | /** 1375 | * Password should be at least 8 characters long and contain uppercase characters (A-Z) 1376 | */ 1377 | REQUIRED_CHARACTERS_NEW_PASSWORD = 464, 1378 | /** 1379 | * The 'dialogflow_key_id' parameter is invalid. 1380 | */ 1381 | INVALID_DIALOGFLOW_KEY_ID = 465, 1382 | /** 1383 | * The 'billing_address_state' parameter length must be less than 1384 | */ 1385 | INVALID_BILLING_ADDRESS_STATE_LEN = 466, 1386 | /** 1387 | * The old contractor has a debt and cannot be changed 1388 | */ 1389 | CONTRACTOR_WITH_DEBT = 467, 1390 | /** 1391 | * Cannot change the contractor because previous period is not closed 1392 | */ 1393 | INVALID_CHANGE_CONTRACTOR_IN_PREV_PERIOD = 468, 1394 | /** 1395 | * Invalid value specified for the ‘direction’ parameter. Allowed parameter values are: 'IN' 1396 | */ 1397 | INVALID_SMS_DIRECTION_PARAMETER = 470, 1398 | /** 1399 | * Cannot fetch the subscription templates for the current account as it does not support child account management. 1400 | */ 1401 | CANT_GET_TEMPLATES_FOR_ACCOUNT = 471, 1402 | /** 1403 | * The following agent parameters can not be found: 1404 | */ 1405 | EMPTY_AGREEMENT_ARGUMENTS = 472, 1406 | /** 1407 | * Operation denied for the current status of the document: %s. 1408 | */ 1409 | INVALID_DOCUMENT_STATUS = 473, 1410 | /** 1411 | * The 'document_id' parameter is invalid. 1412 | */ 1413 | INVALID_DOCUMENT_ID = 474, 1414 | /** 1415 | * The 'individual_phone_number' parameter is invalid. 1416 | */ 1417 | INVALID_INDIVIDUAL_PHONE_NUMBER = 475, 1418 | /** 1419 | * The 'legal_status' parameter is invalid. 1420 | */ 1421 | INVALID_LEGAL_STATUS = 476, 1422 | /** 1423 | * The \'%s\' parameter length must not exceed %d symbols. 1424 | */ 1425 | LENGTH_EXCEEDED = 477, 1426 | /** 1427 | * The 'proxy_passport_series' parameter is invalid. 1428 | */ 1429 | INVALID_PROXY_PASSPORT_SERIES = 478, 1430 | /** 1431 | * The 'proxy_passport_number' parameter is invalid. 1432 | */ 1433 | INVALID_PROXY_PASSPORT_NUMBER = 479, 1434 | /** 1435 | * Update failed. You cannot change your individual taxpayer number. To change it 1436 | */ 1437 | CONTRACTOR_DATA_CONFLICTS_WITH_AGREEMENT = 480, 1438 | /** 1439 | * The 'agreement' parameter is invalid. 1440 | */ 1441 | INVALID_AGREEMENT_DOCUMENT = 481, 1442 | /** 1443 | * Invalid MIME type. 1444 | */ 1445 | INVALID_MIME_TYPE = 482, 1446 | /** 1447 | * Invalid email. 1448 | */ 1449 | INVALID_AGREEMENT_EMAIL = 483, 1450 | /** 1451 | * HTTP request is rejected due to probable automatic request resend. Try again later. 1452 | */ 1453 | HTTP_REQUEST_REJECTED = 484, 1454 | /** 1455 | * Specify the '%s' parameter 1456 | */ 1457 | PARAMETER_CANT_BE_EMPTY = 485, 1458 | /** 1459 | * Specify the '%1$s' parameter. 1460 | */ 1461 | PARAMETER_CANT_BE_EMPTY_EX = 485, 1462 | /** 1463 | * Invalid 'bik' parameter value. 1464 | */ 1465 | INVALID_BIK = 486, 1466 | /** 1467 | * Invalid 'expense_account' parameter value. 1468 | */ 1469 | INVALID_EXPENSE_ACCOUNT = 487, 1470 | /** 1471 | * Invalid 'correspondent_account' parameter value. 1472 | */ 1473 | INVALID_CORRESPONDENT_ACCOUNT = 488, 1474 | /** 1475 | * Cannot change the contractor in a closed period 1476 | */ 1477 | INVALID_CHANGE_CONTRACTOR_IN_PERIOD = 489, 1478 | /** 1479 | * Not found selected contractor 1480 | */ 1481 | INVALID_CONTRATOR = 490, 1482 | /** 1483 | * The '%1$s' must be greater than %3$s%4$s. 1484 | */ 1485 | LOW_AMOUNT = 491, 1486 | /** 1487 | * The '%1$s' parameter is forbidden. 1488 | */ 1489 | FORBIDDEN_PARAMETER = 492, 1490 | /** 1491 | * The '%1$s' is not unique. 1492 | */ 1493 | VALUE_NOT_UNIQUE = 493, 1494 | /** 1495 | * The queues limit per application is exceeded. 1496 | */ 1497 | SC_QUEUE_COUNT_LIMIT = 494, 1498 | /** 1499 | * The skill count limit per application is exceeded."; 1500 | */ 1501 | SC_SKILL_COUNT_LIMIT = 495, 1502 | /** 1503 | * The '%1$s' parameter is invalid. 1504 | */ 1505 | INVALID = 496, 1506 | /** 1507 | * %2$s should be in range of %3$s..%4$s 1508 | */ 1509 | INVALID_RANGE = 497, 1510 | /** 1511 | * Agent can be assigned up to 5 skills 1512 | */ 1513 | MAX_AGENT_SKILLS_EXCEEDED = 498, 1514 | /** 1515 | * The '%1$s' parameter length must be less than %3$s. 1516 | */ 1517 | TOO_LONG = 499, 1518 | /** 1519 | * The 'partner_code' parameter length must be less than 1520 | */ 1521 | INVALID_PARTNER_CODE_LENGTH = 500, 1522 | /** 1523 | * File not found. 1524 | */ 1525 | FILE_NOT_FOUND = 501, 1526 | /** 1527 | * No routes for numbers %3$s in dst_numbers 1528 | */ 1529 | NO_ROUTE_FOR_DST_NUMBERS = 506, 1530 | /** 1531 | * The 'src_number' parameter is invalid. 1532 | */ 1533 | INVALID_SRC_NUMBER = 507, 1534 | /** 1535 | * The 'text' parameter is invalid. 1536 | */ 1537 | INVALID_TEXT = 508, 1538 | /** 1539 | * A2P SMS disabled for number %1$s 1540 | */ 1541 | A2P_SMS_DISABLED = 509, 1542 | /** 1543 | * Registration incomplete 1544 | */ 1545 | REGISTRATION_INCOMPLETE = 511, 1546 | /** 1547 | * '%1$s' parameter changes limit exceeded. 1548 | */ 1549 | EXCEED = 512, 1550 | /** 1551 | * Unable to send an email 1552 | */ 1553 | UNABLE_SEND_EMAIL = 513, 1554 | /** 1555 | * Account creation has already started 1556 | */ 1557 | LOCKED = 514, 1558 | /** 1559 | * The same operation has been performed recently. Please 1560 | */ 1561 | SAME_OPERATION_LIMIT = 515, 1562 | /** 1563 | * Payment in progress. 1564 | */ 1565 | PAYMENT_IN_PROGRESS = 516, 1566 | /** 1567 | * The combined length of the '%1$s' and '%2$s' parameters cannot be less than 6 characters. 1568 | */ 1569 | INSUFFICIENT_PASSPORT_DATA_LENGTH = 517, 1570 | /** 1571 | * Invalid SSL Certificate type. You have specified the VOIP provider type in your request but the certificate provided is not of type VoIP. 1572 | */ 1573 | CERT_APPLE_INVALID = 518, 1574 | /** 1575 | * Invalid SSL Certificate type. You have provided the VOIP certificate type in your request but the provider specified is not of type VOIP. 1576 | */ 1577 | CERT_APPLE_VOIP_INVALID = 519, 1578 | /** 1579 | * SSL Certificate is expired. Expiration date: %s 1580 | */ 1581 | CERT_EXPIRED = 520, 1582 | /** 1583 | * SSL Certificate is not yet valid. Please check the \'Not Valid Before\' parameter in the certificate properties. 1584 | */ 1585 | CERT_NOT_YET_VALID = 521, 1586 | /** 1587 | * SSL Certificate does not support production mode. Please check the \'is_dev_mode\' parameter in your request. 1588 | */ 1589 | CERT_PROD_MODE_NOT_SUPPORTED = 522, 1590 | /** 1591 | * Password is too weak 1592 | */ 1593 | PASSWORD_TOO_WEAK = 523, 1594 | /** 1595 | * Password cannot contain spaces. 1596 | */ 1597 | WHITESPACES_NOT_ALLOWED = 524, 1598 | /** 1599 | * Grouping by user can be specified for %s reports only. 1600 | */ 1601 | INAPPROPRIATE_AGENT_REPORTS = 525, 1602 | /** 1603 | * Grouping by queue can be specified for %s reports only. 1604 | */ 1605 | INAPPROPRIATE_QUEUE_REPORTS = 526, 1606 | /** 1607 | * Please make a request outside VPN. 1608 | */ 1609 | VPN_IS_NOT_ALLOWED = 527, 1610 | /** 1611 | * Sms is not supported 1612 | */ 1613 | NOT_SUPPORT_SMS = 528, 1614 | /** 1615 | * The list of phone numbers for this category is not available. 1616 | */ 1617 | PHONE_NUMBERS_LIST_IS_NOT_AVAILABLE = 529, 1618 | /** 1619 | * Cannot get the number list for this category. Please 1620 | */ 1621 | BUYING_BY_PHONE_NUMBER_IS_NOT_SUPPORTED = 530, 1622 | /** 1623 | * This phone category does not require a regulation address. 1624 | */ 1625 | REGULATION_ADDRESS_NOT_REQUIRED = 531, 1626 | /** 1627 | * This regulation address does not require additional documents. 1628 | */ 1629 | REGULATION_ADDRESS_NOT_REQUIRED_ADDITIONAL_DOCUMENTS = 532, 1630 | /** 1631 | * We do not accept cards issued outside Russian Federation. 1632 | */ 1633 | ALFABANK_PAYMENT_BY_NOT_RUS_CARD_FORBIDDEN = 533, 1634 | /** 1635 | * Cannot find a proper email for receipts. 1636 | */ 1637 | NO_EMAIL_FOR_RECEIPT = 534, 1638 | /** 1639 | * Please choose a password that you have not used before. 1640 | */ 1641 | PASSWORD_WAS_ALREADY_USED = 535, 1642 | /** 1643 | * Cannot add or delete Authorized IPs because this setting is managed by your parent account. 1644 | */ 1645 | PARENT_AUTHORIZED_IPS_USED = 536, 1646 | /** 1647 | * Changing the email is only possible with password authentication. 1648 | */ 1649 | ONLY_PASSWORD_AUTHENTICATION_FOR_EMAIL_CHANGING = 537, 1650 | /** 1651 | * Onboarding is currently in progress. 1652 | */ 1653 | ONBOARDING_IN_PROGRESS = 538, 1654 | /** 1655 | * Update failed. No active onboarding process found. 1656 | */ 1657 | ONBOARDING_NOT_STARTED = 539, 1658 | /** 1659 | * This type of subscription has been already attached 1660 | */ 1661 | COUNTABLE_SUBSCRIPTION_WAS_ALREADY_USED = 540, 1662 | /** 1663 | * Countable subscription must be in active status 1664 | */ 1665 | COUNTABLE_SUBSCRIPTION_MUST_BE_IN_ACTIVE_STATUS = 541, 1666 | /** 1667 | * The 'number_status' parameter is invalid. 1668 | */ 1669 | INVALID_NUMBER_STATUS = 542, 1670 | /** 1671 | * The billing address is incorrect. Please check it and try again. 1672 | */ 1673 | CAN_NOT_PAY_WITHOUT_VALID_ADDR = 543, 1674 | /** 1675 | * Invalid custom_record_storage_id. 1676 | */ 1677 | INVALID_CUSTOM_RECORD_STORAGE_ID = 544, 1678 | /** 1679 | * Invalid 'host' parameter value. 1680 | */ 1681 | INVALID_HOST_PARAMETER = 545, 1682 | /** 1683 | * Invalid Application IDs. 1684 | */ 1685 | INVALID_APPLICATION_IDS = 546, 1686 | /** 1687 | * Test phone number already exists. 1688 | */ 1689 | TEST_NUMBER_ALREADY_EXISTS = 547, 1690 | /** 1691 | * Test phone number does not exist. 1692 | */ 1693 | TEST_NUMBER_NO_NUMBER = 548, 1694 | /** 1695 | * Test phone number is already verified. 1696 | */ 1697 | TEST_NUMBER_VERIFIED = 549, 1698 | /** 1699 | * No attempts left to enter the verification code. 1700 | */ 1701 | TEST_NUMBER_CODE_ATTEMPTS_LIMIT = 550, 1702 | /** 1703 | * Please get a code first. 1704 | */ 1705 | TEST_NUMBER_NO_CODE = 551, 1706 | /** 1707 | * Wrong verification code. 1708 | */ 1709 | TEST_NUMBER_WRONG_CODE = 552, 1710 | /** 1711 | * No attempts left to verify this number. 1712 | */ 1713 | TEST_NUMBER_VERIFICATION_LIMIT = 553, 1714 | /** 1715 | * You've reached the daily limit on verification calls 1716 | */ 1717 | TEST_NUMBER_VERIFICATION_DAILY_LIMIT = 554, 1718 | /** 1719 | * The 'verification_code' parameter is invalid. 1720 | */ 1721 | INVALID_TEST_NUMBER_VERIFICATION_CODE = 555, 1722 | /** 1723 | * You can add only 10 emails addresses. 1724 | */ 1725 | EMAIL_COUNT_LIMIT = 556, 1726 | /** 1727 | * Report is not found. 1728 | */ 1729 | REPORT_NOT_FOUND = 557, 1730 | /** 1731 | * Application is not found. 1732 | */ 1733 | APPLICATION_NOT_FOUND = 558, 1734 | /** 1735 | * Please enter a custom status that you have not used before. 1736 | */ 1737 | SQ_CUSTOM_STATUS_ALREADY_EXISTS = 559, 1738 | /** 1739 | * We need your email address to send a receipt after payment. 1740 | */ 1741 | EMPTY_BILLING_EMAIL = 560, 1742 | /** 1743 | * You cannot use this currency with the current storage region. Please choose another currency or storage region. 1744 | */ 1745 | MISMATCH_CURRENCY_AND_REGION = 561, 1746 | /** 1747 | * You cannot call this function for custom record storages. 1748 | */ 1749 | FORBIDDEN_LINK_REMOVING = 562, 1750 | /** 1751 | * You cannot bind more than %1$s queues to an agent. 1752 | */ 1753 | EXCEEDED_QUEUES_PER_AGENT_LIMIT = 563, 1754 | /** 1755 | * The 'price' parameter is invalid. 1756 | */ 1757 | INVALID_SETTING_MGP_PRICE = 564, 1758 | /** 1759 | * Setting MGP already exists. 1760 | */ 1761 | SETTING_MGP_ALREADY_EXISTS = 565, 1762 | /** 1763 | * Setting MGP does not exist. 1764 | */ 1765 | SETTING_MGP_DOES_NOT_EXISTS = 566, 1766 | /** 1767 | * Account MGP already exists. 1768 | */ 1769 | ACCOUNT_MGP_ALREADY_EXISTS = 567, 1770 | /** 1771 | * Account MGP does not exist. 1772 | */ 1773 | ACCOUNT_MGP_DOES_NOT_EXISTS = 568, 1774 | /** 1775 | * Date range must be within %1$d days. 1776 | */ 1777 | DATE_RANGE_LIMIT = 569, 1778 | /** 1779 | * The caller ID is already verified. You can extend the verification after %1$d day(s). 1780 | */ 1781 | CALLER_ID_ALREADY_VERIFIED = 570, 1782 | /** 1783 | * MGP template does not exist. 1784 | */ 1785 | MGP_TEMPLATE_DOES_NOT_EXISTS = 571, 1786 | /** 1787 | * Address not found. 1788 | */ 1789 | AVALARA_ADDR_NOT_FOUND = 572, 1790 | /** 1791 | * You cannot transfer funds to this user 1792 | */ 1793 | USER_WITHOUT_SEPARATE_BILLING_ACCOUNT = 573, 1794 | /** 1795 | * Cannot verify your documents at phone numbers provider. %1$s 1796 | */ 1797 | BICS_DOCUMENT_FILE_ERROR = 574, 1798 | /** 1799 | * Required fields for phone number provider are missing or invalid. %1$s 1800 | */ 1801 | BICS_MANDATORY_FIELDS_ERROR = 575, 1802 | /** 1803 | * Cannot buy the selected phone number. %1$s 1804 | */ 1805 | BICS_NUMBERS_ERROR = 576, 1806 | /** 1807 | * Cannot request phone numbers request from the provider. Please contact support. 1808 | */ 1809 | BICS_REQUEST_ERROR = 577, 1810 | /** 1811 | * Phone number provider is temporarily unavailable. Please contact support. 1812 | */ 1813 | BICS_SERVICE_UNAVAILABLE = 578, 1814 | /** 1815 | * Required address for phone number provider is invalid. %1$s 1816 | */ 1817 | BICS_ADDRESS_ERROR = 579, 1818 | /** 1819 | * Cannot purchase the selected phone number. Please contact support. 1820 | */ 1821 | BICS_ORDER_ERROR = 580, 1822 | /** 1823 | * No phone numbers available for the current request. Please contact support. 1824 | */ 1825 | PHONE_PROVIDER_NO_SUCH_PRODUCT = 581, 1826 | /** 1827 | * Specify a valid mobile number. 1828 | */ 1829 | INVALID_PHONE_TO_PAYMENTS = 583, 1830 | /** 1831 | * Specified phone number is rented. Please enter a personal phone number. 1832 | */ 1833 | PHONE_IS_NOT_PERSONAL = 584, 1834 | } 1835 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "declaration": true, 6 | "sourceMap": false, 7 | "outDir": "dist", 8 | "rootDir": "src", 9 | "noImplicitAny": false 10 | }, 11 | "include": [ 12 | "src/**/*" 13 | ] 14 | } -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # This file is generated by running "yarn install" inside your project. 2 | # Manual changes might be lost - proceed with caution! 3 | 4 | __metadata: 5 | version: 6 6 | cacheKey: 8 7 | 8 | "@types/node@npm:11.11.5": 9 | version: 11.11.5 10 | resolution: "@types/node@npm:11.11.5" 11 | checksum: c33eac3c34f176aec87b98de95247c0347a59c69a86ed88a286be1478aeb19ae285b30165014998a242953bbfdd193e2d9c76c2127074a7fe8700ac588596336 12 | languageName: node 13 | linkType: hard 14 | 15 | "@voximplant/apiclient-nodejs@workspace:.": 16 | version: 0.0.0-use.local 17 | resolution: "@voximplant/apiclient-nodejs@workspace:." 18 | dependencies: 19 | "@types/node": 11.11.5 20 | axios: 0.21.4 21 | form-data: 2.5.1 22 | jsonwebtoken: 9.0.2 23 | prettier: 2.8.8 24 | rimraf: 2.7.1 25 | typescript: 3.9.10 26 | languageName: unknown 27 | linkType: soft 28 | 29 | "asynckit@npm:^0.4.0": 30 | version: 0.4.0 31 | resolution: "asynckit@npm:0.4.0" 32 | checksum: 7b78c451df768adba04e2d02e63e2d0bf3b07adcd6e42b4cf665cb7ce899bedd344c69a1dcbce355b5f972d597b25aaa1c1742b52cffd9caccb22f348114f6be 33 | languageName: node 34 | linkType: hard 35 | 36 | "axios@npm:0.21.4": 37 | version: 0.21.4 38 | resolution: "axios@npm:0.21.4" 39 | dependencies: 40 | follow-redirects: ^1.14.0 41 | checksum: 44245f24ac971e7458f3120c92f9d66d1fc695e8b97019139de5b0cc65d9b8104647db01e5f46917728edfc0cfd88eb30fc4c55e6053eef4ace76768ce95ff3c 42 | languageName: node 43 | linkType: hard 44 | 45 | "balanced-match@npm:^1.0.0": 46 | version: 1.0.2 47 | resolution: "balanced-match@npm:1.0.2" 48 | checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 49 | languageName: node 50 | linkType: hard 51 | 52 | "brace-expansion@npm:^1.1.7": 53 | version: 1.1.11 54 | resolution: "brace-expansion@npm:1.1.11" 55 | dependencies: 56 | balanced-match: ^1.0.0 57 | concat-map: 0.0.1 58 | checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 59 | languageName: node 60 | linkType: hard 61 | 62 | "buffer-equal-constant-time@npm:1.0.1": 63 | version: 1.0.1 64 | resolution: "buffer-equal-constant-time@npm:1.0.1" 65 | checksum: 80bb945f5d782a56f374b292770901065bad21420e34936ecbe949e57724b4a13874f735850dd1cc61f078773c4fb5493a41391e7bda40d1fa388d6bd80daaab 66 | languageName: node 67 | linkType: hard 68 | 69 | "combined-stream@npm:^1.0.6": 70 | version: 1.0.8 71 | resolution: "combined-stream@npm:1.0.8" 72 | dependencies: 73 | delayed-stream: ~1.0.0 74 | checksum: 49fa4aeb4916567e33ea81d088f6584749fc90c7abec76fd516bf1c5aa5c79f3584b5ba3de6b86d26ddd64bae5329c4c7479343250cfe71c75bb366eae53bb7c 75 | languageName: node 76 | linkType: hard 77 | 78 | "concat-map@npm:0.0.1": 79 | version: 0.0.1 80 | resolution: "concat-map@npm:0.0.1" 81 | checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af 82 | languageName: node 83 | linkType: hard 84 | 85 | "delayed-stream@npm:~1.0.0": 86 | version: 1.0.0 87 | resolution: "delayed-stream@npm:1.0.0" 88 | checksum: 46fe6e83e2cb1d85ba50bd52803c68be9bd953282fa7096f51fc29edd5d67ff84ff753c51966061e5ba7cb5e47ef6d36a91924eddb7f3f3483b1c560f77a0020 89 | languageName: node 90 | linkType: hard 91 | 92 | "ecdsa-sig-formatter@npm:1.0.11": 93 | version: 1.0.11 94 | resolution: "ecdsa-sig-formatter@npm:1.0.11" 95 | dependencies: 96 | safe-buffer: ^5.0.1 97 | checksum: 207f9ab1c2669b8e65540bce29506134613dd5f122cccf1e6a560f4d63f2732d427d938f8481df175505aad94583bcb32c688737bb39a6df0625f903d6d93c03 98 | languageName: node 99 | linkType: hard 100 | 101 | "follow-redirects@npm:^1.14.0": 102 | version: 1.15.9 103 | resolution: "follow-redirects@npm:1.15.9" 104 | peerDependenciesMeta: 105 | debug: 106 | optional: true 107 | checksum: 859e2bacc7a54506f2bf9aacb10d165df78c8c1b0ceb8023f966621b233717dab56e8d08baadc3ad3b9db58af290413d585c999694b7c146aaf2616340c3d2a6 108 | languageName: node 109 | linkType: hard 110 | 111 | "form-data@npm:2.5.1": 112 | version: 2.5.1 113 | resolution: "form-data@npm:2.5.1" 114 | dependencies: 115 | asynckit: ^0.4.0 116 | combined-stream: ^1.0.6 117 | mime-types: ^2.1.12 118 | checksum: 5134ada56cc246b293a1ac7678dba6830000603a3979cf83ff7b2f21f2e3725202237cfb89e32bcb38a1d35727efbd3c3a22e65b42321e8ade8eec01ce755d08 119 | languageName: node 120 | linkType: hard 121 | 122 | "fs.realpath@npm:^1.0.0": 123 | version: 1.0.0 124 | resolution: "fs.realpath@npm:1.0.0" 125 | checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 126 | languageName: node 127 | linkType: hard 128 | 129 | "glob@npm:^7.1.3": 130 | version: 7.2.3 131 | resolution: "glob@npm:7.2.3" 132 | dependencies: 133 | fs.realpath: ^1.0.0 134 | inflight: ^1.0.4 135 | inherits: 2 136 | minimatch: ^3.1.1 137 | once: ^1.3.0 138 | path-is-absolute: ^1.0.0 139 | checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 140 | languageName: node 141 | linkType: hard 142 | 143 | "inflight@npm:^1.0.4": 144 | version: 1.0.6 145 | resolution: "inflight@npm:1.0.6" 146 | dependencies: 147 | once: ^1.3.0 148 | wrappy: 1 149 | checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd 150 | languageName: node 151 | linkType: hard 152 | 153 | "inherits@npm:2": 154 | version: 2.0.4 155 | resolution: "inherits@npm:2.0.4" 156 | checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 157 | languageName: node 158 | linkType: hard 159 | 160 | "jsonwebtoken@npm:9.0.2": 161 | version: 9.0.2 162 | resolution: "jsonwebtoken@npm:9.0.2" 163 | dependencies: 164 | jws: ^3.2.2 165 | lodash.includes: ^4.3.0 166 | lodash.isboolean: ^3.0.3 167 | lodash.isinteger: ^4.0.4 168 | lodash.isnumber: ^3.0.3 169 | lodash.isplainobject: ^4.0.6 170 | lodash.isstring: ^4.0.1 171 | lodash.once: ^4.0.0 172 | ms: ^2.1.1 173 | semver: ^7.5.4 174 | checksum: fc739a6a8b33f1974f9772dca7f8493ca8df4cc31c5a09dcfdb7cff77447dcf22f4236fb2774ef3fe50df0abeb8e1c6f4c41eba82f500a804ab101e2fbc9d61a 175 | languageName: node 176 | linkType: hard 177 | 178 | "jwa@npm:^1.4.1": 179 | version: 1.4.1 180 | resolution: "jwa@npm:1.4.1" 181 | dependencies: 182 | buffer-equal-constant-time: 1.0.1 183 | ecdsa-sig-formatter: 1.0.11 184 | safe-buffer: ^5.0.1 185 | checksum: ff30ea7c2dcc61f3ed2098d868bf89d43701605090c5b21b5544b512843ec6fd9e028381a4dda466cbcdb885c2d1150f7c62e7168394ee07941b4098e1035e2f 186 | languageName: node 187 | linkType: hard 188 | 189 | "jws@npm:^3.2.2": 190 | version: 3.2.2 191 | resolution: "jws@npm:3.2.2" 192 | dependencies: 193 | jwa: ^1.4.1 194 | safe-buffer: ^5.0.1 195 | checksum: f0213fe5b79344c56cd443428d8f65c16bf842dc8cb8f5aed693e1e91d79c20741663ad6eff07a6d2c433d1831acc9814e8d7bada6a0471fbb91d09ceb2bf5c2 196 | languageName: node 197 | linkType: hard 198 | 199 | "lodash.includes@npm:^4.3.0": 200 | version: 4.3.0 201 | resolution: "lodash.includes@npm:4.3.0" 202 | checksum: 71092c130515a67ab3bd928f57f6018434797c94def7f46aafa417771e455ce3a4834889f4267b17887d7f75297dfabd96231bf704fd2b8c5096dc4a913568b6 203 | languageName: node 204 | linkType: hard 205 | 206 | "lodash.isboolean@npm:^3.0.3": 207 | version: 3.0.3 208 | resolution: "lodash.isboolean@npm:3.0.3" 209 | checksum: b70068b4a8b8837912b54052557b21fc4774174e3512ed3c5b94621e5aff5eb6c68089d0a386b7e801d679cd105d2e35417978a5e99071750aa2ed90bffd0250 210 | languageName: node 211 | linkType: hard 212 | 213 | "lodash.isinteger@npm:^4.0.4": 214 | version: 4.0.4 215 | resolution: "lodash.isinteger@npm:4.0.4" 216 | checksum: 6034821b3fc61a2ffc34e7d5644bb50c5fd8f1c0121c554c21ac271911ee0c0502274852845005f8651d51e199ee2e0cfebfe40aaa49c7fe617f603a8a0b1691 217 | languageName: node 218 | linkType: hard 219 | 220 | "lodash.isnumber@npm:^3.0.3": 221 | version: 3.0.3 222 | resolution: "lodash.isnumber@npm:3.0.3" 223 | checksum: 913784275b565346255e6ae6a6e30b760a0da70abc29f3e1f409081585875105138cda4a429ff02577e1bc0a7ae2a90e0a3079a37f3a04c3d6c5aaa532f4cab2 224 | languageName: node 225 | linkType: hard 226 | 227 | "lodash.isplainobject@npm:^4.0.6": 228 | version: 4.0.6 229 | resolution: "lodash.isplainobject@npm:4.0.6" 230 | checksum: 29c6351f281e0d9a1d58f1a4c8f4400924b4c79f18dfc4613624d7d54784df07efaff97c1ff2659f3e085ecf4fff493300adc4837553104cef2634110b0d5337 231 | languageName: node 232 | linkType: hard 233 | 234 | "lodash.isstring@npm:^4.0.1": 235 | version: 4.0.1 236 | resolution: "lodash.isstring@npm:4.0.1" 237 | checksum: eaac87ae9636848af08021083d796e2eea3d02e80082ab8a9955309569cb3a463ce97fd281d7dc119e402b2e7d8c54a23914b15d2fc7fff56461511dc8937ba0 238 | languageName: node 239 | linkType: hard 240 | 241 | "lodash.once@npm:^4.0.0": 242 | version: 4.1.1 243 | resolution: "lodash.once@npm:4.1.1" 244 | checksum: d768fa9f9b4e1dc6453be99b753906f58990e0c45e7b2ca5a3b40a33111e5d17f6edf2f768786e2716af90a8e78f8f91431ab8435f761fef00f9b0c256f6d245 245 | languageName: node 246 | linkType: hard 247 | 248 | "mime-db@npm:1.52.0": 249 | version: 1.52.0 250 | resolution: "mime-db@npm:1.52.0" 251 | checksum: 0d99a03585f8b39d68182803b12ac601d9c01abfa28ec56204fa330bc9f3d1c5e14beb049bafadb3dbdf646dfb94b87e24d4ec7b31b7279ef906a8ea9b6a513f 252 | languageName: node 253 | linkType: hard 254 | 255 | "mime-types@npm:^2.1.12": 256 | version: 2.1.35 257 | resolution: "mime-types@npm:2.1.35" 258 | dependencies: 259 | mime-db: 1.52.0 260 | checksum: 89a5b7f1def9f3af5dad6496c5ed50191ae4331cc5389d7c521c8ad28d5fdad2d06fd81baf38fed813dc4e46bb55c8145bb0ff406330818c9cf712fb2e9b3836 261 | languageName: node 262 | linkType: hard 263 | 264 | "minimatch@npm:^3.1.1": 265 | version: 3.1.2 266 | resolution: "minimatch@npm:3.1.2" 267 | dependencies: 268 | brace-expansion: ^1.1.7 269 | checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a 270 | languageName: node 271 | linkType: hard 272 | 273 | "ms@npm:^2.1.1": 274 | version: 2.1.3 275 | resolution: "ms@npm:2.1.3" 276 | checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d 277 | languageName: node 278 | linkType: hard 279 | 280 | "once@npm:^1.3.0": 281 | version: 1.4.0 282 | resolution: "once@npm:1.4.0" 283 | dependencies: 284 | wrappy: 1 285 | checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 286 | languageName: node 287 | linkType: hard 288 | 289 | "path-is-absolute@npm:^1.0.0": 290 | version: 1.0.1 291 | resolution: "path-is-absolute@npm:1.0.1" 292 | checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 293 | languageName: node 294 | linkType: hard 295 | 296 | "prettier@npm:2.8.8": 297 | version: 2.8.8 298 | resolution: "prettier@npm:2.8.8" 299 | bin: 300 | prettier: bin-prettier.js 301 | checksum: b49e409431bf129dd89238d64299ba80717b57ff5a6d1c1a8b1a28b590d998a34e083fa13573bc732bb8d2305becb4c9a4407f8486c81fa7d55100eb08263cf8 302 | languageName: node 303 | linkType: hard 304 | 305 | "rimraf@npm:2.7.1": 306 | version: 2.7.1 307 | resolution: "rimraf@npm:2.7.1" 308 | dependencies: 309 | glob: ^7.1.3 310 | bin: 311 | rimraf: bin.js 312 | checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd 313 | languageName: node 314 | linkType: hard 315 | 316 | "safe-buffer@npm:^5.0.1": 317 | version: 5.2.1 318 | resolution: "safe-buffer@npm:5.2.1" 319 | checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 320 | languageName: node 321 | linkType: hard 322 | 323 | "semver@npm:^7.5.4": 324 | version: 7.7.2 325 | resolution: "semver@npm:7.7.2" 326 | bin: 327 | semver: bin/semver.js 328 | checksum: dd94ba8f1cbc903d8eeb4dd8bf19f46b3deb14262b6717d0de3c804b594058ae785ef2e4b46c5c3b58733c99c83339068203002f9e37cfe44f7e2cc5e3d2f621 329 | languageName: node 330 | linkType: hard 331 | 332 | "typescript@npm:3.9.10": 333 | version: 3.9.10 334 | resolution: "typescript@npm:3.9.10" 335 | bin: 336 | tsc: bin/tsc 337 | tsserver: bin/tsserver 338 | checksum: 46c842e2cd4797b88b66ef06c9c41dd21da48b95787072ccf39d5f2aa3124361bc4c966aa1c7f709fae0509614d76751455b5231b12dbb72eb97a31369e1ff92 339 | languageName: node 340 | linkType: hard 341 | 342 | "typescript@patch:typescript@3.9.10#~builtin": 343 | version: 3.9.10 344 | resolution: "typescript@patch:typescript@npm%3A3.9.10#~builtin::version=3.9.10&hash=bda367" 345 | bin: 346 | tsc: bin/tsc 347 | tsserver: bin/tsserver 348 | checksum: dc7141ab555b23a8650a6787f98845fc11692063d02b75ff49433091b3af2fe3d773650dea18389d7c21f47d620fb3b110ea363dab4ab039417a6ccbbaf96fc2 349 | languageName: node 350 | linkType: hard 351 | 352 | "wrappy@npm:1": 353 | version: 1.0.2 354 | resolution: "wrappy@npm:1.0.2" 355 | checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 356 | languageName: node 357 | linkType: hard 358 | --------------------------------------------------------------------------------