├── .github ├── CODEOWNERS └── workflows │ ├── deploy-bot.yml │ ├── docs-deploy.yml │ └── unit-testing.yml ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── api.ts ├── api ├── api.base.ts ├── cloud-account.ts ├── database.ts ├── general.ts ├── subscription.ts └── task.ts ├── index.ts ├── package-lock.json ├── package.json ├── tests ├── mockers │ ├── cloud-account.json │ ├── database.json │ ├── general.json │ └── subscription.json └── unit │ ├── cloud-account.ts │ ├── database.ts │ ├── general.ts │ └── subscription.ts ├── tsconfig.json ├── tsdoc.json └── types ├── parameters ├── cloud-account.ts ├── database.ts └── subscription.ts ├── responses ├── cloud-account.ts ├── database.ts ├── general.ts └── subscription.ts └── task.ts /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @danitseitlin -------------------------------------------------------------------------------- /.github/workflows/deploy-bot.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Bot 2 | on: 3 | push: 4 | branches: [ master ] 5 | jobs: 6 | deployment: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Setting up the environment 11 | run: npm install && npm run build 12 | - name: Deploying version 13 | uses: danitseitlin/npm-package-deployer@master 14 | with: 15 | pkg_name: redis-cloud-api-sdk 16 | main_pkg_manager: npm 17 | npm_access_token: ${{secrets.NPM_AUTH_TOKEN}} 18 | github_access_token: ${{secrets.G_AUTH_TOKEN}} 19 | pkg_managers: "[github, npm]" 20 | pretty_print: true 21 | -------------------------------------------------------------------------------- /.github/workflows/docs-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Docs 2 | on: 3 | push: 4 | branches: [master] 5 | jobs: 6 | deploy: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - name: Setup 11 | run: npm install 12 | - name: Generating Docs 13 | run: npm run generate-docs 14 | - name: Deploy 🚀 15 | uses: JamesIves/github-pages-deploy-action@4.1.7 16 | with: 17 | branch: gh-pages # The branch the action should deploy to. 18 | folder: docs # The folder the action should deploy. -------------------------------------------------------------------------------- /.github/workflows/unit-testing.yml: -------------------------------------------------------------------------------- 1 | name: Unit testing 2 | 3 | on: 4 | workflow_dispatch: 5 | pull_request: 6 | branches: [master] 7 | jobs: 8 | CI: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | node-version: [10.x] 13 | steps: 14 | - uses: actions/checkout@v2 15 | - name: Use Node.js ${{ matrix.node-version }} 16 | uses: actions/setup-node@v1 17 | with: 18 | node-version: ${{ matrix.node-version }} 19 | - name: 'Setting up NPM' 20 | run: npm install && npm run build 21 | - name: 'Running unit tests on general requests' 22 | run: npm run general-unit-tests 23 | - name: 'Running unit tests on cloud account requests' 24 | run: npm run cloud-account-unit-tests 25 | - name: 'Running unit tests on subscription requests' 26 | run: npm run subscription-unit-tests 27 | - name: 'Running unit tests on database requests' 28 | run: npm run database-unit-tests 29 | env: 30 | CI: true 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github 2 | node_modules 3 | tests 4 | **/tests/*.ts 5 | **/tests/*.js 6 | types/ 7 | api.ts 8 | index.ts 9 | package-lock.json 10 | tsconfig.json -------------------------------------------------------------------------------- /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 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

21 | 22 | # Let's get started :memo: 23 | ### Installing latest version:
24 | ``` 25 | npm install redis-cloud-api-sdk@latest 26 | ``` 27 | 28 | ### Versions & Releases 29 | * A list of existing versions can be found [here](https://www.npmjs.com/package/redis-cloud-api-sdk?activeTab=versions) 30 | * A list of releases will be found [here](https://github.com/danitseitlin/redis-cloud-api-sdk/releases) 31 | 32 | # Documentation :book: 33 | Come and read our SDK documentation [here](https://danitseitlin.github.io/redis-cloud-api-sdk/classes/CloudAPISDK.html) before starting
34 | You can also find the API documentation [here](https://api.redislabs.com/v1/swagger-ui.html) 35 | 36 | # About :thought_balloon: 37 | This NPM package is an SDK for the [Redis Cloud REST API](https://docs.redis.com/latest/rc/api/).
38 | You can use [this module](https://www.npmjs.com/package/redis-cloud-api-sdk) to develop againts Redis Cloud REST API. 39 | -------------------------------------------------------------------------------- /api.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CreateSubscriptionParameters, SubscriptionUpdateParameters, CidrUpdateParameters, VpcPeeringCreationParameters 3 | } from './types/parameters/subscription'; 4 | import { 5 | DatabaseImportParameters, DatabaseCreationParameters, DatabaseUpdateParameters 6 | } from './types/parameters/database'; 7 | import { 8 | CloudAccountCreationParameters, CloudAccountUpdateParameters 9 | } from './types/parameters/cloud-account'; 10 | import { 11 | SubscriptionCloudProvider, SubscriptionCidrWhitelist, SubscriptionStatus, SubscriptionVpcPeering, 12 | SubscriptionVpcPeeringStatus, SubscriptionResponse 13 | } from './types/responses/subscription'; 14 | import { 15 | AccountInformation, DatabaseModule, SystemLog, PaymentMethod, Plan, Region, DataPersistence 16 | } from './types/responses/general'; 17 | import { 18 | CloudAccountResponse, CloudAccountStatus 19 | } from './types/responses/cloud-account'; 20 | import { 21 | TaskObject, 22 | TaskResponse, TaskStatus 23 | } from './types/task'; 24 | import { DatabaseResponse, DatabaseStatus } from './types/responses/database'; 25 | import { General } from './api/general'; 26 | import { Subscription } from './api/subscription' 27 | import { Task } from './api/task'; 28 | import { Database } from './api/database'; 29 | import { CloudAccount } from './api/cloud-account'; 30 | import { Client } from './api/api.base'; 31 | 32 | export class CloudAPISDK extends Client { 33 | private general: General 34 | private subscription: Subscription 35 | private database: Database 36 | private cloudAccount: CloudAccount 37 | private task: Task 38 | 39 | /** 40 | * Initializing the constructur with given custom parameters 41 | * @param parameters The parameters we can pass you customize our sdk client 42 | */ 43 | constructor(parameters: CloudAPISDKParameters) { 44 | super(parameters); 45 | this.general = new General(this); 46 | this.subscription = new Subscription(this); 47 | this.database = new Database(this); 48 | this.cloudAccount = new CloudAccount(this); 49 | this.task = new Task(this); 50 | } 51 | 52 | /** 53 | * Returning current account and related information 54 | */ 55 | async getAccountInformation(): Promise { 56 | return await this.general.getAccountInformation(); 57 | } 58 | 59 | /** 60 | * Returning a lookup list of data persistence values 61 | */ 62 | async getDataPersistences(): Promise { 63 | return await this.general.getDataPersistences(); 64 | } 65 | 66 | /** 67 | * Returning a lookup list of database modules supported in current account (support may differ based on subscription and database settings) 68 | */ 69 | async getDatabaseModules(): Promise { 70 | return await this.general.getDatabaseModules(); 71 | } 72 | 73 | /** 74 | * Returning system log information for current account 75 | * @param limit Maximum number of items to return 76 | * @param offset Number of items to skip 77 | */ 78 | async getSystemLogs(limit: number, offset: number): Promise { 79 | return await this.general.getSystemLogs(limit, offset); 80 | } 81 | 82 | /** 83 | * Returning a lookup list of current account’s payment methods 84 | */ 85 | async getPaymentMethods(): Promise { 86 | return await this.general.getPaymentMethods(); 87 | } 88 | 89 | /** 90 | * Returning a lookup list of current account's plans 91 | * @param provider The cloud provider of the plan 92 | */ 93 | async getPlans(provider: SubscriptionCloudProvider): Promise { 94 | return await this.general.getPlans(provider); 95 | } 96 | 97 | /** 98 | * Returning a lookup list of current account's regions 99 | * @param provider The cloud provider of the plan 100 | */ 101 | async getRegions(provider: SubscriptionCloudProvider): Promise { 102 | return await this.general.getRegions(provider); 103 | } 104 | 105 | /* ------------------------------------------------------------------------------Subscription------------------------------------------------------------------------------*/ 106 | 107 | /** 108 | * Returning a lookup list of current account's subscriptions 109 | */ 110 | async getSubscriptions(): Promise { 111 | return await this.subscription.getSubscriptions(); 112 | } 113 | 114 | /** 115 | * Creating a subscription 116 | * @param createParameters The given parameters given for the subscription creation 117 | */ 118 | async createSubscription(createParameters: CreateSubscriptionParameters): Promise { 119 | return await this.subscription.createSubscription(createParameters); 120 | } 121 | 122 | /** 123 | * Returning a subscription 124 | * @param subscriptionId The id of the subscription 125 | */ 126 | async getSubscription(subscriptionId: number): Promise { 127 | return await this.subscription.getSubscription(subscriptionId) 128 | } 129 | 130 | /** 131 | * Updating a subscription 132 | * @param subscriptionId The id of the subscription 133 | * @param updateParameters The given update parameters to update the subscription with 134 | */ 135 | async updateSubscription(subscriptionId: number, updateParameters: SubscriptionUpdateParameters): Promise { 136 | return await this.subscription.updateSubscription(subscriptionId, updateParameters) 137 | } 138 | 139 | /** 140 | * Deleting a subscription 141 | * @param subscriptionId The id of the subscription 142 | */ 143 | async deleteSubscription(subscriptionId: number): Promise { 144 | return await this.subscription.deleteSubscription(subscriptionId) 145 | } 146 | 147 | /** 148 | * Returning a lookup list of a subscription CIDR whitelists 149 | * @param subscriptionId The id of the subscription 150 | */ 151 | async getSubscriptionCidrWhitelist(subscriptionId: number): Promise { 152 | return await this.subscription.getSubscriptionCidrWhitelist(subscriptionId) 153 | } 154 | 155 | /** 156 | * Updating a subscription CIDR whitelists 157 | * @param subscriptionId The id of the subscription 158 | * @param updateParameters The parameters to update the subscription with 159 | */ 160 | async updateSubscriptionCidrWhitelists(subscriptionId: number, updateParameters: CidrUpdateParameters): Promise { 161 | return await this.subscription.updateSubscriptionCidrWhitelists(subscriptionId, updateParameters) 162 | } 163 | 164 | /** 165 | * Returning a lookup list of the subscription VPC Peerings 166 | * @param subscriptionId The id of the subscription 167 | */ 168 | async getVpcPeerings(subscriptionId: number): Promise { 169 | return await this.subscription.getVpcPeerings(subscriptionId) 170 | } 171 | 172 | /** 173 | * Creating a subscription VPC peering 174 | * @param subscriptionId The id of the subscription 175 | * @param createParameters The create parameters to create the VPC peering with 176 | */ 177 | async createSubscriptionVpcPeering(subscriptionId: number, createParameters: VpcPeeringCreationParameters): Promise { 178 | return await this.subscription.createSubscriptionVpcPeering(subscriptionId, createParameters) 179 | } 180 | 181 | /** 182 | * Deleting a subscription VPC peering 183 | * @param subscriptionId The id of the subscription 184 | * @param vpcPeeringId The id of the VPC peering 185 | */ 186 | async deleteSubscriptionVpcPeering(subscriptionId: number, vpcPeeringId: number): Promise { 187 | return await this.subscription.deleteSubscriptionVpcPeering(subscriptionId, vpcPeeringId) 188 | } 189 | 190 | /* ---------------------------------------------------------------------------------Database---------------------------------------------------------------------------------*/ 191 | 192 | /** 193 | * Returning a lookup list of databases owned by the account 194 | * @param subscriptionId The id of the subscription 195 | */ 196 | async getDatabases(subscriptionId: number): Promise { 197 | return await this.database.getDatabases(subscriptionId); 198 | } 199 | 200 | /** 201 | * Creating a database 202 | * @param subscriptionId The id of the subscription 203 | * @param createParameters The create parameters to create the database 204 | */ 205 | async createDatabase(subscriptionId: number, createParameters: DatabaseCreationParameters): Promise { 206 | return this.database.createDatabase(subscriptionId, createParameters); 207 | } 208 | 209 | /** 210 | * Returning a database 211 | * @param subscriptionId The id of the subscription 212 | * @param databaseId The id of the database 213 | */ 214 | async getDatabase(subscriptionId: number, databaseId: number): Promise { 215 | return this.database.getDatabase(subscriptionId, databaseId); 216 | } 217 | 218 | /** 219 | * Updating a database 220 | * @param subscriptionId The id of the subscription 221 | * @param databaseId The id of the database 222 | * @param updateParameters The update parameters to update the database 223 | */ 224 | async updateDatabase(subscriptionId: number, databaseId: number, updateParameters: DatabaseUpdateParameters): Promise { 225 | return this.database.updateDatabase(subscriptionId, databaseId, updateParameters); 226 | } 227 | 228 | /** 229 | * Deleting a database 230 | * @param subscriptionId The id of the subscription 231 | * @param databaseId The id of the database 232 | */ 233 | async deleteDatabase(subscriptionId: number, databaseId: number): Promise { 234 | return this.database.deleteDatabase(subscriptionId, databaseId); 235 | } 236 | 237 | /** 238 | * Backing up a database 239 | * @param subscriptionId The id of the subscription 240 | * @param databaseId The id of the database 241 | */ 242 | async backupDatabase(subscriptionId: number, databaseId: number): Promise { 243 | return this.database.backupDatabase(subscriptionId, databaseId); 244 | } 245 | 246 | /** 247 | * Importing a dataset into a database 248 | * @param subscriptionId The id of the subscription 249 | * @param databaseId The id of the database 250 | * @param importParameters The import parameters to import into a database 251 | */ 252 | async importIntoDatabase(subscriptionId: number, databaseId: number, importParameters: DatabaseImportParameters): Promise { 253 | return this.database.importIntoDatabase(subscriptionId, databaseId, importParameters); 254 | } 255 | 256 | /* ------------------------------------------------------------------------------Cloud-Account------------------------------------------------------------------------------*/ 257 | /** 258 | * Returning a lookup list of cloud accounts owned by the account 259 | */ 260 | async getCloudAccounts(): Promise { 261 | return await this.cloudAccount.getCloudAccounts(); 262 | } 263 | 264 | /** 265 | * Returning a cloud account 266 | * @param cloudAccountId The id of the cloud account 267 | */ 268 | async getCloudAccount(cloudAccountId: number): Promise { 269 | return await this.cloudAccount.getCloudAccount(cloudAccountId); 270 | } 271 | 272 | /** 273 | * Creating a cloud account 274 | * @param createParameters The create parameters to create a cloud account 275 | */ 276 | async createCloudAccount(createParameters: CloudAccountCreationParameters): Promise { 277 | return await this.cloudAccount.createCloudAccount(createParameters); 278 | } 279 | 280 | /** 281 | * Updating a cloud account 282 | * @param cloudAccountId The id of the cloud account 283 | * @param updateParameters The update parameters to update a cloud account 284 | */ 285 | async updateCloudAccount(cloudAccountId: number, updateParameters: CloudAccountUpdateParameters): Promise { 286 | return await this.cloudAccount.updateCloudAccount(cloudAccountId, updateParameters); 287 | } 288 | 289 | /** 290 | * Deleting a cloud account 291 | * @param cloudAccountId The id of the cloud account 292 | */ 293 | async deleteCloudAccount(cloudAccountId: number): Promise { 294 | return await this.cloudAccount.deleteCloudAccount(cloudAccountId); 295 | } 296 | 297 | /*------------------------------------------------------------------------------Task-------------------------------------------------------------------------------/* 298 | /** 299 | * Returning a lookup list of tasks owned by the account 300 | */ 301 | async getTasks(): Promise { 302 | return await this.task.getTasks() 303 | } 304 | 305 | /** 306 | * Returning a task 307 | * @param taskId The id of the task 308 | */ 309 | async getTask(taskId: number): Promise { 310 | return await this.task.getTask(taskId) 311 | } 312 | 313 | /*--------------------------------------------------------------------------------------Helper--functions-----------------------------------------------------------------------------------*/ 314 | 315 | /** 316 | * Waiting for the subscription status to change to a given status 317 | * @param subscriptionId The id of the subscription 318 | * @param expectedStatus The expected status 319 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes 320 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 321 | */ 322 | async waitForSubscriptionStatus(subscriptionId: number, expectedStatus: SubscriptionStatus, timeoutInSeconds = 20 * 60, sleepTimeInSeconds = 5) { 323 | return await this.subscription.waitForSubscriptionStatus(subscriptionId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 324 | } 325 | 326 | /** 327 | * Waiting for existing subscriptions statuses to change to a given status 328 | * @param expectedStatus The expected status 329 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes 330 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 331 | * @returns A batch of subscription responses 332 | */ 333 | async waitForSubscriptionsStatus(expectedStatus: SubscriptionStatus, timeoutInSeconds = 20 * 60, sleepTimeInSeconds = 5) { 334 | return await this.subscription.waitForSubscriptionsStatus(expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 335 | } 336 | 337 | /** 338 | * Waiting for the subscription VPC peering status to change to a given status 339 | * @param subscriptionId The id of the subscription 340 | * @param vpcPeeringId The id of the subscription VPC peering 341 | * @param expectedStatus The expected status 342 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 343 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 344 | */ 345 | async waitForVpcPeeringStatus(subscriptionId: number, vpcPeeringId: number, expectedStatus: SubscriptionVpcPeeringStatus, timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5){ 346 | return await this.subscription.waitForVpcPeeringStatus(subscriptionId, vpcPeeringId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 347 | } 348 | 349 | /** 350 | * Waiting for database status to change to a given status 351 | * @param subscriptionId The id of the subscription 352 | * @param databaseId The id of the database 353 | * @param expectedStatus The expected status 354 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 355 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 356 | */ 357 | async waitForDatabaseStatus(subscriptionId: number, databaseId: number, expectedStatus: DatabaseStatus, timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5) { 358 | return await this.database.waitForDatabaseStatus(subscriptionId, databaseId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 359 | } 360 | 361 | /** 362 | * Waiting for all databases status under subscription to change to the expected status 363 | * @param subscriptionId The id of the subscription 364 | * @param expectedStatus The expected status 365 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 366 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 367 | */ 368 | async waitForSubscriptionDatabasesStatus(subscriptionId: number, expectedStatus: DatabaseStatus = 'active', timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5) { 369 | return await this.database.waitForSubscriptionDatabasesStatus(subscriptionId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds) 370 | } 371 | 372 | /** 373 | * Waiting for cloud account status to change to a given status 374 | * @param cloudAccountId The id of the cloud account 375 | * @param expectedStatus The expected status 376 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 377 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 378 | */ 379 | async waitForCloudAccountStatus(cloudAccountId: number, expectedStatus: CloudAccountStatus, timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5) { 380 | return await this.cloudAccount.waitForCloudAccountStatus(cloudAccountId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 381 | } 382 | 383 | /** 384 | * Waiting for task status to change to a given status 385 | * @param taskId The id of the task 386 | * @param expectedStatus The expected status 387 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes 388 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 389 | */ 390 | async waitForTaskStatus(taskId: number, expectedStatus: TaskStatus, timeoutInSeconds = 20 * 60, sleepTimeInSeconds = 5): Promise { 391 | return await this.task.waitForTaskStatus(taskId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 392 | } 393 | } 394 | 395 | /** 396 | * The parameters used to initialize the constructor 397 | * @param accessKey Required. The Cloud API access key 398 | * @param secretKey Required. The Cloud API secret key 399 | * @param protocol Optional. The protocol of the API url 400 | * @param domain Optional. The domain of the API url 401 | * @param version Optional. The version of the API 402 | * @param debug Optional. Ability to show extra debug logs 403 | */ 404 | export interface CloudAPISDKParameters { 405 | accessKey: string, 406 | secretKey: string, 407 | protocol?: string, 408 | domain?: string, 409 | version?: string, 410 | debug?: boolean 411 | } 412 | 413 | type Error = { 414 | config: { 415 | url: string, 416 | method: string, 417 | headers: {[key: string]: any}, 418 | baseURL: string, 419 | [key: string]: any 420 | }, 421 | request: {[key: string]: any}, 422 | response: { 423 | status: string | number, 424 | statusText: string, 425 | headers: {[key: string]: any}, 426 | config: { 427 | url: string, 428 | method: string, 429 | headers: {[key: string]: any}, 430 | baseURL: string, 431 | [key: string]: any 432 | }, 433 | request: {[key: string]: any}, 434 | data: string, 435 | [key: string]: any 436 | }, 437 | [key: string]: any 438 | } -------------------------------------------------------------------------------- /api/api.base.ts: -------------------------------------------------------------------------------- 1 | import Axios, { AxiosInstance, AxiosResponse } from 'axios'; 2 | import { CloudAPISDKParameters } from '../api'; 3 | 4 | export class Client { 5 | /** 6 | * The protocol of the API. Default: 'https' 7 | */ 8 | public protocol = 'https'; 9 | /** 10 | * The domain of the API. Default: 'api.redislabs.com' 11 | */ 12 | public domain = 'api.redislabs.com'; 13 | /** 14 | * The version of the API. Default: 'v1' 15 | */ 16 | public version = 'v1'; 17 | /** 18 | * If to report debug logs when performing requests. Default: false 19 | */ 20 | public debug = false; 21 | /** 22 | * The Axios HTTP Client. 23 | */ 24 | public httpClient: AxiosInstance 25 | /** 26 | * The access key for authentication. 27 | */ 28 | public accessKey: string 29 | /** 30 | * The secret key for authentication. 31 | */ 32 | public secretKey: string 33 | 34 | /** 35 | * Initializing the API base of the SDK 36 | * @param parameters The parameters of the SDK 37 | */ 38 | constructor(parameters: CloudAPISDKParameters) { 39 | if(parameters.protocol !== undefined) this.protocol = parameters.protocol; 40 | if(parameters.domain !== undefined) this.domain = parameters.domain; 41 | if(parameters.version !== undefined) this.version = parameters.version; 42 | if(parameters.debug !== undefined) this.debug = parameters.debug; 43 | this.accessKey = parameters.accessKey; 44 | this.secretKey = parameters.secretKey; 45 | this.httpClient = Axios.create({ 46 | baseURL: `${this.protocol}://${this.domain}/${this.version}`, 47 | responseType: 'json', 48 | headers: { 49 | 'Content-Type': 'application/json', 50 | 'x-api-key': this.accessKey, 51 | 'x-api-secret-key': this.secretKey 52 | } 53 | }) 54 | } 55 | 56 | /** 57 | * Performing a "GET" request 58 | * @param url The URL of the request 59 | * @returns An Axios Response 60 | */ 61 | async get(url: string): Promise> { 62 | this.log('debug', `Performing GET request for url '${url}'`); 63 | const response = await this.httpClient.get(url); 64 | this.log('debug', JSON.stringify(response.data)) 65 | return response; 66 | } 67 | 68 | /** 69 | * Performing a "POST" request 70 | * @param url The URL of the request 71 | * @param body The body of the request 72 | * @returns An Axios Response 73 | */ 74 | async post(url: string, body?: any): Promise> { 75 | this.log('debug', `Performing POST request for url '${url}'`); 76 | const response = body ? await this.httpClient.post(url, body): await this.httpClient.post(url); 77 | this.log('debug', JSON.stringify(response.data)) 78 | return response; 79 | } 80 | 81 | /** 82 | * Performing a "PUT" request 83 | * @param url The URL of the request 84 | * @param body The body of the request 85 | * @returns An Axios Response 86 | */ 87 | async put(url: string, body?: any): Promise> { 88 | this.log('debug', `Performing PUT request for url '${url}'`); 89 | const response = body ? await this.httpClient.put(url, body): await this.httpClient.put(url); 90 | this.log('debug', JSON.stringify(response.data)) 91 | return response; 92 | } 93 | 94 | /** 95 | * Performing a "DELETE" request 96 | * @param url The URL of the request 97 | * @returns An Axios Response 98 | */ 99 | async delete(url: string): Promise> { 100 | this.log('debug', `Performing DELETE request for url '${url}'`); 101 | const response = await this.httpClient.delete(url); 102 | this.log('debug', JSON.stringify(response.data)) 103 | return response; 104 | } 105 | 106 | /** 107 | * Log messages depending on log levels 108 | * @param level The log level 109 | * @param message The message 110 | */ 111 | log(level: 'debug', message: string): void { 112 | if(level === 'debug' && this.debug === true){ 113 | console.debug(`[Cloud API SDK] ${message}`); 114 | } 115 | } 116 | 117 | /** 118 | * Freezing the code for a number of seconds 119 | * @param seconds seconds to freeze the code 120 | */ 121 | async sleep(seconds: number): Promise<{[key: string]: any}> { 122 | return new Promise(resolve => setTimeout(resolve, seconds * 1000)); 123 | } 124 | } -------------------------------------------------------------------------------- /api/cloud-account.ts: -------------------------------------------------------------------------------- 1 | import { TaskResponse } from '../types/task' 2 | import { CloudAccountCreationParameters, CloudAccountUpdateParameters } from '../types/parameters/cloud-account'; 3 | import { CloudAccountResponse, CloudAccountStatus } from '../types/responses/cloud-account'; 4 | import { Task } from './task' 5 | import { Client } from './api.base'; 6 | 7 | export class CloudAccount { 8 | private task: Task 9 | constructor(protected client: Client) { 10 | this.task = new Task(client) 11 | } 12 | 13 | /** 14 | * Returning a lookup list of cloud accounts owned by the account 15 | */ 16 | async getCloudAccounts(): Promise { 17 | try { 18 | const response = await this.client.get('/cloud-accounts'); 19 | return response.data.cloudAccounts; 20 | } 21 | catch(error) { 22 | return error as any; 23 | } 24 | } 25 | 26 | /** 27 | * Creating a cloud account 28 | * @param createParameters The create parameters to create a cloud account 29 | */ 30 | async createCloudAccount(createParameters: CloudAccountCreationParameters): Promise { 31 | try { 32 | const response = await this.client.post('/cloud-accounts', createParameters); 33 | const taskId: number = response.data.taskId; 34 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 35 | return taskResponse.response; 36 | } 37 | catch(error) { 38 | return error as any; 39 | } 40 | } 41 | 42 | /** 43 | * Returning a cloud account 44 | * @param cloudAccountId The id of the cloud account 45 | */ 46 | async getCloudAccount(cloudAccountId: number): Promise { 47 | try { 48 | const response = await this.client.get(`/cloud-accounts/${cloudAccountId}`); 49 | return response.data; 50 | } 51 | catch(error) { 52 | return error as any; 53 | } 54 | } 55 | 56 | /** 57 | * Updating a cloud account 58 | * @param cloudAccountId The id of the cloud account 59 | * @param updateParameters The update parameters to update a cloud account 60 | */ 61 | async updateCloudAccount(cloudAccountId: number, updateParameters: CloudAccountUpdateParameters): Promise { 62 | try { 63 | const response = await this.client.put(`/cloud-accounts/${cloudAccountId}`, updateParameters); 64 | const taskId: number = response.data.taskId; 65 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 66 | return taskResponse.response; 67 | } 68 | catch(error) { 69 | return error as any; 70 | } 71 | } 72 | 73 | /** 74 | * Deleting a cloud account 75 | * @param cloudAccountId The id of the cloud account 76 | */ 77 | async deleteCloudAccount(cloudAccountId: number): Promise { 78 | try { 79 | const response = await this.client.delete(`/cloud-accounts/${cloudAccountId}`); 80 | const taskId: number = response.data.taskId; 81 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 82 | return taskResponse.response; 83 | } 84 | catch(error) { 85 | return error as any; 86 | } 87 | } 88 | 89 | /** 90 | * Waiting for cloud account status to change to a given status 91 | * @param cloudAccountId The id of the cloud account 92 | * @param expectedStatus The expected status 93 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 94 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 95 | */ 96 | async waitForCloudAccountStatus(cloudAccountId: number, expectedStatus: CloudAccountStatus, timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5) { 97 | let cloudAccount = await this.getCloudAccount(cloudAccountId); 98 | let timePassedInSeconds = 0; 99 | while (cloudAccount.status !== expectedStatus && cloudAccount.status !== 'error' && cloudAccount.status !== undefined && timePassedInSeconds <= timeoutInSeconds) { 100 | this.client.log('debug', `Waiting for cloud account ${cloudAccountId} status '${cloudAccount.status}' to be become status '${expectedStatus}' (${timePassedInSeconds}/${timeoutInSeconds}`); 101 | await this.client.sleep(sleepTimeInSeconds); 102 | timePassedInSeconds+=sleepTimeInSeconds; 103 | cloudAccount = await this.getCloudAccount(cloudAccountId); 104 | } 105 | this.client.log('debug', `Cloud account ${cloudAccountId} ended up as '${cloudAccount.status}' status after ${timePassedInSeconds}/${timeoutInSeconds}`); 106 | return cloudAccount; 107 | } 108 | } -------------------------------------------------------------------------------- /api/database.ts: -------------------------------------------------------------------------------- 1 | import { DatabaseCreationParameters, DatabaseImportParameters, DatabaseUpdateParameters } from '../types/parameters/database'; 2 | import { DatabaseResponse, DatabaseStatus } from '../types/responses/database'; 3 | import { TaskResponse } from '../types/task'; 4 | import { Client } from './api.base'; 5 | import { Task } from './task'; 6 | 7 | export class Database { 8 | private task: Task 9 | constructor(protected client: Client) { 10 | this.task = new Task(client) 11 | } 12 | /** 13 | * Returning a lookup list of databases owned by the account 14 | * @param subscriptionId The id of the subscription 15 | */ 16 | async getDatabases(subscriptionId: number): Promise { 17 | try { 18 | const response = await this.client.get(`/subscriptions/${subscriptionId}/databases`); 19 | return response.data.subscription[0].databases; 20 | } 21 | catch(error) { 22 | return error as any; 23 | } 24 | } 25 | 26 | /** 27 | * Creating a database 28 | * @param subscriptionId The id of the subscription 29 | * @param createParameters The create parameters to create the database 30 | */ 31 | async createDatabase(subscriptionId: number, createParameters: DatabaseCreationParameters): Promise { 32 | try { 33 | const response = await this.client.post(`/subscriptions/${subscriptionId}/databases`, createParameters); 34 | const taskId: number = response.data.taskId; 35 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 36 | return taskResponse.response; 37 | } 38 | catch(error) { 39 | return error as any; 40 | } 41 | } 42 | 43 | /** 44 | * Returning a database 45 | * @param subscriptionId The id of the subscription 46 | * @param databaseId The id of the database 47 | */ 48 | async getDatabase(subscriptionId: number, databaseId: number): Promise { 49 | try { 50 | const response = await this.client.get(`/subscriptions/${subscriptionId}/databases/${databaseId}`); 51 | return response.data; 52 | } 53 | catch(error) { 54 | return error as any; 55 | } 56 | } 57 | 58 | /** 59 | * Updating a database 60 | * @param subscriptionId The id of the subscription 61 | * @param databaseId The id of the database 62 | * @param updateParameters The update parameters to update the database 63 | */ 64 | async updateDatabase(subscriptionId: number, databaseId: number, updateParameters: DatabaseUpdateParameters): Promise { 65 | try { 66 | const response = await this.client.put(`/subscriptions/${subscriptionId}/databases/${databaseId}`, updateParameters); 67 | const taskId: number = response.data.taskId; 68 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 69 | return taskResponse.response; 70 | } 71 | catch(error) { 72 | return error as any; 73 | } 74 | } 75 | 76 | /** 77 | * Deleting a database 78 | * @param subscriptionId The id of the subscription 79 | * @param databaseId The id of the database 80 | */ 81 | async deleteDatabase(subscriptionId: number, databaseId: number): Promise { 82 | try { 83 | const response = await this.client.delete(`/subscriptions/${subscriptionId}/databases/${databaseId}`); 84 | const taskId: number = response.data.taskId; 85 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 86 | return taskResponse.response; 87 | } 88 | catch(error) { 89 | return error as any; 90 | } 91 | } 92 | 93 | /** 94 | * Backing up a database 95 | * @param subscriptionId The id of the subscription 96 | * @param databaseId The id of the database 97 | */ 98 | async backupDatabase(subscriptionId: number, databaseId: number): Promise { 99 | try { 100 | const response = await this.client.post(`/subscriptions/${subscriptionId}/databases/${databaseId}/backup`); 101 | const taskId: number = response.data.taskId; 102 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 103 | return taskResponse.response; 104 | } 105 | catch(error) { 106 | return error as any; 107 | } 108 | } 109 | 110 | /** 111 | * Importing a dataset into a database 112 | * @param subscriptionId The id of the subscription 113 | * @param databaseId The id of the database 114 | * @param importParameters The import parameters to import into a database 115 | */ 116 | async importIntoDatabase(subscriptionId: number, databaseId: number, importParameters: DatabaseImportParameters): Promise { 117 | try { 118 | const response = await this.client.post(`/subscriptions/${subscriptionId}/databases/${databaseId}/import`, importParameters); 119 | const taskId: number = response.data.taskId; 120 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 121 | return taskResponse.response; 122 | } 123 | catch(error) { 124 | return error as any; 125 | } 126 | } 127 | 128 | /** 129 | * Waiting for database status to change to a given status 130 | * @param subscriptionId The id of the subscription 131 | * @param databaseId The id of the database 132 | * @param expectedStatus The expected status 133 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 134 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 135 | */ 136 | async waitForDatabaseStatus(subscriptionId: number, databaseId: number, expectedStatus: DatabaseStatus, timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5) { 137 | let database = await this.getDatabase(subscriptionId, databaseId); 138 | let timePassedInSeconds = 0; 139 | while (database.status !== expectedStatus && database.status !== 'error' && database.status !== undefined && timePassedInSeconds <= timeoutInSeconds) { 140 | this.client.log('debug', `Waiting for database ${databaseId} status '${database.status}' to be become status '${expectedStatus}' (${timePassedInSeconds}/${timeoutInSeconds} (Subscription ${subscriptionId})`); 141 | await this.client.sleep(sleepTimeInSeconds); 142 | timePassedInSeconds+=sleepTimeInSeconds; 143 | database = await this.getDatabase(subscriptionId, databaseId); 144 | } 145 | this.client.log('debug', `Database ${databaseId} ended up as '${database.status}' status after ${timePassedInSeconds}/${timeoutInSeconds} (Subscription ${subscriptionId})`); 146 | return database; 147 | } 148 | 149 | /** 150 | * Waiting for all databases status under subscription to change to the expected status 151 | * @param subscriptionId The id of the subscription 152 | * @param expectedStatus The expected status 153 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 154 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 155 | */ 156 | async waitForSubscriptionDatabasesStatus(subscriptionId: number, expectedStatus: DatabaseStatus = 'active', timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5) { 157 | let databases = await this.getDatabases(subscriptionId); 158 | for (const database of databases){ 159 | await this.waitForDatabaseStatus(subscriptionId, database.databaseId, expectedStatus, timeoutInSeconds, sleepTimeInSeconds) 160 | } 161 | } 162 | } -------------------------------------------------------------------------------- /api/general.ts: -------------------------------------------------------------------------------- 1 | import { AccountInformation, DataPersistence, DatabaseModule, SystemLog, PaymentMethod, Plan, Region } from '../types/responses/general'; 2 | import { SubscriptionCloudProvider } from '../types/responses/subscription'; 3 | import { Client } from './api.base'; 4 | 5 | export class General { 6 | constructor(protected client: Client) { } 7 | 8 | /** 9 | * Retrieving a lookup of the account information 10 | */ 11 | async getAccountInformation(): Promise { 12 | try { 13 | const response = await this.client.get('/'); 14 | return response.data.account; 15 | } 16 | catch(error) { 17 | return error as any; 18 | } 19 | } 20 | 21 | /** 22 | * Returning a lookup list of data persistence values 23 | */ 24 | async getDataPersistences(): Promise { 25 | try { 26 | const response = await this.client.get('/data-persistence'); 27 | return response.data.dataPersistence; 28 | } 29 | catch(error) { 30 | return error as any; 31 | } 32 | } 33 | 34 | /** 35 | * Returning a lookup list of database modules supported in current account (support may differ based on subscription and database settings) 36 | */ 37 | async getDatabaseModules(): Promise { 38 | try { 39 | const response = await this.client.get('/database-modules'); 40 | return response.data.modules; 41 | } 42 | catch(error) { 43 | return error as any; 44 | } 45 | } 46 | 47 | /** 48 | * Returning system log information for current account 49 | * @param limit Maximum number of items to return 50 | * @param offset Number of items to skip 51 | */ 52 | async getSystemLogs(limit: number, offset: number): Promise { 53 | try { 54 | const response = await this.client.get(`/logs?limit=${limit}&offset=${offset}`); 55 | return response.data.entries; 56 | } 57 | catch(error) { 58 | return error as any; 59 | } 60 | } 61 | 62 | /** 63 | * Returning a lookup list of current account’s payment methods 64 | */ 65 | async getPaymentMethods(): Promise { 66 | try { 67 | const response = await this.client.get('/payment-methods'); 68 | return response.data.paymentMethods; 69 | } 70 | catch(error) { 71 | return error as any; 72 | } 73 | } 74 | 75 | /** 76 | * Returning a lookup list of current account's plans 77 | * @param provider The cloud provider of the plan 78 | */ 79 | async getPlans(provider: SubscriptionCloudProvider): Promise { 80 | try { 81 | const response = await this.client.get(`/plans?provider=${provider}`); 82 | return response.data.plans; 83 | } 84 | catch(error) { 85 | return error as any; 86 | } 87 | } 88 | 89 | /** 90 | * Returning a lookup list of current account's regions 91 | * @param provider The cloud provider of the plan 92 | */ 93 | async getRegions(provider: SubscriptionCloudProvider): Promise { 94 | try { 95 | const response = await this.client.get(`/regions?provider=${provider}`); 96 | return response.data.regions; 97 | } 98 | catch(error) { 99 | return error as any; 100 | } 101 | } 102 | } -------------------------------------------------------------------------------- /api/subscription.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CidrUpdateParameters, CreateSubscriptionParameters, SubscriptionUpdateParameters, 3 | VpcPeeringCreationParameters 4 | } from '../types/parameters/subscription'; 5 | import { SubscriptionCidrWhitelist, SubscriptionVpcPeering, SubscriptionResponse, SubscriptionStatus, SubscriptionVpcPeeringStatus } from '../types/responses/subscription'; 6 | import { TaskResponse } from '../types/task'; 7 | import { Task } from '../api/task'; 8 | import { Client } from './api.base'; 9 | 10 | export class Subscription { 11 | private task: Task 12 | constructor(protected client: Client) { 13 | this.task = new Task(client) 14 | } 15 | 16 | /** 17 | * Returning a lookup list of current account's subscriptions 18 | */ 19 | async getSubscriptions(): Promise { 20 | try { 21 | const response = await this.client.get('/subscriptions'); 22 | return response.data.subscriptions; 23 | } 24 | catch(error) { 25 | return error as any; 26 | } 27 | } 28 | 29 | /** 30 | * Creating a subscription 31 | * @param createParameters The given parameters given for the subscription creation 32 | */ 33 | async createSubscription(createParameters: CreateSubscriptionParameters): Promise { 34 | try { 35 | const response = await this.client.post('/subscriptions', createParameters); 36 | const taskId: number = response.data.taskId; 37 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 38 | return taskResponse.response; 39 | } 40 | catch(error) { 41 | return error as any; 42 | } 43 | } 44 | 45 | /** 46 | * Returning a subscription 47 | * @param subscriptionId The id of the subscription 48 | */ 49 | async getSubscription(subscriptionId: number): Promise { 50 | try { 51 | const response = await this.client.get(`/subscriptions/${subscriptionId}`); 52 | return response.data; 53 | } 54 | catch(error) { 55 | return error as any; 56 | } 57 | } 58 | 59 | /** 60 | * Updating a subscription 61 | * @param subscriptionId The id of the subscription 62 | * @param updateParameters The given update parameters to update the subscription with 63 | */ 64 | async updateSubscription(subscriptionId: number, updateParameters: SubscriptionUpdateParameters): Promise { 65 | try { 66 | const response = await this.client.put(`/subscriptions/${subscriptionId}`, updateParameters); 67 | const taskId: number = response.data.taskId; 68 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 69 | return taskResponse.response; 70 | } 71 | catch(error) { 72 | return error as any; 73 | } 74 | } 75 | 76 | /** 77 | * Deleting a subscription 78 | * @param subscriptionId The id of the subscription 79 | */ 80 | async deleteSubscription(subscriptionId: number): Promise { 81 | try { 82 | const response = await this.client.delete(`/subscriptions/${subscriptionId}`); 83 | const taskId: number = response.data.taskId; 84 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 85 | return taskResponse.response; 86 | } 87 | catch(error) { 88 | return error as any; 89 | } 90 | } 91 | 92 | /** 93 | * Returning a lookup list of a subscription CIDR whitelists 94 | * @param subscriptionId The id of the subscription 95 | */ 96 | async getSubscriptionCidrWhitelist(subscriptionId: number): Promise { 97 | try { 98 | const response = await this.client.get(`/subscriptions/${subscriptionId}/cidr`); 99 | const taskId: number = response.data.taskId; 100 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 101 | return taskResponse.response.resource as any; 102 | } 103 | catch(error) { 104 | return error as any; 105 | } 106 | } 107 | 108 | /** 109 | * Updating a subscription CIDR whitelists 110 | * @param subscriptionId The id of the subscription 111 | * @param updateParameters The parameters to update the subscription with 112 | */ 113 | async updateSubscriptionCidrWhitelists(subscriptionId: number, updateParameters: CidrUpdateParameters): Promise { 114 | try { 115 | const response = await this.client.put(`/subscriptions/${subscriptionId}/cidr`, updateParameters); 116 | const taskId: number = response.data.taskId; 117 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 118 | return taskResponse.response; 119 | } 120 | catch(error) { 121 | return error as any; 122 | } 123 | } 124 | 125 | /** 126 | * Returning a lookup list of the subscription VPC Peerings 127 | * @param subscriptionId The id of the subscription 128 | */ 129 | async getVpcPeerings(subscriptionId: number): Promise { 130 | try { 131 | const response = await this.client.get(`/subscriptions/${subscriptionId}/peerings`); 132 | const taskId: number = response.data.taskId; 133 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 134 | return (taskResponse.response.resource as any).peerings; 135 | } 136 | catch(error) { 137 | return error as any; 138 | } 139 | } 140 | 141 | /** 142 | * Creating a subscription VPC peering 143 | * @param subscriptionId The id of the subscription 144 | * @param createParameters The create parameters to create the VPC peering with 145 | */ 146 | async createSubscriptionVpcPeering(subscriptionId: number, createParameters: VpcPeeringCreationParameters): Promise { 147 | try { 148 | const response = await this.client.post(`/subscriptions/${subscriptionId}/peerings`, createParameters); 149 | const taskId: number = response.data.taskId; 150 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 151 | return taskResponse.response; 152 | } 153 | catch(error) { 154 | return error as any; 155 | } 156 | } 157 | 158 | /** 159 | * Deleting a subscription VPC peering 160 | * @param subscriptionId The id of the subscription 161 | * @param vpcPeeringId The id of the VPC peering 162 | */ 163 | async deleteSubscriptionVpcPeering(subscriptionId: number, vpcPeeringId: number): Promise { 164 | try { 165 | const response = await this.client.delete(`/subscriptions/${subscriptionId}/peerings/${vpcPeeringId}`); 166 | const taskId: number = response.data.taskId; 167 | const taskResponse = await this.task.waitForTaskStatus(taskId, 'processing-completed'); 168 | return taskResponse.response; 169 | } 170 | catch(error) { 171 | return error as any; 172 | } 173 | } 174 | 175 | /** 176 | * Waiting for the subscription status to change to a given status 177 | * @param subscriptionId The id of the subscription 178 | * @param expectedStatus The expected status 179 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes 180 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 181 | */ 182 | async waitForSubscriptionStatus(subscriptionId: number, expectedStatus: SubscriptionStatus, timeoutInSeconds = 20 * 60, sleepTimeInSeconds = 5) { 183 | let subscription = await this.getSubscription(subscriptionId); 184 | let timePassedInSeconds = 0; 185 | while (subscription.status !== expectedStatus && subscription.status !== 'error' && subscription.status !== undefined && timePassedInSeconds <= timeoutInSeconds) { 186 | this.client.log('debug', `Waiting for subscription ${subscription.id} status '${subscription.status}' to be become status '${expectedStatus}' (${timePassedInSeconds}/${timeoutInSeconds})`) 187 | await this.client.sleep(sleepTimeInSeconds); 188 | timePassedInSeconds+=sleepTimeInSeconds; 189 | subscription = await this.getSubscription(subscriptionId); 190 | } 191 | this.client.log('debug', `Subscription ${subscription.id} ended up as '${subscription.status}' status after ${timePassedInSeconds}/${timeoutInSeconds}`); 192 | return subscription; 193 | } 194 | 195 | /** 196 | * Waiting for existing subscriptions statuses to change to a given status 197 | * @param expectedStatus The expected status 198 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes 199 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 200 | * @returns A batch of subscription responses 201 | */ 202 | async waitForSubscriptionsStatus(expectedStatus: SubscriptionStatus, timeoutInSeconds = 20 * 60, sleepTimeInSeconds = 5) { 203 | const subscriptions = await this.getSubscriptions(); 204 | const subscriptionResponses: SubscriptionResponse[] = []; 205 | for(const subscription of subscriptions) { 206 | const response = await this.waitForSubscriptionStatus(subscription.id, expectedStatus, timeoutInSeconds, sleepTimeInSeconds); 207 | subscriptionResponses.push(response); 208 | } 209 | return subscriptionResponses; 210 | } 211 | 212 | /** 213 | * Waiting for the subscription VPC peering status to change to a given status 214 | * @param subscriptionId The id of the subscription 215 | * @param vpcPeeringId The id of the subscription VPC peering 216 | * @param expectedStatus The expected status 217 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 5 minutes 218 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 219 | */ 220 | async waitForVpcPeeringStatus(subscriptionId: number, vpcPeeringId: number, expectedStatus: SubscriptionVpcPeeringStatus, timeoutInSeconds = 5 * 60, sleepTimeInSeconds = 5){ 221 | let vpcPeerings = await this.getVpcPeerings(subscriptionId); 222 | let vpcPeering = vpcPeerings.find((vpcPeering: SubscriptionVpcPeering)=> vpcPeering.id === vpcPeeringId) 223 | let timePassedInSeconds = 0; 224 | if(vpcPeering !== undefined) { 225 | let status = vpcPeering.status; 226 | while (status !== expectedStatus && status !== 'failed' && status !== undefined && timePassedInSeconds <= timeoutInSeconds) { 227 | this.client.log('debug', `Waiting for VPC peering ${vpcPeeringId} status '${status}' to be become status '${expectedStatus}' (${timePassedInSeconds}/${timeoutInSeconds}`) 228 | await this.client.sleep(sleepTimeInSeconds); 229 | timePassedInSeconds+=sleepTimeInSeconds; 230 | vpcPeerings = await this.getVpcPeerings(subscriptionId); 231 | vpcPeering = vpcPeerings.find((vpcPeering: SubscriptionVpcPeering)=> vpcPeering.id === vpcPeeringId) 232 | if(vpcPeering !== undefined) status = vpcPeering.status; 233 | } 234 | } 235 | this.client.log('debug', `VPC peering ${vpcPeeringId} ended up as '${status}' status after ${timePassedInSeconds}/${timeoutInSeconds}`); 236 | return vpcPeering; 237 | } 238 | } 239 | -------------------------------------------------------------------------------- /api/task.ts: -------------------------------------------------------------------------------- 1 | import { TaskObject, TaskStatus } from '../types/task'; 2 | import { Client } from './api.base'; 3 | 4 | export class Task { 5 | constructor(protected client: Client) {} 6 | 7 | /** 8 | * Waiting for task status to change to a given status 9 | * @param taskId The id of the task 10 | * @param expectedStatus The expected status 11 | * @param timeoutInSeconds The timeout of waiting for the status. Default: 20 minutes 12 | * @param sleepTimeInSeconds The sleep time between requests. Default: 5 seconds 13 | */ 14 | async waitForTaskStatus(taskId: number, expectedStatus: TaskStatus, timeoutInSeconds = 20 * 60, sleepTimeInSeconds = 5): Promise { 15 | let task = await this.getTask(taskId); 16 | let timePassedInSeconds = 0; 17 | while (task.status !== expectedStatus && task.status !== 'processing-error' && task.status !== undefined && timePassedInSeconds <= timeoutInSeconds) { 18 | this.client.log('debug', `Waiting for task ${taskId} status '${task.status}' to be become status '${expectedStatus}' (${timePassedInSeconds}/${timeoutInSeconds}`); 19 | await this.client.sleep(sleepTimeInSeconds); 20 | timePassedInSeconds+=sleepTimeInSeconds; 21 | task = await this.getTask(taskId); 22 | } 23 | this.client.log('debug', `Task ${taskId} ended up as '${task.status}' status after ${timePassedInSeconds}/${timeoutInSeconds}`); 24 | if(task.status === 'processing-error' && task.response.error !== undefined) { 25 | const errorType = task.response.error.type; 26 | const errorStatus = task.response.error.status; 27 | const errorDescription = task.response.error.description; 28 | console.log(`Task ${taskId} ended up in error: type: ${errorType}, status: ${errorStatus}, description: ${errorDescription}`); 29 | } 30 | return task; 31 | } 32 | 33 | /** 34 | * Returning a lookup list of tasks owned by the account 35 | */ 36 | async getTasks(): Promise { 37 | try { 38 | const response = await this.client.get('/tasks'); 39 | return response.data; 40 | } 41 | catch(error) { 42 | return error as any; 43 | } 44 | } 45 | 46 | /** 47 | * Returning a task 48 | * @param taskId The id of the task 49 | */ 50 | async getTask(taskId: number): Promise { 51 | try { 52 | const response = await this.client.get(`/tasks/${taskId}`); 53 | return response.data; 54 | } 55 | catch(error) { 56 | return error as any; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /index.ts: -------------------------------------------------------------------------------- 1 | // MAIN 2 | export { CloudAPISDK, CloudAPISDKParameters } from './api'; 3 | // PARAMETERS 4 | export { CloudAccountCreationParameters, CloudAccountUpdateParameters } from './types/parameters/cloud-account'; 5 | export { 6 | DatabaseCreationParameters, DatabaseUpdateParameters, DatabaseImportParameters, 7 | Module, Alert, AlertName 8 | } from './types/parameters/database'; 9 | export { 10 | CreateSubscriptionParameters, SubscriptionUpdateParameters, 11 | VpcPeeringCreationParameters, CidrUpdateParameters, CloudProvider, 12 | DatabaseParameters, CloudProviderRegion 13 | } from './types/parameters/subscription'; 14 | // RESPONSES 15 | export { CloudAccountProvider } from './types/responses/cloud-account'; 16 | export { 17 | DatabaseProtocol, DatabaseDataEvictionPolicy, DatabaseDataPersistence, 18 | DatabaseImportSource, DatabaseThroughputMeasurement, DatabaseStatus, 19 | DatabaseResponse, DatabaseReplicaOfEndpoints 20 | } from './types/responses/database'; 21 | export { 22 | SubscriptionCloudProvider, SubscriptionMemoryStorage, SubscriptionResponse, 23 | SubscriptionPricing, SubscriptionStatus 24 | } from './types/responses/subscription'; 25 | export { DatabaseModule, SubscriptionPaymentMethod } from './types/responses/general'; 26 | // TASKS 27 | export { TaskObject, TaskResponse, ErrorResponse, TaskStatus } from './types/task'; -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "redis-cloud-api-sdk", 3 | "version": "1.0.9", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@cspotcode/source-map-consumer": { 8 | "version": "0.8.0", 9 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", 10 | "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", 11 | "dev": true 12 | }, 13 | "@cspotcode/source-map-support": { 14 | "version": "0.7.0", 15 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", 16 | "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", 17 | "dev": true, 18 | "requires": { 19 | "@cspotcode/source-map-consumer": "0.8.0" 20 | } 21 | }, 22 | "@microsoft/tsdoc": { 23 | "version": "0.13.2", 24 | "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", 25 | "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", 26 | "dev": true 27 | }, 28 | "@tsconfig/node10": { 29 | "version": "1.0.8", 30 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", 31 | "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", 32 | "dev": true 33 | }, 34 | "@tsconfig/node12": { 35 | "version": "1.0.9", 36 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", 37 | "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", 38 | "dev": true 39 | }, 40 | "@tsconfig/node14": { 41 | "version": "1.0.1", 42 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", 43 | "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", 44 | "dev": true 45 | }, 46 | "@tsconfig/node16": { 47 | "version": "1.0.2", 48 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", 49 | "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", 50 | "dev": true 51 | }, 52 | "@types/axios": { 53 | "version": "0.14.0", 54 | "resolved": "https://registry.npmjs.org/@types/axios/-/axios-0.14.0.tgz", 55 | "integrity": "sha1-7CMA++fX3d1+udOr+HmZlkyvzkY=", 56 | "dev": true, 57 | "requires": { 58 | "axios": "*" 59 | } 60 | }, 61 | "@types/body-parser": { 62 | "version": "1.19.2", 63 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", 64 | "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", 65 | "dev": true, 66 | "requires": { 67 | "@types/connect": "*", 68 | "@types/node": "*" 69 | } 70 | }, 71 | "@types/chai": { 72 | "version": "4.3.0", 73 | "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.0.tgz", 74 | "integrity": "sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw==", 75 | "dev": true 76 | }, 77 | "@types/connect": { 78 | "version": "3.4.35", 79 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", 80 | "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", 81 | "dev": true, 82 | "requires": { 83 | "@types/node": "*" 84 | } 85 | }, 86 | "@types/express": { 87 | "version": "4.17.13", 88 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", 89 | "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", 90 | "dev": true, 91 | "requires": { 92 | "@types/body-parser": "*", 93 | "@types/express-serve-static-core": "^4.17.18", 94 | "@types/qs": "*", 95 | "@types/serve-static": "*" 96 | } 97 | }, 98 | "@types/express-serve-static-core": { 99 | "version": "4.17.31", 100 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", 101 | "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", 102 | "dev": true, 103 | "requires": { 104 | "@types/node": "*", 105 | "@types/qs": "*", 106 | "@types/range-parser": "*" 107 | } 108 | }, 109 | "@types/mime": { 110 | "version": "3.0.1", 111 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", 112 | "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", 113 | "dev": true 114 | }, 115 | "@types/mocha": { 116 | "version": "9.1.0", 117 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.0.tgz", 118 | "integrity": "sha512-QCWHkbMv4Y5U9oW10Uxbr45qMMSzl4OzijsozynUAgx3kEHUdXB00udx2dWDQ7f2TU2a2uuiFaRZjCe3unPpeg==", 119 | "dev": true 120 | }, 121 | "@types/node": { 122 | "version": "16.11.9", 123 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz", 124 | "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==", 125 | "dev": true 126 | }, 127 | "@types/qs": { 128 | "version": "6.9.7", 129 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", 130 | "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", 131 | "dev": true 132 | }, 133 | "@types/range-parser": { 134 | "version": "1.2.4", 135 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", 136 | "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", 137 | "dev": true 138 | }, 139 | "@types/serve-static": { 140 | "version": "1.15.0", 141 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", 142 | "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==", 143 | "dev": true, 144 | "requires": { 145 | "@types/mime": "*", 146 | "@types/node": "*" 147 | } 148 | }, 149 | "@ungap/promise-all-settled": { 150 | "version": "1.1.2", 151 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 152 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 153 | "dev": true 154 | }, 155 | "accepts": { 156 | "version": "1.3.8", 157 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 158 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 159 | "dev": true, 160 | "requires": { 161 | "mime-types": "~2.1.34", 162 | "negotiator": "0.6.3" 163 | } 164 | }, 165 | "acorn": { 166 | "version": "8.7.0", 167 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", 168 | "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", 169 | "dev": true 170 | }, 171 | "acorn-walk": { 172 | "version": "8.2.0", 173 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", 174 | "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", 175 | "dev": true 176 | }, 177 | "ansi-colors": { 178 | "version": "4.1.1", 179 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 180 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 181 | "dev": true 182 | }, 183 | "ansi-regex": { 184 | "version": "5.0.1", 185 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 186 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 187 | "dev": true 188 | }, 189 | "ansi-styles": { 190 | "version": "4.3.0", 191 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 192 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 193 | "dev": true, 194 | "requires": { 195 | "color-convert": "^2.0.1" 196 | } 197 | }, 198 | "anymatch": { 199 | "version": "3.1.2", 200 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 201 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 202 | "dev": true, 203 | "requires": { 204 | "normalize-path": "^3.0.0", 205 | "picomatch": "^2.0.4" 206 | } 207 | }, 208 | "arg": { 209 | "version": "4.1.3", 210 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 211 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 212 | "dev": true 213 | }, 214 | "argparse": { 215 | "version": "2.0.1", 216 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 217 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 218 | "dev": true 219 | }, 220 | "array-flatten": { 221 | "version": "1.1.1", 222 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 223 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", 224 | "dev": true 225 | }, 226 | "assertion-error": { 227 | "version": "1.1.0", 228 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 229 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", 230 | "dev": true 231 | }, 232 | "axios": { 233 | "version": "0.24.0", 234 | "resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz", 235 | "integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==", 236 | "requires": { 237 | "follow-redirects": "^1.14.4" 238 | } 239 | }, 240 | "balanced-match": { 241 | "version": "1.0.2", 242 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 243 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 244 | "dev": true 245 | }, 246 | "binary-extensions": { 247 | "version": "2.2.0", 248 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 249 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 250 | "dev": true 251 | }, 252 | "body-parser": { 253 | "version": "1.20.0", 254 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", 255 | "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", 256 | "dev": true, 257 | "requires": { 258 | "bytes": "3.1.2", 259 | "content-type": "~1.0.4", 260 | "debug": "2.6.9", 261 | "depd": "2.0.0", 262 | "destroy": "1.2.0", 263 | "http-errors": "2.0.0", 264 | "iconv-lite": "0.4.24", 265 | "on-finished": "2.4.1", 266 | "qs": "6.10.3", 267 | "raw-body": "2.5.1", 268 | "type-is": "~1.6.18", 269 | "unpipe": "1.0.0" 270 | } 271 | }, 272 | "brace-expansion": { 273 | "version": "1.1.11", 274 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 275 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 276 | "dev": true, 277 | "requires": { 278 | "balanced-match": "^1.0.0", 279 | "concat-map": "0.0.1" 280 | } 281 | }, 282 | "braces": { 283 | "version": "3.0.2", 284 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 285 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 286 | "dev": true, 287 | "requires": { 288 | "fill-range": "^7.0.1" 289 | } 290 | }, 291 | "browser-stdout": { 292 | "version": "1.3.1", 293 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 294 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 295 | "dev": true 296 | }, 297 | "bytes": { 298 | "version": "3.1.2", 299 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 300 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 301 | "dev": true 302 | }, 303 | "call-bind": { 304 | "version": "1.0.2", 305 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 306 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 307 | "dev": true, 308 | "requires": { 309 | "function-bind": "^1.1.1", 310 | "get-intrinsic": "^1.0.2" 311 | } 312 | }, 313 | "camelcase": { 314 | "version": "6.3.0", 315 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 316 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 317 | "dev": true 318 | }, 319 | "chai": { 320 | "version": "4.3.6", 321 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", 322 | "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", 323 | "dev": true, 324 | "requires": { 325 | "assertion-error": "^1.1.0", 326 | "check-error": "^1.0.2", 327 | "deep-eql": "^3.0.1", 328 | "get-func-name": "^2.0.0", 329 | "loupe": "^2.3.1", 330 | "pathval": "^1.1.1", 331 | "type-detect": "^4.0.5" 332 | } 333 | }, 334 | "chalk": { 335 | "version": "4.1.2", 336 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 337 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 338 | "dev": true, 339 | "requires": { 340 | "ansi-styles": "^4.1.0", 341 | "supports-color": "^7.1.0" 342 | }, 343 | "dependencies": { 344 | "supports-color": { 345 | "version": "7.2.0", 346 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 347 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 348 | "dev": true, 349 | "requires": { 350 | "has-flag": "^4.0.0" 351 | } 352 | } 353 | } 354 | }, 355 | "check-error": { 356 | "version": "1.0.2", 357 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", 358 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", 359 | "dev": true 360 | }, 361 | "chokidar": { 362 | "version": "3.5.3", 363 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 364 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 365 | "dev": true, 366 | "requires": { 367 | "anymatch": "~3.1.2", 368 | "braces": "~3.0.2", 369 | "fsevents": "~2.3.2", 370 | "glob-parent": "~5.1.2", 371 | "is-binary-path": "~2.1.0", 372 | "is-glob": "~4.0.1", 373 | "normalize-path": "~3.0.0", 374 | "readdirp": "~3.6.0" 375 | } 376 | }, 377 | "cli-argument-parser": { 378 | "version": "0.6.1", 379 | "resolved": "https://registry.npmjs.org/cli-argument-parser/-/cli-argument-parser-0.6.1.tgz", 380 | "integrity": "sha512-nM/WwoXQkR2bC/sXDPTXZmp6/G3Pid62WDy+kJWvqzaR6yMCqIs2ELaN8vTGvzBnWPb/VmxSl3SR2JASxJlRRw==", 381 | "dev": true, 382 | "requires": { 383 | "dotenv": "10.0.0", 384 | "file-exists": "5.0.1" 385 | } 386 | }, 387 | "cliui": { 388 | "version": "7.0.4", 389 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 390 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 391 | "dev": true, 392 | "requires": { 393 | "string-width": "^4.2.0", 394 | "strip-ansi": "^6.0.0", 395 | "wrap-ansi": "^7.0.0" 396 | } 397 | }, 398 | "color-convert": { 399 | "version": "2.0.1", 400 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 401 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 402 | "dev": true, 403 | "requires": { 404 | "color-name": "~1.1.4" 405 | } 406 | }, 407 | "color-name": { 408 | "version": "1.1.4", 409 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 410 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 411 | "dev": true 412 | }, 413 | "concat-map": { 414 | "version": "0.0.1", 415 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 416 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 417 | "dev": true 418 | }, 419 | "content-disposition": { 420 | "version": "0.5.4", 421 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 422 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 423 | "dev": true, 424 | "requires": { 425 | "safe-buffer": "5.2.1" 426 | }, 427 | "dependencies": { 428 | "safe-buffer": { 429 | "version": "5.2.1", 430 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 431 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 432 | "dev": true 433 | } 434 | } 435 | }, 436 | "content-type": { 437 | "version": "1.0.4", 438 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 439 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", 440 | "dev": true 441 | }, 442 | "cookie": { 443 | "version": "0.4.2", 444 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", 445 | "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", 446 | "dev": true 447 | }, 448 | "cookie-signature": { 449 | "version": "1.0.6", 450 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 451 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", 452 | "dev": true 453 | }, 454 | "create-require": { 455 | "version": "1.1.1", 456 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", 457 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", 458 | "dev": true 459 | }, 460 | "debug": { 461 | "version": "2.6.9", 462 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 463 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 464 | "dev": true, 465 | "requires": { 466 | "ms": "2.0.0" 467 | } 468 | }, 469 | "decamelize": { 470 | "version": "4.0.0", 471 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 472 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 473 | "dev": true 474 | }, 475 | "deep-eql": { 476 | "version": "3.0.1", 477 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", 478 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", 479 | "dev": true, 480 | "requires": { 481 | "type-detect": "^4.0.0" 482 | } 483 | }, 484 | "depd": { 485 | "version": "2.0.0", 486 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 487 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 488 | "dev": true 489 | }, 490 | "destroy": { 491 | "version": "1.2.0", 492 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 493 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 494 | "dev": true 495 | }, 496 | "diff": { 497 | "version": "5.0.0", 498 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 499 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 500 | "dev": true 501 | }, 502 | "dmock-server": { 503 | "version": "1.9.7", 504 | "resolved": "https://registry.npmjs.org/dmock-server/-/dmock-server-1.9.7.tgz", 505 | "integrity": "sha512-OT3b3o0QO7SzJ4wmJVg+S7vCmEhxbr27WuVvhvvo1d6JO4ZK/MJ3akM3Q22tJ/CU97VaxMKvvElsFlHXs0mJcQ==", 506 | "dev": true, 507 | "requires": { 508 | "@types/express": "4.17.13", 509 | "body-parser": "1.20.0", 510 | "express": "4.17.3" 511 | } 512 | }, 513 | "dotenv": { 514 | "version": "10.0.0", 515 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", 516 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", 517 | "dev": true 518 | }, 519 | "ee-first": { 520 | "version": "1.1.1", 521 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 522 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", 523 | "dev": true 524 | }, 525 | "emoji-regex": { 526 | "version": "8.0.0", 527 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 528 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 529 | "dev": true 530 | }, 531 | "encodeurl": { 532 | "version": "1.0.2", 533 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 534 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 535 | "dev": true 536 | }, 537 | "escalade": { 538 | "version": "3.1.1", 539 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 540 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 541 | "dev": true 542 | }, 543 | "escape-html": { 544 | "version": "1.0.3", 545 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 546 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", 547 | "dev": true 548 | }, 549 | "escape-string-regexp": { 550 | "version": "4.0.0", 551 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 552 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 553 | "dev": true 554 | }, 555 | "etag": { 556 | "version": "1.8.1", 557 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 558 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 559 | "dev": true 560 | }, 561 | "express": { 562 | "version": "4.17.3", 563 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz", 564 | "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==", 565 | "dev": true, 566 | "requires": { 567 | "accepts": "~1.3.8", 568 | "array-flatten": "1.1.1", 569 | "body-parser": "1.19.2", 570 | "content-disposition": "0.5.4", 571 | "content-type": "~1.0.4", 572 | "cookie": "0.4.2", 573 | "cookie-signature": "1.0.6", 574 | "debug": "2.6.9", 575 | "depd": "~1.1.2", 576 | "encodeurl": "~1.0.2", 577 | "escape-html": "~1.0.3", 578 | "etag": "~1.8.1", 579 | "finalhandler": "~1.1.2", 580 | "fresh": "0.5.2", 581 | "merge-descriptors": "1.0.1", 582 | "methods": "~1.1.2", 583 | "on-finished": "~2.3.0", 584 | "parseurl": "~1.3.3", 585 | "path-to-regexp": "0.1.7", 586 | "proxy-addr": "~2.0.7", 587 | "qs": "6.9.7", 588 | "range-parser": "~1.2.1", 589 | "safe-buffer": "5.2.1", 590 | "send": "0.17.2", 591 | "serve-static": "1.14.2", 592 | "setprototypeof": "1.2.0", 593 | "statuses": "~1.5.0", 594 | "type-is": "~1.6.18", 595 | "utils-merge": "1.0.1", 596 | "vary": "~1.1.2" 597 | }, 598 | "dependencies": { 599 | "body-parser": { 600 | "version": "1.19.2", 601 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", 602 | "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==", 603 | "dev": true, 604 | "requires": { 605 | "bytes": "3.1.2", 606 | "content-type": "~1.0.4", 607 | "debug": "2.6.9", 608 | "depd": "~1.1.2", 609 | "http-errors": "1.8.1", 610 | "iconv-lite": "0.4.24", 611 | "on-finished": "~2.3.0", 612 | "qs": "6.9.7", 613 | "raw-body": "2.4.3", 614 | "type-is": "~1.6.18" 615 | } 616 | }, 617 | "depd": { 618 | "version": "1.1.2", 619 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 620 | "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", 621 | "dev": true 622 | }, 623 | "http-errors": { 624 | "version": "1.8.1", 625 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", 626 | "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", 627 | "dev": true, 628 | "requires": { 629 | "depd": "~1.1.2", 630 | "inherits": "2.0.4", 631 | "setprototypeof": "1.2.0", 632 | "statuses": ">= 1.5.0 < 2", 633 | "toidentifier": "1.0.1" 634 | } 635 | }, 636 | "inherits": { 637 | "version": "2.0.4", 638 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 639 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 640 | "dev": true 641 | }, 642 | "on-finished": { 643 | "version": "2.3.0", 644 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 645 | "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", 646 | "dev": true, 647 | "requires": { 648 | "ee-first": "1.1.1" 649 | } 650 | }, 651 | "qs": { 652 | "version": "6.9.7", 653 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", 654 | "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", 655 | "dev": true 656 | }, 657 | "raw-body": { 658 | "version": "2.4.3", 659 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz", 660 | "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==", 661 | "dev": true, 662 | "requires": { 663 | "bytes": "3.1.2", 664 | "http-errors": "1.8.1", 665 | "iconv-lite": "0.4.24", 666 | "unpipe": "1.0.0" 667 | } 668 | }, 669 | "safe-buffer": { 670 | "version": "5.2.1", 671 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 672 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 673 | "dev": true 674 | }, 675 | "statuses": { 676 | "version": "1.5.0", 677 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 678 | "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", 679 | "dev": true 680 | } 681 | } 682 | }, 683 | "file-exists": { 684 | "version": "5.0.1", 685 | "resolved": "https://registry.npmjs.org/file-exists/-/file-exists-5.0.1.tgz", 686 | "integrity": "sha512-TeBMgeKbdSsQtcY2XqKY/yTa4BciMD/Gw8YcND0XMDZt4CDj87l1Wl4x7K0ravZ80tZcyIGMD0hj2VSRPR8M8Q==", 687 | "dev": true 688 | }, 689 | "fill-range": { 690 | "version": "7.0.1", 691 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 692 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 693 | "dev": true, 694 | "requires": { 695 | "to-regex-range": "^5.0.1" 696 | } 697 | }, 698 | "finalhandler": { 699 | "version": "1.1.2", 700 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 701 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 702 | "dev": true, 703 | "requires": { 704 | "debug": "2.6.9", 705 | "encodeurl": "~1.0.2", 706 | "escape-html": "~1.0.3", 707 | "on-finished": "~2.3.0", 708 | "parseurl": "~1.3.3", 709 | "statuses": "~1.5.0", 710 | "unpipe": "~1.0.0" 711 | }, 712 | "dependencies": { 713 | "on-finished": { 714 | "version": "2.3.0", 715 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 716 | "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", 717 | "dev": true, 718 | "requires": { 719 | "ee-first": "1.1.1" 720 | } 721 | }, 722 | "statuses": { 723 | "version": "1.5.0", 724 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 725 | "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", 726 | "dev": true 727 | } 728 | } 729 | }, 730 | "find-up": { 731 | "version": "5.0.0", 732 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 733 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 734 | "dev": true, 735 | "requires": { 736 | "locate-path": "^6.0.0", 737 | "path-exists": "^4.0.0" 738 | } 739 | }, 740 | "flat": { 741 | "version": "5.0.2", 742 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 743 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 744 | "dev": true 745 | }, 746 | "follow-redirects": { 747 | "version": "1.14.8", 748 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", 749 | "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" 750 | }, 751 | "forwarded": { 752 | "version": "0.2.0", 753 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 754 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 755 | "dev": true 756 | }, 757 | "fresh": { 758 | "version": "0.5.2", 759 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 760 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 761 | "dev": true 762 | }, 763 | "fs.realpath": { 764 | "version": "1.0.0", 765 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 766 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 767 | "dev": true 768 | }, 769 | "fsevents": { 770 | "version": "2.3.2", 771 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 772 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 773 | "dev": true, 774 | "optional": true 775 | }, 776 | "function-bind": { 777 | "version": "1.1.1", 778 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 779 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 780 | "dev": true 781 | }, 782 | "get-caller-file": { 783 | "version": "2.0.5", 784 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 785 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 786 | "dev": true 787 | }, 788 | "get-func-name": { 789 | "version": "2.0.0", 790 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", 791 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", 792 | "dev": true 793 | }, 794 | "get-intrinsic": { 795 | "version": "1.1.3", 796 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", 797 | "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", 798 | "dev": true, 799 | "requires": { 800 | "function-bind": "^1.1.1", 801 | "has": "^1.0.3", 802 | "has-symbols": "^1.0.3" 803 | } 804 | }, 805 | "glob": { 806 | "version": "7.2.0", 807 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 808 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 809 | "dev": true, 810 | "requires": { 811 | "fs.realpath": "^1.0.0", 812 | "inflight": "^1.0.4", 813 | "inherits": "2", 814 | "minimatch": "^3.0.4", 815 | "once": "^1.3.0", 816 | "path-is-absolute": "^1.0.0" 817 | }, 818 | "dependencies": { 819 | "minimatch": { 820 | "version": "3.1.2", 821 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 822 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 823 | "dev": true, 824 | "requires": { 825 | "brace-expansion": "^1.1.7" 826 | } 827 | } 828 | } 829 | }, 830 | "glob-parent": { 831 | "version": "5.1.2", 832 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 833 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 834 | "dev": true, 835 | "requires": { 836 | "is-glob": "^4.0.1" 837 | } 838 | }, 839 | "growl": { 840 | "version": "1.10.5", 841 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 842 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 843 | "dev": true 844 | }, 845 | "has": { 846 | "version": "1.0.3", 847 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 848 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 849 | "dev": true, 850 | "requires": { 851 | "function-bind": "^1.1.1" 852 | } 853 | }, 854 | "has-flag": { 855 | "version": "4.0.0", 856 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 857 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 858 | "dev": true 859 | }, 860 | "has-symbols": { 861 | "version": "1.0.3", 862 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 863 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 864 | "dev": true 865 | }, 866 | "he": { 867 | "version": "1.2.0", 868 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 869 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 870 | "dev": true 871 | }, 872 | "http-errors": { 873 | "version": "2.0.0", 874 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 875 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 876 | "dev": true, 877 | "requires": { 878 | "depd": "2.0.0", 879 | "inherits": "2.0.4", 880 | "setprototypeof": "1.2.0", 881 | "statuses": "2.0.1", 882 | "toidentifier": "1.0.1" 883 | }, 884 | "dependencies": { 885 | "inherits": { 886 | "version": "2.0.4", 887 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 888 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 889 | "dev": true 890 | } 891 | } 892 | }, 893 | "iconv-lite": { 894 | "version": "0.4.24", 895 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 896 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 897 | "dev": true, 898 | "requires": { 899 | "safer-buffer": ">= 2.1.2 < 3" 900 | } 901 | }, 902 | "inflight": { 903 | "version": "1.0.6", 904 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 905 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 906 | "dev": true, 907 | "requires": { 908 | "once": "^1.3.0", 909 | "wrappy": "1" 910 | } 911 | }, 912 | "inherits": { 913 | "version": "2.0.3", 914 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 915 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 916 | "dev": true 917 | }, 918 | "ipaddr.js": { 919 | "version": "1.9.1", 920 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 921 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 922 | "dev": true 923 | }, 924 | "is-binary-path": { 925 | "version": "2.1.0", 926 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 927 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 928 | "dev": true, 929 | "requires": { 930 | "binary-extensions": "^2.0.0" 931 | } 932 | }, 933 | "is-extglob": { 934 | "version": "2.1.1", 935 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 936 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 937 | "dev": true 938 | }, 939 | "is-fullwidth-code-point": { 940 | "version": "3.0.0", 941 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 942 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 943 | "dev": true 944 | }, 945 | "is-glob": { 946 | "version": "4.0.3", 947 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 948 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 949 | "dev": true, 950 | "requires": { 951 | "is-extglob": "^2.1.1" 952 | } 953 | }, 954 | "is-number": { 955 | "version": "7.0.0", 956 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 957 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 958 | "dev": true 959 | }, 960 | "is-plain-obj": { 961 | "version": "2.1.0", 962 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 963 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 964 | "dev": true 965 | }, 966 | "is-unicode-supported": { 967 | "version": "0.1.0", 968 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 969 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 970 | "dev": true 971 | }, 972 | "isexe": { 973 | "version": "2.0.0", 974 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 975 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 976 | "dev": true 977 | }, 978 | "js-yaml": { 979 | "version": "4.1.0", 980 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 981 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 982 | "dev": true, 983 | "requires": { 984 | "argparse": "^2.0.1" 985 | } 986 | }, 987 | "jsonc-parser": { 988 | "version": "3.0.0", 989 | "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", 990 | "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", 991 | "dev": true 992 | }, 993 | "locate-path": { 994 | "version": "6.0.0", 995 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 996 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 997 | "dev": true, 998 | "requires": { 999 | "p-locate": "^5.0.0" 1000 | } 1001 | }, 1002 | "log-symbols": { 1003 | "version": "4.1.0", 1004 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1005 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1006 | "dev": true, 1007 | "requires": { 1008 | "chalk": "^4.1.0", 1009 | "is-unicode-supported": "^0.1.0" 1010 | } 1011 | }, 1012 | "loupe": { 1013 | "version": "2.3.4", 1014 | "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", 1015 | "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", 1016 | "dev": true, 1017 | "requires": { 1018 | "get-func-name": "^2.0.0" 1019 | } 1020 | }, 1021 | "lunr": { 1022 | "version": "2.3.9", 1023 | "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", 1024 | "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", 1025 | "dev": true 1026 | }, 1027 | "make-error": { 1028 | "version": "1.3.6", 1029 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 1030 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 1031 | "dev": true 1032 | }, 1033 | "marked": { 1034 | "version": "4.0.10", 1035 | "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.10.tgz", 1036 | "integrity": "sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw==", 1037 | "dev": true 1038 | }, 1039 | "media-typer": { 1040 | "version": "0.3.0", 1041 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 1042 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 1043 | "dev": true 1044 | }, 1045 | "merge-descriptors": { 1046 | "version": "1.0.1", 1047 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 1048 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", 1049 | "dev": true 1050 | }, 1051 | "methods": { 1052 | "version": "1.1.2", 1053 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 1054 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 1055 | "dev": true 1056 | }, 1057 | "mime": { 1058 | "version": "1.6.0", 1059 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1060 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 1061 | "dev": true 1062 | }, 1063 | "mime-db": { 1064 | "version": "1.52.0", 1065 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1066 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 1067 | "dev": true 1068 | }, 1069 | "mime-types": { 1070 | "version": "2.1.35", 1071 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1072 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1073 | "dev": true, 1074 | "requires": { 1075 | "mime-db": "1.52.0" 1076 | } 1077 | }, 1078 | "minimatch": { 1079 | "version": "4.2.1", 1080 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", 1081 | "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", 1082 | "dev": true, 1083 | "requires": { 1084 | "brace-expansion": "^1.1.7" 1085 | } 1086 | }, 1087 | "mocha": { 1088 | "version": "9.2.2", 1089 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", 1090 | "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", 1091 | "dev": true, 1092 | "requires": { 1093 | "@ungap/promise-all-settled": "1.1.2", 1094 | "ansi-colors": "4.1.1", 1095 | "browser-stdout": "1.3.1", 1096 | "chokidar": "3.5.3", 1097 | "debug": "4.3.3", 1098 | "diff": "5.0.0", 1099 | "escape-string-regexp": "4.0.0", 1100 | "find-up": "5.0.0", 1101 | "glob": "7.2.0", 1102 | "growl": "1.10.5", 1103 | "he": "1.2.0", 1104 | "js-yaml": "4.1.0", 1105 | "log-symbols": "4.1.0", 1106 | "minimatch": "4.2.1", 1107 | "ms": "2.1.3", 1108 | "nanoid": "3.3.1", 1109 | "serialize-javascript": "6.0.0", 1110 | "strip-json-comments": "3.1.1", 1111 | "supports-color": "8.1.1", 1112 | "which": "2.0.2", 1113 | "workerpool": "6.2.0", 1114 | "yargs": "16.2.0", 1115 | "yargs-parser": "20.2.4", 1116 | "yargs-unparser": "2.0.0" 1117 | }, 1118 | "dependencies": { 1119 | "debug": { 1120 | "version": "4.3.3", 1121 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", 1122 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 1123 | "dev": true, 1124 | "requires": { 1125 | "ms": "2.1.2" 1126 | }, 1127 | "dependencies": { 1128 | "ms": { 1129 | "version": "2.1.2", 1130 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1131 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1132 | "dev": true 1133 | } 1134 | } 1135 | }, 1136 | "ms": { 1137 | "version": "2.1.3", 1138 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1139 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1140 | "dev": true 1141 | } 1142 | } 1143 | }, 1144 | "ms": { 1145 | "version": "2.0.0", 1146 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1147 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", 1148 | "dev": true 1149 | }, 1150 | "nanoid": { 1151 | "version": "3.3.1", 1152 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", 1153 | "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", 1154 | "dev": true 1155 | }, 1156 | "negotiator": { 1157 | "version": "0.6.3", 1158 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 1159 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 1160 | "dev": true 1161 | }, 1162 | "normalize-path": { 1163 | "version": "3.0.0", 1164 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1165 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1166 | "dev": true 1167 | }, 1168 | "object-inspect": { 1169 | "version": "1.12.2", 1170 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", 1171 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", 1172 | "dev": true 1173 | }, 1174 | "on-finished": { 1175 | "version": "2.4.1", 1176 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 1177 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 1178 | "dev": true, 1179 | "requires": { 1180 | "ee-first": "1.1.1" 1181 | } 1182 | }, 1183 | "once": { 1184 | "version": "1.4.0", 1185 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1186 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1187 | "dev": true, 1188 | "requires": { 1189 | "wrappy": "1" 1190 | } 1191 | }, 1192 | "p-limit": { 1193 | "version": "3.1.0", 1194 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1195 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1196 | "dev": true, 1197 | "requires": { 1198 | "yocto-queue": "^0.1.0" 1199 | } 1200 | }, 1201 | "p-locate": { 1202 | "version": "5.0.0", 1203 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1204 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1205 | "dev": true, 1206 | "requires": { 1207 | "p-limit": "^3.0.2" 1208 | } 1209 | }, 1210 | "parseurl": { 1211 | "version": "1.3.3", 1212 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1213 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 1214 | "dev": true 1215 | }, 1216 | "path-exists": { 1217 | "version": "4.0.0", 1218 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1219 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1220 | "dev": true 1221 | }, 1222 | "path-is-absolute": { 1223 | "version": "1.0.1", 1224 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1225 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1226 | "dev": true 1227 | }, 1228 | "path-to-regexp": { 1229 | "version": "0.1.7", 1230 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1231 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", 1232 | "dev": true 1233 | }, 1234 | "pathval": { 1235 | "version": "1.1.1", 1236 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", 1237 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", 1238 | "dev": true 1239 | }, 1240 | "picomatch": { 1241 | "version": "2.3.1", 1242 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1243 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1244 | "dev": true 1245 | }, 1246 | "proxy-addr": { 1247 | "version": "2.0.7", 1248 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 1249 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1250 | "dev": true, 1251 | "requires": { 1252 | "forwarded": "0.2.0", 1253 | "ipaddr.js": "1.9.1" 1254 | } 1255 | }, 1256 | "qs": { 1257 | "version": "6.10.3", 1258 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", 1259 | "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", 1260 | "dev": true, 1261 | "requires": { 1262 | "side-channel": "^1.0.4" 1263 | } 1264 | }, 1265 | "randombytes": { 1266 | "version": "2.1.0", 1267 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1268 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1269 | "dev": true, 1270 | "requires": { 1271 | "safe-buffer": "^5.1.0" 1272 | } 1273 | }, 1274 | "range-parser": { 1275 | "version": "1.2.1", 1276 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1277 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 1278 | "dev": true 1279 | }, 1280 | "raw-body": { 1281 | "version": "2.5.1", 1282 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 1283 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 1284 | "dev": true, 1285 | "requires": { 1286 | "bytes": "3.1.2", 1287 | "http-errors": "2.0.0", 1288 | "iconv-lite": "0.4.24", 1289 | "unpipe": "1.0.0" 1290 | } 1291 | }, 1292 | "readdirp": { 1293 | "version": "3.6.0", 1294 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1295 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1296 | "dev": true, 1297 | "requires": { 1298 | "picomatch": "^2.2.1" 1299 | } 1300 | }, 1301 | "require-directory": { 1302 | "version": "2.1.1", 1303 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1304 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 1305 | "dev": true 1306 | }, 1307 | "safe-buffer": { 1308 | "version": "5.1.2", 1309 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1310 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 1311 | "dev": true 1312 | }, 1313 | "safer-buffer": { 1314 | "version": "2.1.2", 1315 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1316 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1317 | "dev": true 1318 | }, 1319 | "send": { 1320 | "version": "0.17.2", 1321 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz", 1322 | "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==", 1323 | "dev": true, 1324 | "requires": { 1325 | "debug": "2.6.9", 1326 | "depd": "~1.1.2", 1327 | "destroy": "~1.0.4", 1328 | "encodeurl": "~1.0.2", 1329 | "escape-html": "~1.0.3", 1330 | "etag": "~1.8.1", 1331 | "fresh": "0.5.2", 1332 | "http-errors": "1.8.1", 1333 | "mime": "1.6.0", 1334 | "ms": "2.1.3", 1335 | "on-finished": "~2.3.0", 1336 | "range-parser": "~1.2.1", 1337 | "statuses": "~1.5.0" 1338 | }, 1339 | "dependencies": { 1340 | "depd": { 1341 | "version": "1.1.2", 1342 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 1343 | "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", 1344 | "dev": true 1345 | }, 1346 | "destroy": { 1347 | "version": "1.0.4", 1348 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 1349 | "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==", 1350 | "dev": true 1351 | }, 1352 | "http-errors": { 1353 | "version": "1.8.1", 1354 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", 1355 | "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", 1356 | "dev": true, 1357 | "requires": { 1358 | "depd": "~1.1.2", 1359 | "inherits": "2.0.4", 1360 | "setprototypeof": "1.2.0", 1361 | "statuses": ">= 1.5.0 < 2", 1362 | "toidentifier": "1.0.1" 1363 | } 1364 | }, 1365 | "inherits": { 1366 | "version": "2.0.4", 1367 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1368 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1369 | "dev": true 1370 | }, 1371 | "ms": { 1372 | "version": "2.1.3", 1373 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1374 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1375 | "dev": true 1376 | }, 1377 | "on-finished": { 1378 | "version": "2.3.0", 1379 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 1380 | "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", 1381 | "dev": true, 1382 | "requires": { 1383 | "ee-first": "1.1.1" 1384 | } 1385 | }, 1386 | "statuses": { 1387 | "version": "1.5.0", 1388 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1389 | "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", 1390 | "dev": true 1391 | } 1392 | } 1393 | }, 1394 | "serialize-javascript": { 1395 | "version": "6.0.0", 1396 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 1397 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 1398 | "dev": true, 1399 | "requires": { 1400 | "randombytes": "^2.1.0" 1401 | } 1402 | }, 1403 | "serve-static": { 1404 | "version": "1.14.2", 1405 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz", 1406 | "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==", 1407 | "dev": true, 1408 | "requires": { 1409 | "encodeurl": "~1.0.2", 1410 | "escape-html": "~1.0.3", 1411 | "parseurl": "~1.3.3", 1412 | "send": "0.17.2" 1413 | } 1414 | }, 1415 | "setprototypeof": { 1416 | "version": "1.2.0", 1417 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1418 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", 1419 | "dev": true 1420 | }, 1421 | "shiki": { 1422 | "version": "0.10.0", 1423 | "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.0.tgz", 1424 | "integrity": "sha512-iczxaIYeBFHTFrQPb9DVy2SKgYxC4Wo7Iucm7C17cCh2Ge/refnvHscUOxM85u57MfLoNOtjoEFUWt9gBexblA==", 1425 | "dev": true, 1426 | "requires": { 1427 | "jsonc-parser": "^3.0.0", 1428 | "vscode-oniguruma": "^1.6.1", 1429 | "vscode-textmate": "5.2.0" 1430 | } 1431 | }, 1432 | "side-channel": { 1433 | "version": "1.0.4", 1434 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1435 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1436 | "dev": true, 1437 | "requires": { 1438 | "call-bind": "^1.0.0", 1439 | "get-intrinsic": "^1.0.2", 1440 | "object-inspect": "^1.9.0" 1441 | } 1442 | }, 1443 | "statuses": { 1444 | "version": "2.0.1", 1445 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1446 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1447 | "dev": true 1448 | }, 1449 | "string-width": { 1450 | "version": "4.2.3", 1451 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1452 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1453 | "dev": true, 1454 | "requires": { 1455 | "emoji-regex": "^8.0.0", 1456 | "is-fullwidth-code-point": "^3.0.0", 1457 | "strip-ansi": "^6.0.1" 1458 | } 1459 | }, 1460 | "strip-ansi": { 1461 | "version": "6.0.1", 1462 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1463 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1464 | "dev": true, 1465 | "requires": { 1466 | "ansi-regex": "^5.0.1" 1467 | } 1468 | }, 1469 | "strip-json-comments": { 1470 | "version": "3.1.1", 1471 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1472 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1473 | "dev": true 1474 | }, 1475 | "supports-color": { 1476 | "version": "8.1.1", 1477 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1478 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1479 | "dev": true, 1480 | "requires": { 1481 | "has-flag": "^4.0.0" 1482 | } 1483 | }, 1484 | "to-regex-range": { 1485 | "version": "5.0.1", 1486 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1487 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1488 | "dev": true, 1489 | "requires": { 1490 | "is-number": "^7.0.0" 1491 | } 1492 | }, 1493 | "toidentifier": { 1494 | "version": "1.0.1", 1495 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1496 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1497 | "dev": true 1498 | }, 1499 | "ts-node": { 1500 | "version": "10.7.0", 1501 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", 1502 | "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", 1503 | "dev": true, 1504 | "requires": { 1505 | "@cspotcode/source-map-support": "0.7.0", 1506 | "@tsconfig/node10": "^1.0.7", 1507 | "@tsconfig/node12": "^1.0.7", 1508 | "@tsconfig/node14": "^1.0.0", 1509 | "@tsconfig/node16": "^1.0.2", 1510 | "acorn": "^8.4.1", 1511 | "acorn-walk": "^8.1.1", 1512 | "arg": "^4.1.0", 1513 | "create-require": "^1.1.0", 1514 | "diff": "^4.0.1", 1515 | "make-error": "^1.1.1", 1516 | "v8-compile-cache-lib": "^3.0.0", 1517 | "yn": "3.1.1" 1518 | }, 1519 | "dependencies": { 1520 | "diff": { 1521 | "version": "4.0.2", 1522 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 1523 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 1524 | "dev": true 1525 | } 1526 | } 1527 | }, 1528 | "type-detect": { 1529 | "version": "4.0.8", 1530 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 1531 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 1532 | "dev": true 1533 | }, 1534 | "type-is": { 1535 | "version": "1.6.18", 1536 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1537 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1538 | "dev": true, 1539 | "requires": { 1540 | "media-typer": "0.3.0", 1541 | "mime-types": "~2.1.24" 1542 | } 1543 | }, 1544 | "typedoc": { 1545 | "version": "0.22.11", 1546 | "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.11.tgz", 1547 | "integrity": "sha512-pVr3hh6dkS3lPPaZz1fNpvcrqLdtEvXmXayN55czlamSgvEjh+57GUqfhAI1Xsuu/hNHUT1KNSx8LH2wBP/7SA==", 1548 | "dev": true, 1549 | "requires": { 1550 | "glob": "^7.2.0", 1551 | "lunr": "^2.3.9", 1552 | "marked": "^4.0.10", 1553 | "minimatch": "^3.0.4", 1554 | "shiki": "^0.10.0" 1555 | }, 1556 | "dependencies": { 1557 | "glob": { 1558 | "version": "7.2.0", 1559 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 1560 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 1561 | "dev": true, 1562 | "requires": { 1563 | "fs.realpath": "^1.0.0", 1564 | "inflight": "^1.0.4", 1565 | "inherits": "2", 1566 | "minimatch": "^3.0.4", 1567 | "once": "^1.3.0", 1568 | "path-is-absolute": "^1.0.0" 1569 | } 1570 | }, 1571 | "minimatch": { 1572 | "version": "3.1.2", 1573 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1574 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1575 | "dev": true, 1576 | "requires": { 1577 | "brace-expansion": "^1.1.7" 1578 | } 1579 | } 1580 | } 1581 | }, 1582 | "typescript": { 1583 | "version": "4.5.5", 1584 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", 1585 | "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", 1586 | "dev": true 1587 | }, 1588 | "unpipe": { 1589 | "version": "1.0.0", 1590 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1591 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1592 | "dev": true 1593 | }, 1594 | "utils-merge": { 1595 | "version": "1.0.1", 1596 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1597 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1598 | "dev": true 1599 | }, 1600 | "v8-compile-cache-lib": { 1601 | "version": "3.0.0", 1602 | "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", 1603 | "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", 1604 | "dev": true 1605 | }, 1606 | "vary": { 1607 | "version": "1.1.2", 1608 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1609 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1610 | "dev": true 1611 | }, 1612 | "vscode-oniguruma": { 1613 | "version": "1.6.1", 1614 | "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", 1615 | "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==", 1616 | "dev": true 1617 | }, 1618 | "vscode-textmate": { 1619 | "version": "5.2.0", 1620 | "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", 1621 | "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", 1622 | "dev": true 1623 | }, 1624 | "which": { 1625 | "version": "2.0.2", 1626 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1627 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1628 | "dev": true, 1629 | "requires": { 1630 | "isexe": "^2.0.0" 1631 | } 1632 | }, 1633 | "workerpool": { 1634 | "version": "6.2.0", 1635 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", 1636 | "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", 1637 | "dev": true 1638 | }, 1639 | "wrap-ansi": { 1640 | "version": "7.0.0", 1641 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1642 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1643 | "dev": true, 1644 | "requires": { 1645 | "ansi-styles": "^4.0.0", 1646 | "string-width": "^4.1.0", 1647 | "strip-ansi": "^6.0.0" 1648 | } 1649 | }, 1650 | "wrappy": { 1651 | "version": "1.0.2", 1652 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1653 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1654 | "dev": true 1655 | }, 1656 | "y18n": { 1657 | "version": "5.0.8", 1658 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1659 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1660 | "dev": true 1661 | }, 1662 | "yargs": { 1663 | "version": "16.2.0", 1664 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1665 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1666 | "dev": true, 1667 | "requires": { 1668 | "cliui": "^7.0.2", 1669 | "escalade": "^3.1.1", 1670 | "get-caller-file": "^2.0.5", 1671 | "require-directory": "^2.1.1", 1672 | "string-width": "^4.2.0", 1673 | "y18n": "^5.0.5", 1674 | "yargs-parser": "^20.2.2" 1675 | } 1676 | }, 1677 | "yargs-parser": { 1678 | "version": "20.2.4", 1679 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1680 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1681 | "dev": true 1682 | }, 1683 | "yargs-unparser": { 1684 | "version": "2.0.0", 1685 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1686 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1687 | "dev": true, 1688 | "requires": { 1689 | "camelcase": "^6.0.0", 1690 | "decamelize": "^4.0.0", 1691 | "flat": "^5.0.2", 1692 | "is-plain-obj": "^2.1.0" 1693 | } 1694 | }, 1695 | "yn": { 1696 | "version": "3.1.1", 1697 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1698 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1699 | "dev": true 1700 | }, 1701 | "yocto-queue": { 1702 | "version": "0.1.0", 1703 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1704 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1705 | "dev": true 1706 | } 1707 | } 1708 | } 1709 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "redis-cloud-api-sdk", 3 | "version": "1.0.9", 4 | "description": "This is a client for the Redislabs Cloud API", 5 | "main": "lib/index.js", 6 | "types": "lib/index.d.ts", 7 | "scripts": { 8 | "build": "tsc", 9 | "generate-docs": "typedoc --out docs .", 10 | "test": "mocha -r ts-node/register", 11 | "unit-tests": "npm run general-unit-tests && npm run cloud-account-unit-tests && npm run subscription-unit-tests && npm run database-unit-tests", 12 | "general-unit-tests": "npm run test tests/unit/general.ts -- --ENVIRONMENT=localhost --PORT=3000 --API_ACCESS_KEY=access-key --API_SECRET_KEY=secret-key", 13 | "cloud-account-unit-tests": "npm run test tests/unit/cloud-account.ts -- --ENVIRONMENT=localhost --PORT=3000 --API_ACCESS_KEY=access-key --API_SECRET_KEY=secret-key", 14 | "subscription-unit-tests": "npm run test tests/unit/subscription.ts -- --ENVIRONMENT=localhost --PORT=3000 --API_ACCESS_KEY=access-key --API_SECRET_KEY=secret-key", 15 | "database-unit-tests": "npm run test tests/unit/database.ts -- --ENVIRONMENT=localhost --PORT=3000 --API_ACCESS_KEY=access-key --API_SECRET_KEY=secret-key" 16 | }, 17 | "keywords": [ 18 | "Redis", 19 | "Redis Cloud API", 20 | "Redis Cloud API SDK", 21 | "Cloud API SDK", 22 | "Cloud API", 23 | "Cloud" 24 | ], 25 | "repository": { 26 | "type": "git", 27 | "url": "git+https://github.com/danitseitlin/redis-cloud-api-sdk.git" 28 | }, 29 | "author": "Dani Tseitlin", 30 | "license": "Apache 2.0", 31 | "bugs": { 32 | "url": "https://github.com/danitseitlin/redis-cloud-api-sdk/issues" 33 | }, 34 | "homepage": "https://github.com/danitseitlin/redis-cloud-api-sdk#readme", 35 | "dependencies": { 36 | "axios": "0.24.0" 37 | }, 38 | "devDependencies": { 39 | "@microsoft/tsdoc": "0.13.2", 40 | "@types/axios": "0.14.0", 41 | "@types/chai": "4.3.0", 42 | "@types/mocha": "9.1.0", 43 | "@types/node": "16.11.9", 44 | "chai": "4.3.6", 45 | "cli-argument-parser": "0.6.1", 46 | "dmock-server": "1.9.7", 47 | "mocha": "9.2.2", 48 | "ts-node": "10.7.0", 49 | "typedoc": "0.22.11", 50 | "typescript": "4.5.5" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/mockers/cloud-account.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "path": "/v1/cloud-accounts", 3 | "method": "post", 4 | "response": { 5 | "taskId": 1 6 | } 7 | },{ 8 | "path": "/v1/tasks/1", 9 | "method": "get", 10 | "response": { 11 | "response": { 12 | "resourceId": 1, 13 | "status": "processing-completed" 14 | } 15 | } 16 | },{ 17 | "path": "/v1/cloud-accounts", 18 | "method": "get", 19 | "response": { 20 | "cloudAccounts": [{ 21 | "id": 1, 22 | "name": "My cloud account" 23 | }] 24 | } 25 | },{ 26 | "path": "/v1/cloud-accounts/1", 27 | "method": "get", 28 | "response": { 29 | "id": 1, 30 | "name": "My cloud account" 31 | } 32 | },{ 33 | "path": "/v1/cloud-accounts/1", 34 | "method": "delete", 35 | "response": { 36 | "taskId": 1 37 | } 38 | }] -------------------------------------------------------------------------------- /tests/mockers/database.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "path": "/v1/subscriptions/1/databases", 3 | "method": "get", 4 | "response": { 5 | "subscription": [{ 6 | "databases": [{ 7 | "databaseId": 1, 8 | "name": "First database" 9 | }] 10 | }] 11 | } 12 | },{ 13 | "path": "/v1/subscriptions/1/databases", 14 | "method": "post", 15 | "response": { 16 | "taskId": 1 17 | } 18 | },{ 19 | "path": "/v1/subscriptions/1/databases/1", 20 | "method": "get", 21 | "response": { 22 | "databaseId": 1, 23 | "name": "First database" 24 | } 25 | },{ 26 | "path": "/v1/subscriptions/1/databases/1", 27 | "method": "put", 28 | "response": { 29 | "taskId": 1 30 | } 31 | },{ 32 | "path": "/v1/subscriptions/1/databases/1", 33 | "method": "delete", 34 | "response": { 35 | "taskId": 1 36 | } 37 | },{ 38 | "path": "/v1/subscriptions/1/databases/1/backup", 39 | "method": "post", 40 | "response": { 41 | "taskId": 1 42 | } 43 | },{ 44 | "path": "/v1/subscriptions/1/databases/1/import", 45 | "method": "post", 46 | "response": { 47 | "taskId": 1 48 | } 49 | },{ 50 | "path": "/v1/tasks/1", 51 | "method": "get", 52 | "response": { 53 | "response": { 54 | "resourceId": 1, 55 | "status": "processing-completed" 56 | } 57 | } 58 | }] -------------------------------------------------------------------------------- /tests/mockers/general.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "path": "/v1/", 3 | "method": "get", 4 | "response": { 5 | "account": { 6 | "id": 1, 7 | "key": { 8 | "accountId": 123 9 | } 10 | } 11 | } 12 | },{ 13 | "path": "/v1/data-persistence", 14 | "method": "get", 15 | "response": { 16 | "dataPersistence": [ 17 | { "name": "none", "description": "None" }, 18 | { "name": "aof-every-1-second", "description": "Append only file (AOF) - fsync every 1 second" }, 19 | { "name": "aof-every-write", "description": "Append only file (AOF) - fsync every write" }, 20 | { "name": "snapshot-every-1-hour", "description": "Snapshot every 1 hour" }, 21 | { "name": "snapshot-every-6-hours", "description": "Snapshot every 6 hour" }, 22 | { "name": "snapshot-every-12-hours", "description": "Snapshot every 12 hour" } 23 | ] 24 | } 25 | },{ 26 | "path": "/v1/database-modules", 27 | "method": "get", 28 | "response": { 29 | "modules": [{ 30 | "name": "Module 1", 31 | "description": "The first module" 32 | }] 33 | } 34 | },{ 35 | "path": "/v1/logs", 36 | "method": "get", 37 | "response": { 38 | "entries": [{ 39 | "id": 1, 40 | "time": "22.05.2022", 41 | "originator": "name", 42 | "apiKeyName": "key-name", 43 | "type": "AWS", 44 | "description": "Key description" 45 | }] 46 | } 47 | },{ 48 | "path": "/v1/payment-methods", 49 | "method": "get", 50 | "response": { 51 | "paymentMethods": [{ 52 | "id": 1 53 | }] 54 | } 55 | },{ 56 | "path": "/v1/plans", 57 | "method": "get", 58 | "response": { 59 | "plans": [{ 60 | "id": 1 61 | }] 62 | } 63 | },{ 64 | "path": "/v1/regions", 65 | "method": "get", 66 | "response": { 67 | "regions": [{ 68 | "id": 1 69 | }] 70 | } 71 | }] -------------------------------------------------------------------------------- /tests/mockers/subscription.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "path": "/v1/subscriptions", 3 | "method": "post", 4 | "response": { 5 | "taskId": 1 6 | } 7 | },{ 8 | "path": "/v1/subscriptions", 9 | "method": "get", 10 | "response": { 11 | "subscriptions": [{ 12 | "id": 1 13 | }] 14 | } 15 | },{ 16 | "path": "/v1/subscriptions/1", 17 | "method": "get", 18 | "response": { 19 | "id": 1, 20 | "status": "active" 21 | } 22 | },{ 23 | "path": "/v1/subscriptions/1", 24 | "method": "put", 25 | "response": { 26 | "taskId": 1 27 | } 28 | },{ 29 | "path": "/v1/subscriptions/1/cidr", 30 | "method": "get", 31 | "response": { 32 | "taskId": 1 33 | } 34 | },{ 35 | "path": "/v1/subscriptions/1/cidr", 36 | "method": "put", 37 | "response": { 38 | "taskId": 1 39 | } 40 | },{ 41 | "path": "/v1/subscriptions/1/peerings", 42 | "method": "get", 43 | "response": { 44 | "taskId": 1 45 | } 46 | },{ 47 | "path": "/v1/subscriptions/1/peerings", 48 | "method": "post", 49 | "response": { 50 | "taskId": 1 51 | } 52 | },{ 53 | "path": "/v1/subscriptions/1/peerings/1", 54 | "method": "delete", 55 | "response": { 56 | "taskId": 1 57 | } 58 | },{ 59 | "path": "/v1/tasks/1", 60 | "method": "get", 61 | "response": { 62 | "resourceId": 1, 63 | "status": "processing-completed", 64 | "response": { 65 | "resourceId": 1, 66 | "status": "processing-completed", 67 | "resource": { 68 | "cidr_ips": ["123"], 69 | "peerings": ["456"] 70 | } 71 | } 72 | } 73 | }] 74 | -------------------------------------------------------------------------------- /tests/unit/cloud-account.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai'; 2 | import { CloudAPISDK } from '../../api'; 3 | import { cliArguments } from 'cli-argument-parser'; 4 | import { MockServer } from 'dmock-server'; 5 | 6 | const server = new MockServer({ 7 | hostname: cliArguments.ENVIRONMENT, 8 | port: parseInt(cliArguments.PORT), 9 | routes: 'tests/mockers/cloud-account.json' 10 | }); 11 | 12 | const client = new CloudAPISDK({ 13 | protocol: 'http', 14 | domain: `${cliArguments.ENVIRONMENT}:${cliArguments.PORT}`, 15 | accessKey: cliArguments.API_ACCESS_KEY, 16 | secretKey: cliArguments.API_SECRET_KEY, 17 | debug: true 18 | }); 19 | 20 | describe('Testing cloud account', async function() { 21 | this.timeout(10 * 60 * 60); 22 | const cloudAccountId = 1; 23 | before(async () => { 24 | server.start(); 25 | }); 26 | after(async () => { 27 | server.stop(); 28 | }); 29 | it('createCloudAccount', async () => { 30 | const response = await client.createCloudAccount({ 31 | name: 'My cloud account', 32 | accessKeyId: 'fake-creds', 33 | accessSecretKey: 'fake-creds', 34 | consoleUsername: 'console-username', 35 | consolePassword: 'console-password', 36 | signInLoginUrl: 'sign-in-login-url' 37 | }); 38 | expect(response.resourceId).to.eql(1, 'Cloud account id'); 39 | }); 40 | it('getCloudAccounts', async () => { 41 | const cloudAccounts = await client.getCloudAccounts(); 42 | expect(cloudAccounts.length).to.eql(1, 'Cloud accounts count'); 43 | }) 44 | it('getCloudAccount', async () => { 45 | const cloudAccount = await client.getCloudAccount(cloudAccountId); 46 | expect(cloudAccount.id).to.eql(1, 'Cloud account id'); 47 | expect(cloudAccount.name).to.eql('My cloud account', 'Cloud account name'); 48 | }); 49 | it('deleteCloudAccount', async () => { 50 | const response = await client.deleteCloudAccount(cloudAccountId); 51 | expect(response.resourceId).to.eql(1, 'Cloud account id'); 52 | }); 53 | }); 54 | -------------------------------------------------------------------------------- /tests/unit/database.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai'; 2 | import { CloudAPISDK } from '../../api'; 3 | import { cliArguments } from 'cli-argument-parser'; 4 | import { MockServer } from 'dmock-server'; 5 | 6 | const server = new MockServer({ 7 | hostname: cliArguments.ENVIRONMENT, 8 | port: parseInt(cliArguments.PORT), 9 | routes: 'tests/mockers/database.json' 10 | }); 11 | 12 | const client = new CloudAPISDK({ 13 | protocol: 'http', 14 | domain: `${cliArguments.ENVIRONMENT}:${cliArguments.PORT}`, 15 | accessKey: cliArguments.API_ACCESS_KEY, 16 | secretKey: cliArguments.API_SECRET_KEY, 17 | debug: true 18 | }); 19 | 20 | describe('Testing databases', async function() { 21 | this.timeout(10 * 60 * 60); 22 | const subscriptionId = 1; 23 | const databaseId = 1; 24 | before(async () => { 25 | server.start(); 26 | }); 27 | after(async () => { 28 | server.stop(); 29 | }); 30 | it('getDatabases', async () => { 31 | const databases = await client.getDatabases(subscriptionId); 32 | expect(databases.length).to.eql(1, 'Databases count') 33 | }); 34 | it('createDatabase', async () => { 35 | const createDatabase = await client.createDatabase(subscriptionId, { 36 | name: 'test-database', 37 | memoryLimitInGb: 10.0 38 | }); 39 | expect(createDatabase.resourceId).to.eql(1, 'Database id'); 40 | }); 41 | it('getDatabase', async () => { 42 | const database = await client.getDatabase(subscriptionId, databaseId); 43 | expect(database.databaseId).to.eql(1, 'Database id'); 44 | expect(database.name).to.eql('First database', 'Database name'); 45 | }); 46 | it('updateDatabase', async () => { 47 | const updateDatabase = await client.updateDatabase(subscriptionId, databaseId, { 48 | name: 'test-updated-databases' 49 | }); 50 | expect(updateDatabase.resourceId).to.eql(1, 'Database id'); 51 | }); 52 | it('deleteDatabase', async () => { 53 | const deleteDatabaseResponse = await client.deleteDatabase(subscriptionId, databaseId); 54 | expect(deleteDatabaseResponse.resourceId).to.eql(1, 'Database id'); 55 | }); 56 | it('backupDatabase', async () => { 57 | const response = await client.backupDatabase(subscriptionId, databaseId); 58 | expect(response.resourceId).to.eql(1, 'Database id'); 59 | }); 60 | it('importIntoDatabase', async () => { 61 | const response = await client.importIntoDatabase(subscriptionId, databaseId, { 62 | sourceType: 'ftp', 63 | importFromUri: ['ftp-import-url'] 64 | }); 65 | expect(response.resourceId).to.eql(1, 'Database id'); 66 | }); 67 | }); -------------------------------------------------------------------------------- /tests/unit/general.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai'; 2 | import { CloudAPISDK } from '../../api'; 3 | import { cliArguments } from 'cli-argument-parser'; 4 | import { MockServer } from 'dmock-server'; 5 | 6 | const server = new MockServer({ 7 | hostname: cliArguments.ENVIRONMENT, 8 | port: parseInt(cliArguments.PORT), 9 | routes: 'tests/mockers/general.json' 10 | }); 11 | 12 | const client = new CloudAPISDK({ 13 | protocol: 'http', 14 | domain: `${cliArguments.ENVIRONMENT}:${cliArguments.PORT}`, 15 | accessKey: cliArguments.API_ACCESS_KEY, 16 | secretKey: cliArguments.API_SECRET_KEY, 17 | debug: true 18 | }); 19 | describe('Testing general functions', async function() { 20 | this.timeout(10 * 60 * 60); 21 | before(async () => { 22 | server.start(); 23 | }); 24 | after(async () => { 25 | server.stop(); 26 | }); 27 | it('getAccountInformation', async () => { 28 | const accountInformation = await client.getAccountInformation(); 29 | expect(accountInformation.key.accountId).to.eql(123, 'Account id'); 30 | }); 31 | it('getDataPersistences', async () => { 32 | const dataPersistenceList = await client.getDataPersistences(); 33 | expect(dataPersistenceList.length).to.eql(6, 'Data persistences count') 34 | }); 35 | it('getDatabaseModules', async () => { 36 | const databaseModules = await client.getDatabaseModules(); 37 | expect(databaseModules.length).to.eql(1, 'Database modules count') 38 | }); 39 | it('getSystemLogs', async () => { 40 | const systemLogs = await client.getSystemLogs(2, 0); 41 | expect(systemLogs.length).to.eql(1, 'System logs count') 42 | }); 43 | it('getPaymentMethods', async () => { 44 | const paymentMethods = await client.getPaymentMethods(); 45 | expect(paymentMethods.length).to.eql(1, 'Payment methods count'); 46 | }); 47 | it('getPlans', async () => { 48 | const plans = await client.getPlans('AWS'); 49 | expect(plans.length).to.eql(1, 'Plans count'); 50 | }); 51 | it('getRegions', async () => { 52 | const regions = await client.getRegions('AWS'); 53 | expect(regions.length).to.eql(1, 'Regions count'); 54 | }); 55 | }); -------------------------------------------------------------------------------- /tests/unit/subscription.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai'; 2 | import { CloudAPISDK } from '../../api'; 3 | import { cliArguments } from 'cli-argument-parser'; 4 | import { MockServer } from 'dmock-server'; 5 | 6 | const server = new MockServer({ 7 | hostname: cliArguments.ENVIRONMENT, 8 | port: parseInt(cliArguments.PORT), 9 | routes: 'tests/mockers/subscription.json' 10 | }); 11 | 12 | const client = new CloudAPISDK({ 13 | protocol: 'http', 14 | domain: `${cliArguments.ENVIRONMENT}:${cliArguments.PORT}`, 15 | accessKey: cliArguments.API_ACCESS_KEY, 16 | secretKey: cliArguments.API_SECRET_KEY, 17 | debug: true 18 | }); 19 | 20 | describe('Testing subscription', async function() { 21 | this.timeout(10 * 60 * 60); 22 | const subscriptionId = 1; 23 | const vpcPeeringId = 1; 24 | before(async () => { 25 | server.start(); 26 | }); 27 | after(async () => { 28 | server.stop(); 29 | }); 30 | it('createSubscription', async () => { 31 | const response = await client.createSubscription({ 32 | dryRun: false, 33 | paymentMethodId: 123, 34 | cloudProviders: [{ 35 | cloudAccountId: 456, 36 | regions: [{ 37 | region: 'us-east-1', 38 | networking: { 39 | deploymentCIDR: '192.168.1.0/24' 40 | } 41 | }] 42 | }], 43 | databases: [{ 44 | name: 'database', 45 | memoryLimitInGb: 5 46 | }] 47 | }); 48 | expect(response.resourceId).to.eql(subscriptionId, 'Subscription id'); 49 | }); 50 | it('getSubscriptions', async () => { 51 | const subscriptions = await client.getSubscriptions(); 52 | expect(subscriptions.length).to.eql(1, 'Subscriptions count'); 53 | }); 54 | it('getSubscription', async () => { 55 | const subscription = await client.getSubscription(subscriptionId); 56 | expect(subscription.id).to.eql(1, 'Subscription id'); 57 | }); 58 | it('updateSubscription', async () => { 59 | const response = await client.updateSubscription(subscriptionId, { 60 | name: 'updated-subscription' 61 | }); 62 | expect(response.resourceId).to.eql(1, 'Subscription id'); 63 | }); 64 | it('getCidrWhitelists', async () => { 65 | const cidrWhitelists = await client.getSubscriptionCidrWhitelist(subscriptionId); 66 | expect(cidrWhitelists.cidr_ips?.length).to.eql(1, 'Cidr whitelists count'); 67 | }); 68 | it('updateCidrWhitelists', async () => { 69 | const response = await client.updateSubscriptionCidrWhitelists(subscriptionId, { 70 | cidrIps: ['192.168.20.0/24'] 71 | }); 72 | expect(response.resourceId).to.eql(1, 'Subscription id'); 73 | }); 74 | it('getSubscriptionVpcPeerings', async () => { 75 | const subscriptionVpcPeerings = await client.getVpcPeerings(subscriptionId); 76 | expect(subscriptionVpcPeerings.length).to.eql(1, 'Vpc Peerings count'); 77 | }); 78 | it('createSubscriptionVpcPeering', async () => { 79 | const response = await client.createSubscriptionVpcPeering(subscriptionId, { 80 | region: 'us-east-1', 81 | awsAccountId: 'aws-account-id', 82 | vpcCidr: 'vpc-cidr', 83 | vpcId: 'vpc-id' 84 | }); 85 | expect(response.resourceId).to.eql(1, 'Subscription id'); 86 | }); 87 | it('deleteSubscriptionVpcPeering', async () => { 88 | const response = await client.deleteSubscriptionVpcPeering(subscriptionId, vpcPeeringId); 89 | expect(response.resourceId).to.eql(1, 'Subscription id'); 90 | }); 91 | it('waitForSubscriptionStatus', async () => { 92 | const response = await client.waitForSubscriptionStatus(subscriptionId, 'active'); 93 | expect(response.id).to.eql(1, 'Subscription id'); 94 | }); 95 | it('waitForSubscriptionsStatus', async() => { 96 | const responses = await client.waitForSubscriptionsStatus('active'); 97 | expect(responses.length).to.eql(1, 'The count of subscription responses'); 98 | }) 99 | }); 100 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "declaration": true, 6 | "outDir": "./lib", 7 | "strict": true, 8 | "moduleResolution": "node" 9 | } 10 | } -------------------------------------------------------------------------------- /tsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsdoc":{ 3 | "source":"./api.ts", 4 | "destination":"./docs", 5 | "tutorials":"", 6 | "systemName": "redis-cloud-api-sdk", 7 | "footer": "", 8 | "copyright": "redis-cloud-api-sdk Copyright © 2021 Dani Tseitlin", 9 | "outputSourceFiles": true, 10 | "commentsOnly": true 11 | } 12 | } -------------------------------------------------------------------------------- /types/parameters/cloud-account.ts: -------------------------------------------------------------------------------- 1 | import { CloudAccountProvider } from '../responses/cloud-account'; 2 | 3 | /** 4 | * The parameters needed to create a cloud account 5 | * @param accessKeyId Required. Cloud provider access key 6 | * @param accessSecretKey Required. Cloud provider secret key 7 | * @param consolePassword Required. Cloud provider management console password 8 | * @param consoleUsername Required. Cloud provider management console username 9 | * @param name Required. Cloud account display name 10 | * @param provider Optional. Cloud provider. Default: ‘AWS’ 11 | * @param signInLoginUrl Required. Cloud provider management console login URL 12 | */ 13 | export type CloudAccountCreationParameters = { 14 | accessKeyId: string, 15 | accessSecretKey: string, 16 | consolePassword: string, 17 | consoleUsername: string, 18 | name: string, 19 | provider?: CloudAccountProvider, 20 | signInLoginUrl: string 21 | } 22 | 23 | /** 24 | * The parameters needed to update a cloud account 25 | * @param accessKeyId Required. Cloud provider access key 26 | * @param accessSecretKey Required. Cloud provider secret key 27 | * @param consolePassword Required. Cloud provider management console password 28 | * @param consoleUsername Required. Cloud provider management console username 29 | * @param name Optional. Cloud account display name 30 | * @param signInLoginUrl Optional. Cloud provider management console login URL 31 | */ 32 | export type CloudAccountUpdateParameters = { 33 | accessKeyId: string, 34 | accessSecretKey: string, 35 | consolePassword: string, 36 | consoleUsername: string, 37 | name?: string, 38 | signInLoginUrl?: string 39 | } -------------------------------------------------------------------------------- /types/parameters/database.ts: -------------------------------------------------------------------------------- 1 | import { DatabaseProtocol, DatabaseDataPersistence, DatabaseDataEvictionPolicy, DatabaseThroughputMeasurement, DatabaseImportSource } from '../responses/database'; 2 | 3 | /** 4 | * The parameters used to create a database 5 | * @param dryRun Optional. When 'false’: Creates a deployment plan and deploys it (creating any resources required by the plan). When 'true’: creates a read-only deployment plan without any resource creation. Default: ‘true’ 6 | * @param name Required. Database name 7 | * @param protocol Optional. Database protocol: either ‘redis’ or 'memcached’. Default: ‘redis’ 8 | * @param memoryLimitInGb Required. Maximum memory usage for this specific database 9 | * @param supportOSSClusterApi Optional. Support Redis open-source (OSS) Cluster API 10 | * @param useExternalEndpointForOSSClusterApi Optional. Should use external endpoint for open-source (OSS) Cluster API. Can only be enabled if OSS Cluster API support is enabled’. Default: ‘false’ 11 | * @param dataPersistence Optional. Rate of database data persistence (in persistent storage) 12 | * @param dataEvictionPolicy Optional. Data items eviction method 13 | * @param replication Optional. Databases replication 14 | * @param throughputMeasurement Optional. The throughput measurement of the database 15 | * @param throughputMeasurement.by Required. Throughput measurement method. Either ‘number-of-shards’ or ‘operations-per-second’ 16 | * @param throughputMeasurement.value Required. Throughput value (as applies to selected measurement method) 17 | * @param replicaOf Optional. This database will be a replica of the specified Redis databases provided as one or more URI (sample format: 'redis://user:password@host:port)'. If the URI provided is Redis Labs Cloud instance, only host and port should be provided (using the format: ['redis://endpoint1:6379’, ‘redis://endpoint2:6380’] ). 18 | * @param periodicBackupPath Optional. If specified, database will be able to perform backups to this path. If empty string is received, backup path will be removed 19 | * @param sourceIp Optional. List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32’, ‘192.168.12.0/24’] ) 20 | * @param enableTls Optional. When 'true’, requires TLS authentication for all connections (mTLS with valid clientSslCertificate, regular TLS when the clientSslCertificate is not provided) 21 | * @param clientSslCertificate Optional. If specified, this SSL certificate will be required to authenticate user connections. If empty string is received, SSL certificate will be removed 22 | * @param password Optional. If specified, this password will be used to access the database 23 | * @param alerts Optional. Redis Labs database alerts 24 | * @param averageItemSizeInBytes Optional. Relevant only to ram-and-flash subscriptions. Estimated average size (measured in bytes) of the items stored in the database, Default: 1000 25 | * @param modules Optional. Redis Labs modules to be provisioned in the database 26 | */ 27 | export type DatabaseCreationParameters = { 28 | dryRun?: boolean, 29 | name: string, 30 | protocol?: DatabaseProtocol, 31 | memoryLimitInGb: number, 32 | supportOSSClusterApi?: boolean, 33 | useExternalEndpointForOSSClusterApi?: boolean, 34 | dataPersistence?: DatabaseDataPersistence, 35 | dataEvictionPolicy?: DatabaseDataEvictionPolicy, 36 | replication?: boolean, 37 | throughputMeasurement?: DatabaseThroughputMeasurement, 38 | averageItemSizeInBytes?: number, 39 | replicaOf?: string[], 40 | periodicBackupPath?: string, 41 | sourceIp?: string[], 42 | enableTls?: boolean, 43 | clientSslCertificate?: string, 44 | password?: string, 45 | alerts?: Alert[], 46 | modules?: Module[] 47 | } 48 | 49 | /** 50 | * The parameters used to update an existing database 51 | * @param dryRun Optional. When 'false’: Creates a deployment plan and deploys it (creating any resources required by the plan). When 'true’: creates a read-only deployment plan without any resource creation. Default: ‘true’ 52 | * @param name Optional. Database name 53 | * @param memoryLimitInGb Optional. Maximum memory usage for this specific database 54 | * @param supportOSSClusterApi Optional. Support Redis open-source (OSS) Cluster API 55 | * @param useExternalEndpointForOSSClusterApi Optional. Should use external endpoint for open-source (OSS) Cluster API. Can only be enabled if OSS Cluster API support is enabled’. Default: ‘false’ 56 | * @param dataPersistence Optional. Rate of database data persistence (in persistent storage) 57 | * @param dataEvictionPolicy Optional. Data items eviction method 58 | * @param replication Optional. Databases replication 59 | * @param throughputMeasurement Optional. The throughput measurement of the database 60 | * @param throughputMeasurement.by Required. Throughput measurement method. Either ‘number-of-shards’ or ‘operations-per-second’ 61 | * @param throughputMeasurement.value Required. Throughput value (as applies to selected measurement method) 62 | * @param replicaOf Optional. This database will be a replica of the specified Redis databases provided as one or more URI (sample format: 'redis://user:password@host:port)'. If the URI provided is Redis Labs Cloud instance, only host and port should be provided (using the format: ['redis://endpoint1:6379’, ‘redis://endpoint2:6380’] ). 63 | * @param periodicBackupPath Optional. If specified, database will be able to perform backups to this path. If empty string is received, backup path will be removed 64 | * @param sourceIp Optional. List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: ['192.168.10.0/32’, ‘192.168.12.0/24’] ) 65 | * @param enableTls Optional. When 'true’, requires TLS authentication for all connections (mTLS with valid clientSslCertificate, regular TLS when the clientSslCertificate is not provided) 66 | * @param clientSslCertificate Optional. If specified, this SSL certificate will be required to authenticate user connections. If empty string is received, SSL certificate will be removed 67 | * @param password Optional. If specified, this password will be used to access the database 68 | * @param alerts Optional. Redis Labs database alerts 69 | * @param regexRules Optional. Shard regex rules. Relevant only for a sharded database 70 | */ 71 | export type DatabaseUpdateParameters = { 72 | dryRun?: boolean, 73 | name?: string, 74 | memoryLimitInGb?: number, 75 | supportOSSClusterApi?: boolean, 76 | useExternalEndpointForOSSClusterApi?: boolean, 77 | dataPersistence?: DatabaseDataPersistence, 78 | dataEvictionPolicy?: DatabaseDataEvictionPolicy, 79 | replication?: boolean, 80 | throughputMeasurement?: DatabaseThroughputMeasurement, 81 | replicaOf?: string[], 82 | periodicBackupPath?: string, 83 | sourceIp?: string[], 84 | enableTls?: boolean, 85 | clientSslCertificate?: string, 86 | password?: string, 87 | alerts?: Alert[], 88 | regexRules?: string[] 89 | } 90 | 91 | 92 | /** 93 | * The database alert 94 | * @param name The name of the alert 95 | * @param value The value of the alert 96 | */ 97 | export type Alert = { 98 | name: AlertName, 99 | value: string 100 | } 101 | 102 | /** 103 | * The alert names 104 | */ 105 | export type AlertName = 'dataset-size' | 'throughput-higher-than' | 'throughput-lower-than' | 'latency' | 'syncsource-error' | 'syncsource-lag'; 106 | 107 | /** 108 | * The database module 109 | * @param name Required. The name of the database module. 110 | * @param parameters Optional Redis Labs database module parameters (name and value), as relevant to the specific module (see modules parameters specification) 111 | */ 112 | export type Module = { 113 | name: DatabaseModule, 114 | parameters?: {[key: string]: any} 115 | } 116 | 117 | /** 118 | * The available database modules by name 119 | * @param RedisBloom The Redis Bloom module 120 | * @param RedisGraph The Redis Graph module 121 | * @param RedisJSON The Redis JSON module 122 | * @param RediSearch The Redis Search module 123 | * @param RedisTimeSeries The Redis Time Series module 124 | */ 125 | type DatabaseModule = 'RedisBloom' | 'RedisGraph' | 'RedisJSON' | 'RediSearch' | 'RedisTimeSeries' 126 | 127 | /** 128 | * The parameters needed to import a database file into an existing database 129 | * @param sourceType Required. Type of storage source from which to import the database file (RDB files) or data (Redis connection) 130 | * @param importFromUri Required. One or more URIs to source data files or Redis databases, as appropriate to specified source type (example: ['http://mydomain.com/redis-backup-file1’, ‘http://mydomain.com/redis-backup-file2’]) 131 | */ 132 | export type DatabaseImportParameters = { 133 | sourceType: DatabaseImportSource, 134 | importFromUri: string[] 135 | } -------------------------------------------------------------------------------- /types/parameters/subscription.ts: -------------------------------------------------------------------------------- 1 | import { SubscriptionMemoryStorage, SubscriptionCloudProvider } from '../responses/subscription' 2 | import { DatabaseProtocol, DatabaseDataPersistence, DatabaseThroughputMeasurement } from '../responses/database' 3 | import { Module } from './database' 4 | import { SubscriptionPaymentMethod } from '../responses/general' 5 | 6 | /** 7 | * The parameters needed to create a subscription 8 | * @param name Optional. Subscription name 9 | * @param dryRun Optional. When 'false’: Creates a deployment plan and deploys it (creating any resources required by the plan). When 'true’: creates a read-only deployment plan without any resource creation. Default: ‘true’ 10 | * @param paymentMethodId Required. A valid payment method (credit card, wire transfer etc) pre-defined in the current account. It will be billed for any charges related to the created subscription) 11 | * @param memoryStorage Optional. Memory storage preference: either ‘ram’ or a combination of 'ram-and-flash’. Default: ‘ram’ 12 | * @param persistentStorageEncryption Optional. Encrypt data stored in persistent storage. Required for a GCP subscription. Default: ‘false’ 13 | * @param cloudProviders Required. 14 | * @param databases Required. 15 | */ 16 | export type CreateSubscriptionParameters = { 17 | name?: string, 18 | dryRun?: boolean, 19 | paymentMethod?: SubscriptionPaymentMethod 20 | paymentMethodId?: number, 21 | memoryStorage?: SubscriptionMemoryStorage, 22 | persistentStorageEncryption?: boolean, 23 | cloudProviders: CloudProvider[], 24 | databases: DatabaseParameters[] 25 | } 26 | 27 | /** 28 | * The subscription cloud provider 29 | * @param provider Optional. Cloud provider. Default: ‘AWS’ 30 | * @param cloudAccountId Optional. Cloud account identifier. Default: Redis Labs internal cloud account (using Cloud Account Id = 1 implies using Redis Labs internal cloud account). Note that a GCP subscription can be created only with Redis Labs internal cloud account. 31 | * @param regions Required. Cloud networking details, per region (single region or multiple regions for Active-Active cluster only) 32 | */ 33 | export type CloudProvider = { 34 | provider?: SubscriptionCloudProvider, 35 | cloudAccountId?: number, 36 | regions: CloudProviderRegion[] 37 | } 38 | 39 | /** 40 | * The subscription cloud provider region 41 | * @param region Required. Deployment region as defined by cloud provider 42 | * @param multipleAvailabilityZones Optional. Support deployment on multiple availability zones within the selected region. Default: ‘false’ 43 | * @param preferredAvailabilityZones Optional. Availability zones deployment preferences (for the selected provider & region). Example = '['us-east-1a’, 'us-east-1c’, ‘us-east-2e’]' 44 | * @param networking Required. The networking of the subscription 45 | * @param networking.deploymentCIDR Required. Deployment CIDR mask. Default: If using Redis Labs internal cloud account, 192.168.0.0/24 46 | * @param networking.vpcId Optional. Either an existing VPC Id (already exists in the specific region) or create a new VPC (if no VPC is specified). VPC Identifier must be in a valid format (for example: ‘vpc-0125be68a4625884ad’) and existing within the hosting account 47 | */ 48 | export type CloudProviderRegion = { 49 | region: string, 50 | multipleAvailabilityZones?: boolean, 51 | preferredAvailabilityZones?: string[], 52 | networking: { 53 | deploymentCIDR: string, 54 | vpcId?: string 55 | } 56 | } 57 | 58 | /** 59 | * @param name Required. Database name (Database name must be up to 40 characters long, include only letters, digits, or hyphen ('-'), start with a letter, and end with a letter or digit) 60 | * @param protocol Optional. Database protocol: either ‘redis’ or 'memcached’. Default: ‘redis’ 61 | * @param memoryLimitInGb Required. Maximum memory usage for this specific database 62 | * @param supportOSSClusterApi Optional. Support Redis open-source (OSS) Cluster API. Default: ‘false’ 63 | * @param dataPersistence Optional. Rate of database data persistence (in persistent storage). Default: ‘none’ 64 | * @param replication Optional. Databases replication. Default: ‘true’ 65 | * @param throughputMeasurement The throughput measurement of the database 66 | * @param throughputMeasurement.by Required. Throughput measurement method. Either ‘number-of-shards’ or ‘operations-per-second’ 67 | * @param throughputMeasurement.value Required. Throughput value (as applies to selected measurement method) 68 | * @param modules Optional. Redis Labs modules to be provisioned in the database 69 | * @param quantity Optional. Number of databases (of this type) that will be created. Default: 1 70 | * @param averageItemSizeInBytes Optional. Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) of the items stored in the database. Default: 1000 71 | */ 72 | export type DatabaseParameters = { 73 | name: string, 74 | protocol?: DatabaseProtocol, 75 | memoryLimitInGb: number, 76 | supportOSSClusterApi?: boolean, 77 | dataPersistence?: DatabaseDataPersistence, 78 | replication?: boolean, 79 | throughputMeasurement?: DatabaseThroughputMeasurement, 80 | modules?: Module[], 81 | quantity?: number, 82 | averageItemSizeInBytes?: number 83 | } 84 | 85 | /** 86 | * The parameters needed to update a subscription 87 | * @param name Optional. Subscription name 88 | * @param paymentMethodId Optional. Payment method Id 89 | */ 90 | export type SubscriptionUpdateParameters = { 91 | name?: string, 92 | paymentMethodId?: number 93 | } 94 | 95 | /** 96 | * The parameters needed to update the database CIDR whitelist 97 | * @param cidrIps Optional. CIDR values in an array format (example: [‘10.1.1.0/32’]) 98 | * @param securityGroupIds Optional. AWS Security group identifier 99 | */ 100 | export type CidrUpdateParameters = { 101 | cidrIps?: string[], 102 | securityGroupIds?: string[] 103 | } 104 | 105 | /** 106 | * The parameters needed to create a VPC peering for a database 107 | * @param region Required. Deployment region as defined by cloud provider 108 | * @param awsAccountId Required. The AWS Account id of the VPC peering 109 | * @param vpcId Required. The id of the VPC peering 110 | * @param vpcCidr Required. The CIDR of the VPC peering */ 111 | export type VpcPeeringCreationParameters = { 112 | region: string, 113 | awsAccountId: string, 114 | vpcId: string, 115 | vpcCidr: string 116 | } -------------------------------------------------------------------------------- /types/responses/cloud-account.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Cloud account object 3 | * @param id The id of the cloud account 4 | * @param name The name of the cloud account 5 | * @param provider The provider of the cloud account 6 | * @param status The status of the cloud account 7 | * @param accessKeyId The access key id of the cloud account 8 | */ 9 | 10 | export type CloudAccountResponse = { 11 | id: number, 12 | name: string, 13 | provider: string, 14 | status: CloudAccountStatus, 15 | accessKeyId?: string, 16 | [key: string]: any 17 | }; 18 | 19 | /** 20 | * The cloud account providers 21 | * @param AWS Amazon Web Services provider 22 | * @param GCP Google Cloud Platform provider 23 | */ 24 | export type CloudAccountProvider = 'AWS' | 'GCP'; 25 | 26 | /** 27 | * The cloud account status 28 | * @param active Active status 29 | * @param draft Pending status 30 | * @param change-draft Pending change status 31 | * @param error Error status 32 | * @param 404 Deleted status 33 | */ 34 | 35 | export type CloudAccountStatus = 'active' | 'draft' | 'change-draft' | 'error' | 404; -------------------------------------------------------------------------------- /types/responses/database.ts: -------------------------------------------------------------------------------- 1 | import { DatabaseModule } from './general'; 2 | 3 | /** 4 | * The database response 5 | * @param databaseId The id of the database 6 | * @param protocol The protocol of the database 7 | * @param provider The provider of the database 8 | * @param region The region of the database 9 | * @param redisVersionCompliance The Redis version of the database 10 | * @param status The status of the database 11 | * @param memoryLimitInGb The memory limit of the database 12 | * @param memoryUsedInMb The memory used in the database 13 | * @param memoryStorage The memory storage type of the database 14 | * @param supportOSSClusterApi If the database supports oss cluster API 15 | * @param dataPersistence The data persistence of the database 16 | * @param replication If the database replication is enabled/disabled 17 | * @param privateEndpoint The private endpoint of the database 18 | * @param publicEndpoint The public endpoint of the database 19 | * @param dataEvictionPolicy The data eviction policy of the database 20 | * @param throughputMeasurement The throughput measurement of the database 21 | * @param replicaOf The replica of endpoints of the database 22 | * @param clustering The database clustering 23 | * @param security The database security 24 | * @param modules The database modules 25 | * @param alerts The database alerts 26 | */ 27 | export type DatabaseResponse = { 28 | databaseId: number, 29 | name: string, 30 | protocol: DatabaseProtocol, 31 | provider: DatabaseProvider, 32 | region: string, 33 | redisVersionCompliance: string, 34 | status: DatabaseStatus, 35 | memoryLimitInGb: number, 36 | memoryUsedInMb: number, 37 | memoryStorage: DatabaseMemoryStorage, 38 | supportOSSClusterApi: boolean, 39 | dataPersistence: DatabaseDataPersistence, 40 | replication: boolean, 41 | privateEndpoint: string, 42 | publicEndpoint: string, 43 | dataEvictionPolicy: DatabaseDataEvictionPolicy, 44 | throughputMeasurement: DatabaseThroughputMeasurement, 45 | replicaOf: DatabaseReplicaOfEndpoints, 46 | clustering: DatabaseClustering, 47 | security: DatabaseSecurity, 48 | modules: DatabaseModule[], 49 | alerts: any[], 50 | [key: string]: any 51 | } 52 | 53 | /** 54 | * The database throughput measurement 55 | * @param by The type of throughput measurement 56 | * @param value The value of the throughput measurement 57 | */ 58 | export type DatabaseThroughputMeasurement = { 59 | by: 'number-of-shards' | 'operations-per-second', 60 | value: number, 61 | [key: string]: any 62 | } 63 | 64 | /** 65 | * The database security 66 | * @param password The database password 67 | * @param enableTls The TLS status 68 | * @param sslClientAuthentication The SSL client authentication 69 | * @param sourceIps The list of source IP's 70 | */ 71 | export type DatabaseSecurity = { 72 | password: string, 73 | enableTls?: boolean, 74 | sslClientAuthentication: boolean, 75 | sourceIps: string[], 76 | [key: string]: any 77 | } 78 | 79 | /** 80 | * The database clustering 81 | * @param numberOfShards The database number of shards 82 | * @param regexRules The database regex rules 83 | * @param hashingPolicy The database hashing policy 84 | */ 85 | export type DatabaseClustering = { 86 | numberOfShards?: number, 87 | regexRules?: any[], 88 | hashingPolicy: any[], 89 | [key: string]: any 90 | } 91 | 92 | /** 93 | * The database memory storage type 94 | * @param ram Redis on RAM 95 | * @param ram-and-flash Redis on Flash 96 | */ 97 | export type DatabaseMemoryStorage = 'ram' | 'ram-and-flash'; 98 | 99 | /** 100 | * The database provider 101 | * @param AWS Amazon Web Services 102 | * @param GCP Google Cloud Platform 103 | */ 104 | export type DatabaseProvider = 'AWS' | 'GCP'; 105 | 106 | /** 107 | * The database protocol types 108 | * @param redis Redis database protocol 109 | * @param memcached Memchached database protocol 110 | */ 111 | export type DatabaseProtocol = 'redis' | 'memcached'; 112 | 113 | /** 114 | * The database data persistence types 115 | * @param none No data persistence 116 | * @param aof-every-1-second AOF every second 117 | * @param aof-every-write AOF every write 118 | * @param snapshot-every-1-hour Snapshot every hour 119 | * @param snapshot-every-6-hours Snapshot every 6 hours 120 | * @param snapshot-every-12-hours Snapshot every 12 hours 121 | */ 122 | export type DatabaseDataPersistence = 'none' | 'aof-every-1-second' | 'aof-every-write' | 'snapshot-every-1-hour' | 'snapshot-every-6-hours' | 'snapshot-every-12-hours'; 123 | 124 | /** 125 | * The database data eviction policy types 126 | * @param allkeys-lru allkeys-lru eviction policy 127 | * @param allkeys-lfu allkeys-lfu eviction policy 128 | * @param allkeys-random allkeys-random eviction policy 129 | * @param volatile-lru volatile-lru eviction policy 130 | * @param volatile-lfu volatile-lfu eviction policy 131 | * @param volatile-random volatile-random eviction policy 132 | * @param volatile-ttl volatile-ttl eviction policy 133 | * @param noeviction noeviction eviction policy 134 | */ 135 | export type DatabaseDataEvictionPolicy = 'allkeys-lru' | 'allkeys-lfu' | 'allkeys-random' | 'volatile-lru' | 'volatile-lfu' | 'volatile-random' | 'volatile-ttl' | 'noeviction'; 136 | 137 | /** 138 | * The database import source types 139 | * @param http HTTP import source 140 | * @param redis Redis import source 141 | * @param ftp FTP import source 142 | * @param aws-s3 S3 import source 143 | * @param azure-blob-storage Azure import source 144 | * @param google-blob-sotrage Google import source 145 | */ 146 | export type DatabaseImportSource = 'http' | 'redis' | 'ftp' | 'aws-s3' | 'azure-blob-storage' | 'google-blob-storage'; 147 | 148 | /** 149 | * The available database status 150 | * @param active The database status when it's activated 151 | * @param draft The database status when it's pending 152 | * @param active-change-pending The database status when it's pending for an active change (active + pending status) 153 | * @param 404 The database status when it's deleted (404 status code) 154 | * @param error The database status when it's in error 155 | * @param synced The database status when it's synced with it's replica's 156 | */ 157 | export type DatabaseStatus = 'active' | 'draft' | 'active-change-pending' | 404 | 'error' | 'synced'; 158 | 159 | /** 160 | * The replica of endpoints of the database 161 | */ 162 | export type DatabaseReplicaOfEndpoints = { 163 | endpoints: string[] 164 | } -------------------------------------------------------------------------------- /types/responses/general.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Account information object 3 | * @param id The id of the account 4 | * @param name The email address of the account 5 | * @param createdTimestamp The creation timestamp of the account 6 | * @param updatedTimestamp The updated timestamp of the account 7 | * @param key The key of the additional information of the account 8 | * @param key.name The name of the account 9 | * @param key.accountId The id of the account 10 | * @param key.accountName The email address of the account 11 | * @param key.allowedSourceIps The allowed source IP's of the account 12 | * @param key.createdTimestamp The creation timestamp of the account 13 | * @param key.owner The information of the account owner 14 | * @param key.owner.name The name of the account owner 15 | * @param key.owner.email The email address of the account owner 16 | * @param key.httpSourceIp The source IP of the account 17 | * @param key.gcpAccount If the account is a GCP account 18 | */ 19 | export type AccountInformation = { 20 | id: number, 21 | name: string, 22 | createdTimestamp: string, 23 | updatedTimestamp: string, 24 | key: { 25 | name: string, 26 | accountId: number, 27 | accountName: string, 28 | allowedSourceIps: string[], 29 | createdTimestamp: string, 30 | owner: { 31 | name: string, 32 | email: string 33 | }, 34 | httpSourceIp: string, 35 | gcpAccount: boolean 36 | [key: string]: any 37 | }, 38 | [key: string]: any 39 | } 40 | 41 | /** 42 | * Data persistence object 43 | * @param name The name of the data-persistence 44 | * @param description The description of the data-persistence 45 | */ 46 | export type DataPersistence = { 47 | name: string, 48 | description: string 49 | } 50 | 51 | /** 52 | * Database module object 53 | * @param id The ID of the module 54 | * @param name The name of the module 55 | * @param version The version of the module 56 | * @param description The description of the module 57 | * @param parameters The parameters of the module 58 | */ 59 | export type DatabaseModule = { 60 | id: number, 61 | name: string, 62 | version: string, 63 | description: string, 64 | parameters: DatabaseModuleParameter[], 65 | [key: string]: any 66 | } 67 | 68 | /** 69 | * Database module parameter object 70 | * @param name The name of the module parameter 71 | * @param description The description of the module parameter 72 | * @param type The type of the module parameter 73 | * @param defaultValue The default value of the module parameter 74 | * @param required Is the parameter of the module required 75 | */ 76 | export type DatabaseModuleParameter = { 77 | name?: string, 78 | description?: string, 79 | type?: string, 80 | defaultValue?: number, 81 | required?: boolean, 82 | [key: string]: any 83 | } 84 | 85 | /** 86 | * System log object 87 | * @param id The id of the log 88 | * @param time The time of the log 89 | * @param originator The originator of the log 90 | * @param apiKeyName The api key name of the log 91 | * @param type The type of the log 92 | * @param description The description of the log 93 | */ 94 | export type SystemLog = { 95 | id: number, 96 | time: string, 97 | originator: string, 98 | apiKeyName: string, 99 | type: string, 100 | description: string, 101 | [key: string]: any 102 | } 103 | 104 | /** 105 | * Payment method object 106 | * @param id The id of the payment method 107 | * @param type The type of the payment method 108 | * @param creditCardEndsWith The last digits of the credit card 109 | * @param nameOnCard The name of the credit card holder 110 | * @param expirationMonth The expiration month of the credit card 111 | * @param expirationYear The expiration year of the credit card 112 | */ 113 | export type PaymentMethod = { 114 | id: number, 115 | type: string, 116 | creditCardEndsWith: number, 117 | nameOnCard: string, 118 | expirationMonth: number, 119 | expirationYear: number 120 | } 121 | 122 | /** 123 | * Subscription plan object 124 | * @param id The id of the plan 125 | * @param name The name of the plan 126 | * @param provider The provider of the plan 127 | * @param region The region of the plan 128 | * @param price The price of the plan 129 | * @param priceCurrency The price currency of the plan 130 | * @param pricePeriod The price period of the plan 131 | * @param supportsRedisOnFlash If the plan supports Redis on Flash 132 | * @param supportsMultipleAvailabilityZones If the plan supports Multi Availability Zones 133 | * @param maximumNumberOfDatabases The maximum number of database allowed in the plan 134 | * @param memorySizeInMb The memory size in MB of the plan 135 | * @param throughputOperationsPerSecond The throughput operations per second of the plan 136 | * @param planType The type of the plan 137 | */ 138 | export type Plan = { 139 | id: number, 140 | name: string, 141 | provider: string, 142 | region: string, 143 | price: number, 144 | priceCurrency: string, 145 | pricePeriod: string, 146 | supportsRedisOnFlash: boolean, 147 | supportsMultipleAvailabilityZones: boolean, 148 | maximumNumberOfDatabases: number, 149 | memorySizeInMb: number, 150 | throughputOperationsPerSecond: number, 151 | planType: string, 152 | [key: string]: any 153 | } 154 | 155 | /** 156 | * Region object 157 | * @param name The name of the region 158 | * @param provider The provider of the region 159 | * @param RegionNetworking The networking of the region 160 | * @param preferredAvailabilityZones The preferred availability zones 161 | * @param multipleAvailabilityZones The multiple availability zones 162 | */ 163 | export type Region = { 164 | name: string, 165 | provider: string, 166 | networking: RegionNetworking[], 167 | preferredAvailabilityZones: string[], 168 | multipleAvailabilityZones: boolean 169 | [key: string]: any 170 | } 171 | 172 | /** 173 | * Region's networking object 174 | * @param deploymentCIDR The Deployment CIDR 175 | * @param subnetId The subnetId 176 | */ 177 | export type RegionNetworking = { 178 | deploymentCIDR: string, 179 | subnetId: string 180 | } 181 | 182 | /** 183 | * The payment methods for subscriptions 184 | */ 185 | export type SubscriptionPaymentMethod = 'credit-card' | 'marketplace' ; -------------------------------------------------------------------------------- /types/responses/subscription.ts: -------------------------------------------------------------------------------- 1 | import { Region } from './general'; 2 | 3 | /** 4 | * Subscription object 5 | * @param id The id of the subscription 6 | * @param status The status of the subscription 7 | * @param paymentMethodId The payment method id of the subscription 8 | * @param memoryStorage The memory storage of the subscription 9 | * @param storageEncryption The storage encryption of the subscription 10 | * @param numberOfDatabases The databases count of the subscription 11 | * @param subscriptionPricing The pricing of the subscription 12 | * @param cloudDetails The cloud details of the subscription 13 | */ 14 | export type SubscriptionResponse = { 15 | id: number, 16 | name: string, 17 | status: SubscriptionStatus, 18 | paymentMethodId: number, 19 | memoryStorage: SubscriptionMemoryStorage, 20 | storageEncryption: boolean, 21 | numberOfDatabases: number, 22 | subscriptionPricing: SubscriptionPricing[], 23 | cloudDetails: SubscriptionCloudDetails[], 24 | [key: string]: any 25 | } 26 | 27 | /** 28 | * Subscription pricing object 29 | * @param type The type of the subscription pricing 30 | * @param quantity The quantity of the subscription pricing 31 | * @param quantityMeasurement The quantity measurement of the subscription pricing 32 | * @param databaseName The name of the database 33 | * @param typeDetails The details of the type measurement of the subscription pricing 34 | * @param pricePerUnit The price per unit of the type measurement of the subscription pricing 35 | * @param priceCurrency The currency of the price 36 | * @param pricePeriod The time period of the price 37 | */ 38 | export type SubscriptionPricing = { 39 | type: string, 40 | quantity: number, 41 | quantityMeasurement: string, 42 | databaseName?: string, 43 | typeDetails?: string, 44 | pricePerUnit?: number, 45 | priceCurrency?: string, 46 | pricePeriod?: string, 47 | [key: string]: any 48 | } 49 | 50 | /** 51 | * Subscription cloud details object 52 | * @param provider The provider of the cloud details 53 | * @param cloudAccountId The cloud account id of the cloud details 54 | * @param totalSizeInGb The total size in GB of the cloud details 55 | * @param regions The regions of the cloud details 56 | */ 57 | export type SubscriptionCloudDetails = { 58 | provider: SubscriptionCloudProvider, 59 | cloudAccountId: number, 60 | totalSizeInGb: number, 61 | regions: Region[], 62 | [key: string]: any 63 | } 64 | 65 | /** 66 | * Subscription CIDR whitelists 67 | * @param cidr_ips The list of the cidr ips 68 | * @param security_group_ids The list of the security groups 69 | * @param the list of the errors 70 | */ 71 | export type SubscriptionCidrWhitelist = { 72 | cidr_ips?: string[], 73 | security_group_ids?: string[], 74 | errors?: any[], 75 | [key: string]: any 76 | } 77 | 78 | /** 79 | * Subscription VPC Peering 80 | * @param id The id of the vpc peering 81 | * @param status The status of the vpc peering 82 | */ 83 | export type SubscriptionVpcPeering = { 84 | id?: number, 85 | status?: SubscriptionVpcPeeringStatus 86 | } 87 | 88 | /** 89 | * The availiable subscription status 90 | * @param active Active status 91 | * @param pending Pending status 92 | * @param error Error status 93 | * @param 404 Delete status 94 | */ 95 | export type SubscriptionStatus = 'active' | 'pending' | 'error' | 'deleting' | 404; 96 | 97 | /** 98 | * The availiable subscription vpc peering status 99 | * @param active Active status 100 | * @param inactive Inactive status 101 | * @param pending-acceptance Pending status 102 | * @param failed Error status 103 | */ 104 | export type SubscriptionVpcPeeringStatus = 'active' | 'inactive' | 'pending-acceptance' | 'failed'; 105 | 106 | /** 107 | * The subscription memory storage types 108 | * @param ram Redis on RAM memory storage 109 | * @param ram-and-flash Redis on Flash memory storage 110 | */ 111 | export type SubscriptionMemoryStorage = 'ram' | 'ram-and-flash'; 112 | 113 | /** 114 | * The subscription cloud provider types 115 | * @param AWS Amazon Web Service cloud provider 116 | * @param GCP Google Cloud Platform cloud provider 117 | */ 118 | export type SubscriptionCloudProvider = 'AWS' | 'GCP'; -------------------------------------------------------------------------------- /types/task.ts: -------------------------------------------------------------------------------- 1 | import { SubscriptionPricing } from "./responses/subscription"; 2 | 3 | 4 | /** 5 | * Task object 6 | * @param taskId The id of the task 7 | * @param status The status of the task 8 | * @param description The description of the task 9 | * @param timestamp The timestamp of the task 10 | * @param response The response of the task 11 | */ 12 | export type TaskObject = { 13 | taskId: string, 14 | status: TaskStatus, 15 | description: string, 16 | timestamp: string, 17 | response: TaskResponse, 18 | [key: string]: any 19 | } 20 | 21 | /** 22 | * Task response object 23 | * @param resourceId The resource id 24 | * @param error The error of the task 25 | * @param resource The resource of the task (Returned when dryRun = true) 26 | */ 27 | export type TaskResponse = { 28 | resourceId: number, 29 | error?: ErrorResponse, 30 | resource?: { 31 | pricing?: SubscriptionPricing[], 32 | cidr_ips?: string[], 33 | security_group_ids?: string[], 34 | errors?: any[], 35 | [key: string]: any 36 | }, 37 | [key: string]: any 38 | } 39 | 40 | /** 41 | * Task error response 42 | * @param type The type of the error 43 | * @param status The status of the error 44 | * @param description The description of the error 45 | */ 46 | export type ErrorResponse = { 47 | type?: string, 48 | status?: string, 49 | description?: string, 50 | [key: string]: any 51 | } 52 | 53 | /** 54 | * The task status 55 | * @param processing-completed Completed status 56 | * @param processing-error Error status 57 | */ 58 | export type TaskStatus = 'processing-completed' | 'processing-error'; --------------------------------------------------------------------------------