diff --git a/.eslintrc.json b/.eslintrc.json index 36d76d7..5820122 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,21 +4,14 @@ "commonjs": true, "es2021": true }, - "extends": [ - "airbnb-base", - "airbnb-typescript/base", - "prettier" - ], + "extends": ["airbnb-base", "airbnb-typescript/base", "prettier"], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": "latest", "sourceType": "module", "project": "./tsconfig.eslint.json" }, - "plugins": [ - "@typescript-eslint", - "prettier" - ], + "plugins": ["@typescript-eslint", "prettier"], "rules": { "no-console": "off", "max-len": [ @@ -38,12 +31,7 @@ "settings": { "import/resolver": { "node": { - "extensions": [ - ".js", - ".jsx", - ".ts", - ".tsx" - ] + "extensions": [".js", ".jsx", ".ts", ".tsx"] } } } diff --git a/.github/workflows/build-checks.yml b/.github/workflows/build-checks.yml index 10aff5c..984dd02 100644 --- a/.github/workflows/build-checks.yml +++ b/.github/workflows/build-checks.yml @@ -10,7 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout Repository & Submo uses: actions/checkout@v2 with: @@ -32,4 +31,3 @@ jobs: - name: Run Test & Coverage check run: npm run test - diff --git a/.manifest.json b/.manifest.json new file mode 100644 index 0000000..f37c37a --- /dev/null +++ b/.manifest.json @@ -0,0 +1,342 @@ +{ + "liblabVersion": "1.1.43", + "date": "2024-04-03T23:04:28.847Z", + "config": { + "authentication": { + "access": { + "prefix": "Bearer" + } + }, + "deliveryType": "zip", + "languages": ["typescript"], + "inputFileName": "/tmp/resources/spec/open-api-spec.json", + "environmentVariables": [], + "fileOutput": "/tmp", + "tempDir": "/tmp/liblab-codegen-1.1.43-Our4mq", + "inferServiceNames": true, + "httpLibrary": { + "name": "https", + "languages": ["javascript", "typescript"], + "packages": {}, + "message": "This library is built into Node.js. No additional packages are required. However, it cannot be used in the browser." + }, + "auth": ["bearer"], + "privateRepo": false, + "githubRef": "", + "sdkName": "DopplerSDK", + "sdkVersion": "1.3.0", + "retry": { + "enabled": true, + "maxAttempts": 3, + "retryDelay": 150 + }, + "customQueries": { + "paths": [], + "rawQueries": [], + "queriesData": [] + }, + "generateEnv": false, + "npmName": "node-sdk", + "npmOrg": "dopplerhq", + "injectedModels": [], + "includeWatermark": false, + "license": { + "type": "MIT", + "name": "MIT", + "url": "https://opensource.org/licenses/MIT" + }, + "ignoreFiles": ["./README.md", ".github/workflows/release-checks.yml", ".devcontainer"], + "alwaysInitializeOptionals": false, + "environments": [], + "reservedKeywords": {}, + "deliveryMethods": [], + "bundle": true, + "exportClassDefault": true, + "responseHeaders": false, + "renameIllegalModelProperties": false, + "devContainer": false, + "strictVersion": false, + "authors": [], + "classifiers": [], + "projectUrls": {}, + "homepage": "", + "enforceRequestValidation": false, + "denoteCommon": false, + "includeOptionalSnippetParameters": true, + "hooks": { + "enabled": false, + "sourceDir": "" + }, + "spec": { + "type": "openapi", + "version": "3.1" + }, + "usesFormData": false + }, + "files": [ + ".eslintrc.json", + ".github/PROTECTED_BRANCHES", + ".github/workflows/build-checks.yml", + ".github/workflows/pr-checks.yml", + ".gitignore", + ".prettierrc.json", + "LICENSE", + "examples/README.md", + "examples/package.json", + "examples/src/index.ts", + "examples/tsconfig.json", + "install.sh", + "jest.config.json", + "package.json", + "src/BaseService.ts", + "src/hooks/Hook.ts", + "src/http/Environment.ts", + "src/http/HTTPClient.ts", + "src/http/HTTPLibrary.ts", + "src/http/QuerySerializer.ts", + "src/http/errors/BadGateway.ts", + "src/http/errors/BadRequest.ts", + "src/http/errors/Conflict.ts", + "src/http/errors/ExpectationFailed.ts", + "src/http/errors/FailedDependency.ts", + "src/http/errors/Forbidden.ts", + "src/http/errors/GatewayTimeout.ts", + "src/http/errors/Gone.ts", + "src/http/errors/HttpVersionNotSupported.ts", + "src/http/errors/InternalServerError.ts", + "src/http/errors/LengthRequired.ts", + "src/http/errors/Locked.ts", + "src/http/errors/LoopDetected.ts", + "src/http/errors/MethodNotAllowed.ts", + "src/http/errors/MisdirectedRequest.ts", + "src/http/errors/NetworkAuthenticationRequired.ts", + "src/http/errors/NotAcceptable.ts", + "src/http/errors/NotExtended.ts", + "src/http/errors/NotFound.ts", + "src/http/errors/NotImplemented.ts", + "src/http/errors/PayloadTooLarge.ts", + "src/http/errors/PaymentRequired.ts", + "src/http/errors/PreconditionFailed.ts", + "src/http/errors/PreconditionRequired.ts", + "src/http/errors/ProxyAuthenticationRequired.ts", + "src/http/errors/RangeNotSatisfiable.ts", + "src/http/errors/RequestHeaderFieldsTooLarge.ts", + "src/http/errors/RequestTimeout.ts", + "src/http/errors/ServiceUnavailable.ts", + "src/http/errors/TooEarly.ts", + "src/http/errors/TooManyRequests.ts", + "src/http/errors/Unauthorized.ts", + "src/http/errors/UnavailableForLegalReasons.ts", + "src/http/errors/UnprocessableEntity.ts", + "src/http/errors/UnsufficientStorage.ts", + "src/http/errors/UnsupportedMediaType.ts", + "src/http/errors/UpgradeRequired.ts", + "src/http/errors/UriTooLong.ts", + "src/http/errors/VariantAlsoNegotiates.ts", + "src/http/errors/base.ts", + "src/http/errors/index.ts", + "src/http/httpExceptions.ts", + "src/index.ts", + "src/models.ts", + "src/services/README.md", + "src/services/activityLogs/ActivityLogs.ts", + "src/services/activityLogs/index.ts", + "src/services/activityLogs/models/ActivityLogsListResponse.ts", + "src/services/activityLogs/models/RetrieveResponse.ts", + "src/services/audit/Audit.ts", + "src/services/audit/index.ts", + "src/services/audit/models/GetUserResponse.ts", + "src/services/auth/Auth.ts", + "src/services/auth/index.ts", + "src/services/auth/models/MeResponse.ts", + "src/services/auth/models/RevokeRequest.ts", + "src/services/common/DeleteResponse.ts", + "src/services/configLogs/ConfigLogs.ts", + "src/services/configLogs/index.ts", + "src/services/configLogs/models/ConfigLogsGetResponse.ts", + "src/services/configLogs/models/ConfigLogsListResponse.ts", + "src/services/configLogs/models/RollbackResponse.ts", + "src/services/configs/Configs.ts", + "src/services/configs/index.ts", + "src/services/configs/models/AddTrustedIpRequest.ts", + "src/services/configs/models/AddTrustedIpResponse.ts", + "src/services/configs/models/CloneRequest.ts", + "src/services/configs/models/CloneResponse.ts", + "src/services/configs/models/ConfigsCreateRequest.ts", + "src/services/configs/models/ConfigsCreateResponse.ts", + "src/services/configs/models/ConfigsDeleteRequest.ts", + "src/services/configs/models/ConfigsGetResponse.ts", + "src/services/configs/models/ConfigsListResponse.ts", + "src/services/configs/models/ConfigsUpdateRequest.ts", + "src/services/configs/models/ConfigsUpdateResponse.ts", + "src/services/configs/models/DeleteTrustedIpRequest.ts", + "src/services/configs/models/ListTrustedIpsResponse.ts", + "src/services/configs/models/LockRequest.ts", + "src/services/configs/models/LockResponse.ts", + "src/services/configs/models/UnlockRequest.ts", + "src/services/configs/models/UnlockResponse.ts", + "src/services/dynamicSecrets/DynamicSecrets.ts", + "src/services/dynamicSecrets/index.ts", + "src/services/dynamicSecrets/models/IssueLeaseRequest.ts", + "src/services/dynamicSecrets/models/IssueLeaseResponse.ts", + "src/services/dynamicSecrets/models/RevokeLeaseRequest.ts", + "src/services/dynamicSecrets/models/RevokeLeaseResponse.ts", + "src/services/environments/Environments.ts", + "src/services/environments/index.ts", + "src/services/environments/models/EnvironmentsCreateRequest.ts", + "src/services/environments/models/EnvironmentsCreateResponse.ts", + "src/services/environments/models/EnvironmentsGetResponse.ts", + "src/services/environments/models/EnvironmentsListResponse.ts", + "src/services/environments/models/RenameRequest.ts", + "src/services/environments/models/RenameResponse.ts", + "src/services/get/Get.ts", + "src/services/get/index.ts", + "src/services/get/models/OptionsResponse.ts", + "src/services/groups/Groups.ts", + "src/services/groups/index.ts", + "src/services/groups/models/AddMemberRequest.ts", + "src/services/groups/models/GroupsCreateRequest.ts", + "src/services/groups/models/GroupsCreateResponse.ts", + "src/services/groups/models/GroupsGetResponse.ts", + "src/services/groups/models/GroupsListResponse.ts", + "src/services/groups/models/GroupsType.ts", + "src/services/groups/models/GroupsUpdateRequest.ts", + "src/services/groups/models/GroupsUpdateResponse.ts", + "src/services/integrations/Integrations.ts", + "src/services/integrations/index.ts", + "src/services/integrations/models/IntegrationsCreateRequest.ts", + "src/services/integrations/models/IntegrationsCreateResponse.ts", + "src/services/integrations/models/IntegrationsDeleteResponse.ts", + "src/services/integrations/models/IntegrationsGetResponse.ts", + "src/services/integrations/models/IntegrationsListResponse.ts", + "src/services/integrations/models/IntegrationsUpdateRequest.ts", + "src/services/integrations/models/IntegrationsUpdateResponse.ts", + "src/services/invites/Invites.ts", + "src/services/invites/index.ts", + "src/services/invites/models/InvitesListResponse.ts", + "src/services/projectMembers/ProjectMembers.ts", + "src/services/projectMembers/index.ts", + "src/services/projectMembers/models/AddRequest.ts", + "src/services/projectMembers/models/AddResponse.ts", + "src/services/projectMembers/models/ProjectMembersGetResponse.ts", + "src/services/projectMembers/models/ProjectMembersListResponse.ts", + "src/services/projectMembers/models/ProjectMembersUpdateRequest.ts", + "src/services/projectMembers/models/ProjectMembersUpdateResponse.ts", + "src/services/projectMembers/models/Type.ts", + "src/services/projectRoles/ProjectRoles.ts", + "src/services/projectRoles/index.ts", + "src/services/projectRoles/models/ProjectRolesCreateRequest.ts", + "src/services/projectRoles/models/ProjectRolesCreateResponse.ts", + "src/services/projectRoles/models/ProjectRolesGetResponse.ts", + "src/services/projectRoles/models/ProjectRolesListPermissionsResponse.ts", + "src/services/projectRoles/models/ProjectRolesListResponse.ts", + "src/services/projectRoles/models/ProjectRolesUpdateRequest.ts", + "src/services/projectRoles/models/ProjectRolesUpdateResponse.ts", + "src/services/projects/Projects.ts", + "src/services/projects/index.ts", + "src/services/projects/models/CreateRequest.ts", + "src/services/projects/models/CreateResponse.ts", + "src/services/projects/models/DeleteRequest.ts", + "src/services/projects/models/GetResponse.ts", + "src/services/projects/models/ListResponse.ts", + "src/services/projects/models/UpdateRequest.ts", + "src/services/projects/models/UpdateResponse.ts", + "src/services/retrieve/Retrieve.ts", + "src/services/retrieve/index.ts", + "src/services/retrieve/models/MemberResponse.ts", + "src/services/retrieve/models/MemberType.ts", + "src/services/secrets/Secrets.ts", + "src/services/secrets/index.ts", + "src/services/secrets/models/DownloadResponse.ts", + "src/services/secrets/models/Format.ts", + "src/services/secrets/models/NameTransformer.ts", + "src/services/secrets/models/NamesResponse.ts", + "src/services/secrets/models/SecretsGetResponse.ts", + "src/services/secrets/models/SecretsListResponse.ts", + "src/services/secrets/models/SecretsUpdateRequest.ts", + "src/services/secrets/models/SecretsUpdateResponse.ts", + "src/services/secrets/models/UpdateNoteRequest.ts", + "src/services/secrets/models/UpdateNoteResponse.ts", + "src/services/serviceAccountTokens/ServiceAccountTokens.ts", + "src/services/serviceAccountTokens/index.ts", + "src/services/serviceAccountTokens/models/ServiceAccountTokensCreateRequest.ts", + "src/services/serviceAccountTokens/models/ServiceAccountTokensCreateResponse.ts", + "src/services/serviceAccountTokens/models/ServiceAccountTokensGetResponse.ts", + "src/services/serviceAccountTokens/models/ServiceAccountTokensListResponse.ts", + "src/services/serviceAccounts/ServiceAccounts.ts", + "src/services/serviceAccounts/index.ts", + "src/services/serviceAccounts/models/ServiceAccountsCreateRequest.ts", + "src/services/serviceAccounts/models/ServiceAccountsCreateResponse.ts", + "src/services/serviceAccounts/models/ServiceAccountsGetResponse.ts", + "src/services/serviceAccounts/models/ServiceAccountsListResponse.ts", + "src/services/serviceAccounts/models/ServiceAccountsUpdateRequest.ts", + "src/services/serviceAccounts/models/ServiceAccountsUpdateResponse.ts", + "src/services/serviceTokens/ServiceTokens.ts", + "src/services/serviceTokens/index.ts", + "src/services/serviceTokens/models/ServiceTokensCreateRequest.ts", + "src/services/serviceTokens/models/ServiceTokensCreateResponse.ts", + "src/services/serviceTokens/models/ServiceTokensDeleteRequest.ts", + "src/services/serviceTokens/models/ServiceTokensListResponse.ts", + "src/services/syncs/Syncs.ts", + "src/services/syncs/index.ts", + "src/services/syncs/models/SyncsCreateRequest.ts", + "src/services/syncs/models/SyncsCreateResponse.ts", + "src/services/syncs/models/SyncsDeleteResponse.ts", + "src/services/syncs/models/SyncsGetResponse.ts", + "src/services/users/Users.ts", + "src/services/users/index.ts", + "src/services/users/models/UsersGetResponse.ts", + "src/services/users/models/UsersListResponse.ts", + "src/services/webhooks/Webhooks.ts", + "src/services/webhooks/index.ts", + "src/services/webhooks/models/DisableResponse.ts", + "src/services/webhooks/models/EnableResponse.ts", + "src/services/webhooks/models/WebhooksAddRequest.ts", + "src/services/webhooks/models/WebhooksAddResponse.ts", + "src/services/webhooks/models/WebhooksDeleteResponse.ts", + "src/services/webhooks/models/WebhooksGetResponse.ts", + "src/services/webhooks/models/WebhooksListResponse.ts", + "src/services/webhooks/models/WebhooksUpdateRequest.ts", + "src/services/webhooks/models/WebhooksUpdateResponse.ts", + "src/services/workplace/Workplace.ts", + "src/services/workplace/index.ts", + "src/services/workplace/models/WorkplaceGetResponse.ts", + "src/services/workplace/models/WorkplaceUpdateRequest.ts", + "src/services/workplace/models/WorkplaceUpdateResponse.ts", + "src/services/workplaceRoles/WorkplaceRoles.ts", + "src/services/workplaceRoles/index.ts", + "src/services/workplaceRoles/models/ListPermissionsResponse.ts", + "src/services/workplaceRoles/models/WorkplaceRolesCreateRequest.ts", + "src/services/workplaceRoles/models/WorkplaceRolesCreateResponse.ts", + "src/services/workplaceRoles/models/WorkplaceRolesGetResponse.ts", + "src/services/workplaceRoles/models/WorkplaceRolesListResponse.ts", + "src/services/workplaceRoles/models/WorkplaceRolesUpdateRequest.ts", + "src/services/workplaceRoles/models/WorkplaceRolesUpdateResponse.ts", + "test/services/activityLogs/ActivityLogs.test.ts", + "test/services/audit/Audit.test.ts", + "test/services/auth/Auth.test.ts", + "test/services/configLogs/ConfigLogs.test.ts", + "test/services/configs/Configs.test.ts", + "test/services/dynamicSecrets/DynamicSecrets.test.ts", + "test/services/environments/Environments.test.ts", + "test/services/get/Get.test.ts", + "test/services/groups/Groups.test.ts", + "test/services/integrations/Integrations.test.ts", + "test/services/invites/Invites.test.ts", + "test/services/projectMembers/ProjectMembers.test.ts", + "test/services/projectRoles/ProjectRoles.test.ts", + "test/services/projects/Projects.test.ts", + "test/services/retrieve/Retrieve.test.ts", + "test/services/secrets/Secrets.test.ts", + "test/services/serviceAccountTokens/ServiceAccountTokens.test.ts", + "test/services/serviceAccounts/ServiceAccounts.test.ts", + "test/services/serviceTokens/ServiceTokens.test.ts", + "test/services/syncs/Syncs.test.ts", + "test/services/users/Users.test.ts", + "test/services/webhooks/Webhooks.test.ts", + "test/services/workplace/Workplace.test.ts", + "test/services/workplaceRoles/WorkplaceRoles.test.ts", + "tsconfig.eslint.json", + "tsconfig.json" + ] +} diff --git a/LICENSE b/LICENSE index 261eeb9..4dc8223 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,19 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Copyright (c) 2024 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index e48003f..fa05c76 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,9 +1,11 @@ # @dopplerhq/node-sdk-example + A basic example of how to use the @dopplerhq/node-sdk package. ## Installation In the event `@dopplerhq/node-sdk` is not published to npm, you can install it locally by running the following command in the examples folder: + ```sh npm run setup ``` @@ -11,6 +13,7 @@ npm run setup This will rebuild the parent package and install it locally. Otherwise you can install it from npm: + ```sh npm install @dopplerhq/node-sdk ``` @@ -18,6 +21,7 @@ npm install @dopplerhq/node-sdk ## Usage To run the example, run the following command in the examples folder: + ```sh npm run start ``` diff --git a/examples/package.json b/examples/package.json index d1a8b41..8adfde6 100644 --- a/examples/package.json +++ b/examples/package.json @@ -12,6 +12,6 @@ }, "devDependencies": { "ts-node": "^10.9.1", - "typescript": "4.8.4" + "typescript": "^4.6.0" } } diff --git a/examples/src/index.ts b/examples/src/index.ts index 48fa675..aecb018 100644 --- a/examples/src/index.ts +++ b/examples/src/index.ts @@ -4,6 +4,11 @@ const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projects.list(); - console.log(result); + try { + const result = await sdk.projects.list(); + console.log(result); + } catch (err) { + const error = err as Error; + console.error(error.message); + } })(); diff --git a/examples/tsconfig.json b/examples/tsconfig.json index 6cb81ed..a63d73c 100644 --- a/examples/tsconfig.json +++ b/examples/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -25,8 +25,8 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - "rootDir": "./src", /* Specify the root folder within your source files. */ + "module": "commonjs" /* Specify what module code is generated. */, + "rootDir": "./src" /* Specify the root folder within your source files. */, // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ @@ -49,7 +49,7 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist", /* Specify an output folder for all emitted files. */ + "outDir": "./dist" /* Specify an output folder for all emitted files. */, // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ @@ -71,12 +71,12 @@ /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ + "strict": true /* Enable all strict type-checking options. */, // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ @@ -98,6 +98,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ } } diff --git a/jest.config.json b/jest.config.json index 4ab2aeb..2717f58 100644 --- a/jest.config.json +++ b/jest.config.json @@ -1,7 +1,4 @@ { "preset": "ts-jest", - "testEnvironment": "node", - "moduleNameMapper": { - "axios": "axios/dist/node/axios.cjs" - } + "testEnvironment": "node" } diff --git a/package-lock.json b/package-lock.json index 36a5e6a..8605eb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "@dopplerhq/node-sdk", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dopplerhq/node-sdk", - "version": "1.2.0", + "version": "1.3.0", + "license": "MIT", "devDependencies": { - "@types/jest": "^27.4.1", + "@types/jest": "^29.5.6", "@types/node": "^17.0.23", "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", @@ -18,12 +19,12 @@ "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.2.1", - "jest": "^27.5.1", + "jest": "^29.7.0", "nock": "^13.2.4", "prettier": "^2.6.2", - "ts-jest": "^27.0.3", + "ts-jest": "^29.1.1", "tsup": "^6.7.0", - "typescript": "4.8.4" + "typescript": "^4.6.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -36,128 +37,57 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/compat-data": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", - "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.20.tgz", - "integrity": "sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", + "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.22.15", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.22.20", - "@babel/helpers": "^7.22.15", - "@babel/parser": "^7.22.16", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.22.20", - "@babel/types": "^7.22.19", - "convert-source-map": "^1.7.0", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.24.4", + "@babel/parser": "^7.24.4", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", @@ -181,14 +111,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.15.tgz", - "integrity": "sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", + "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -196,14 +126,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -230,13 +160,13 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -255,21 +185,21 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.20.tgz", - "integrity": "sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -286,9 +216,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -319,9 +249,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -337,37 +267,38 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.15.tgz", - "integrity": "sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", + "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.1", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -445,9 +376,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.16", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", - "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -516,6 +447,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -604,12 +550,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", + "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -619,34 +565,34 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.20.tgz", - "integrity": "sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.22.15", + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.22.5", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.16", - "@babel/types": "^7.22.19", - "debug": "^4.1.0", + "@babel/parser": "^7.24.1", + "@babel/types": "^7.24.0", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -663,13 +609,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", - "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.19", + "@babel/helper-string-parser": "^7.23.4", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1050,18 +996,18 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", - "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -1082,22 +1028,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.49.0.tgz", - "integrity": "sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -1118,11 +1064,107 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1232,59 +1274,59 @@ } }, "node_modules/@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "dependencies": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "ci-info": "^3.2.0", "exit": "^0.1.2", "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "rimraf": "^3.0.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1296,85 +1338,110 @@ } }, "node_modules/@jest/environment": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz", - "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^27.5.1" + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz", - "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz", - "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/types": "^27.5.1", - "expect": "^27.5.1" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz", - "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.1.3", - "jest-haste-map": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1385,119 +1452,132 @@ } } }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/@jest/source-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz", - "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", - "graceful-fs": "^4.2.9", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-result": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz", - "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "dependencies": { - "@jest/console": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz", - "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "dependencies": { - "@jest/test-result": "^27.5.1", + "@jest/test-result": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-runtime": "^27.5.1" + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz", - "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz", - "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "dependencies": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1510,9 +1590,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -1554,37 +1634,44 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, "node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "engines": { - "node": ">= 6" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@types/babel__core": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", - "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "dependencies": { "@babel/parser": "^7.20.7", @@ -1595,18 +1682,18 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.5", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz", - "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz", - "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1614,61 +1701,61 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz", - "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz", + "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" } }, "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { - "version": "27.5.2", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", - "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "expect": "^29.0.0", + "pretty-format": "^29.0.0" } }, "node_modules/@types/json-schema": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", - "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/json5": { @@ -1683,37 +1770,31 @@ "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", "dev": true }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true - }, "node_modules/@types/semver": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", - "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "node_modules/@types/yargs": { - "version": "16.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.5.tgz", - "integrity": "sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { @@ -1904,38 +1985,16 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, - "node_modules/acorn-globals/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1953,27 +2012,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2067,28 +2105,32 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -2108,16 +2150,17 @@ } }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", - "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2163,17 +2206,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -2183,17 +2227,14 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2202,22 +2243,21 @@ } }, "node_modules/babel-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", - "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "dependencies": { - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^27.5.1", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" @@ -2239,19 +2279,44 @@ "node": ">=8" } }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz", - "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/babel-preset-current-node-syntax": { @@ -2278,16 +2343,16 @@ } }, "node_modules/babel-preset-jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz", - "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^27.5.1", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -2300,12 +2365,15 @@ "dev": true }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -2330,16 +2398,10 @@ "node": ">=8" } }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -2356,10 +2418,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -2396,9 +2458,9 @@ "dev": true }, "node_modules/bundle-require": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.1.tgz", - "integrity": "sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-4.0.2.tgz", + "integrity": "sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==", "dev": true, "dependencies": { "load-tsconfig": "^0.2.3" @@ -2420,13 +2482,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2451,9 +2519,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001535", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001535.tgz", - "integrity": "sha512-48jLyUkiWFfhm/afF7cQPqPjaUmSraEhK4j+FCTJpgnGGEZHqyLe3hmWH7lIooZdSzXL0ReMvHz0vKDoTBsrwg==", + "version": "1.0.30001605", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001605.tgz", + "integrity": "sha512-nXwGlFWo34uliI9z3n6Qc0wZaf7zaZWA1CPZ169La5mV3I/gem7bst0vr5XQH5TJXZIMfDeZyOrZnSlVzKxxHQ==", "dev": true, "funding": [ { @@ -2496,16 +2564,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -2518,6 +2580,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -2535,9 +2600,9 @@ } }, "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, "funding": [ { @@ -2556,14 +2621,17 @@ "dev": true }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/co": { @@ -2600,18 +2668,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -2634,11 +2690,32 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2653,42 +2730,55 @@ "node": ">= 8" } }, - "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dev": true, "dependencies": { - "cssom": "~0.3.6" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", "dev": true, "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">=10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/debug": { @@ -2708,17 +2798,19 @@ } } }, - "node_modules/decimal.js": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", - "dev": true - }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", @@ -2736,17 +2828,20 @@ } }, "node_modules/define-data-property": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", - "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-properties": { @@ -2766,15 +2861,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2785,12 +2871,12 @@ } }, "node_modules/diff-sequences": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", - "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { @@ -2817,40 +2903,25 @@ "node": ">=6.0.0" } }, - "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "dependencies": { - "webidl-conversions": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.523", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.523.tgz", - "integrity": "sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==", + "version": "1.4.725", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.725.tgz", + "integrity": "sha512-OGkMXLY7XH6ykHE5ZOVVIMHaGAvvxqw98cswTKB683dntBJre7ufm9wouJ0ExDm0VXhHenU8mREvxIbV5nNoVQ==", "dev": true }, "node_modules/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -2872,50 +2943,57 @@ } }, "node_modules/es-abstract": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", - "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.1", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -2924,27 +3002,60 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -3002,9 +3113,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -3022,49 +3133,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.49.0.tgz", - "integrity": "sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.49.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -3182,9 +3264,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -3208,28 +3290,28 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", - "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.13.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", "semver": "^6.3.1", - "tsconfig-paths": "^3.14.2" + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" @@ -3462,18 +3544,19 @@ } }, "node_modules/expect": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", - "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/fast-deep-equal": { @@ -3489,9 +3572,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3529,9 +3612,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -3587,23 +3670,23 @@ } }, "node_modules/flat-cache": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", - "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.2.7", + "flatted": "^3.2.9", "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/for-each": { @@ -3615,18 +3698,32 @@ "is-callable": "^1.1.3" } }, - "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">= 6" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fs.realpath": { @@ -3650,10 +3747,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.6", @@ -3701,15 +3801,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3737,13 +3841,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -3785,9 +3890,9 @@ } }, "node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3858,18 +3963,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -3889,21 +3982,21 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -3925,12 +4018,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -3939,16 +4032,16 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { - "whatwg-encoding": "^1.0.5" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=10" + "node": ">= 0.4" } }, "node_modules/html-escaper": { @@ -3957,33 +4050,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3993,22 +4059,10 @@ "node": ">=10.17.0" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -4075,13 +4129,13 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -4089,14 +4143,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4161,12 +4217,27 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", "dev": true, "dependencies": { - "has": "^1.0.3" + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4227,9 +4298,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -4271,12 +4342,6 @@ "node": ">=8" } }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -4294,12 +4359,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4348,12 +4416,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -4362,12 +4430,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -4393,37 +4455,28 @@ "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" + "semver": "^7.5.4" }, "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node": ">=10" } }, "node_modules/istanbul-lib-report": { @@ -4455,9 +4508,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4467,21 +4520,40 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jest": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", - "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "dependencies": { - "@jest/core": "^27.5.1", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^27.5.1" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -4493,73 +4565,73 @@ } }, "node_modules/jest-changed-files": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz", - "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", "execa": "^5.0.0", - "throat": "^6.0.1" + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-circus": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz", - "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.5.1", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-cli": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz", - "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "dependencies": { - "@jest/core": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.9", "import-local": "^3.0.2", - "jest-config": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "prompts": "^2.0.1", - "yargs": "^16.2.0" + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -4571,248 +4643,204 @@ } }, "node_modules/jest-config": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz", - "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "dependencies": { - "@babel/core": "^7.8.0", - "@jest/test-sequencer": "^27.5.1", - "@jest/types": "^27.5.1", - "babel-jest": "^27.5.1", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", + "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-circus": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-jasmine2": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", "parse-json": "^5.2.0", - "pretty-format": "^27.5.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { + "@types/node": "*", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "ts-node": { "optional": true } } }, "node_modules/jest-diff": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", - "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-docblock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz", - "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "dependencies": { "detect-newline": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-each": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz", - "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-environment-jsdom": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz", - "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==", - "dev": true, - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1", - "jsdom": "^16.6.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz", - "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^27.5.1", - "jest-util": "^27.5.1" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", - "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz", - "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "@types/graceful-fs": "^4.1.2", + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "graceful-fs": "^4.2.9", - "jest-regex-util": "^27.5.1", - "jest-serializer": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "micromatch": "^4.0.4", - "walker": "^1.0.7" + "walker": "^1.0.8" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "optionalDependencies": { "fsevents": "^2.3.2" } }, - "node_modules/jest-jasmine2": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz", - "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==", - "dev": true, - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.5.1", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "pretty-format": "^27.5.1", - "throat": "^6.0.1" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, "node_modules/jest-leak-detector": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz", - "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "dependencies": { - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", - "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz", - "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.5.1", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-mock": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz", - "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "@types/node": "*" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { @@ -4833,167 +4861,150 @@ } }, "node_modules/jest-regex-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz", - "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz", - "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz", - "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-snapshot": "^27.5.1" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz", - "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "@jest/console": "^27.5.1", - "@jest/environment": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "emittery": "^0.13.1", "graceful-fs": "^4.2.9", - "jest-docblock": "^27.5.1", - "jest-environment-jsdom": "^27.5.1", - "jest-environment-node": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-leak-detector": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-util": "^27.5.1", - "jest-worker": "^27.5.1", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runtime": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz", - "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==", - "dev": true, - "dependencies": { - "@jest/environment": "^27.5.1", - "@jest/fake-timers": "^27.5.1", - "@jest/globals": "^27.5.1", - "@jest/source-map": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", "chalk": "^4.0.0", "cjs-module-lexer": "^1.0.0", "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", "glob": "^7.1.3", "graceful-fs": "^4.2.9", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-mock": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-serializer": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz", - "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==", - "dev": true, - "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.9" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz", - "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.5.1", + "expect": "^29.7.0", "graceful-fs": "^4.2.9", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-matcher-utils": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^27.5.1", - "semver": "^7.3.2" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-util": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", - "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", @@ -5001,24 +5012,24 @@ "picomatch": "^2.2.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz", - "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@jest/types": "^27.5.1", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.5.1", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^27.5.1" + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate/node_modules/camelcase": { @@ -5034,35 +5045,37 @@ } }, "node_modules/jest-watcher": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz", - "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@jest/test-result": "^27.5.1", - "@jest/types": "^27.5.1", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.5.1", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker/node_modules/supports-color": { @@ -5107,52 +5120,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5208,9 +5175,9 @@ } }, "node_modules/keyv": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", - "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "dependencies": { "json-buffer": "3.0.1" @@ -5286,12 +5253,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5377,27 +5338,6 @@ "node": ">=8.6" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -5428,6 +5368,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5458,14 +5407,13 @@ "dev": true }, "node_modules/nock": { - "version": "13.3.3", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.3.3.tgz", - "integrity": "sha512-z+KUlILy9SK/RjpeXDiDUEAq4T94ADPHE3qaRkf66mpEhzc/ytOMm3Bwdrbq6k1tMWkbdujiKim3G2tfQARuJw==", + "version": "13.5.4", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", + "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", "dev": true, "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.21", "propagate": "^2.0.0" }, "engines": { @@ -5479,9 +5427,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -5505,12 +5453,6 @@ "node": ">=8" } }, - "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", - "dev": true - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -5521,9 +5463,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5539,13 +5481,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -5557,28 +5499,29 @@ } }, "node_modules/object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -5588,26 +5531,28 @@ } }, "node_modules/object.groupby": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", - "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -5726,12 +5671,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -5765,6 +5704,31 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5865,6 +5829,15 @@ "node": ">=8" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss-load-config": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", @@ -5931,17 +5904,17 @@ } }, "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -5978,26 +5951,30 @@ "node": ">= 8" } }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -6020,9 +5997,9 @@ ] }, "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, "node_modules/readdirp": { @@ -6038,14 +6015,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -6063,16 +6041,10 @@ "node": ">=0.10.0" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, "node_modules/resolve": { - "version": "1.22.6", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", - "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", @@ -6117,9 +6089,9 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.1.tgz", - "integrity": "sha512-/NtpHNDN7jWhAaQ9BvBUYZ6YTXsRBgfqWFWP7BZBaoMJO/I3G5OFzvTuWNlZC3aPjins1F+TNrLKsGbH4rfsRQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, "engines": { "node": ">=10" @@ -6151,9 +6123,9 @@ } }, "node_modules/rollup": { - "version": "3.29.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.2.tgz", - "integrity": "sha512-CJouHoZ27v6siztc21eEQGo0kIcE5D1gVPA571ez0mMYb25LGYGKnVNXpEj5MGlepmDWGXNjDB5q7uNiPHC11A==", + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6190,13 +6162,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -6208,41 +6180,26 @@ } }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -6272,15 +6229,33 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -6308,14 +6283,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6352,9 +6331,9 @@ } }, "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "dependencies": { "buffer-from": "^1.0.0", @@ -6415,15 +6394,31 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -6433,28 +6428,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6472,6 +6470,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -6503,14 +6514,14 @@ } }, "node_modules/sucrase": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz", - "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==", + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.2", "commander": "^4.0.0", - "glob": "7.1.6", + "glob": "^10.3.10", "lines-and-columns": "^1.1.6", "mz": "^2.7.0", "pirates": "^4.0.1", @@ -6521,49 +6532,62 @@ "sucrase-node": "bin/sucrase-node" }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/sucrase/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.6", + "minimatch": "^9.0.1", + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" + "has-flag": "^4.0.0" }, "engines": { "node": ">=8" @@ -6581,28 +6605,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -6644,12 +6646,6 @@ "node": ">=0.8" } }, - "node_modules/throat": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", - "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==", - "dev": true - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -6677,31 +6673,13 @@ "node": ">=8.0" } }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", "dev": true, "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" + "punycode": "^2.1.0" } }, "node_modules/tree-kill": { @@ -6720,38 +6698,38 @@ "dev": true }, "node_modules/ts-jest": { - "version": "27.1.5", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.5.tgz", - "integrity": "sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==", + "version": "29.1.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", + "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", "dev": true, "dependencies": { "bs-logger": "0.x", "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", "lodash.memoize": "4.x", "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" }, "peerDependenciesMeta": { "@babel/core": { "optional": true }, - "@types/jest": { + "@jest/types": { "optional": true }, "babel-jest": { @@ -6763,9 +6741,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", - "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", @@ -6867,32 +6845,6 @@ "node": ">= 8" } }, - "node_modules/tsup/node_modules/tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/tsup/node_modules/webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, - "node_modules/tsup/node_modules/whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -6942,29 +6894,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -6974,16 +6927,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -6993,32 +6947,29 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -7043,19 +6994,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, "funding": [ { @@ -7091,61 +7033,20 @@ "punycode": "^2.1.0" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, "node_modules/v8-to-istanbul": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz", - "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", - "dev": true, - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "dependencies": { - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -7156,41 +7057,20 @@ } }, "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true, - "engines": { - "node": ">=10.4" - } - }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "dependencies": { - "iconv-lite": "0.4.24" - } - }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", "dev": true }, "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=10" + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" } }, "node_modules/which": { @@ -7225,16 +7105,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -7260,6 +7140,24 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7267,50 +7165,18 @@ "dev": true }, "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "engines": { - "node": ">=8.3.0" + "signal-exit": "^3.0.7" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -7336,30 +7202,30 @@ } }, "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/yocto-queue": { diff --git a/package.json b/package.json index f6e905b..62ea06c 100644 --- a/package.json +++ b/package.json @@ -20,18 +20,18 @@ "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", "@types/node": "^17.0.23", - "@types/jest": "^27.4.1", + "@types/jest": "^29.5.6", "eslint": "^8.20.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-airbnb-typescript": "^17.0.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.2.1", - "jest": "^27.5.1", + "jest": "^29.7.0", "nock": "^13.2.4", "prettier": "^2.6.2", - "ts-jest": "^27.0.3", - "typescript": "4.8.4", + "ts-jest": "^29.1.1", + "typescript": "^4.6.0", "tsup": "^6.7.0" }, "scripts": { @@ -51,8 +51,9 @@ }, "name": "@dopplerhq/node-sdk", "description": "DopplerSDK", - "version": "1.2.0", + "version": "1.3.0", "author": "DopplerSDK", "dependencies": {}, + "license": "MIT", "type": "module" } diff --git a/src/hooks/Hook.ts b/src/hooks/Hook.ts index b68e544..443030b 100644 --- a/src/hooks/Hook.ts +++ b/src/hooks/Hook.ts @@ -8,6 +8,15 @@ export interface Request { export interface Response { data: object; headers: object; + status: number; +} + +export interface Exception extends Error { + title: string; + type?: string; + detail?: string; + instance?: string; + statusCode: number; } export interface Hook { @@ -15,5 +24,5 @@ export interface Hook { afterResponse(request: Request, response: Response): Promise; - afterError(error: object): Promise; + onError(error: Exception): Promise; } diff --git a/src/http/HTTPLibrary.ts b/src/http/HTTPLibrary.ts index de54dd9..02780f2 100644 --- a/src/http/HTTPLibrary.ts +++ b/src/http/HTTPLibrary.ts @@ -3,6 +3,10 @@ import { RequestOptions } from 'https'; import HTTPClient, { Headers } from './HTTPClient'; import throwHttpError from './httpExceptions'; +// Ignore TS errors when checking if we are running inside Deno or Bun +declare const Deno: any; +declare const Bun: any; + interface Response { status: number; headers: any; @@ -10,12 +14,7 @@ interface Response { } export default class HTTPLibrary implements HTTPClient { - readonly userAgentHeader: Headers = { - 'User-Agent': 'liblab/0.1.17 DopplerSDK/1.2.0 typescript/5.2.2', - }; - readonly retryAttempts: number = 3; - readonly retryDelayMs: number = 150; private static readonly responseMapper: Map = new Map([ @@ -209,10 +208,22 @@ export default class HTTPLibrary implements HTTPClient { } private getUserAgentHeader(): Headers { + const userAgentBase = 'DopplerSDK/1.3.0'; + + let userAgent = ''; if (typeof window !== 'undefined') { return {}; + } else if (typeof process !== 'undefined') { + userAgent = `Node.js/${process.version} ${userAgentBase}`; + } else if (typeof Deno !== 'undefined') { + userAgent = `Deno/${Deno.version.deno} ${userAgentBase}`; + } else if (typeof Bun !== 'undefined') { + userAgent = `Bun/${Bun.version} ${userAgentBase}`; + } else { + userAgent = userAgentBase; } - return this.userAgentHeader; + + return { 'User-Agent': userAgent }; } /** @@ -232,7 +243,7 @@ export default class HTTPLibrary implements HTTPClient { const convertedObj: Record = {}; Object.entries(obj).forEach(([key, value]) => { - if (value) { + if (value !== undefined) { const convertedKey = jsonMapper.get(key) || key; convertedObj[convertedKey] = HTTPLibrary.convertKeysWithMapper(value, jsonMapper); } diff --git a/src/http/QuerySerializer.ts b/src/http/QuerySerializer.ts index 2ba9596..43c88f3 100644 --- a/src/http/QuerySerializer.ts +++ b/src/http/QuerySerializer.ts @@ -1,6 +1,6 @@ -type Explode = boolean; -type QueryStyles = 'form' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject'; -type PathStyles = 'simple' | 'label' | 'matrix'; +export type Explode = boolean; +export type QueryStyles = 'form' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject'; +export type PathStyles = 'simple' | 'label' | 'matrix'; const styleMethods: Record = { simple: (value: unknown, explode: boolean) => { @@ -28,24 +28,24 @@ const styleMethods: Record = { }, form: (parameterName: string, parameterValue: unknown, explode: boolean) => { - // Check if the value is an array + // Check if the parameterValue is an array if (Array.isArray(parameterValue)) { return explode - ? parameterValue.map((parameterValue) => `${parameterName}=${parameterValue}`).join('&') + ? parameterValue.map((value) => `${parameterName}=${value}`).join('&') : `${parameterName}=${parameterValue.join(',')}`; } - // Check if the value is an object + // Check if the parameterValue is an object if (typeof parameterValue === 'object' && parameterValue !== null) { if (explode) { // Serialize object with exploded format: "key1=value1&key2=value2" return Object.entries(parameterValue) - .map(([parameterName, parameterValue]) => `${parameterName}=${parameterValue}`) + .map(([name, value]) => `${name}=${value}`) .join('&'); } // Serialize object with non-exploded format: "key=key1,value1,key2,value2" return `${parameterName}=${Object.entries(parameterValue) - .flatMap(([parameterName, parameterValue]) => [parameterName, parameterValue]) + .flatMap(([name, value]) => [name, value]) .join(',')}`; } diff --git a/src/http/errors/index.ts b/src/http/errors/index.ts new file mode 100644 index 0000000..0f98f74 --- /dev/null +++ b/src/http/errors/index.ts @@ -0,0 +1,83 @@ +import BadRequest from './BadRequest'; +import Unauthorized from './Unauthorized'; +import PaymentRequired from './PaymentRequired'; +import Forbidden from './Forbidden'; +import NotFound from './NotFound'; +import MethodNotAllowed from './MethodNotAllowed'; +import NotAcceptable from './NotAcceptable'; +import ProxyAuthenticationRequired from './ProxyAuthenticationRequired'; +import RequestTimeout from './RequestTimeout'; +import Conflict from './Conflict'; +import Gone from './Gone'; +import LengthRequired from './LengthRequired'; +import PreconditionFailed from './PreconditionFailed'; +import PayloadTooLarge from './PayloadTooLarge'; +import UriTooLong from './UriTooLong'; +import UnsupportedMediaType from './UnsupportedMediaType'; +import RangeNotSatisfiable from './RangeNotSatisfiable'; +import ExpectationFailed from './ExpectationFailed'; +import MisdirectedRequest from './MisdirectedRequest'; +import UnprocessableEntity from './UnprocessableEntity'; +import Locked from './Locked'; +import FailedDependency from './FailedDependency'; +import TooEarly from './TooEarly'; +import UpgradeRequired from './UpgradeRequired'; +import PreconditionRequired from './PreconditionRequired'; +import TooManyRequests from './TooManyRequests'; +import RequestHeaderFieldsTooLarge from './RequestHeaderFieldsTooLarge'; +import UnavailableForLegalReasons from './UnavailableForLegalReasons'; +import InternalServerError from './InternalServerError'; +import NotImplemented from './NotImplemented'; +import BadGateway from './BadGateway'; +import ServiceUnavailable from './ServiceUnavailable'; +import GatewayTimeout from './GatewayTimeout'; +import HttpVersionNotSupported from './HttpVersionNotSupported'; +import VariantAlsoNegotiates from './VariantAlsoNegotiates'; +import UnsufficientStorage from './UnsufficientStorage'; +import LoopDetected from './LoopDetected'; +import NotExtended from './NotExtended'; +import NetworkAuthenticationRequired from './NetworkAuthenticationRequired'; +import { BaseHTTPError } from './base'; + +export { + BaseHTTPError, + BadRequest, + Unauthorized, + PaymentRequired, + Forbidden, + NotFound, + MethodNotAllowed, + NotAcceptable, + ProxyAuthenticationRequired, + RequestTimeout, + Conflict, + Gone, + LengthRequired, + PreconditionFailed, + PayloadTooLarge, + UriTooLong, + UnsupportedMediaType, + RangeNotSatisfiable, + ExpectationFailed, + MisdirectedRequest, + UnprocessableEntity, + Locked, + FailedDependency, + TooEarly, + UpgradeRequired, + PreconditionRequired, + TooManyRequests, + RequestHeaderFieldsTooLarge, + UnavailableForLegalReasons, + InternalServerError, + NotImplemented, + BadGateway, + ServiceUnavailable, + GatewayTimeout, + HttpVersionNotSupported, + VariantAlsoNegotiates, + UnsufficientStorage, + LoopDetected, + NotExtended, + NetworkAuthenticationRequired, +}; diff --git a/src/http/httpExceptions.ts b/src/http/httpExceptions.ts index 8c59955..09926ca 100644 --- a/src/http/httpExceptions.ts +++ b/src/http/httpExceptions.ts @@ -1,43 +1,45 @@ -import BadRequest from './errors/BadRequest'; -import Unauthorized from './errors/Unauthorized'; -import PaymentRequired from './errors/PaymentRequired'; -import Forbidden from './errors/Forbidden'; -import NotFound from './errors/NotFound'; -import MethodNotAllowed from './errors/MethodNotAllowed'; -import NotAcceptable from './errors/NotAcceptable'; -import ProxyAuthenticationRequired from './errors/ProxyAuthenticationRequired'; -import RequestTimeout from './errors/RequestTimeout'; -import Conflict from './errors/Conflict'; -import Gone from './errors/Gone'; -import LengthRequired from './errors/LengthRequired'; -import PreconditionFailed from './errors/PreconditionFailed'; -import PayloadTooLarge from './errors/PayloadTooLarge'; -import UriTooLong from './errors/UriTooLong'; -import UnsupportedMediaType from './errors/UnsupportedMediaType'; -import RangeNotSatisfiable from './errors/RangeNotSatisfiable'; -import ExpectationFailed from './errors/ExpectationFailed'; -import MisdirectedRequest from './errors/MisdirectedRequest'; -import UnprocessableEntity from './errors/UnprocessableEntity'; -import Locked from './errors/Locked'; -import FailedDependency from './errors/FailedDependency'; -import TooEarly from './errors/TooEarly'; -import UpgradeRequired from './errors/UpgradeRequired'; -import PreconditionRequired from './errors/PreconditionRequired'; -import TooManyRequests from './errors/TooManyRequests'; -import RequestHeaderFieldsTooLarge from './errors/RequestHeaderFieldsTooLarge'; -import UnavailableForLegalReasons from './errors/UnavailableForLegalReasons'; -import InternalServerError from './errors/InternalServerError'; -import NotImplemented from './errors/NotImplemented'; -import BadGateway from './errors/BadGateway'; -import ServiceUnavailable from './errors/ServiceUnavailable'; -import GatewayTimeout from './errors/GatewayTimeout'; -import HttpVersionNotSupported from './errors/HttpVersionNotSupported'; -import VariantAlsoNegotiates from './errors/VariantAlsoNegotiates'; -import UnsufficientStorage from './errors/UnsufficientStorage'; -import LoopDetected from './errors/LoopDetected'; -import NotExtended from './errors/NotExtended'; -import NetworkAuthenticationRequired from './errors/NetworkAuthenticationRequired'; -import { BaseHTTPError } from './errors/base'; +import { + BaseHTTPError, + BadRequest, + Unauthorized, + PaymentRequired, + Forbidden, + NotFound, + MethodNotAllowed, + NotAcceptable, + ProxyAuthenticationRequired, + RequestTimeout, + Conflict, + Gone, + LengthRequired, + PreconditionFailed, + PayloadTooLarge, + UriTooLong, + UnsupportedMediaType, + RangeNotSatisfiable, + ExpectationFailed, + MisdirectedRequest, + UnprocessableEntity, + Locked, + FailedDependency, + TooEarly, + UpgradeRequired, + PreconditionRequired, + TooManyRequests, + RequestHeaderFieldsTooLarge, + UnavailableForLegalReasons, + InternalServerError, + NotImplemented, + BadGateway, + ServiceUnavailable, + GatewayTimeout, + HttpVersionNotSupported, + VariantAlsoNegotiates, + UnsufficientStorage, + LoopDetected, + NotExtended, + NetworkAuthenticationRequired, +} from './errors'; interface HttpResponseWithError { status: number; @@ -98,29 +100,39 @@ const statusCodeToErrorFunction: NumberToClass = { * @throws {Error} - an http error */ export default function throwHttpError(response: HttpResponseWithError): never { - // certain error codes have special handling, we try those first + let error: BaseHTTPError = new BaseHTTPError(response.data); switch (response.status) { case 401: - throw new Unauthorized(response.data, response.headers['WWW-Authenticate']); + error = new Unauthorized(response.data, response.headers['WWW-Authenticate']); + break; case 405: // this indicates a bug in the spec if it allows a method that the server rejects - throw new MethodNotAllowed(response.data, response.headers.allowed); + error = new MethodNotAllowed(response.data, response.headers.allowed); + break; case 407: - throw new ProxyAuthenticationRequired(response.data, response.headers['Proxy-Authenticate']); + error = new ProxyAuthenticationRequired( + response.data, + response.headers['Proxy-Authenticate'], + ); + break; case 413: - throw new PayloadTooLarge(response.data, response.headers['Retry-After']); + error = new PayloadTooLarge(response.data, response.headers['Retry-After']); + break; case 429: - throw new TooManyRequests(response.data, response.headers['Retry-After']); + error = new TooManyRequests(response.data, response.headers['Retry-After']); + break; case 503: - throw new ServiceUnavailable(response.data, response.headers['Retry-After']); + error = new ServiceUnavailable(response.data, response.headers['Retry-After']); + break; default: if (response.status in statusCodeToErrorFunction) { - throw new statusCodeToErrorFunction[response.status](response.data); + error = new statusCodeToErrorFunction[response.status](response.data); } else { const error = new BaseHTTPError(response.data); error.statusCode = response.status; error.title = 'unknown error'; - throw error; } } + + throw error; } diff --git a/src/index.ts b/src/index.ts index bec086e..bda1982 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,141 +1,177 @@ -import { ProjectsService } from './services/projects/Projects'; -import { SecretsService } from './services/secrets/Secrets'; -import { ConfigLogsService } from './services/configLogs/ConfigLogs'; -import { EnvironmentsService } from './services/environments/Environments'; -import { ConfigsService } from './services/configs/Configs'; import { ActivityLogsService } from './services/activityLogs/ActivityLogs'; -import { WorkplaceService } from './services/workplace/Workplace'; -import { ServiceTokensService } from './services/serviceTokens/ServiceTokens'; import { AuditService } from './services/audit/Audit'; -import { DynamicSecretsService } from './services/dynamicSecrets/DynamicSecrets'; import { AuthService } from './services/auth/Auth'; +import { ConfigLogsService } from './services/configLogs/ConfigLogs'; +import { ConfigsService } from './services/configs/Configs'; +import { DynamicSecretsService } from './services/dynamicSecrets/DynamicSecrets'; +import { EnvironmentsService } from './services/environments/Environments'; +import { GetService } from './services/get/Get'; +import { GroupsService } from './services/groups/Groups'; import { IntegrationsService } from './services/integrations/Integrations'; -import { SyncsService } from './services/syncs/Syncs'; -import { WorkplaceRolesService } from './services/workplaceRoles/WorkplaceRoles'; -import { ProjectRolesService } from './services/projectRoles/ProjectRoles'; -import { ProjectMembersService } from './services/projectMembers/ProjectMembers'; import { InvitesService } from './services/invites/Invites'; +import { ProjectMembersService } from './services/projectMembers/ProjectMembers'; +import { ProjectRolesService } from './services/projectRoles/ProjectRoles'; +import { ProjectsService } from './services/projects/Projects'; +import { RetrieveService } from './services/retrieve/Retrieve'; +import { SecretsService } from './services/secrets/Secrets'; +import { ServiceAccountTokensService } from './services/serviceAccountTokens/ServiceAccountTokens'; import { ServiceAccountsService } from './services/serviceAccounts/ServiceAccounts'; -import { GroupsService } from './services/groups/Groups'; +import { ServiceTokensService } from './services/serviceTokens/ServiceTokens'; +import { SyncsService } from './services/syncs/Syncs'; import { UsersService } from './services/users/Users'; +import { WebhooksService } from './services/webhooks/Webhooks'; +import { WorkplaceService } from './services/workplace/Workplace'; +import { WorkplaceRolesService } from './services/workplaceRoles/WorkplaceRoles'; export * from './models'; -export * as SecretsModels from './services/secrets'; -export * as ProjectMembersModels from './services/projectMembers'; -export * as GroupsModels from './services/groups'; -export * as ProjectsModels from './services/projects'; -export * as ConfigLogsModels from './services/configLogs'; -export * as EnvironmentsModels from './services/environments'; -export * as ConfigsModels from './services/configs'; -export * as ServiceTokensModels from './services/serviceTokens'; export * as ActivityLogsModels from './services/activityLogs'; -export * as WorkplaceModels from './services/workplace'; export * as AuditModels from './services/audit'; +export * as AuthModels from './services/auth'; +export * as ConfigLogsModels from './services/configLogs'; +export * as ConfigsModels from './services/configs'; export * as DynamicSecretsModels from './services/dynamicSecrets'; +export * as EnvironmentsModels from './services/environments'; +export * as GetModels from './services/get'; +export * as GroupsModels from './services/groups'; export * as IntegrationsModels from './services/integrations'; -export * as SyncsModels from './services/syncs'; -export * as AuthModels from './services/auth'; -export * as WorkplaceRolesModels from './services/workplaceRoles'; -export * as ProjectRolesModels from './services/projectRoles'; export * as InvitesModels from './services/invites'; +export * as ProjectMembersModels from './services/projectMembers'; +export * as ProjectRolesModels from './services/projectRoles'; +export * as ProjectsModels from './services/projects'; +export * as RetrieveModels from './services/retrieve'; +export * as SecretsModels from './services/secrets'; +export * as ServiceAccountTokensModels from './services/serviceAccountTokens'; export * as ServiceAccountsModels from './services/serviceAccounts'; +export * as ServiceTokensModels from './services/serviceTokens'; +export * as SyncsModels from './services/syncs'; export * as UsersModels from './services/users'; +export * as WebhooksModels from './services/webhooks'; +export * as WorkplaceModels from './services/workplace'; +export * as WorkplaceRolesModels from './services/workplaceRoles'; type Config = { accessToken?: string; }; +export * from './http/errors'; + export class DopplerSDK { - public projects: ProjectsService; - public secrets: SecretsService; - public configLogs: ConfigLogsService; - public environments: EnvironmentsService; - public configs: ConfigsService; public activityLogs: ActivityLogsService; - public workplace: WorkplaceService; - public serviceTokens: ServiceTokensService; public audit: AuditService; - public dynamicSecrets: DynamicSecretsService; public auth: AuthService; + public configLogs: ConfigLogsService; + public configs: ConfigsService; + public dynamicSecrets: DynamicSecretsService; + public environments: EnvironmentsService; + public get: GetService; + public groups: GroupsService; public integrations: IntegrationsService; - public syncs: SyncsService; - public workplaceRoles: WorkplaceRolesService; - public projectRoles: ProjectRolesService; - public projectMembers: ProjectMembersService; public invites: InvitesService; + public projectMembers: ProjectMembersService; + public projectRoles: ProjectRolesService; + public projects: ProjectsService; + public retrieve: RetrieveService; + public secrets: SecretsService; + public serviceAccountTokens: ServiceAccountTokensService; public serviceAccounts: ServiceAccountsService; - public groups: GroupsService; + public serviceTokens: ServiceTokensService; + public syncs: SyncsService; public users: UsersService; + public webhooks: WebhooksService; + public workplace: WorkplaceService; + public workplaceRoles: WorkplaceRolesService; constructor({ accessToken = '' }: Config) { - this.projects = new ProjectsService(accessToken); - this.secrets = new SecretsService(accessToken); - this.configLogs = new ConfigLogsService(accessToken); - this.environments = new EnvironmentsService(accessToken); - this.configs = new ConfigsService(accessToken); this.activityLogs = new ActivityLogsService(accessToken); - this.workplace = new WorkplaceService(accessToken); - this.serviceTokens = new ServiceTokensService(accessToken); this.audit = new AuditService(accessToken); - this.dynamicSecrets = new DynamicSecretsService(accessToken); this.auth = new AuthService(accessToken); + this.configLogs = new ConfigLogsService(accessToken); + this.configs = new ConfigsService(accessToken); + this.dynamicSecrets = new DynamicSecretsService(accessToken); + this.environments = new EnvironmentsService(accessToken); + this.get = new GetService(accessToken); + this.groups = new GroupsService(accessToken); this.integrations = new IntegrationsService(accessToken); - this.syncs = new SyncsService(accessToken); - this.workplaceRoles = new WorkplaceRolesService(accessToken); - this.projectRoles = new ProjectRolesService(accessToken); - this.projectMembers = new ProjectMembersService(accessToken); this.invites = new InvitesService(accessToken); + this.projectMembers = new ProjectMembersService(accessToken); + this.projectRoles = new ProjectRolesService(accessToken); + this.projects = new ProjectsService(accessToken); + this.retrieve = new RetrieveService(accessToken); + this.secrets = new SecretsService(accessToken); + this.serviceAccountTokens = new ServiceAccountTokensService(accessToken); this.serviceAccounts = new ServiceAccountsService(accessToken); - this.groups = new GroupsService(accessToken); + this.serviceTokens = new ServiceTokensService(accessToken); + this.syncs = new SyncsService(accessToken); this.users = new UsersService(accessToken); + this.webhooks = new WebhooksService(accessToken); + this.workplace = new WorkplaceService(accessToken); + this.workplaceRoles = new WorkplaceRolesService(accessToken); } + /** + * Sets the baseUrl that the SDK will use for its requests. + * @param {string} url + */ setBaseUrl(url: string): void { - this.projects.setBaseUrl(url); - this.secrets.setBaseUrl(url); - this.configLogs.setBaseUrl(url); - this.environments.setBaseUrl(url); - this.configs.setBaseUrl(url); this.activityLogs.setBaseUrl(url); - this.workplace.setBaseUrl(url); - this.serviceTokens.setBaseUrl(url); this.audit.setBaseUrl(url); - this.dynamicSecrets.setBaseUrl(url); this.auth.setBaseUrl(url); + this.configLogs.setBaseUrl(url); + this.configs.setBaseUrl(url); + this.dynamicSecrets.setBaseUrl(url); + this.environments.setBaseUrl(url); + this.get.setBaseUrl(url); + this.groups.setBaseUrl(url); this.integrations.setBaseUrl(url); - this.syncs.setBaseUrl(url); - this.workplaceRoles.setBaseUrl(url); - this.projectRoles.setBaseUrl(url); - this.projectMembers.setBaseUrl(url); this.invites.setBaseUrl(url); + this.projectMembers.setBaseUrl(url); + this.projectRoles.setBaseUrl(url); + this.projects.setBaseUrl(url); + this.retrieve.setBaseUrl(url); + this.secrets.setBaseUrl(url); + this.serviceAccountTokens.setBaseUrl(url); this.serviceAccounts.setBaseUrl(url); - this.groups.setBaseUrl(url); + this.serviceTokens.setBaseUrl(url); + this.syncs.setBaseUrl(url); this.users.setBaseUrl(url); + this.webhooks.setBaseUrl(url); + this.workplace.setBaseUrl(url); + this.workplaceRoles.setBaseUrl(url); } + /** + * Sets the access token used to authenticate. + * @param {string} accessToken + */ setAccessToken(accessToken: string) { - this.projects.setAccessToken(accessToken); - this.secrets.setAccessToken(accessToken); - this.configLogs.setAccessToken(accessToken); - this.environments.setAccessToken(accessToken); - this.configs.setAccessToken(accessToken); this.activityLogs.setAccessToken(accessToken); - this.workplace.setAccessToken(accessToken); - this.serviceTokens.setAccessToken(accessToken); this.audit.setAccessToken(accessToken); - this.dynamicSecrets.setAccessToken(accessToken); this.auth.setAccessToken(accessToken); + this.configLogs.setAccessToken(accessToken); + this.configs.setAccessToken(accessToken); + this.dynamicSecrets.setAccessToken(accessToken); + this.environments.setAccessToken(accessToken); + this.get.setAccessToken(accessToken); + this.groups.setAccessToken(accessToken); this.integrations.setAccessToken(accessToken); - this.syncs.setAccessToken(accessToken); - this.workplaceRoles.setAccessToken(accessToken); - this.projectRoles.setAccessToken(accessToken); - this.projectMembers.setAccessToken(accessToken); this.invites.setAccessToken(accessToken); + this.projectMembers.setAccessToken(accessToken); + this.projectRoles.setAccessToken(accessToken); + this.projects.setAccessToken(accessToken); + this.retrieve.setAccessToken(accessToken); + this.secrets.setAccessToken(accessToken); + this.serviceAccountTokens.setAccessToken(accessToken); this.serviceAccounts.setAccessToken(accessToken); - this.groups.setAccessToken(accessToken); + this.serviceTokens.setAccessToken(accessToken); + this.syncs.setAccessToken(accessToken); this.users.setAccessToken(accessToken); + this.webhooks.setAccessToken(accessToken); + this.workplace.setAccessToken(accessToken); + this.workplaceRoles.setAccessToken(accessToken); } } export default DopplerSDK; + +// c029837e0e474b76bc487506e8799df5e3335891efe4fb02bda7a1441840310c diff --git a/src/models.ts b/src/models.ts index 7d0381f..39dcdc3 100644 --- a/src/models.ts +++ b/src/models.ts @@ -1,105 +1,125 @@ -export type { Format } from './services/secrets/models/Format'; -export type { NameTransformer } from './services/secrets/models/NameTransformer'; -export type { Type } from './services/projectMembers/models/Type'; -export type { GroupsType } from './services/groups/models/GroupsType'; -export type { ListResponse } from './services/projects/models/ListResponse'; -export type { CreateResponse } from './services/projects/models/CreateResponse'; -export type { SecretsListResponse } from './services/secrets/models/SecretsListResponse'; -export type { UpdateResponse } from './services/secrets/models/UpdateResponse'; +export type { ActivityLogsListResponse } from './services/activityLogs/models/ActivityLogsListResponse'; +export type { AddMemberRequest } from './services/groups/models/AddMemberRequest'; +export type { AddRequest } from './services/projectMembers/models/AddRequest'; +export type { AddResponse } from './services/projectMembers/models/AddResponse'; +export type { AddTrustedIpRequest } from './services/configs/models/AddTrustedIpRequest'; +export type { AddTrustedIpResponse } from './services/configs/models/AddTrustedIpResponse'; +export type { CloneRequest } from './services/configs/models/CloneRequest'; +export type { CloneResponse } from './services/configs/models/CloneResponse'; +export type { ConfigLogsGetResponse } from './services/configLogs/models/ConfigLogsGetResponse'; export type { ConfigLogsListResponse } from './services/configLogs/models/ConfigLogsListResponse'; -export type { GetResponse } from './services/configLogs/models/GetResponse'; -export type { EnvironmentsGetResponse } from './services/environments/models/EnvironmentsGetResponse'; -export type { RenameResponse } from './services/environments/models/RenameResponse'; -export type { ProjectsGetResponse } from './services/projects/models/ProjectsGetResponse'; -export type { ProjectsUpdateResponse } from './services/projects/models/ProjectsUpdateResponse'; -export type { ConfigsListResponse } from './services/configs/models/ConfigsListResponse'; +export type { ConfigsCreateRequest } from './services/configs/models/ConfigsCreateRequest'; export type { ConfigsCreateResponse } from './services/configs/models/ConfigsCreateResponse'; +export type { ConfigsDeleteRequest } from './services/configs/models/ConfigsDeleteRequest'; export type { ConfigsGetResponse } from './services/configs/models/ConfigsGetResponse'; +export type { ConfigsListResponse } from './services/configs/models/ConfigsListResponse'; +export type { ConfigsUpdateRequest } from './services/configs/models/ConfigsUpdateRequest'; export type { ConfigsUpdateResponse } from './services/configs/models/ConfigsUpdateResponse'; +export type { CreateRequest } from './services/projects/models/CreateRequest'; +export type { CreateResponse } from './services/projects/models/CreateResponse'; +export type { DeleteRequest } from './services/projects/models/DeleteRequest'; export type { DeleteResponse } from './services/common/DeleteResponse'; -export type { EnvironmentsListResponse } from './services/environments/models/EnvironmentsListResponse'; +export type { DeleteTrustedIpRequest } from './services/configs/models/DeleteTrustedIpRequest'; +export type { DisableResponse } from './services/webhooks/models/DisableResponse'; +export type { DownloadResponse } from './services/secrets/models/DownloadResponse'; +export type { EnableResponse } from './services/webhooks/models/EnableResponse'; +export type { EnvironmentsCreateRequest } from './services/environments/models/EnvironmentsCreateRequest'; export type { EnvironmentsCreateResponse } from './services/environments/models/EnvironmentsCreateResponse'; -export type { RollbackResponse } from './services/configLogs/models/RollbackResponse'; -export type { RetrieveResponse } from './services/activityLogs/models/RetrieveResponse'; -export type { WorkplaceGetResponse } from './services/workplace/models/WorkplaceGetResponse'; -export type { WorkplaceUpdateResponse } from './services/workplace/models/WorkplaceUpdateResponse'; -export type { ActivityLogsListResponse } from './services/activityLogs/models/ActivityLogsListResponse'; -export type { SecretsGetResponse } from './services/secrets/models/SecretsGetResponse'; -export type { ServiceTokensListResponse } from './services/serviceTokens/models/ServiceTokensListResponse'; -export type { ServiceTokensCreateResponse } from './services/serviceTokens/models/ServiceTokensCreateResponse'; -export type { CloneResponse } from './services/configs/models/CloneResponse'; -export type { LockResponse } from './services/configs/models/LockResponse'; -export type { UnlockResponse } from './services/configs/models/UnlockResponse'; +export type { EnvironmentsGetResponse } from './services/environments/models/EnvironmentsGetResponse'; +export type { EnvironmentsListResponse } from './services/environments/models/EnvironmentsListResponse'; +export type { Format } from './services/secrets/models/Format'; +export type { GetResponse } from './services/projects/models/GetResponse'; export type { GetUserResponse } from './services/audit/models/GetUserResponse'; -export type { DownloadResponse } from './services/secrets/models/DownloadResponse'; -export type { IssueLeaseResponse } from './services/dynamicSecrets/models/IssueLeaseResponse'; -export type { RevokeLeaseResponse } from './services/dynamicSecrets/models/RevokeLeaseResponse'; -export type { NamesResponse } from './services/secrets/models/NamesResponse'; -export type { UpdateNoteResponse } from './services/secrets/models/UpdateNoteResponse'; -export type { IntegrationsListResponse } from './services/integrations/models/IntegrationsListResponse'; +export type { GroupsCreateRequest } from './services/groups/models/GroupsCreateRequest'; +export type { GroupsCreateResponse } from './services/groups/models/GroupsCreateResponse'; +export type { GroupsGetResponse } from './services/groups/models/GroupsGetResponse'; +export type { GroupsListResponse } from './services/groups/models/GroupsListResponse'; +export type { GroupsType } from './services/groups/models/GroupsType'; +export type { GroupsUpdateRequest } from './services/groups/models/GroupsUpdateRequest'; +export type { GroupsUpdateResponse } from './services/groups/models/GroupsUpdateResponse'; +export type { IntegrationsCreateRequest } from './services/integrations/models/IntegrationsCreateRequest'; export type { IntegrationsCreateResponse } from './services/integrations/models/IntegrationsCreateResponse'; +export type { IntegrationsDeleteResponse } from './services/integrations/models/IntegrationsDeleteResponse'; export type { IntegrationsGetResponse } from './services/integrations/models/IntegrationsGetResponse'; +export type { IntegrationsListResponse } from './services/integrations/models/IntegrationsListResponse'; +export type { IntegrationsUpdateRequest } from './services/integrations/models/IntegrationsUpdateRequest'; export type { IntegrationsUpdateResponse } from './services/integrations/models/IntegrationsUpdateResponse'; -export type { IntegrationsDeleteResponse } from './services/integrations/models/IntegrationsDeleteResponse'; -export type { SyncsCreateResponse } from './services/syncs/models/SyncsCreateResponse'; -export type { SyncsGetResponse } from './services/syncs/models/SyncsGetResponse'; -export type { SyncsDeleteResponse } from './services/syncs/models/SyncsDeleteResponse'; -export type { MeResponse } from './services/auth/models/MeResponse'; -export type { ListTrustedIpsResponse } from './services/configs/models/ListTrustedIpsResponse'; -export type { AddTrustedIpResponse } from './services/configs/models/AddTrustedIpResponse'; -export type { WorkplaceRolesListResponse } from './services/workplaceRoles/models/WorkplaceRolesListResponse'; -export type { WorkplaceRolesCreateResponse } from './services/workplaceRoles/models/WorkplaceRolesCreateResponse'; +export type { InvitesListResponse } from './services/invites/models/InvitesListResponse'; +export type { IssueLeaseRequest } from './services/dynamicSecrets/models/IssueLeaseRequest'; +export type { IssueLeaseResponse } from './services/dynamicSecrets/models/IssueLeaseResponse'; export type { ListPermissionsResponse } from './services/workplaceRoles/models/ListPermissionsResponse'; -export type { WorkplaceRolesGetResponse } from './services/workplaceRoles/models/WorkplaceRolesGetResponse'; -export type { WorkplaceRolesUpdateResponse } from './services/workplaceRoles/models/WorkplaceRolesUpdateResponse'; -export type { ProjectRolesListResponse } from './services/projectRoles/models/ProjectRolesListResponse'; +export type { ListResponse } from './services/projects/models/ListResponse'; +export type { ListTrustedIpsResponse } from './services/configs/models/ListTrustedIpsResponse'; +export type { LockRequest } from './services/configs/models/LockRequest'; +export type { LockResponse } from './services/configs/models/LockResponse'; +export type { MemberResponse } from './services/retrieve/models/MemberResponse'; +export type { MemberType } from './services/retrieve/models/MemberType'; +export type { MeResponse } from './services/auth/models/MeResponse'; +export type { NamesResponse } from './services/secrets/models/NamesResponse'; +export type { NameTransformer } from './services/secrets/models/NameTransformer'; +export type { OptionsResponse } from './services/get/models/OptionsResponse'; +export type { ProjectMembersGetResponse } from './services/projectMembers/models/ProjectMembersGetResponse'; +export type { ProjectMembersListResponse } from './services/projectMembers/models/ProjectMembersListResponse'; +export type { ProjectMembersUpdateRequest } from './services/projectMembers/models/ProjectMembersUpdateRequest'; +export type { ProjectMembersUpdateResponse } from './services/projectMembers/models/ProjectMembersUpdateResponse'; +export type { ProjectRolesCreateRequest } from './services/projectRoles/models/ProjectRolesCreateRequest'; export type { ProjectRolesCreateResponse } from './services/projectRoles/models/ProjectRolesCreateResponse'; export type { ProjectRolesGetResponse } from './services/projectRoles/models/ProjectRolesGetResponse'; -export type { ProjectRolesUpdateResponse } from './services/projectRoles/models/ProjectRolesUpdateResponse'; export type { ProjectRolesListPermissionsResponse } from './services/projectRoles/models/ProjectRolesListPermissionsResponse'; -export type { ProjectMembersListResponse } from './services/projectMembers/models/ProjectMembersListResponse'; -export type { AddResponse } from './services/projectMembers/models/AddResponse'; -export type { ProjectMembersGetResponse } from './services/projectMembers/models/ProjectMembersGetResponse'; -export type { ProjectMembersUpdateResponse } from './services/projectMembers/models/ProjectMembersUpdateResponse'; -export type { InvitesListResponse } from './services/invites/models/InvitesListResponse'; -export type { ServiceAccountsListResponse } from './services/serviceAccounts/models/ServiceAccountsListResponse'; +export type { ProjectRolesListResponse } from './services/projectRoles/models/ProjectRolesListResponse'; +export type { ProjectRolesUpdateRequest } from './services/projectRoles/models/ProjectRolesUpdateRequest'; +export type { ProjectRolesUpdateResponse } from './services/projectRoles/models/ProjectRolesUpdateResponse'; +export type { RenameRequest } from './services/environments/models/RenameRequest'; +export type { RenameResponse } from './services/environments/models/RenameResponse'; +export type { RetrieveResponse } from './services/activityLogs/models/RetrieveResponse'; +export type { RevokeLeaseRequest } from './services/dynamicSecrets/models/RevokeLeaseRequest'; +export type { RevokeLeaseResponse } from './services/dynamicSecrets/models/RevokeLeaseResponse'; +export type { RevokeRequest } from './services/auth/models/RevokeRequest'; +export type { RollbackResponse } from './services/configLogs/models/RollbackResponse'; +export type { SecretsGetResponse } from './services/secrets/models/SecretsGetResponse'; +export type { SecretsListResponse } from './services/secrets/models/SecretsListResponse'; +export type { SecretsUpdateRequest } from './services/secrets/models/SecretsUpdateRequest'; +export type { SecretsUpdateResponse } from './services/secrets/models/SecretsUpdateResponse'; +export type { ServiceAccountsCreateRequest } from './services/serviceAccounts/models/ServiceAccountsCreateRequest'; export type { ServiceAccountsCreateResponse } from './services/serviceAccounts/models/ServiceAccountsCreateResponse'; export type { ServiceAccountsGetResponse } from './services/serviceAccounts/models/ServiceAccountsGetResponse'; +export type { ServiceAccountsListResponse } from './services/serviceAccounts/models/ServiceAccountsListResponse'; +export type { ServiceAccountsUpdateRequest } from './services/serviceAccounts/models/ServiceAccountsUpdateRequest'; export type { ServiceAccountsUpdateResponse } from './services/serviceAccounts/models/ServiceAccountsUpdateResponse'; -export type { GroupsListResponse } from './services/groups/models/GroupsListResponse'; -export type { GroupsCreateResponse } from './services/groups/models/GroupsCreateResponse'; -export type { GroupsGetResponse } from './services/groups/models/GroupsGetResponse'; -export type { GroupsUpdateResponse } from './services/groups/models/GroupsUpdateResponse'; -export type { UsersListResponse } from './services/users/models/UsersListResponse'; -export type { UsersGetResponse } from './services/users/models/UsersGetResponse'; -export type { CreateRequest } from './services/projects/models/CreateRequest'; -export type { UpdateRequest } from './services/secrets/models/UpdateRequest'; -export type { RenameRequest } from './services/environments/models/RenameRequest'; -export type { ProjectsUpdateRequest } from './services/projects/models/ProjectsUpdateRequest'; -export type { DeleteRequest } from './services/projects/models/DeleteRequest'; -export type { ConfigsCreateRequest } from './services/configs/models/ConfigsCreateRequest'; -export type { ConfigsUpdateRequest } from './services/configs/models/ConfigsUpdateRequest'; -export type { ConfigsDeleteRequest } from './services/configs/models/ConfigsDeleteRequest'; -export type { EnvironmentsCreateRequest } from './services/environments/models/EnvironmentsCreateRequest'; -export type { WorkplaceUpdateRequest } from './services/workplace/models/WorkplaceUpdateRequest'; +export type { ServiceAccountTokensCreateRequest } from './services/serviceAccountTokens/models/ServiceAccountTokensCreateRequest'; +export type { ServiceAccountTokensCreateResponse } from './services/serviceAccountTokens/models/ServiceAccountTokensCreateResponse'; +export type { ServiceAccountTokensGetResponse } from './services/serviceAccountTokens/models/ServiceAccountTokensGetResponse'; +export type { ServiceAccountTokensListResponse } from './services/serviceAccountTokens/models/ServiceAccountTokensListResponse'; export type { ServiceTokensCreateRequest } from './services/serviceTokens/models/ServiceTokensCreateRequest'; +export type { ServiceTokensCreateResponse } from './services/serviceTokens/models/ServiceTokensCreateResponse'; export type { ServiceTokensDeleteRequest } from './services/serviceTokens/models/ServiceTokensDeleteRequest'; -export type { CloneRequest } from './services/configs/models/CloneRequest'; -export type { LockRequest } from './services/configs/models/LockRequest'; +export type { ServiceTokensListResponse } from './services/serviceTokens/models/ServiceTokensListResponse'; +export type { SyncsCreateRequest } from './services/syncs/models/SyncsCreateRequest'; +export type { SyncsCreateResponse } from './services/syncs/models/SyncsCreateResponse'; +export type { SyncsDeleteResponse } from './services/syncs/models/SyncsDeleteResponse'; +export type { SyncsGetResponse } from './services/syncs/models/SyncsGetResponse'; +export type { Type } from './services/projectMembers/models/Type'; export type { UnlockRequest } from './services/configs/models/UnlockRequest'; -export type { IssueLeaseRequest } from './services/dynamicSecrets/models/IssueLeaseRequest'; -export type { RevokeLeaseRequest } from './services/dynamicSecrets/models/RevokeLeaseRequest'; -export type { RevokeRequest } from './services/auth/models/RevokeRequest'; +export type { UnlockResponse } from './services/configs/models/UnlockResponse'; export type { UpdateNoteRequest } from './services/secrets/models/UpdateNoteRequest'; -export type { IntegrationsCreateRequest } from './services/integrations/models/IntegrationsCreateRequest'; -export type { IntegrationsUpdateRequest } from './services/integrations/models/IntegrationsUpdateRequest'; -export type { SyncsCreateRequest } from './services/syncs/models/SyncsCreateRequest'; -export type { AddTrustedIpRequest } from './services/configs/models/AddTrustedIpRequest'; -export type { DeleteTrustedIpRequest } from './services/configs/models/DeleteTrustedIpRequest'; -export type { AddRequest } from './services/projectMembers/models/AddRequest'; -export type { ProjectMembersUpdateRequest } from './services/projectMembers/models/ProjectMembersUpdateRequest'; -export type { ServiceAccountsCreateRequest } from './services/serviceAccounts/models/ServiceAccountsCreateRequest'; -export type { ServiceAccountsUpdateRequest } from './services/serviceAccounts/models/ServiceAccountsUpdateRequest'; -export type { GroupsCreateRequest } from './services/groups/models/GroupsCreateRequest'; -export type { GroupsUpdateRequest } from './services/groups/models/GroupsUpdateRequest'; -export type { AddMemberRequest } from './services/groups/models/AddMemberRequest'; +export type { UpdateNoteResponse } from './services/secrets/models/UpdateNoteResponse'; +export type { UpdateRequest } from './services/projects/models/UpdateRequest'; +export type { UpdateResponse } from './services/projects/models/UpdateResponse'; +export type { UsersGetResponse } from './services/users/models/UsersGetResponse'; +export type { UsersListResponse } from './services/users/models/UsersListResponse'; +export type { WebhooksAddRequest } from './services/webhooks/models/WebhooksAddRequest'; +export type { WebhooksAddResponse } from './services/webhooks/models/WebhooksAddResponse'; +export type { WebhooksDeleteResponse } from './services/webhooks/models/WebhooksDeleteResponse'; +export type { WebhooksGetResponse } from './services/webhooks/models/WebhooksGetResponse'; +export type { WebhooksListResponse } from './services/webhooks/models/WebhooksListResponse'; +export type { WebhooksUpdateRequest } from './services/webhooks/models/WebhooksUpdateRequest'; +export type { WebhooksUpdateResponse } from './services/webhooks/models/WebhooksUpdateResponse'; +export type { WorkplaceGetResponse } from './services/workplace/models/WorkplaceGetResponse'; +export type { WorkplaceRolesCreateRequest } from './services/workplaceRoles/models/WorkplaceRolesCreateRequest'; +export type { WorkplaceRolesCreateResponse } from './services/workplaceRoles/models/WorkplaceRolesCreateResponse'; +export type { WorkplaceRolesGetResponse } from './services/workplaceRoles/models/WorkplaceRolesGetResponse'; +export type { WorkplaceRolesListResponse } from './services/workplaceRoles/models/WorkplaceRolesListResponse'; +export type { WorkplaceRolesUpdateRequest } from './services/workplaceRoles/models/WorkplaceRolesUpdateRequest'; +export type { WorkplaceRolesUpdateResponse } from './services/workplaceRoles/models/WorkplaceRolesUpdateResponse'; +export type { WorkplaceUpdateRequest } from './services/workplace/models/WorkplaceUpdateRequest'; +export type { WorkplaceUpdateResponse } from './services/workplace/models/WorkplaceUpdateResponse'; diff --git a/src/services/README.md b/src/services/README.md index 342339d..08bcb29 100644 --- a/src/services/README.md +++ b/src/services/README.md @@ -1,259 +1,281 @@ # DopplerSDK Services -A list of all services and services methods. -- Services - - [Projects](#projects) - - - [Secrets](#secrets) +A list of all services and services methods. - - [ConfigLogs](#configlogs) +- Services - - [Environments](#environments) + - [Projects](#projects) - - [Configs](#configs) + - [Environments](#environments) - - [ActivityLogs](#activitylogs) + - [Configs](#configs) - - [Workplace](#workplace) + - [ConfigLogs](#configlogs) - - [ServiceTokens](#servicetokens) + - [Secrets](#secrets) - - [Audit](#audit) + - [Workplace](#workplace) - - [DynamicSecrets](#dynamicsecrets) + - [ActivityLogs](#activitylogs) - - [Auth](#auth) + - [ServiceTokens](#servicetokens) - - [Integrations](#integrations) + - [Audit](#audit) - - [Syncs](#syncs) + - [DynamicSecrets](#dynamicsecrets) - - [WorkplaceRoles](#workplaceroles) + - [Auth](#auth) - - [ProjectRoles](#projectroles) + - [Integrations](#integrations) - - [ProjectMembers](#projectmembers) + - [Syncs](#syncs) - - [Invites](#invites) + - [WorkplaceRoles](#workplaceroles) - - [ServiceAccounts](#serviceaccounts) + - [ProjectRoles](#projectroles) - - [Groups](#groups) + - [ProjectMembers](#projectmembers) - - [Users](#users) -- [All Methods](#all-methods) + - [Invites](#invites) + - [ServiceAccounts](#serviceaccounts) -## Projects + - [Groups](#groups) -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [update](#update) | Update | -| [get](#get) | Retrieve | -| [delete](#delete) | Delete | + - [Users](#users) + - [Get](#get) -## Secrets + - [Retrieve](#retrieve) -| Method | Description| -| :-------- | :----------| -| [update](#update) | Update | -| [list](#list) | List | -| [get](#get) | Retrieve | -| [delete](#delete) | Delete | -| [download](#download) | Download | -| [names](#names) | List Names | -| [updateNote](#updatenote) | Update Note | + - [Webhooks](#webhooks) + - [ServiceAccountTokens](#serviceaccounttokens) -## ConfigLogs +- [All Methods](#all-methods) -| Method | Description| -| :-------- | :----------| -| [list](#list) | List | -| [get](#get) | Retrieve | -| [rollback](#rollback) | Rollback | +## Projects +| Method | Description | +| :---------------- | :---------- | +| [create](#create) | Create | +| [list](#list) | List | +| [update](#update) | Update | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | ## Environments -| Method | Description| -| :-------- | :----------| -| [get](#get) | Retrieve | -| [delete](#delete) | Delete | -| [rename](#rename) | Rename | -| [create](#create) | Create | -| [list](#list) | List | - +| Method | Description | +| :---------------- | :---------- | +| [create](#create) | Create | +| [list](#list) | List | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | +| [rename](#rename) | Rename | ## Configs -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [update](#update) | Update | -| [get](#get) | Retrieve | -| [delete](#delete) | Delete | -| [clone](#clone) | Clone | -| [lock](#lock) | Lock | -| [unlock](#unlock) | Unlock | -| [addTrustedIp](#addtrustedip) | Add | -| [listTrustedIps](#listtrustedips) | List | -| [deleteTrustedIp](#deletetrustedip) | Delete | +| Method | Description | +| :---------------------------------- | :---------- | +| [update](#update) | Update | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | +| [create](#create) | Create | +| [list](#list) | List | +| [unlock](#unlock) | Unlock | +| [clone](#clone) | Clone | +| [lock](#lock) | Lock | +| [addTrustedIp](#addtrustedip) | Add | +| [listTrustedIps](#listtrustedips) | List | +| [deleteTrustedIp](#deletetrustedip) | Delete | +## ConfigLogs -## ActivityLogs +| Method | Description | +| :-------------------- | :---------- | +| [get](#get) | Retrieve | +| [list](#list) | List | +| [rollback](#rollback) | Rollback | -| Method | Description| -| :-------- | :----------| -| [retrieve](#retrieve) | Retrieve | -| [list](#list) | List | +## Secrets +| Method | Description | +| :------------------------ | :---------- | +| [update](#update) | Update | +| [list](#list) | List | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | +| [download](#download) | Download | +| [updateNote](#updatenote) | Update Note | +| [names](#names) | List Names | ## Workplace -| Method | Description| -| :-------- | :----------| -| [update](#update) | Update | -| [get](#get) | Retrieve | +| Method | Description | +| :---------------- | :---------- | +| [update](#update) | Update | +| [get](#get) | Retrieve | + +## ActivityLogs +| Method | Description | +| :-------------------- | :---------- | +| [list](#list) | List | +| [retrieve](#retrieve) | Retrieve | ## ServiceTokens -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [delete](#delete) | Delete | - +| Method | Description | +| :---------------- | :---------- | +| [delete](#delete) | Delete | +| [create](#create) | Create | +| [list](#list) | List | ## Audit -| Method | Description| -| :-------- | :----------| +| Method | Description | +| :------------------ | :------------- | | [getUser](#getuser) | Workplace User | - ## DynamicSecrets -| Method | Description| -| :-------- | :----------| -| [issueLease](#issuelease) | Issue Lease | +| Method | Description | +| :-------------------------- | :----------- | | [revokeLease](#revokelease) | Revoke Lease | - +| [issueLease](#issuelease) | Issue Lease | ## Auth -| Method | Description| -| :-------- | :----------| -| [revoke](#revoke) | Revoke | -| [me](#me) | Me | - +| Method | Description | +| :---------------- | :---------- | +| [revoke](#revoke) | Revoke | +| [me](#me) | Me | ## Integrations -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [get](#get) | Retrieve | -| [delete](#delete) | Delete | -| [update](#update) | Update | - +| Method | Description | +| :---------------- | :---------- | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | +| [update](#update) | Update | +| [create](#create) | Create | +| [list](#list) | List | ## Syncs -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [get](#get) | Retrieve | -| [delete](#delete) | Delete | - +| Method | Description | +| :---------------- | :---------- | +| [create](#create) | Create | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | ## WorkplaceRoles -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | +| Method | Description | +| :---------------------------------- | :--------------- | +| [create](#create) | Create | +| [list](#list) | List | +| [get](#get) | Retrieve | +| [update](#update) | Update | +| [delete](#delete) | Delete | | [listPermissions](#listpermissions) | List Permissions | -| [get](#get) | Retrieve | -| [update](#update) | Update | -| [delete](#delete) | Delete | - ## ProjectRoles -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [get](#get) | Retrieve | -| [update](#update) | Update | -| [delete](#delete) | Delete | +| Method | Description | +| :---------------------------------- | :--------------- | +| [get](#get) | Retrieve | +| [update](#update) | Update | +| [delete](#delete) | Delete | +| [create](#create) | Create | +| [list](#list) | List | | [listPermissions](#listpermissions) | List Permissions | - ## ProjectMembers -| Method | Description| -| :-------- | :----------| -| [add](#add) | Add | -| [list](#list) | List | -| [get](#get) | Retrieve | -| [update](#update) | Update | -| [delete](#delete) | Delete | - +| Method | Description | +| :---------------- | :---------- | +| [add](#add) | Add | +| [list](#list) | List | +| [get](#get) | Retrieve | +| [update](#update) | Update | +| [delete](#delete) | Delete | ## Invites -| Method | Description| -| :-------- | :----------| -| [list](#list) | List | - +| Method | Description | +| :------------ | :---------- | +| [list](#list) | List | ## ServiceAccounts -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [get](#get) | Retrieve | -| [update](#update) | Update | -| [delete](#delete) | Delete | - +| Method | Description | +| :---------------- | :---------- | +| [get](#get) | Retrieve | +| [update](#update) | Update | +| [delete](#delete) | Delete | +| [create](#create) | Create | +| [list](#list) | List | ## Groups -| Method | Description| -| :-------- | :----------| -| [create](#create) | Create | -| [list](#list) | List | -| [get](#get) | Retrieve | -| [update](#update) | Update | -| [delete](#delete) | Delete | -| [addMember](#addmember) | Add Member | +| Method | Description | +| :---------------------------- | :------------ | +| [get](#get) | Retrieve | +| [update](#update) | Update | +| [delete](#delete) | Delete | +| [create](#create) | Create | +| [list](#list) | List | | [deleteMember](#deletemember) | Delete Member | - +| [addMember](#addmember) | Add Member | ## Users -| Method | Description| -| :-------- | :----------| -| [list](#list) | List | -| [get](#get) | Retrieve | +| Method | Description | +| :------------ | :---------- | +| [list](#list) | List | +| [get](#get) | Retrieve | +## Get +| Method | Description | +| :------------------ | :---------- | +| [options](#options) | Get Options | +## Retrieve -## All Methods +| Method | Description | +| :---------------- | :-------------- | +| [member](#member) | Retrieve Member | +## Webhooks + +| Method | Description | +| :------------------ | :---------- | +| [add](#add) | Add | +| [list](#list) | List | +| [get](#get) | Retrieve | +| [update](#update) | Update | +| [delete](#delete) | Delete | +| [enable](#enable) | Enable | +| [disable](#disable) | Disable | + +## ServiceAccountTokens + +| Method | Description | +| :---------------- | :---------- | +| [create](#create) | Create | +| [list](#list) | List | +| [get](#get) | Retrieve | +| [delete](#delete) | Delete | + +## All Methods ### **create** + Create + - HTTP Method: POST - Endpoint: /v3/projects @@ -261,15 +283,14 @@ Create | input | object | Request body. | - - **Return Type** CreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -284,28 +305,29 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` ### **list** + List + - HTTP Method: GET - Endpoint: /v3/projects - **Optional Parameters** Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | Page number | +| Name | Type | Description | +| :------ | :----- | :------------- | +| page | number | Page number | | perPage | number | Items per page | - **Return Type** ListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -319,7 +341,9 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` ### **update** + Update + - HTTP Method: POST - Endpoint: /v3/projects/project @@ -327,15 +351,14 @@ Update | input | object | Request body. | - - **Return Type** -ProjectsUpdateResponse +UpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -354,25 +377,26 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` ### **get** + Retrieve + - HTTP Method: GET - Endpoint: /v3/projects/project **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | | project | string | Unique identifier for the project object. | - - **Return Type** -ProjectsGetResponse +GetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -386,7 +410,9 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` ### **delete** + Delete + - HTTP Method: DELETE - Endpoint: /v3/projects/project @@ -394,15 +420,14 @@ Delete | input | object | Request body. | - - **Return Type** Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -416,989 +441,1070 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` +### **create** + +Create -### **update** -Update - HTTP Method: POST -- Endpoint: /v3/configs/config/secrets +- Endpoint: /v3/environments **Required Parameters** -| input | object | Request body. | - - +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | +| input | object | Request body. | **Return Type** -UpdateResponse +EnvironmentsCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - config: 'CONFIG_NAME', - project: 'PROJECT_NAME', - secrets: { - ALGOLIA: 'N9TOPUCTO', - DATABASE: '${USER}@aws.dynamodb.com:9876', - STRIPE: 'sk_test_9YxLnoLDdvOPn2dfjBVPB', - }, - }; - const result = await sdk.secrets.update(input); + const input = { name: 'name', slug: 'slug' }; + const result = await sdk.environments.create(input, 'project'); console.log(result); })(); ``` ### **list** + List + - HTTP Method: GET -- Endpoint: /v3/configs/config/secrets +- Endpoint: /v3/environments **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | - -**Optional Parameters** - -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} - -| Name | Type| Description | -| :-------- | :----------| :----------| -| accepts | string | Available options are: **application/json**, **text/plain** | -| includeDynamicSecrets | boolean | Whether or not to issue leases and include dynamic secret values for the config | -| dynamicSecretsTtlSec | number | The number of seconds until dynamic leases expire. Must be used with `include_dynamic_secrets`. Defaults to 1800 (30 minutes). | -| secrets | string | A comma-separated list of secrets to include in the response | -| includeManagedSecrets | boolean | Whether to include Doppler's auto-generated (managed) secrets | - +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -SecretsListResponse +EnvironmentsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.secrets.list('PROJECT_NAME', 'CONFIG_NAME', { - accepts: 'application/json', - includeDynamicSecrets: true, - dynamicSecretsTtlSec: -63740284, - secrets: 'secrets', - includeManagedSecrets: true, - }); + const result = await sdk.environments.list('project'); console.log(result); })(); ``` ### **get** + Retrieve + - HTTP Method: GET -- Endpoint: /v3/configs/config/secret +- Endpoint: /v3/environments/environment **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | -| name | string | Name of the secret. | - - +| Name | Type | Description | +| :---------- | :----- | :--------------------- | +| project | string | The project's name | +| environment | string | The environment's slug | **Return Type** -SecretsGetResponse +EnvironmentsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.secrets.get('PROJECT_NAME', 'CONFIG_NAME', 'SECRET_NAME'); + const result = await sdk.environments.get('project', 'environment'); console.log(result); })(); ``` ### **delete** + Delete + - HTTP Method: DELETE -- Endpoint: /v3/configs/config/secret +- Endpoint: /v3/environments/environment **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | -| name | string | Name of the secret. | - - +| Name | Type | Description | +| :---------- | :----- | :--------------------- | +| project | string | The project's name | +| environment | string | The environment's slug | **Return Type** Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.secrets.delete('PROJECT_NAME', 'CONFIG_NAME', 'SECRET_NAME'); + const result = await sdk.environments.delete('project', 'environment'); console.log(result); })(); ``` -### **download** -Download -- HTTP Method: GET -- Endpoint: /v3/configs/config/secrets/download - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. Not required if using a Service Token. | -| config | string | Name of the config object. Not required if using a Service Token. | +### **rename** -**Optional Parameters** +Rename -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +- HTTP Method: PUT +- Endpoint: /v3/environments/environment -| Name | Type| Description | -| :-------- | :----------| :----------| -| format | [Format](/src/models/README.md#format) | | -| nameTransformer | [NameTransformer](/src/models/README.md#nametransformer) | Transform secret names to a different case | -| includeDynamicSecrets | boolean | Whether or not to issue leases and include dynamic secret values for the config | -| dynamicSecretsTtlSec | number | The number of seconds until dynamic leases expire. Must be used with `include_dynamic_secrets`. Defaults to 1800 (30 minutes). | +**Required Parameters** +| Name | Type | Description | +| :---------- | :----- | :--------------------- | +| project | string | The project's name | +| environment | string | The environment's slug | +| input | object | Request body. | **Return Type** -DownloadResponse +RenameResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.secrets.download('project', 'config', { - format: 'json', - nameTransformer: 'upper-camel', - includeDynamicSecrets: true, - dynamicSecretsTtlSec: 1800, - }); + const input = { name: 'name', slug: 'slug' }; + const result = await sdk.environments.rename(input, 'project', 'environment'); console.log(result); })(); ``` -### **names** -List Names -- HTTP Method: GET -- Endpoint: /v3/configs/config/secrets/names - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | +### **update** -**Optional Parameters** +Update -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +- HTTP Method: POST +- Endpoint: /v3/configs/config -| Name | Type| Description | -| :-------- | :----------| :----------| -| includeDynamicSecrets | boolean | Whether or not to issue leases and include dynamic secret values for the config | -| includeManagedSecrets | boolean | Whether to include Doppler's auto-generated (managed) secrets | +**Required Parameters** +| input | object | Request body. | **Return Type** -NamesResponse +ConfigsUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.secrets.names('PROJECT_NAME', 'CONFIG_NAME', { - includeDynamicSecrets: true, - includeManagedSecrets: true, - }); + const input = { config: 'CONFIG_NAME', name: 'CONFIG_NEW_NAME', project: 'PROJECT_NAME' }; + const result = await sdk.configs.update(input); console.log(result); })(); ``` -### **updateNote** -Update Note -- HTTP Method: POST -- Endpoint: /v3/configs/config/secrets/note +### **get** -**Required Parameters** +Retrieve -| input | object | Request body. | +- HTTP Method: GET +- Endpoint: /v3/configs/config +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | **Return Type** -UpdateNoteResponse +ConfigsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { config: 'CONFIG_NAME', note: 'note', project: 'PROJECT_NAME', secret: 'secret' }; - const result = await sdk.secrets.updateNote(input); + const result = await sdk.configs.get('PROJECT_NAME', 'CONFIG_NAME'); console.log(result); })(); ``` +### **delete** -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/configs/config/logs - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | - -**Optional Parameters** +Delete -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +- HTTP Method: DELETE +- Endpoint: /v3/configs/config -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | Page number | -| perPage | number | Items per page | +**Required Parameters** +| input | object | Request body. | **Return Type** -ConfigLogsListResponse +DeleteResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.configLogs.list('PROJECT_NAME', 'CONFIG_NAME', { page: 1, perPage: 20 }); + const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' }; + const result = await sdk.configs.delete(input); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/configs/config/logs/log +### **create** -**Required Parameters** +Create -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | -| log | string | Unique identifier for the log object. | +- HTTP Method: POST +- Endpoint: /v3/configs +**Required Parameters** +| input | object | Request body. | **Return Type** -GetResponse +ConfigsCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.configLogs.get('PROJECT_NAME', 'CONFIG_NAME', 'LOG_ID'); + const input = { environment: 'ENVIRONMENT_ID', name: 'CONFIG_NAME', project: 'PROJECT_NAME' }; + const result = await sdk.configs.create(input); console.log(result); })(); ``` -### **rollback** -Rollback -- HTTP Method: POST -- Endpoint: /v3/configs/config/logs/log/rollback +### **list** -**Required Parameters** +List -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | -| log | string | Unique identifier for the log object. | +- HTTP Method: GET +- Endpoint: /v3/configs +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | + +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} + +| Name | Type | Description | +| :---------- | :----- | :---------------------------------------------------- | +| environment | string | (optional) the environment from which to list configs | +| page | number | Page number | +| perPage | number | Items per page | **Return Type** -RollbackResponse +ConfigsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.configLogs.rollback('PROJECT_NAME', 'CONFIG_NAME', 'LOG_ID'); + const result = await sdk.configs.list('project', { + environment: 'Environment slug', + page: 1, + perPage: 20, + }); console.log(result); })(); ``` +### **unlock** -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/environments/environment - -**Required Parameters** +Unlock -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project's name | -| environment | string | The environment's slug | +- HTTP Method: POST +- Endpoint: /v3/configs/config/unlock +**Required Parameters** +| input | object | Request body. | **Return Type** -EnvironmentsGetResponse +UnlockResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.environments.get('project', 'environment'); + const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' }; + const result = await sdk.configs.unlock(input); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/environments/environment +### **clone** -**Required Parameters** +Clone -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project's name | -| environment | string | The environment's slug | +- HTTP Method: POST +- Endpoint: /v3/configs/config/clone +**Required Parameters** +| input | object | Request body. | **Return Type** -Returns a dict object. +CloneResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.environments.delete('project', 'environment'); + const input = { config: 'CONFIG_NAME', name: 'NEW_CONFIG_NAME', project: 'PROJECT_NAME' }; + const result = await sdk.configs.clone(input); console.log(result); })(); ``` -### **rename** -Rename -- HTTP Method: PUT -- Endpoint: /v3/environments/environment +### **lock** -**Required Parameters** +Lock -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project's name | -| environment | string | The environment's slug | -| input | object | Request body. | +- HTTP Method: POST +- Endpoint: /v3/configs/config/lock +**Required Parameters** +| input | object | Request body. | **Return Type** -RenameResponse +LockResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { name: 'name', slug: 'slug' }; - const result = await sdk.environments.rename(input, 'project', 'environment'); + const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' }; + const result = await sdk.configs.lock(input); console.log(result); })(); ``` -### **create** -Create -- HTTP Method: POST -- Endpoint: /v3/environments +### **addTrustedIp** -**Required Parameters** +Add -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project's name | -| input | object | Request body. | +- HTTP Method: POST +- Endpoint: /v3/configs/config/trusted_ips +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :------------ | +| project | string | | +| config | string | | +| input | object | Request body. | **Return Type** -EnvironmentsCreateResponse +AddTrustedIpResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { name: 'name', slug: 'slug' }; - const result = await sdk.environments.create(input, 'project'); + const input = { ip: 'ip' }; + const result = await sdk.configs.addTrustedIp(input, 'project', 'config'); console.log(result); })(); ``` -### **list** +### **listTrustedIps** + List + - HTTP Method: GET -- Endpoint: /v3/environments +- Endpoint: /v3/configs/config/trusted_ips **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project's name | - - +| Name | Type | Description | +| :------ | :----- | :---------- | +| project | string | | +| config | string | | **Return Type** -EnvironmentsListResponse +ListTrustedIpsResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.environments.list('project'); + const result = await sdk.configs.listTrustedIps('project', 'config'); console.log(result); })(); ``` +### **deleteTrustedIp** -### **create** -Create -- HTTP Method: POST -- Endpoint: /v3/configs - -**Required Parameters** +Delete -| input | object | Request body. | +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/trusted_ips +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :------------ | +| project | string | | +| config | string | | +| input | object | Request body. | **Return Type** -ConfigsCreateResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { environment: 'ENVIRONMENT_ID', name: 'CONFIG_NAME', project: 'PROJECT_NAME' }; - const result = await sdk.configs.create(input); + const input = { ip: 'ip' }; + const result = await sdk.configs.deleteTrustedIp(input, 'project', 'config'); console.log(result); })(); ``` -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/configs - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project's name | +### **get** -**Optional Parameters** +Retrieve -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +- HTTP Method: GET +- Endpoint: /v3/configs/config/logs/log -| Name | Type| Description | -| :-------- | :----------| :----------| -| environment | string | (optional) the environment from which to list configs | -| page | number | Page number | -| perPage | number | Items per page | +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | +| log | string | Unique identifier for the log object. | **Return Type** -ConfigsListResponse +ConfigLogsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.configs.list('project', { - environment: 'Environment slug', - page: 1, - perPage: 20, - }); + const result = await sdk.configLogs.get('PROJECT_NAME', 'CONFIG_NAME', 'LOG_ID'); console.log(result); })(); ``` -### **update** -Update -- HTTP Method: POST -- Endpoint: /v3/configs/config +### **list** + +List + +- HTTP Method: GET +- Endpoint: /v3/configs/config/logs **Required Parameters** -| input | object | Request body. | +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :------------- | +| page | number | Page number | +| perPage | number | Items per page | **Return Type** -ConfigsUpdateResponse +ConfigLogsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { config: 'CONFIG_NAME', name: 'CONFIG_NEW_NAME', project: 'PROJECT_NAME' }; - const result = await sdk.configs.update(input); + const result = await sdk.configLogs.list('PROJECT_NAME', 'CONFIG_NAME', { page: 1, perPage: 20 }); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/configs/config +### **rollback** -**Required Parameters** +Rollback -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | +- HTTP Method: POST +- Endpoint: /v3/configs/config/logs/log/rollback +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | +| log | string | Unique identifier for the log object. | **Return Type** -ConfigsGetResponse +RollbackResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.configs.get('PROJECT_NAME', 'CONFIG_NAME'); + const result = await sdk.configLogs.rollback('PROJECT_NAME', 'CONFIG_NAME', 'LOG_ID'); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/configs/config +### **update** -**Required Parameters** +Update -| input | object | Request body. | +- HTTP Method: POST +- Endpoint: /v3/configs/config/secrets +**Required Parameters** +| input | object | Request body. | **Return Type** -DeleteResponse +SecretsUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' }; - const result = await sdk.configs.delete(input); + const input = { + change_requests: [ + { + name: 'cupidatat consectetur ut non quis', + originalName: 'occaecat in in', + originalValue: 'cillum aute occaecat', + originalVisibility: 'sit minim ad', + shouldConverge: false, + shouldDelete: false, + shouldPromote: false, + value: 'consectetur proident ea', + visibility: 'in labore exercitation', + }, + { + name: 'laborum anim sint', + originalName: 'laboris ut', + originalValue: 'in commodo in', + originalVisibility: 'tempor', + shouldConverge: false, + shouldDelete: true, + shouldPromote: true, + value: 'pariatur adipisicing nulla ea', + visibility: 'dolore in culpa officia', + }, + ], + config: 'CONFIG_NAME', + project: 'PROJECT_NAME', + secrets: {}, + }; + const result = await sdk.secrets.update(input); console.log(result); })(); ``` -### **clone** -Clone -- HTTP Method: POST -- Endpoint: /v3/configs/config/clone +### **list** + +List + +- HTTP Method: GET +- Endpoint: /v3/configs/config/secrets **Required Parameters** -| input | object | Request body. | +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :-------------------- | :------ | :----------------------------------------------------------------------------------------------------------------------------- | +| accepts | string | Available options are: **application/json**, **text/plain** | +| includeDynamicSecrets | boolean | Whether or not to issue leases and include dynamic secret values for the config | +| dynamicSecretsTtlSec | number | The number of seconds until dynamic leases expire. Must be used with `include_dynamic_secrets`. Defaults to 1800 (30 minutes). | +| secrets | string | A comma-separated list of secrets to include in the response | +| includeManagedSecrets | boolean | Whether to include Doppler's auto-generated (managed) secrets | **Return Type** -CloneResponse +SecretsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { config: 'CONFIG_NAME', name: 'NEW_CONFIG_NAME', project: 'PROJECT_NAME' }; - const result = await sdk.configs.clone(input); + const result = await sdk.secrets.list('PROJECT_NAME', 'CONFIG_NAME', { + accepts: 'application/json', + includeDynamicSecrets: true, + dynamicSecretsTtlSec: -33704873, + secrets: 'secrets', + includeManagedSecrets: true, + }); console.log(result); })(); ``` -### **lock** -Lock -- HTTP Method: POST -- Endpoint: /v3/configs/config/lock +### **get** -**Required Parameters** +Retrieve -| input | object | Request body. | +- HTTP Method: GET +- Endpoint: /v3/configs/config/secret +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | +| name | string | Name of the secret. | **Return Type** -LockResponse +SecretsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' }; - const result = await sdk.configs.lock(input); + const result = await sdk.secrets.get('PROJECT_NAME', 'CONFIG_NAME', 'SECRET_NAME'); console.log(result); })(); ``` -### **unlock** -Unlock -- HTTP Method: POST -- Endpoint: /v3/configs/config/unlock +### **delete** -**Required Parameters** +Delete -| input | object | Request body. | +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/secret +**Required Parameters** +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | +| name | string | Name of the secret. | **Return Type** -UnlockResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { config: 'CONFIG_NAME', project: 'PROJECT_NAME' }; - const result = await sdk.configs.unlock(input); + const result = await sdk.secrets.delete('PROJECT_NAME', 'CONFIG_NAME', 'SECRET_NAME'); console.log(result); })(); ``` -### **addTrustedIp** -Add -- HTTP Method: POST -- Endpoint: /v3/configs/config/trusted_ips +### **download** + +Download + +- HTTP Method: GET +- Endpoint: /v3/configs/config/secrets/download **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | | -| config | string | | -| input | object | Request body. | +| Name | Type | Description | +| :------ | :----- | :------------------------------------------------------------------------------- | +| project | string | Unique identifier for the project object. Not required if using a Service Token. | +| config | string | Name of the config object. Not required if using a Service Token. | +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :-------------------- | :------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | +| format | [Format](/src/models/README.md#format) | | +| nameTransformer | [NameTransformer](/src/models/README.md#nametransformer) | Transform secret names to a different case | +| includeDynamicSecrets | boolean | Whether or not to issue leases and include dynamic secret values for the config | +| dynamicSecretsTtlSec | number | The number of seconds until dynamic leases expire. Must be used with `include_dynamic_secrets`. Defaults to 1800 (30 minutes). | +| secrets | string | Comma-delimited list of secrets to include in the download. Defaults to all secrets if left unspecified. | **Return Type** -AddTrustedIpResponse +DownloadResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { ip: 'ip' }; - const result = await sdk.configs.addTrustedIp(input, 'project', 'config'); + const result = await sdk.secrets.download('project', 'config', { + format: 'json', + nameTransformer: 'camel', + includeDynamicSecrets: true, + dynamicSecretsTtlSec: 1800, + secrets: 'secrets', + }); console.log(result); })(); ``` -### **listTrustedIps** -List -- HTTP Method: GET -- Endpoint: /v3/configs/config/trusted_ips +### **updateNote** -**Required Parameters** +Update Note -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | | -| config | string | | +- HTTP Method: POST +- Endpoint: /v3/configs/config/secrets/note +**Required Parameters** +| input | object | Request body. | **Return Type** -ListTrustedIpsResponse +UpdateNoteResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.configs.listTrustedIps('project', 'config'); + const input = { + config: 'config', + note: 'YOUR_NOTE', + project: 'PROJECT_NAME', + secret: 'SECRET_NAME', + }; + const result = await sdk.secrets.updateNote(input); console.log(result); })(); ``` -### **deleteTrustedIp** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/configs/config/trusted_ips +### **names** + +List Names + +- HTTP Method: GET +- Endpoint: /v3/configs/config/secrets/names **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | | -| config | string | | -| input | object | Request body. | +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | +| project | string | Unique identifier for the project object. | +| config | string | Name of the config object. | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :-------------------- | :------ | :------------------------------------------------------------------------------ | +| includeDynamicSecrets | boolean | Whether or not to issue leases and include dynamic secret values for the config | +| includeManagedSecrets | boolean | Whether to include Doppler's auto-generated (managed) secrets | **Return Type** -Returns a dict object. +NamesResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { ip: 'ip' }; - const result = await sdk.configs.deleteTrustedIp(input, 'project', 'config'); + const result = await sdk.secrets.names('PROJECT_NAME', 'CONFIG_NAME', { + includeDynamicSecrets: true, + includeManagedSecrets: true, + }); console.log(result); })(); ``` +### **update** -### **retrieve** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/logs/log +Update + +- HTTP Method: POST +- Endpoint: /v3/workplace **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| log | string | Unique identifier for the log object. | +| input | object | Request body. | + +**Return Type** + +WorkplaceUpdateResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { billing_email: 'billing_email', name: 'name', security_email: 'security_email' }; + const result = await sdk.workplace.update(input); + console.log(result); +})(); + +``` + +### **get** +Retrieve +- HTTP Method: GET +- Endpoint: /v3/workplace **Return Type** -RetrieveResponse +WorkplaceGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.activityLogs.retrieve('LOG_ID'); + const result = await sdk.workplace.get(); console.log(result); })(); ``` ### **list** + List + - HTTP Method: GET - Endpoint: /v3/logs - **Optional Parameters** Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | string | Page number | +| Name | Type | Description | +| :------ | :----- | :------------- | +| page | string | Page number | | perPage | number | Items per page | - **Return Type** ActivityLogsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -1411,66 +1517,80 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` +### **retrieve** -### **update** -Update -- HTTP Method: POST -- Endpoint: /v3/workplace - -**Required Parameters** +Retrieve -| input | object | Request body. | +- HTTP Method: GET +- Endpoint: /v3/logs/log +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :------------------------------------ | +| log | string | Unique identifier for the log object. | **Return Type** -WorkplaceUpdateResponse +RetrieveResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { billing_email: 'billing_email', name: 'name', security_email: 'security_email' }; - const result = await sdk.workplace.update(input); + const result = await sdk.activityLogs.retrieve('LOG_ID'); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/workplace +### **delete** + +Delete + +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/tokens/token +**Required Parameters** + +| input | object | Request body. | **Return Type** -WorkplaceGetResponse +DeleteResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplace.get(); + const input = { + config: 'CONFIG_NAME', + project: 'PROJECT_NAME', + slug: 'TOKEN_SLUG', + token: 'TOKEN_VALUE', + }; + const result = await sdk.serviceTokens.delete(input); console.log(result); })(); ``` - ### **create** + Create + - HTTP Method: POST - Endpoint: /v3/configs/config/tokens @@ -1478,15 +1598,14 @@ Create | input | object | Request body. | - - **Return Type** ServiceTokensCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -1496,7 +1615,7 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); const input = { access: 'read', config: 'CONFIG_NAME', - expire_at: '1927-01-04T13:49:20.0Z', + expire_at: '1908-01-12T01:17:11.0Z', name: 'TOKEN_NAME', project: 'PROJECT_NAME', }; @@ -1507,26 +1626,27 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` ### **list** + List + - HTTP Method: GET - Endpoint: /v3/configs/config/tokens **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| +| Name | Type | Description | +| :------ | :----- | :---------------------------------------- | | project | string | Unique identifier for the project object. | -| config | string | Name of the config object. | - - +| config | string | Name of the config object. | **Return Type** ServiceTokensListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; @@ -1539,1513 +1659,2035 @@ const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/configs/config/tokens/token +### **getUser** + +Workplace User + +- HTTP Method: GET +- Endpoint: /v3/workplace/users/{workplace_user_id} **Required Parameters** -| input | object | Request body. | +| Name | Type | Description | +| :-------------- | :----- | :--------------------------- | +| workplaceUserId | string | The ID of the workplace user | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------- | :------ | :--------------------------------------------------------------------------------------------------------------- | +| settings | boolean | If true, the api will return more information if the user has e.g. SAML enabled and/or Multi Factor Auth enabled | **Return Type** -DeleteResponse +GetUserResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - config: 'CONFIG_NAME', - project: 'PROJECT_NAME', - slug: 'TOKEN_SLUG', - token: 'TOKEN_VALUE', - }; - const result = await sdk.serviceTokens.delete(input); + const result = await sdk.audit.getUser('workplace_user_id', { settings: true }); console.log(result); })(); ``` +### **revokeLease** -### **getUser** -Workplace User -- HTTP Method: GET -- Endpoint: /v3/workplace/users/{workplace_user_id} +Revoke Lease + +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/dynamic_secrets/dynamic_secret/leases/lease **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| workplaceUserId | string | The ID of the workplace user | +| input | object | Request body. | -**Optional Parameters** +**Return Type** -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +RevokeLeaseResponse -| Name | Type| Description | -| :-------- | :----------| :----------| -| settings | boolean | If true, the api will return more information if the user has e.g. SAML enabled and/or Multi Factor Auth enabled | +**Example Usage Code Snippet** +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; -**Return Type** +const DOPPLERSDK_ACCESS_TOKEN = ''; -GetUserResponse +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { + config: 'config', + dynamic_secret: 'dynamic_secret', + project: 'project', + slug: 'slug', + }; + const result = await sdk.dynamicSecrets.revokeLease(input); + console.log(result); +})(); + +``` + +### **issueLease** + +Issue Lease + +- HTTP Method: POST +- Endpoint: /v3/configs/config/dynamic_secrets/dynamic_secret/leases + +**Required Parameters** + +| input | object | Request body. | + +**Return Type** + +IssueLeaseResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { + config: 'config', + dynamic_secret: 'dynamic_secret', + project: 'project', + ttl_sec: -46828653, + }; + const result = await sdk.dynamicSecrets.issueLease(input); + console.log(result); +})(); + +``` + +### **revoke** + +Revoke + +- HTTP Method: POST +- Endpoint: /v3/auth/revoke + +**Required Parameters** + +| input | object | Request body. | + +**Return Type** + +Returns a dict object. + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { token: 'token' }; + const result = await sdk.auth.revoke(input); + console.log(result); +})(); + +``` + +### **me** + +Me + +- HTTP Method: GET +- Endpoint: /v3/me + +**Return Type** + +MeResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const result = await sdk.auth.me(); + console.log(result); +})(); + +``` + +### **get** + +Retrieve + +- HTTP Method: GET +- Endpoint: /v3/integrations/integration + +**Required Parameters** + +| Name | Type | Description | +| :---------- | :----- | :------------------- | +| integration | string | The integration slug | + +**Return Type** + +IntegrationsGetResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const result = await sdk.integrations.get('integration'); + console.log(result); +})(); + +``` + +### **delete** + +Delete + +- HTTP Method: DELETE +- Endpoint: /v3/integrations/integration + +**Required Parameters** + +| Name | Type | Description | +| :---------- | :----- | :------------------------------------ | +| integration | string | The slug of the integration to delete | + +**Return Type** + +IntegrationsDeleteResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const result = await sdk.integrations.delete('integration'); + console.log(result); +})(); + +``` + +### **update** + +Update + +- HTTP Method: PUT +- Endpoint: /v3/integrations/integration + +**Required Parameters** + +| Name | Type | Description | +| :---------- | :----- | :------------------------------------ | +| integration | string | The slug of the integration to update | +| input | object | Request body. | + +**Return Type** + +IntegrationsUpdateResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { data: 'data', name: 'name' }; + const result = await sdk.integrations.update(input, 'integration'); + console.log(result); +})(); + +``` + +### **create** + +Create + +- HTTP Method: POST +- Endpoint: /v3/integrations + +**Required Parameters** + +| input | object | Request body. | + +**Return Type** + +IntegrationsCreateResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { data: {}, name: 'name', type_: 'type' }; + const result = await sdk.integrations.create(input); + console.log(result); +})(); + +``` + +### **list** + +List + +- HTTP Method: GET +- Endpoint: /v3/integrations + +**Return Type** + +IntegrationsListResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const result = await sdk.integrations.list(); + console.log(result); +})(); + +``` + +### **create** + +Create + +- HTTP Method: POST +- Endpoint: /v3/configs/config/syncs + +**Required Parameters** + +| Name | Type | Description | +| :------ | :----- | :--------------- | +| project | string | The project slug | +| config | string | The config slug | +| input | object | Request body. | + +**Return Type** + +SyncsCreateResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { + await_initial_sync: true, + data: {}, + import_option: 'none', + integration: 'integration', + }; + const result = await sdk.syncs.create(input, 'project', 'config'); + console.log(result); +})(); + +``` + +### **get** + +Retrieve + +- HTTP Method: GET +- Endpoint: /v3/configs/config/syncs/sync + +**Required Parameters** + +| Name | Type | Description | +| :------ | :----- | :--------------- | +| project | string | The project slug | +| config | string | The config slug | +| sync | string | The sync slug | + +**Return Type** + +SyncsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.audit.getUser('workplace_user_id', { settings: true }); + const result = await sdk.syncs.get('project', 'config', 'sync'); console.log(result); })(); ``` +### **delete** -### **issueLease** -Issue Lease -- HTTP Method: POST -- Endpoint: /v3/configs/config/dynamic_secrets/dynamic_secret/leases - -**Required Parameters** +Delete -| input | object | Request body. | +- HTTP Method: DELETE +- Endpoint: /v3/configs/config/syncs/sync +**Required Parameters** +| Name | Type | Description | +| :--------------- | :------ | :------------------------------------------------------------------- | +| project | string | The project slug | +| config | string | The config slug | +| sync | string | The sync slug | +| deleteFromTarget | boolean | Whether or not to delete the synced data from the target integration | **Return Type** -IssueLeaseResponse +SyncsDeleteResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - config: 'config', - dynamic_secret: 'dynamic_secret', - project: 'project', - ttl_sec: -59680129, - }; - const result = await sdk.dynamicSecrets.issueLease(input); + const result = await sdk.syncs.delete('project', 'config', 'sync', true); console.log(result); })(); ``` -### **revokeLease** -Revoke Lease -- HTTP Method: DELETE -- Endpoint: /v3/configs/config/dynamic_secrets/dynamic_secret/leases/lease +### **create** -**Required Parameters** +Create -| input | object | Request body. | +- HTTP Method: POST +- Endpoint: /v3/workplace/roles +**Required Parameters** +| input | object | Request body. | **Return Type** -RevokeLeaseResponse +WorkplaceRolesCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - config: 'config', - dynamic_secret: 'dynamic_secret', - project: 'project', - slug: 'slug', - }; - const result = await sdk.dynamicSecrets.revokeLease(input); + const input = { name: 'name', permissions: ['sunt', 'deserunt ad Lorem nisi'] }; + const result = await sdk.workplaceRoles.create(input); console.log(result); })(); ``` +### **list** -### **revoke** -Revoke -- HTTP Method: POST -- Endpoint: /v3/auth/revoke - -**Required Parameters** - -| input | object | Request body. | - +List +- HTTP Method: GET +- Endpoint: /v3/workplace/roles **Return Type** -Returns a dict object. +WorkplaceRolesListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { token: 'token' }; - const result = await sdk.auth.revoke(input); + const result = await sdk.workplaceRoles.list(); console.log(result); })(); ``` -### **me** -Me +### **get** + +Retrieve + - HTTP Method: GET -- Endpoint: /v3/me +- Endpoint: /v3/workplace/roles/role/{role} + +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :--------------------------- | +| role | string | The role's unique identifier | **Return Type** -MeResponse +WorkplaceRolesGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.auth.me(); + const result = await sdk.workplaceRoles.get('role'); console.log(result); })(); ``` +### **update** -### **create** -Create -- HTTP Method: POST -- Endpoint: /v3/integrations - -**Required Parameters** +Update -| input | object | Request body. | +- HTTP Method: PATCH +- Endpoint: /v3/workplace/roles/role/{role} +**Required Parameters** +| Name | Type | Description | +| :---- | :----- | :------------------------------------------------------------------------- | +| role | string | The role's unique identifier, which is the initial name the role was given | +| input | object | Request body. | **Return Type** -IntegrationsCreateResponse +WorkplaceRolesUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { data: {}, name: 'name', type_: 'type' }; - const result = await sdk.integrations.create(input); + const input = { name: 'name', permissions: ['sint consequat', 'dolor aute esse adipisicing'] }; + const result = await sdk.workplaceRoles.update(input, 'role'); console.log(result); })(); ``` -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/integrations +### **delete** + +Delete + +- HTTP Method: DELETE +- Endpoint: /v3/workplace/roles/role/{role} + +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :--------------------------- | +| role | string | The role's unique identifier | **Return Type** -IntegrationsListResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.integrations.list(); + const result = await sdk.workplaceRoles.delete('role'); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/integrations/integration - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| integration | string | The integration slug | +### **listPermissions** +List Permissions +- HTTP Method: GET +- Endpoint: /v3/workplace/permissions **Return Type** -IntegrationsGetResponse +ListPermissionsResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.integrations.get('integration'); + const result = await sdk.workplaceRoles.listPermissions(); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/integrations/integration +### **get** -**Required Parameters** +Retrieve -| Name | Type| Description | -| :-------- | :----------| :----------| -| integration | string | The slug of the integration to delete | +- HTTP Method: GET +- Endpoint: /v3/projects/roles/role/{role} +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :--------------------------- | +| role | string | The role's unique identifier | **Return Type** -IntegrationsDeleteResponse +ProjectRolesGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.integrations.delete('integration'); + const result = await sdk.projectRoles.get('role'); console.log(result); })(); ``` ### **update** -Update -- HTTP Method: PUT -- Endpoint: /v3/integrations/integration -**Required Parameters** +Update -| Name | Type| Description | -| :-------- | :----------| :----------| -| integration | string | The slug of the integration to update | -| input | object | Request body. | +- HTTP Method: PATCH +- Endpoint: /v3/projects/roles/role/{role} +**Required Parameters** +| Name | Type | Description | +| :---- | :----- | :--------------------------- | +| role | string | The role's unique identifier | +| input | object | Request body. | **Return Type** -IntegrationsUpdateResponse +ProjectRolesUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { data: 'data', name: 'name' }; - const result = await sdk.integrations.update(input, 'integration'); + const input = { name: 'name', permissions: ['cupidatat laborum Ut proident amet', 'anim ut'] }; + const result = await sdk.projectRoles.update(input, 'role'); console.log(result); })(); ``` +### **delete** -### **create** -Create -- HTTP Method: POST -- Endpoint: /v3/configs/config/syncs - -**Required Parameters** +Delete -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project slug | -| config | string | The config slug | -| input | object | Request body. | +- HTTP Method: DELETE +- Endpoint: /v3/projects/roles/role/{role} +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :--------------------------- | +| role | string | The role's unique identifier | **Return Type** -SyncsCreateResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { data: {}, import_option: 'none', integration: 'integration' }; - const result = await sdk.syncs.create(input, 'project', 'config'); + const result = await sdk.projectRoles.delete('role'); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/configs/config/syncs/sync +### **create** -**Required Parameters** +Create -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project slug | -| config | string | The config slug | -| sync | string | The sync slug | +- HTTP Method: POST +- Endpoint: /v3/projects/roles +**Required Parameters** +| input | object | Request body. | **Return Type** -SyncsGetResponse +ProjectRolesCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.syncs.get('project', 'config', 'sync'); + const input = { + name: 'name', + permissions: ['Lorem ea quis commodo occaecat', 'qui voluptate et consectetur dolor'], + }; + const result = await sdk.projectRoles.create(input); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/configs/config/syncs/sync - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | The project slug | -| config | string | The config slug | -| sync | string | The sync slug | -| deleteFromTarget | boolean | Whether or not to delete the synced data from the target integration | +### **list** +List +- HTTP Method: GET +- Endpoint: /v3/projects/roles **Return Type** -SyncsDeleteResponse +ProjectRolesListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.syncs.delete('project', 'config', 'sync', true); + const result = await sdk.projectRoles.list(); console.log(result); })(); ``` +### **listPermissions** -### **create** -Create -- HTTP Method: POST -- Endpoint: /v3/workplace/roles +List Permissions +- HTTP Method: GET +- Endpoint: /v3/projects/permissions **Return Type** -WorkplaceRolesCreateResponse +ProjectRolesListPermissionsResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplaceRoles.create(); + const result = await sdk.projectRoles.listPermissions(); console.log(result); })(); ``` -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/workplace/roles +### **add** +Add + +- HTTP Method: POST +- Endpoint: /v3/projects/project/members + +**Required Parameters** + +| Name | Type | Description | +| :------ | :----- | :------------ | +| project | string | Project slug | +| input | object | Request body. | **Return Type** -WorkplaceRolesListResponse +AddResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplaceRoles.list(); + const input = { + environments: ['laborum elit enim cillum', 'consequat quis'], + role: 'role', + slug: 'slug', + type_: 'group', + }; + const result = await sdk.projectMembers.add(input, 'project'); console.log(result); })(); ``` -### **listPermissions** -List Permissions +### **list** + +List + - HTTP Method: GET -- Endpoint: /v3/workplace/permissions +- Endpoint: /v3/projects/project/members + +**Required Parameters** + +| Name | Type | Description | +| :------ | :----- | :----------- | +| project | string | Project slug | + +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :---------- | +| page | number | | +| perPage | number | | **Return Type** -ListPermissionsResponse +ProjectMembersListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplaceRoles.listPermissions(); + const result = await sdk.projectMembers.list('project', { page: 1, perPage: 20 }); console.log(result); })(); ``` ### **get** + Retrieve + - HTTP Method: GET -- Endpoint: /v3/workplace/roles/role/{role} +- Endpoint: /v3/projects/project/members/member/{type}/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| role | string | The role's unique identifier | - - +| Name | Type | Description | +| :------ | :--------------------------------- | :------------ | +| project | string | Project slug | +| type\_ | [Type](/src/models/README.md#type) | | +| slug | string | Member's slug | **Return Type** -WorkplaceRolesGetResponse +ProjectMembersGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplaceRoles.get('role'); + const result = await sdk.projectMembers.get('project', 'service_account', 'slug'); console.log(result); })(); ``` ### **update** + Update + - HTTP Method: PATCH -- Endpoint: /v3/workplace/roles/role/{role} +- Endpoint: /v3/projects/project/members/member/{type}/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| role | string | The role's unique identifier | - - +| Name | Type | Description | +| :------ | :--------------------------------- | :------------ | +| type\_ | [Type](/src/models/README.md#type) | | +| slug | string | Member's slug | +| project | string | Project slug | +| input | object | Request body. | **Return Type** -WorkplaceRolesUpdateResponse +ProjectMembersUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplaceRoles.update('role'); + const input = { + environments: ['incididunt veniam in dolor', 'qui laborum sint exercitation ut'], + role: 'role', + }; + const result = await sdk.projectMembers.update(input, 'invite', 'slug', 'project'); console.log(result); })(); ``` ### **delete** + Delete + - HTTP Method: DELETE -- Endpoint: /v3/workplace/roles/role/{role} +- Endpoint: /v3/projects/project/members/member/{type}/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| role | string | The role's unique identifier | - - +| Name | Type | Description | +| :------ | :--------------------------------- | :------------ | +| type\_ | [Type](/src/models/README.md#type) | | +| slug | string | Member's slug | +| project | string | Project slug | **Return Type** Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.workplaceRoles.delete('role'); + const result = await sdk.projectMembers.delete('service_account', 'slug', 'project'); console.log(result); })(); ``` +### **list** -### **create** -Create -- HTTP Method: POST -- Endpoint: /v3/projects/roles +List + +- HTTP Method: GET +- Endpoint: /v3/workplace/invites + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} + +| Name | Type | Description | +| :------ | :----- | :---------- | +| page | number | | +| perPage | number | | **Return Type** -ProjectRolesCreateResponse +InvitesListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectRoles.create(); + const result = await sdk.invites.list({ page: 1, perPage: 20 }); console.log(result); })(); ``` -### **list** -List +### **get** + +Retrieve + - HTTP Method: GET -- Endpoint: /v3/projects/roles +- Endpoint: /v3/workplace/service_accounts/service_account/{slug} + +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :-------------------------- | +| slug | string | Slug of the service account | **Return Type** -ProjectRolesListResponse +ServiceAccountsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectRoles.list(); + const result = await sdk.serviceAccounts.get('slug'); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/projects/roles/role/{role} +### **update** -**Required Parameters** +Update -| Name | Type| Description | -| :-------- | :----------| :----------| -| role | string | The role's unique identifier | +- HTTP Method: PATCH +- Endpoint: /v3/workplace/service_accounts/service_account/{slug} +**Required Parameters** +| Name | Type | Description | +| :---- | :----- | :-------------------------- | +| slug | string | Slug of the service account | +| input | object | Request body. | **Return Type** -ProjectRolesGetResponse +ServiceAccountsUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectRoles.get('role'); + const input = { + name: 'name', + workplace_role: { + identifier: 'identifier', + permissions: ['enim irure reprehenderit', 'eiusmod consequat proident veniam'], + }, + }; + const result = await sdk.serviceAccounts.update(input, 'slug'); console.log(result); })(); ``` -### **update** -Update -- HTTP Method: PATCH -- Endpoint: /v3/projects/roles/role/{role} +### **delete** -**Required Parameters** +Delete -| Name | Type| Description | -| :-------- | :----------| :----------| -| role | string | The role's unique identifier | +- HTTP Method: DELETE +- Endpoint: /v3/workplace/service_accounts/service_account/{slug} +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :-------------------------- | +| slug | string | Slug of the service account | **Return Type** -ProjectRolesUpdateResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectRoles.update('role'); + const result = await sdk.serviceAccounts.delete('slug'); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/projects/roles/role/{role} +### **create** -**Required Parameters** +Create -| Name | Type| Description | -| :-------- | :----------| :----------| -| role | string | The role's unique identifier | +- HTTP Method: POST +- Endpoint: /v3/workplace/service_accounts +**Required Parameters** +| input | object | Request body. | **Return Type** -Returns a dict object. +ServiceAccountsCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectRoles.delete('role'); + const input = { + name: 'name', + workplace_role: { + identifier: 'identifier', + permissions: ['do consequat', 'eiusmod quis nostrud nisi laborum'], + }, + }; + const result = await sdk.serviceAccounts.create(input); console.log(result); })(); ``` -### **listPermissions** -List Permissions +### **list** + +List + - HTTP Method: GET -- Endpoint: /v3/projects/permissions +- Endpoint: /v3/workplace/service_accounts + +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :---------- | +| page | number | | +| perPage | number | | **Return Type** -ProjectRolesListPermissionsResponse +ServiceAccountsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectRoles.listPermissions(); + const result = await sdk.serviceAccounts.list({ page: 1, perPage: 20 }); console.log(result); })(); ``` +### **get** -### **add** -Add -- HTTP Method: POST -- Endpoint: /v3/projects/project/members - -**Required Parameters** +Retrieve -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Project slug | -| input | object | Request body. | +- HTTP Method: GET +- Endpoint: /v3/workplace/groups/group/{slug} +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :--------------- | +| slug | string | The group's slug | **Return Type** -AddResponse +GroupsGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - environments: ['culpa cupidatat', 'elit Lorem proident aliquip'], - role: 'role', - slug: 'slug', - type_: 'group', - }; - const result = await sdk.projectMembers.add(input, 'project'); + const result = await sdk.groups.get('slug'); console.log(result); })(); ``` -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/projects/project/members - -**Required Parameters** - -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Project slug | +### **update** -**Optional Parameters** +Update -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +- HTTP Method: PATCH +- Endpoint: /v3/workplace/groups/group/{slug} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | | -| perPage | number | | +**Required Parameters** +| Name | Type | Description | +| :---- | :----- | :--------------- | +| slug | string | The group's slug | +| input | object | Request body. | **Return Type** -ProjectMembersListResponse +GroupsUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectMembers.list('project', { page: 1, perPage: 20 }); + const input = { default_project_role: 'default_project_role', name: 'name' }; + const result = await sdk.groups.update(input, 'slug'); console.log(result); })(); ``` -### **get** -Retrieve -- HTTP Method: GET -- Endpoint: /v3/projects/project/members/member/{type}/{slug} +### **delete** -**Required Parameters** +Delete -| Name | Type| Description | -| :-------- | :----------| :----------| -| project | string | Project slug | -| type | [Type](/src/models/README.md#type) | | -| slug | string | Member's slug | +- HTTP Method: DELETE +- Endpoint: /v3/workplace/groups/group/{slug} +**Required Parameters** +| Name | Type | Description | +| :--- | :----- | :--------------- | +| slug | string | The group's slug | **Return Type** -ProjectMembersGetResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectMembers.get('project', 'group', 'slug'); + const result = await sdk.groups.delete('slug'); console.log(result); })(); ``` -### **update** -Update -- HTTP Method: PATCH -- Endpoint: /v3/projects/project/members/member/{type}/{slug} +### **create** -**Required Parameters** +Create -| Name | Type| Description | -| :-------- | :----------| :----------| -| type | [Type](/src/models/README.md#type) | | -| slug | string | Member's slug | -| project | string | Project slug | -| input | object | Request body. | +- HTTP Method: POST +- Endpoint: /v3/workplace/groups +**Required Parameters** +| input | object | Request body. | **Return Type** -ProjectMembersUpdateResponse +GroupsCreateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { environments: ['minim', 'irure'], role: 'role' }; - const result = await sdk.projectMembers.update(input, 'invite', 'slug', 'project'); + const input = { default_project_role: 'default_project_role', name: 'name' }; + const result = await sdk.groups.create(input); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/projects/project/members/member/{type}/{slug} +### **list** -**Required Parameters** +List + +- HTTP Method: GET +- Endpoint: /v3/workplace/groups -| Name | Type| Description | -| :-------- | :----------| :----------| -| type | [Type](/src/models/README.md#type) | | -| slug | string | Member's slug | -| project | string | Project slug | +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :---------- | +| page | number | | +| perPage | number | | **Return Type** -Returns a dict object. +GroupsListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.projectMembers.delete('service_account', 'slug', 'project'); + const result = await sdk.groups.list({ page: 1, perPage: 20 }); console.log(result); })(); ``` +### **deleteMember** -### **list** -List -- HTTP Method: GET -- Endpoint: /v3/workplace/invites - - -**Optional Parameters** +Delete Member -Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +- HTTP Method: DELETE +- Endpoint: /v3/workplace/groups/group/{slug}/members/{type}/{member_slug} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | | -| perPage | number | | +**Required Parameters** +| Name | Type | Description | +| :--------- | :--------------------------------------------- | :---------------- | +| slug | string | The group's slug | +| type\_ | [GroupsType](/src/models/README.md#groupstype) | | +| memberSlug | string | The member's slug | **Return Type** -InvitesListResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.invites.list({ page: 1, perPage: 20 }); + const result = await sdk.groups.deleteMember('slug', 'workplace_user', 'member_slug'); console.log(result); })(); ``` +### **addMember** + +Add Member -### **create** -Create - HTTP Method: POST -- Endpoint: /v3/workplace/service_accounts +- Endpoint: /v3/workplace/groups/group/{slug}/members **Required Parameters** -| input | object | Request body. | - - +| Name | Type | Description | +| :---- | :----- | :--------------- | +| slug | string | The group's slug | +| input | object | Request body. | **Return Type** -ServiceAccountsCreateResponse +Returns a dict object. **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - name: 'name', - workplace_role: { - identifier: 'identifier', - permissions: ['commodo ipsum fugiat', 'aute incididunt enim deserunt'], - }, - }; - const result = await sdk.serviceAccounts.create(input); + const input = { slug: 'slug', type_: 'workplace_user' }; + const result = await sdk.groups.addMember(input, 'slug'); console.log(result); })(); ``` ### **list** + List -- HTTP Method: GET -- Endpoint: /v3/workplace/service_accounts +- HTTP Method: GET +- Endpoint: /v3/workplace/users **Optional Parameters** Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | | -| perPage | number | | - +| Name | Type | Description | +| :---- | :----- | :---------------------------------------------------------------------- | +| page | number | The page of users to fetch | +| email | string | Filter results to only include the user with the provided email address | **Return Type** -ServiceAccountsListResponse +UsersListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.serviceAccounts.list({ page: 1, perPage: 20 }); + const result = await sdk.users.list({ page: 1, email: 'email' }); console.log(result); })(); ``` ### **get** + Retrieve + - HTTP Method: GET -- Endpoint: /v3/workplace/service_accounts/service_account/{slug} +- Endpoint: /v3/workplace/users/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | Slug of the service account | - - +| Name | Type | Description | +| :--- | :----- | :----------------------------- | +| slug | string | The slug of the workplace user | **Return Type** -ServiceAccountsGetResponse +UsersGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.serviceAccounts.get('slug'); + const result = await sdk.users.get('slug'); console.log(result); })(); ``` -### **update** -Update -- HTTP Method: PATCH -- Endpoint: /v3/workplace/service_accounts/service_account/{slug} +### **options** -**Required Parameters** +Get Options -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | Slug of the service account | -| input | object | Request body. | +- HTTP Method: GET +- Endpoint: /v3/integrations/integration/options +**Required Parameters** +| Name | Type | Description | +| :---------- | :----- | :------------------- | +| integration | string | The integration slug | **Return Type** -ServiceAccountsUpdateResponse +OptionsResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { - name: 'name', - workplace_role: { - identifier: 'identifier', - permissions: ['dolor pariatur officia', 'labore esse deserunt'], - }, - }; - const result = await sdk.serviceAccounts.update(input, 'slug'); + const result = await sdk.get.options('integration'); console.log(result); })(); ``` -### **delete** -Delete -- HTTP Method: DELETE -- Endpoint: /v3/workplace/service_accounts/service_account/{slug} +### **member** -**Required Parameters** +Retrieve Member -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | Slug of the service account | +- HTTP Method: GET +- Endpoint: /v3/workplace/groups/group/{group_slug}/members/{member_type}/{member_slug} +**Required Parameters** +| Name | Type | Description | +| :--------- | :--------------------------------------------- | :---------------- | +| groupSlug | string | The group's slug | +| memberType | [MemberType](/src/models/README.md#membertype) | | +| memberSlug | string | The member's slug | **Return Type** -Returns a dict object. +MemberResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.serviceAccounts.delete('slug'); + const result = await sdk.retrieve.member('group_slug', 'workplace_user', 'member_slug'); console.log(result); })(); ``` +### **add** + +Add -### **create** -Create - HTTP Method: POST -- Endpoint: /v3/workplace/groups +- Endpoint: /v3/webhooks **Required Parameters** | input | object | Request body. | +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -GroupsCreateResponse +WebhooksAddResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { default_project_role: 'default_project_role', name: 'name' }; - const result = await sdk.groups.create(input); + const result = await sdk.webhooks.add({ project: 'project' }); console.log(result); })(); ``` ### **list** + List -- HTTP Method: GET -- Endpoint: /v3/workplace/groups +- HTTP Method: GET +- Endpoint: /v3/webhooks **Optional Parameters** Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | | -| perPage | number | | - +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -GroupsListResponse +WebhooksListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.groups.list({ page: 1, perPage: 20 }); + const result = await sdk.webhooks.list({ project: 'project' }); console.log(result); })(); ``` ### **get** + Retrieve + - HTTP Method: GET -- Endpoint: /v3/workplace/groups/group/{slug} +- Endpoint: /v3/webhooks/webhook/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | The group's slug | +| Name | Type | Description | +| :--- | :----- | :------------- | +| slug | string | Webhook's slug | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -GroupsGetResponse +WebhooksGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.groups.get('slug'); + const result = await sdk.webhooks.get('slug', { project: 'project' }); console.log(result); })(); ``` ### **update** + Update + - HTTP Method: PATCH -- Endpoint: /v3/workplace/groups/group/{slug} +- Endpoint: /v3/webhooks/webhook/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | The group's slug | -| input | object | Request body. | +| Name | Type | Description | +| :---- | :----- | :------------- | +| slug | string | Webhook's slug | +| input | object | Request body. | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -GroupsUpdateResponse +WebhooksUpdateResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { default_project_role: 'default_project_role', name: 'name' }; - const result = await sdk.groups.update(input, 'slug'); + const result = await sdk.webhooks.update('slug', { project: 'project' }); console.log(result); })(); ``` ### **delete** + Delete + - HTTP Method: DELETE -- Endpoint: /v3/workplace/groups/group/{slug} +- Endpoint: /v3/webhooks/webhook/{slug} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | The group's slug | +| Name | Type | Description | +| :--- | :----- | :------------- | +| slug | string | Webhook's slug | + +**Optional Parameters** +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -Returns a dict object. +WebhooksDeleteResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.groups.delete('slug'); + const result = await sdk.webhooks.delete('slug', { project: 'project' }); console.log(result); })(); ``` -### **addMember** -Add Member +### **enable** + +Enable + - HTTP Method: POST -- Endpoint: /v3/workplace/groups/group/{slug}/members +- Endpoint: /v3/webhooks/webhook/{slug}/enable **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | The group's slug | -| input | object | Request body. | +| Name | Type | Description | +| :--- | :----- | :------------- | +| slug | string | Webhook's slug | +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -Returns a dict object. +EnableResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const input = { slug: 'slug', type_: 'workplace_user' }; - const result = await sdk.groups.addMember(input, 'slug'); + const result = await sdk.webhooks.enable('slug', { project: 'project' }); console.log(result); })(); ``` -### **deleteMember** -Delete Member -- HTTP Method: DELETE -- Endpoint: /v3/workplace/groups/group/{slug}/members/{type}/{member_slug} +### **disable** + +Disable + +- HTTP Method: POST +- Endpoint: /v3/webhooks/webhook/{slug}/disable **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | The group's slug | -| type | [GroupsType](/src/models/README.md#groupstype) | | -| memberSlug | string | The member's slug | +| Name | Type | Description | +| :--- | :----- | :------------- | +| slug | string | Webhook's slug | +**Optional Parameters** + +Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} +| Name | Type | Description | +| :------ | :----- | :----------------- | +| project | string | The project's name | **Return Type** -Returns a dict object. +DisableResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.groups.deleteMember('slug', 'workplace_user', 'member_slug'); + const result = await sdk.webhooks.disable('slug', { project: 'project' }); console.log(result); })(); ``` +### **create** + +Create + +- HTTP Method: POST +- Endpoint: /v3/workplace/service_accounts/service_account/{service_account}/tokens + +**Required Parameters** + +| Name | Type | Description | +| :------------- | :----- | :-------------------------- | +| serviceAccount | string | Slug of the service account | +| input | object | Request body. | + +**Return Type** + +ServiceAccountTokensCreateResponse + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; + +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); + +(async () => { + const input = { expires_at: '1940-05-02T11:24:43.0Z', name: 'name' }; + const result = await sdk.serviceAccountTokens.create(input, 'service_account'); + console.log(result); +})(); + +``` ### **list** + List + - HTTP Method: GET -- Endpoint: /v3/workplace/users +- Endpoint: /v3/workplace/service_accounts/service_account/{service_account}/tokens + +**Required Parameters** +| Name | Type | Description | +| :------------- | :----- | :-------------------------- | +| serviceAccount | string | Slug of the service account | **Optional Parameters** Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'} -| Name | Type| Description | -| :-------- | :----------| :----------| -| page | number | The page of users to fetch | - +| Name | Type | Description | +| :------ | :----- | :---------- | +| page | number | | +| perPage | number | | **Return Type** -UsersListResponse +ServiceAccountTokensListResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.users.list({ page: 1 }); + const result = await sdk.serviceAccountTokens.list('service_account', { page: 1, perPage: 20 }); console.log(result); })(); ``` ### **get** + Retrieve + - HTTP Method: GET -- Endpoint: /v3/workplace/users/{slug} +- Endpoint: /v3/workplace/service_accounts/service_account/{service_account}/tokens/token/{api_token} **Required Parameters** -| Name | Type| Description | -| :-------- | :----------| :----------| -| slug | string | The slug of the workplace user | - - +| Name | Type | Description | +| :------------- | :----- | :-------------------------- | +| serviceAccount | string | Slug of the service account | +| apiToken | string | Slug of the API token | **Return Type** -UsersGetResponse +ServiceAccountTokensGetResponse **Example Usage Code Snippet** + ```Typescript -import { DopplerSDK } from './src'; +import { DopplerSDK } from '@dopplerhq/node-sdk'; const DOPPLERSDK_ACCESS_TOKEN = ''; const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.users.get('slug'); + const result = await sdk.serviceAccountTokens.get('service_account', 'api_token'); console.log(result); })(); ``` +### **delete** + +Delete + +- HTTP Method: DELETE +- Endpoint: /v3/workplace/service_accounts/service_account/{service_account}/tokens/token/{api_token} + +**Required Parameters** + +| Name | Type | Description | +| :------------- | :----- | :-------------------------- | +| serviceAccount | string | Slug of the service account | +| apiToken | string | Slug of the API token | + +**Return Type** + +Returns a dict object. + +**Example Usage Code Snippet** + +```Typescript +import { DopplerSDK } from '@dopplerhq/node-sdk'; + +const DOPPLERSDK_ACCESS_TOKEN = ''; +const sdk = new DopplerSDK({ accessToken: DOPPLERSDK_ACCESS_TOKEN }); +(async () => { + const result = await sdk.serviceAccountTokens.delete('service_account', 'api_token'); + console.log(result); +})(); +``` diff --git a/src/services/activityLogs/ActivityLogs.ts b/src/services/activityLogs/ActivityLogs.ts index 30903ca..784a19f 100644 --- a/src/services/activityLogs/ActivityLogs.ts +++ b/src/services/activityLogs/ActivityLogs.ts @@ -1,40 +1,11 @@ import BaseService from '../../BaseService'; -import { RetrieveResponse } from './models/RetrieveResponse'; import { ActivityLogsListResponse } from './models/ActivityLogsListResponse'; +import { RetrieveResponse } from './models/RetrieveResponse'; import { serializeQuery } from '../../http/QuerySerializer'; export class ActivityLogsService extends BaseService { - /** - * @summary Retrieve - * @description Activity Log - - * @param log Unique identifier for the log object. - * @returns {Promise} - The promise with the result - */ - async retrieve(log: string): Promise { - if (log === undefined) { - throw new Error('The following parameter is required: log, cannot be empty or blank'); - } - const queryParams: string[] = []; - if (log) { - queryParams.push(serializeQuery('form', true, 'log', log)); - } - const urlEndpoint = '/v3/logs/log'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; - const response: any = await this.httpClient.get( - finalUrl, - {}, - { - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as RetrieveResponse; - return responseModel; - } - /** * @summary List * @description Activity Logs @@ -57,8 +28,8 @@ export class ActivityLogsService extends BaseService { queryParams.push(serializeQuery('form', true, 'per_page', perPage)); } const urlEndpoint = '/v3/logs'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -70,4 +41,33 @@ export class ActivityLogsService extends BaseService { const responseModel = response.data as ActivityLogsListResponse; return responseModel; } + + /** + * @summary Retrieve + * @description Activity Log + + * @param log Unique identifier for the log object. + * @returns {Promise} - The promise with the result + */ + async retrieve(log: string): Promise { + if (log === undefined) { + throw new Error('The following parameter is required: log, cannot be empty or blank'); + } + const queryParams: string[] = []; + if (log) { + queryParams.push(serializeQuery('form', true, 'log', log)); + } + const urlEndpoint = '/v3/logs/log'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as RetrieveResponse; + return responseModel; + } } diff --git a/src/services/activityLogs/index.ts b/src/services/activityLogs/index.ts index 3510168..bb64c77 100644 --- a/src/services/activityLogs/index.ts +++ b/src/services/activityLogs/index.ts @@ -1,2 +1,2 @@ -export type { RetrieveResponse } from './models/RetrieveResponse'; export type { ActivityLogsListResponse } from './models/ActivityLogsListResponse'; +export type { RetrieveResponse } from './models/RetrieveResponse'; diff --git a/src/services/audit/Audit.ts b/src/services/audit/Audit.ts index 0cbd8ee..ad83b5f 100644 --- a/src/services/audit/Audit.ts +++ b/src/services/audit/Audit.ts @@ -28,13 +28,13 @@ export class AuditService extends BaseService { let urlEndpoint = '/v3/workplace/users/{workplace_user_id}'; urlEndpoint = urlEndpoint.replace( '{workplace_user_id}', - encodeURIComponent(serializePath('simple', false, workplaceUserId, undefined)), + serializePath('simple', false, workplaceUserId, undefined), ); if (settings) { queryParams.push(serializeQuery('form', true, 'settings', settings)); } - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, diff --git a/src/services/auth/Auth.ts b/src/services/auth/Auth.ts index a1b5b66..96a601c 100644 --- a/src/services/auth/Auth.ts +++ b/src/services/auth/Auth.ts @@ -11,9 +11,9 @@ export class AuthService extends BaseService { * @returns {Promise} - The promise with the result */ async revoke(input: RevokeRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/auth/revoke'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -35,7 +35,7 @@ export class AuthService extends BaseService { */ async me(): Promise { const urlEndpoint = '/v3/me'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, diff --git a/src/services/configLogs/ConfigLogs.ts b/src/services/configLogs/ConfigLogs.ts index 2814dd5..5225769 100644 --- a/src/services/configLogs/ConfigLogs.ts +++ b/src/services/configLogs/ConfigLogs.ts @@ -1,32 +1,25 @@ import BaseService from '../../BaseService'; +import { ConfigLogsGetResponse } from './models/ConfigLogsGetResponse'; import { ConfigLogsListResponse } from './models/ConfigLogsListResponse'; -import { GetResponse } from './models/GetResponse'; import { RollbackResponse } from './models/RollbackResponse'; import { serializeQuery } from '../../http/QuerySerializer'; export class ConfigLogsService extends BaseService { /** - * @summary List - * @description Config Logs + * @summary Retrieve + * @description Config Log * @param project Unique identifier for the project object. * @param config Name of the config object. - * @param optionalParams - Optional parameters - * @param optionalParams.page - Page number - * @param optionalParams.perPage - Items per page - * @returns {Promise} - The promise with the result + * @param log Unique identifier for the log object. + * @returns {Promise} - The promise with the result */ - async list( - project: string, - config: string, - optionalParams: { page?: number; perPage?: number } = {}, - ): Promise { - const { page, perPage } = optionalParams; - if (project === undefined || config === undefined) { + async get(project: string, config: string, log: string): Promise { + if (project === undefined || config === undefined || log === undefined) { throw new Error( - 'The following are required parameters: project,config, cannot be empty or blank', + 'The following are required parameters: project,config,log, cannot be empty or blank', ); } const queryParams: string[] = []; @@ -36,15 +29,11 @@ export class ConfigLogsService extends BaseService { if (config) { queryParams.push(serializeQuery('form', true, 'config', config)); } - if (page) { - queryParams.push(serializeQuery('form', true, 'page', page)); - } - if (perPage) { - queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + if (log) { + queryParams.push(serializeQuery('form', true, 'log', log)); } - const urlEndpoint = '/v3/configs/config/logs'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlEndpoint = '/v3/configs/config/logs/log'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -53,23 +42,30 @@ export class ConfigLogsService extends BaseService { }, true, ); - const responseModel = response.data as ConfigLogsListResponse; + const responseModel = response.data as ConfigLogsGetResponse; return responseModel; } /** - * @summary Retrieve - * @description Config Log + * @summary List + * @description Config Logs * @param project Unique identifier for the project object. * @param config Name of the config object. - * @param log Unique identifier for the log object. - * @returns {Promise} - The promise with the result + * @param optionalParams - Optional parameters + * @param optionalParams.page - Page number + * @param optionalParams.perPage - Items per page + * @returns {Promise} - The promise with the result */ - async get(project: string, config: string, log: string): Promise { - if (project === undefined || config === undefined || log === undefined) { + async list( + project: string, + config: string, + optionalParams: { page?: number; perPage?: number } = {}, + ): Promise { + const { page, perPage } = optionalParams; + if (project === undefined || config === undefined) { throw new Error( - 'The following are required parameters: project,config,log, cannot be empty or blank', + 'The following are required parameters: project,config, cannot be empty or blank', ); } const queryParams: string[] = []; @@ -79,11 +75,15 @@ export class ConfigLogsService extends BaseService { if (config) { queryParams.push(serializeQuery('form', true, 'config', config)); } - if (log) { - queryParams.push(serializeQuery('form', true, 'log', log)); + if (page) { + queryParams.push(serializeQuery('form', true, 'page', page)); } - const urlEndpoint = '/v3/configs/config/logs/log'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + if (perPage) { + queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + } + const urlEndpoint = '/v3/configs/config/logs'; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -92,7 +92,7 @@ export class ConfigLogsService extends BaseService { }, true, ); - const responseModel = response.data as GetResponse; + const responseModel = response.data as ConfigLogsListResponse; return responseModel; } @@ -122,7 +122,7 @@ export class ConfigLogsService extends BaseService { queryParams.push(serializeQuery('form', true, 'log', log)); } const urlEndpoint = '/v3/configs/config/logs/log/rollback'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.post( finalUrl, { project, config, log }, diff --git a/src/services/configLogs/index.ts b/src/services/configLogs/index.ts index 113949c..f38c1d0 100644 --- a/src/services/configLogs/index.ts +++ b/src/services/configLogs/index.ts @@ -1,3 +1,3 @@ +export type { ConfigLogsGetResponse } from './models/ConfigLogsGetResponse'; export type { ConfigLogsListResponse } from './models/ConfigLogsListResponse'; -export type { GetResponse } from './models/GetResponse'; export type { RollbackResponse } from './models/RollbackResponse'; diff --git a/src/services/configs/Configs.ts b/src/services/configs/Configs.ts index 60431f3..665d3b6 100644 --- a/src/services/configs/Configs.ts +++ b/src/services/configs/Configs.ts @@ -1,19 +1,19 @@ import BaseService from '../../BaseService'; -import { ConfigsListResponse } from './models/ConfigsListResponse'; -import { ConfigsCreateResponse } from './models/ConfigsCreateResponse'; -import { ConfigsCreateRequest } from './models/ConfigsCreateRequest'; import { ConfigsGetResponse } from './models/ConfigsGetResponse'; import { ConfigsUpdateResponse } from './models/ConfigsUpdateResponse'; import { DeleteResponse } from '../common/DeleteResponse'; import { ConfigsUpdateRequest } from './models/ConfigsUpdateRequest'; import { ConfigsDeleteRequest } from './models/ConfigsDeleteRequest'; +import { ConfigsListResponse } from './models/ConfigsListResponse'; +import { ConfigsCreateResponse } from './models/ConfigsCreateResponse'; +import { ConfigsCreateRequest } from './models/ConfigsCreateRequest'; +import { UnlockResponse } from './models/UnlockResponse'; +import { UnlockRequest } from './models/UnlockRequest'; import { CloneResponse } from './models/CloneResponse'; import { CloneRequest } from './models/CloneRequest'; import { LockResponse } from './models/LockResponse'; import { LockRequest } from './models/LockRequest'; -import { UnlockResponse } from './models/UnlockResponse'; -import { UnlockRequest } from './models/UnlockRequest'; import { ListTrustedIpsResponse } from './models/ListTrustedIpsResponse'; import { AddTrustedIpResponse } from './models/AddTrustedIpResponse'; import { AddTrustedIpRequest } from './models/AddTrustedIpRequest'; @@ -23,40 +23,28 @@ import { serializeQuery } from '../../http/QuerySerializer'; export class ConfigsService extends BaseService { /** - * @summary List - * @description Fetch all configs. + * @summary Retrieve + * @description Fetch a config's details. - * @param project The project's name - * @param optionalParams - Optional parameters - * @param optionalParams.environment - (optional) the environment from which to list configs - * @param optionalParams.page - Page number - * @param optionalParams.perPage - Items per page - * @returns {Promise} - The promise with the result + * @param project Unique identifier for the project object. + * @param config Name of the config object. + * @returns {Promise} - The promise with the result */ - async list( - project: string, - optionalParams: { environment?: string; page?: number; perPage?: number } = {}, - ): Promise { - const { environment, page, perPage } = optionalParams; - if (project === undefined) { - throw new Error('The following parameter is required: project, cannot be empty or blank'); + async get(project: string, config: string): Promise { + if (project === undefined || config === undefined) { + throw new Error( + 'The following are required parameters: project,config, cannot be empty or blank', + ); } const queryParams: string[] = []; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - if (environment) { - queryParams.push(serializeQuery('form', true, 'environment', environment)); - } - if (page) { - queryParams.push(serializeQuery('form', true, 'page', page)); - } - if (perPage) { - queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + if (config) { + queryParams.push(serializeQuery('form', true, 'config', config)); } - const urlEndpoint = '/v3/configs'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlEndpoint = '/v3/configs/config'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -65,20 +53,20 @@ export class ConfigsService extends BaseService { }, true, ); - const responseModel = response.data as ConfigsListResponse; + const responseModel = response.data as ConfigsGetResponse; return responseModel; } /** - * @summary Create - * @description Create a new branch config. + * @summary Update + * @description Modify an existing config. - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async create(input: ConfigsCreateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + async update(input: ConfigsUpdateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -88,33 +76,68 @@ export class ConfigsService extends BaseService { }, true, ); - const responseModel = response.data as ConfigsCreateResponse; + const responseModel = response.data as ConfigsUpdateResponse; return responseModel; } /** - * @summary Retrieve - * @description Fetch a config's details. + * @summary Delete + * @description Permanently delete the config. - * @param project Unique identifier for the project object. - * @param config Name of the config object. - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async get(project: string, config: string): Promise { - if (project === undefined || config === undefined) { - throw new Error( - 'The following are required parameters: project,config, cannot be empty or blank', - ); + async delete(input: ConfigsDeleteRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.delete( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as DeleteResponse; + return responseModel; + } + + /** + * @summary List + * @description Fetch all configs. + + * @param project The project's name + * @param optionalParams - Optional parameters + * @param optionalParams.environment - (optional) the environment from which to list configs + * @param optionalParams.page - Page number + * @param optionalParams.perPage - Items per page + * @returns {Promise} - The promise with the result + */ + async list( + project: string, + optionalParams: { environment?: string; page?: number; perPage?: number } = {}, + ): Promise { + const { environment, page, perPage } = optionalParams; + if (project === undefined) { + throw new Error('The following parameter is required: project, cannot be empty or blank'); } const queryParams: string[] = []; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - if (config) { - queryParams.push(serializeQuery('form', true, 'config', config)); + if (environment) { + queryParams.push(serializeQuery('form', true, 'environment', environment)); } - const urlEndpoint = '/v3/configs/config'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + if (page) { + queryParams.push(serializeQuery('form', true, 'page', page)); + } + if (perPage) { + queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + } + const urlEndpoint = '/v3/configs'; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -123,20 +146,20 @@ export class ConfigsService extends BaseService { }, true, ); - const responseModel = response.data as ConfigsGetResponse; + const responseModel = response.data as ConfigsListResponse; return responseModel; } /** - * @summary Update - * @description Modify an existing config. + * @summary Create + * @description Create a new branch config. - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async update(input: ConfigsUpdateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + async create(input: ConfigsCreateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -146,21 +169,21 @@ export class ConfigsService extends BaseService { }, true, ); - const responseModel = response.data as ConfigsUpdateResponse; + const responseModel = response.data as ConfigsCreateResponse; return responseModel; } /** - * @summary Delete - * @description Permanently delete the config. + * @summary Unlock + * @description Allow the config to be renamed and/or deleted. - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async delete(input: ConfigsDeleteRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.delete( + async unlock(input: UnlockRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config/unlock'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( finalUrl, input, { @@ -169,7 +192,7 @@ export class ConfigsService extends BaseService { }, true, ); - const responseModel = response.data as DeleteResponse; + const responseModel = response.data as UnlockResponse; return responseModel; } @@ -180,9 +203,9 @@ export class ConfigsService extends BaseService { * @returns {Promise} - The promise with the result */ async clone(input: CloneRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/configs/config/clone'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -203,9 +226,9 @@ export class ConfigsService extends BaseService { * @returns {Promise} - The promise with the result */ async lock(input: LockRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/configs/config/lock'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -219,29 +242,6 @@ export class ConfigsService extends BaseService { return responseModel; } - /** - * @summary Unlock - * @description Allow the config to be renamed and/or deleted. - - * @returns {Promise} - The promise with the result - */ - async unlock(input: UnlockRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config/unlock'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( - finalUrl, - input, - { - ...headers, - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as UnlockResponse; - return responseModel; - } - /** * @summary List @@ -263,7 +263,7 @@ export class ConfigsService extends BaseService { queryParams.push(serializeQuery('form', true, 'config', config)); } const urlEndpoint = '/v3/configs/config/trusted_ips'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -294,7 +294,7 @@ export class ConfigsService extends BaseService { ); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } @@ -302,7 +302,7 @@ export class ConfigsService extends BaseService { queryParams.push(serializeQuery('form', true, 'config', config)); } const urlEndpoint = '/v3/configs/config/trusted_ips'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -334,7 +334,7 @@ export class ConfigsService extends BaseService { ); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } @@ -342,7 +342,7 @@ export class ConfigsService extends BaseService { queryParams.push(serializeQuery('form', true, 'config', config)); } const urlEndpoint = '/v3/configs/config/trusted_ips'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.delete( finalUrl, input, diff --git a/src/services/configs/index.ts b/src/services/configs/index.ts index a836d8c..d3aceb6 100644 --- a/src/services/configs/index.ts +++ b/src/services/configs/index.ts @@ -1,18 +1,18 @@ -export type { ConfigsListResponse } from './models/ConfigsListResponse'; +export type { AddTrustedIpRequest } from './models/AddTrustedIpRequest'; +export type { AddTrustedIpResponse } from './models/AddTrustedIpResponse'; +export type { CloneRequest } from './models/CloneRequest'; +export type { CloneResponse } from './models/CloneResponse'; +export type { ConfigsCreateRequest } from './models/ConfigsCreateRequest'; export type { ConfigsCreateResponse } from './models/ConfigsCreateResponse'; +export type { ConfigsDeleteRequest } from './models/ConfigsDeleteRequest'; export type { ConfigsGetResponse } from './models/ConfigsGetResponse'; +export type { ConfigsListResponse } from './models/ConfigsListResponse'; +export type { ConfigsUpdateRequest } from './models/ConfigsUpdateRequest'; export type { ConfigsUpdateResponse } from './models/ConfigsUpdateResponse'; export type { DeleteResponse } from '../common/DeleteResponse'; -export type { CloneResponse } from './models/CloneResponse'; -export type { LockResponse } from './models/LockResponse'; -export type { UnlockResponse } from './models/UnlockResponse'; +export type { DeleteTrustedIpRequest } from './models/DeleteTrustedIpRequest'; export type { ListTrustedIpsResponse } from './models/ListTrustedIpsResponse'; -export type { AddTrustedIpResponse } from './models/AddTrustedIpResponse'; -export type { ConfigsCreateRequest } from './models/ConfigsCreateRequest'; -export type { ConfigsUpdateRequest } from './models/ConfigsUpdateRequest'; -export type { ConfigsDeleteRequest } from './models/ConfigsDeleteRequest'; -export type { CloneRequest } from './models/CloneRequest'; export type { LockRequest } from './models/LockRequest'; +export type { LockResponse } from './models/LockResponse'; export type { UnlockRequest } from './models/UnlockRequest'; -export type { AddTrustedIpRequest } from './models/AddTrustedIpRequest'; -export type { DeleteTrustedIpRequest } from './models/DeleteTrustedIpRequest'; +export type { UnlockResponse } from './models/UnlockResponse'; diff --git a/src/services/dynamicSecrets/DynamicSecrets.ts b/src/services/dynamicSecrets/DynamicSecrets.ts index 0d93b78..863aa02 100644 --- a/src/services/dynamicSecrets/DynamicSecrets.ts +++ b/src/services/dynamicSecrets/DynamicSecrets.ts @@ -1,22 +1,21 @@ import BaseService from '../../BaseService'; -import { IssueLeaseResponse } from './models/IssueLeaseResponse'; -import { IssueLeaseRequest } from './models/IssueLeaseRequest'; import { RevokeLeaseResponse } from './models/RevokeLeaseResponse'; import { RevokeLeaseRequest } from './models/RevokeLeaseRequest'; +import { IssueLeaseResponse } from './models/IssueLeaseResponse'; +import { IssueLeaseRequest } from './models/IssueLeaseRequest'; export class DynamicSecretsService extends BaseService { /** - * @summary Issue Lease - * @description Issue a lease for a dynamic secret + * @summary Revoke Lease - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async issueLease(input: IssueLeaseRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config/dynamic_secrets/dynamic_secret/leases'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( + async revokeLease(input: RevokeLeaseRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config/dynamic_secrets/dynamic_secret/leases/lease'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.delete( finalUrl, input, { @@ -25,20 +24,21 @@ export class DynamicSecretsService extends BaseService { }, true, ); - const responseModel = response.data as IssueLeaseResponse; + const responseModel = response.data as RevokeLeaseResponse; return responseModel; } /** - * @summary Revoke Lease + * @summary Issue Lease + * @description Issue a lease for a dynamic secret - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async revokeLease(input: RevokeLeaseRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config/dynamic_secrets/dynamic_secret/leases/lease'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.delete( + async issueLease(input: IssueLeaseRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config/dynamic_secrets/dynamic_secret/leases'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( finalUrl, input, { @@ -47,7 +47,7 @@ export class DynamicSecretsService extends BaseService { }, true, ); - const responseModel = response.data as RevokeLeaseResponse; + const responseModel = response.data as IssueLeaseResponse; return responseModel; } } diff --git a/src/services/dynamicSecrets/index.ts b/src/services/dynamicSecrets/index.ts index 57a790e..0ebff70 100644 --- a/src/services/dynamicSecrets/index.ts +++ b/src/services/dynamicSecrets/index.ts @@ -1,4 +1,4 @@ -export type { IssueLeaseResponse } from './models/IssueLeaseResponse'; -export type { RevokeLeaseResponse } from './models/RevokeLeaseResponse'; export type { IssueLeaseRequest } from './models/IssueLeaseRequest'; +export type { IssueLeaseResponse } from './models/IssueLeaseResponse'; export type { RevokeLeaseRequest } from './models/RevokeLeaseRequest'; +export type { RevokeLeaseResponse } from './models/RevokeLeaseResponse'; diff --git a/src/services/environments/Environments.ts b/src/services/environments/Environments.ts index e89d497..8bbf675 100644 --- a/src/services/environments/Environments.ts +++ b/src/services/environments/Environments.ts @@ -1,38 +1,32 @@ import BaseService from '../../BaseService'; -import { EnvironmentsGetResponse } from './models/EnvironmentsGetResponse'; -import { RenameResponse } from './models/RenameResponse'; -import { RenameRequest } from './models/RenameRequest'; import { EnvironmentsListResponse } from './models/EnvironmentsListResponse'; import { EnvironmentsCreateResponse } from './models/EnvironmentsCreateResponse'; import { EnvironmentsCreateRequest } from './models/EnvironmentsCreateRequest'; +import { EnvironmentsGetResponse } from './models/EnvironmentsGetResponse'; +import { RenameResponse } from './models/RenameResponse'; +import { RenameRequest } from './models/RenameRequest'; import { serializeQuery } from '../../http/QuerySerializer'; export class EnvironmentsService extends BaseService { /** - * @summary Retrieve - * @description Environment + * @summary List + * @description Environments * @param project The project's name - * @param environment The environment's slug - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async get(project: string, environment: string): Promise { - if (project === undefined || environment === undefined) { - throw new Error( - 'The following are required parameters: project,environment, cannot be empty or blank', - ); + async list(project: string): Promise { + if (project === undefined) { + throw new Error('The following parameter is required: project, cannot be empty or blank'); } const queryParams: string[] = []; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - if (environment) { - queryParams.push(serializeQuery('form', true, 'environment', environment)); - } - const urlEndpoint = '/v3/environments/environment'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const urlEndpoint = '/v3/environments'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -41,39 +35,32 @@ export class EnvironmentsService extends BaseService { }, true, ); - const responseModel = response.data as EnvironmentsGetResponse; + const responseModel = response.data as EnvironmentsListResponse; return responseModel; } /** - * @summary Rename + * @summary Create * @description Environment * @param project The project's name - * @param environment The environment's slug - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async rename( - input: RenameRequest, + async create( + input: EnvironmentsCreateRequest, project: string, - environment: string, - ): Promise { - if (project === undefined || environment === undefined) { - throw new Error( - 'The following are required parameters: project,environment, cannot be empty or blank', - ); + ): Promise { + if (project === undefined) { + throw new Error('The following parameter is required: project, cannot be empty or blank'); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - if (environment) { - queryParams.push(serializeQuery('form', true, 'environment', environment)); - } - const urlEndpoint = '/v3/environments/environment'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; - const response: any = await this.httpClient.put( + const urlEndpoint = '/v3/environments'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); + const response: any = await this.httpClient.post( finalUrl, input, { @@ -82,19 +69,19 @@ export class EnvironmentsService extends BaseService { }, true, ); - const responseModel = response.data as RenameResponse; + const responseModel = response.data as EnvironmentsCreateResponse; return responseModel; } /** - * @summary Delete + * @summary Retrieve * @description Environment * @param project The project's name * @param environment The environment's slug - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async delete(project: string, environment: string): Promise { + async get(project: string, environment: string): Promise { if (project === undefined || environment === undefined) { throw new Error( 'The following are required parameters: project,environment, cannot be empty or blank', @@ -108,79 +95,92 @@ export class EnvironmentsService extends BaseService { queryParams.push(serializeQuery('form', true, 'environment', environment)); } const urlEndpoint = '/v3/environments/environment'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; - const response: any = await this.httpClient.delete( + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); + const response: any = await this.httpClient.get( finalUrl, - { project, environment }, + {}, { ...this.getAuthorizationHeader(), }, true, ); - const responseModel = response.data; + const responseModel = response.data as EnvironmentsGetResponse; return responseModel; } /** - * @summary List - * @description Environments + * @summary Rename + * @description Environment * @param project The project's name - * @returns {Promise} - The promise with the result + * @param environment The environment's slug + * @returns {Promise} - The promise with the result */ - async list(project: string): Promise { - if (project === undefined) { - throw new Error('The following parameter is required: project, cannot be empty or blank'); + async rename( + input: RenameRequest, + project: string, + environment: string, + ): Promise { + if (project === undefined || environment === undefined) { + throw new Error( + 'The following are required parameters: project,environment, cannot be empty or blank', + ); } const queryParams: string[] = []; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - const urlEndpoint = '/v3/environments'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; - const response: any = await this.httpClient.get( + if (environment) { + queryParams.push(serializeQuery('form', true, 'environment', environment)); + } + const urlEndpoint = '/v3/environments/environment'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); + const response: any = await this.httpClient.put( finalUrl, - {}, + input, { + ...headers, ...this.getAuthorizationHeader(), }, true, ); - const responseModel = response.data as EnvironmentsListResponse; + const responseModel = response.data as RenameResponse; return responseModel; } /** - * @summary Create + * @summary Delete * @description Environment * @param project The project's name - * @returns {Promise} - The promise with the result + * @param environment The environment's slug + * @returns {Promise} - The promise with the result */ - async create( - input: EnvironmentsCreateRequest, - project: string, - ): Promise { - if (project === undefined) { - throw new Error('The following parameter is required: project, cannot be empty or blank'); + async delete(project: string, environment: string): Promise { + if (project === undefined || environment === undefined) { + throw new Error( + 'The following are required parameters: project,environment, cannot be empty or blank', + ); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - const urlEndpoint = '/v3/environments'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; - const response: any = await this.httpClient.post( + if (environment) { + queryParams.push(serializeQuery('form', true, 'environment', environment)); + } + const urlEndpoint = '/v3/environments/environment'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); + const response: any = await this.httpClient.delete( finalUrl, - input, + { project, environment }, { - ...headers, ...this.getAuthorizationHeader(), }, true, ); - const responseModel = response.data as EnvironmentsCreateResponse; + const responseModel = response.data; return responseModel; } } diff --git a/src/services/environments/index.ts b/src/services/environments/index.ts index 256d17c..b9aefd7 100644 --- a/src/services/environments/index.ts +++ b/src/services/environments/index.ts @@ -1,6 +1,6 @@ +export type { EnvironmentsCreateRequest } from './models/EnvironmentsCreateRequest'; +export type { EnvironmentsCreateResponse } from './models/EnvironmentsCreateResponse'; export type { EnvironmentsGetResponse } from './models/EnvironmentsGetResponse'; -export type { RenameResponse } from './models/RenameResponse'; export type { EnvironmentsListResponse } from './models/EnvironmentsListResponse'; -export type { EnvironmentsCreateResponse } from './models/EnvironmentsCreateResponse'; export type { RenameRequest } from './models/RenameRequest'; -export type { EnvironmentsCreateRequest } from './models/EnvironmentsCreateRequest'; +export type { RenameResponse } from './models/RenameResponse'; diff --git a/src/services/get/Get.ts b/src/services/get/Get.ts new file mode 100644 index 0000000..e2049d9 --- /dev/null +++ b/src/services/get/Get.ts @@ -0,0 +1,35 @@ +import BaseService from '../../BaseService'; + +import { OptionsResponse } from './models/OptionsResponse'; + +import { serializeQuery } from '../../http/QuerySerializer'; + +export class GetService extends BaseService { + /** + * @summary Get Options + + * @param integration The integration slug + * @returns {Promise} - The promise with the result + */ + async options(integration: string): Promise { + if (integration === undefined) { + throw new Error('The following parameter is required: integration, cannot be empty or blank'); + } + const queryParams: string[] = []; + if (integration) { + queryParams.push(serializeQuery('form', true, 'integration', integration)); + } + const urlEndpoint = '/v3/integrations/integration/options'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as OptionsResponse; + return responseModel; + } +} diff --git a/src/services/get/index.ts b/src/services/get/index.ts new file mode 100644 index 0000000..8844777 --- /dev/null +++ b/src/services/get/index.ts @@ -0,0 +1 @@ +export type { OptionsResponse } from './models/OptionsResponse'; diff --git a/src/services/get/models/OptionsResponse.ts b/src/services/get/models/OptionsResponse.ts new file mode 100644 index 0000000..ab1ee8b --- /dev/null +++ b/src/services/get/models/OptionsResponse.ts @@ -0,0 +1 @@ +export interface OptionsResponse {} diff --git a/src/services/groups/Groups.ts b/src/services/groups/Groups.ts index 7a8bb6d..aec5022 100644 --- a/src/services/groups/Groups.ts +++ b/src/services/groups/Groups.ts @@ -1,74 +1,17 @@ import BaseService from '../../BaseService'; -import { GroupsListResponse } from './models/GroupsListResponse'; -import { GroupsCreateResponse } from './models/GroupsCreateResponse'; -import { GroupsCreateRequest } from './models/GroupsCreateRequest'; import { GroupsGetResponse } from './models/GroupsGetResponse'; import { GroupsUpdateResponse } from './models/GroupsUpdateResponse'; import { GroupsUpdateRequest } from './models/GroupsUpdateRequest'; -import { AddMemberRequest } from './models/AddMemberRequest'; +import { GroupsListResponse } from './models/GroupsListResponse'; +import { GroupsCreateResponse } from './models/GroupsCreateResponse'; +import { GroupsCreateRequest } from './models/GroupsCreateRequest'; import { GroupsType } from './models/GroupsType'; +import { AddMemberRequest } from './models/AddMemberRequest'; import { serializeQuery, serializePath } from '../../http/QuerySerializer'; export class GroupsService extends BaseService { - /** - * @summary List - - * @param optionalParams - Optional parameters - * @param optionalParams.page - Needed input variable - * @param optionalParams.perPage - Needed input variable - * @returns {Promise} - The promise with the result - */ - async list( - optionalParams: { page?: number; perPage?: number } = {}, - ): Promise { - const { page, perPage } = optionalParams; - - const queryParams: string[] = []; - if (page) { - queryParams.push(serializeQuery('form', true, 'page', page)); - } - if (perPage) { - queryParams.push(serializeQuery('form', true, 'per_page', perPage)); - } - const urlEndpoint = '/v3/workplace/groups'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; - const response: any = await this.httpClient.get( - finalUrl, - {}, - { - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as GroupsListResponse; - return responseModel; - } - - /** - * @summary Create - - * @returns {Promise} - The promise with the result - */ - async create(input: GroupsCreateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/workplace/groups'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( - finalUrl, - input, - { - ...headers, - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as GroupsCreateResponse; - return responseModel; - } - /** * @summary Retrieve @@ -80,11 +23,8 @@ export class GroupsService extends BaseService { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/groups/group/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -107,13 +47,10 @@ export class GroupsService extends BaseService { if (slug === undefined) { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; let urlEndpoint = '/v3/workplace/groups/group/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.patch( finalUrl, input, @@ -138,11 +75,8 @@ export class GroupsService extends BaseService { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/groups/group/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.delete( finalUrl, {}, @@ -156,22 +90,49 @@ export class GroupsService extends BaseService { } /** - * @summary Add Member + * @summary List - * @param slug The group's slug - * @returns {Promise} - The promise with the result + * @param optionalParams - Optional parameters + * @param optionalParams.page - Needed input variable + * @param optionalParams.perPage - Needed input variable + * @returns {Promise} - The promise with the result */ - async addMember(input: AddMemberRequest, slug: string): Promise { - if (slug === undefined) { - throw new Error('The following parameter is required: slug, cannot be empty or blank'); + async list( + optionalParams: { page?: number; perPage?: number } = {}, + ): Promise { + const { page, perPage } = optionalParams; + + const queryParams: string[] = []; + if (page) { + queryParams.push(serializeQuery('form', true, 'page', page)); } - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - let urlEndpoint = '/v3/workplace/groups/group/{slug}/members'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), + if (perPage) { + queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + } + const urlEndpoint = '/v3/workplace/groups'; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const responseModel = response.data as GroupsListResponse; + return responseModel; + } + + /** + * @summary Create + + * @returns {Promise} - The promise with the result + */ + async create(input: GroupsCreateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/workplace/groups'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -181,7 +142,7 @@ export class GroupsService extends BaseService { }, true, ); - const responseModel = response.data; + const responseModel = response.data as GroupsCreateResponse; return responseModel; } @@ -193,26 +154,20 @@ export class GroupsService extends BaseService { * @param memberSlug The member's slug * @returns {Promise} - The promise with the result */ - async deleteMember(slug: string, type: GroupsType, memberSlug: string): Promise { - if (slug === undefined || type === undefined || memberSlug === undefined) { + async deleteMember(slug: string, type_: GroupsType, memberSlug: string): Promise { + if (slug === undefined || type_ === undefined || memberSlug === undefined) { throw new Error( - 'The following are required parameters: slug,type,memberSlug, cannot be empty or blank', + 'The following are required parameters: slug,type_,memberSlug, cannot be empty or blank', ); } let urlEndpoint = '/v3/workplace/groups/group/{slug}/members/{type}/{member_slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - urlEndpoint = urlEndpoint.replace( - '{type_}', - encodeURIComponent(serializePath('simple', false, type, undefined)), - ); + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + urlEndpoint = urlEndpoint.replace('{type}', serializePath('simple', false, type_, undefined)); urlEndpoint = urlEndpoint.replace( '{member_slug}', - encodeURIComponent(serializePath('simple', false, memberSlug, undefined)), + serializePath('simple', false, memberSlug, undefined), ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.delete( finalUrl, {}, @@ -224,4 +179,31 @@ export class GroupsService extends BaseService { const responseModel = response.data; return responseModel; } + + /** + * @summary Add Member + + * @param slug The group's slug + * @returns {Promise} - The promise with the result + */ + async addMember(input: AddMemberRequest, slug: string): Promise { + if (slug === undefined) { + throw new Error('The following parameter is required: slug, cannot be empty or blank'); + } + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + let urlEndpoint = '/v3/workplace/groups/group/{slug}/members'; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data; + return responseModel; + } } diff --git a/src/services/groups/index.ts b/src/services/groups/index.ts index 0e04ca5..f2749aa 100644 --- a/src/services/groups/index.ts +++ b/src/services/groups/index.ts @@ -1,8 +1,8 @@ -export type { GroupsType } from './models/GroupsType'; -export type { GroupsListResponse } from './models/GroupsListResponse'; +export type { AddMemberRequest } from './models/AddMemberRequest'; +export type { GroupsCreateRequest } from './models/GroupsCreateRequest'; export type { GroupsCreateResponse } from './models/GroupsCreateResponse'; export type { GroupsGetResponse } from './models/GroupsGetResponse'; -export type { GroupsUpdateResponse } from './models/GroupsUpdateResponse'; -export type { GroupsCreateRequest } from './models/GroupsCreateRequest'; +export type { GroupsListResponse } from './models/GroupsListResponse'; +export type { GroupsType } from './models/GroupsType'; export type { GroupsUpdateRequest } from './models/GroupsUpdateRequest'; -export type { AddMemberRequest } from './models/AddMemberRequest'; +export type { GroupsUpdateResponse } from './models/GroupsUpdateResponse'; diff --git a/src/services/groups/models/AddMemberRequest.ts b/src/services/groups/models/AddMemberRequest.ts index 2e3e80f..a61d988 100644 --- a/src/services/groups/models/AddMemberRequest.ts +++ b/src/services/groups/models/AddMemberRequest.ts @@ -1,9 +1,9 @@ -type Type = 'workplace_user'; +type Type_ = 'workplace_user'; export interface AddMemberRequest { /** * The member's slug */ slug: string; - type_: Type; + type_: Type_; } diff --git a/src/services/integrations/Integrations.ts b/src/services/integrations/Integrations.ts index 327a726..3ff66b0 100644 --- a/src/services/integrations/Integrations.ts +++ b/src/services/integrations/Integrations.ts @@ -1,60 +1,16 @@ import BaseService from '../../BaseService'; -import { IntegrationsListResponse } from './models/IntegrationsListResponse'; -import { IntegrationsCreateResponse } from './models/IntegrationsCreateResponse'; -import { IntegrationsCreateRequest } from './models/IntegrationsCreateRequest'; import { IntegrationsGetResponse } from './models/IntegrationsGetResponse'; import { IntegrationsUpdateResponse } from './models/IntegrationsUpdateResponse'; import { IntegrationsDeleteResponse } from './models/IntegrationsDeleteResponse'; import { IntegrationsUpdateRequest } from './models/IntegrationsUpdateRequest'; +import { IntegrationsListResponse } from './models/IntegrationsListResponse'; +import { IntegrationsCreateResponse } from './models/IntegrationsCreateResponse'; +import { IntegrationsCreateRequest } from './models/IntegrationsCreateRequest'; import { serializeQuery } from '../../http/QuerySerializer'; export class IntegrationsService extends BaseService { - /** - * @summary List - * @description List all existing integrations - - * @returns {Promise} - The promise with the result - */ - async list(): Promise { - const urlEndpoint = '/v3/integrations'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.get( - finalUrl, - {}, - { - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as IntegrationsListResponse; - return responseModel; - } - - /** - * @summary Create - * @description Create a new external integration. - - * @returns {Promise} - The promise with the result - */ - async create(input: IntegrationsCreateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/integrations'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( - finalUrl, - input, - { - ...headers, - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as IntegrationsCreateResponse; - return responseModel; - } - /** * @summary Retrieve * @description Retrieve an existing integration @@ -71,7 +27,7 @@ export class IntegrationsService extends BaseService { queryParams.push(serializeQuery('form', true, 'integration', integration)); } const urlEndpoint = '/v3/integrations/integration'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -99,12 +55,12 @@ export class IntegrationsService extends BaseService { throw new Error('The following parameter is required: integration, cannot be empty or blank'); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (integration) { queryParams.push(serializeQuery('form', true, 'integration', integration)); } const urlEndpoint = '/v3/integrations/integration'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.put( finalUrl, input, @@ -134,7 +90,7 @@ export class IntegrationsService extends BaseService { queryParams.push(serializeQuery('form', true, 'integration', integration)); } const urlEndpoint = '/v3/integrations/integration'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.delete( finalUrl, { integration }, @@ -146,4 +102,48 @@ export class IntegrationsService extends BaseService { const responseModel = response.data as IntegrationsDeleteResponse; return responseModel; } + + /** + * @summary List + * @description List all existing integrations + + * @returns {Promise} - The promise with the result + */ + async list(): Promise { + const urlEndpoint = '/v3/integrations'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as IntegrationsListResponse; + return responseModel; + } + + /** + * @summary Create + * @description Create a new external integration. + + * @returns {Promise} - The promise with the result + */ + async create(input: IntegrationsCreateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/integrations'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as IntegrationsCreateResponse; + return responseModel; + } } diff --git a/src/services/integrations/index.ts b/src/services/integrations/index.ts index 792f96d..6329039 100644 --- a/src/services/integrations/index.ts +++ b/src/services/integrations/index.ts @@ -1,7 +1,7 @@ -export type { IntegrationsListResponse } from './models/IntegrationsListResponse'; +export type { IntegrationsCreateRequest } from './models/IntegrationsCreateRequest'; export type { IntegrationsCreateResponse } from './models/IntegrationsCreateResponse'; -export type { IntegrationsGetResponse } from './models/IntegrationsGetResponse'; -export type { IntegrationsUpdateResponse } from './models/IntegrationsUpdateResponse'; export type { IntegrationsDeleteResponse } from './models/IntegrationsDeleteResponse'; -export type { IntegrationsCreateRequest } from './models/IntegrationsCreateRequest'; +export type { IntegrationsGetResponse } from './models/IntegrationsGetResponse'; +export type { IntegrationsListResponse } from './models/IntegrationsListResponse'; export type { IntegrationsUpdateRequest } from './models/IntegrationsUpdateRequest'; +export type { IntegrationsUpdateResponse } from './models/IntegrationsUpdateResponse'; diff --git a/src/services/invites/Invites.ts b/src/services/invites/Invites.ts index c31d8fb..684cc9b 100644 --- a/src/services/invites/Invites.ts +++ b/src/services/invites/Invites.ts @@ -26,8 +26,8 @@ export class InvitesService extends BaseService { queryParams.push(serializeQuery('form', true, 'per_page', perPage)); } const urlEndpoint = '/v3/workplace/invites'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, diff --git a/src/services/projectMembers/ProjectMembers.ts b/src/services/projectMembers/ProjectMembers.ts index a179782..5bfa01e 100644 --- a/src/services/projectMembers/ProjectMembers.ts +++ b/src/services/projectMembers/ProjectMembers.ts @@ -39,8 +39,8 @@ export class ProjectMembersService extends BaseService { queryParams.push(serializeQuery('form', true, 'per_page', perPage)); } const urlEndpoint = '/v3/projects/project/members'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -64,12 +64,12 @@ export class ProjectMembersService extends BaseService { throw new Error('The following parameter is required: project, cannot be empty or blank'); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } const urlEndpoint = '/v3/projects/project/members'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -91,10 +91,10 @@ export class ProjectMembersService extends BaseService { * @param slug Member's slug * @returns {Promise} - The promise with the result */ - async get(project: string, type: Type, slug: string): Promise { - if (project === undefined || type === undefined || slug === undefined) { + async get(project: string, type_: Type, slug: string): Promise { + if (project === undefined || type_ === undefined || slug === undefined) { throw new Error( - 'The following are required parameters: project,type,slug, cannot be empty or blank', + 'The following are required parameters: project,type_,slug, cannot be empty or blank', ); } const queryParams: string[] = []; @@ -102,15 +102,9 @@ export class ProjectMembersService extends BaseService { queryParams.push(serializeQuery('form', true, 'project', project)); } let urlEndpoint = '/v3/projects/project/members/member/{type}/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{type_}', - encodeURIComponent(serializePath('simple', false, type, undefined)), - ); - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + urlEndpoint = urlEndpoint.replace('{type}', serializePath('simple', false, type_, undefined)); + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -133,30 +127,24 @@ export class ProjectMembersService extends BaseService { */ async update( input: ProjectMembersUpdateRequest, - type: Type, + type_: Type, slug: string, project: string, ): Promise { - if (type === undefined || slug === undefined || project === undefined) { + if (type_ === undefined || slug === undefined || project === undefined) { throw new Error( - 'The following are required parameters: type,slug,project, cannot be empty or blank', + 'The following are required parameters: type_,slug,project, cannot be empty or blank', ); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; let urlEndpoint = '/v3/projects/project/members/member/{type}/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{type_}', - encodeURIComponent(serializePath('simple', false, type, undefined)), - ); - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); + urlEndpoint = urlEndpoint.replace('{type}', serializePath('simple', false, type_, undefined)); + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.patch( finalUrl, input, @@ -178,26 +166,20 @@ export class ProjectMembersService extends BaseService { * @param project Project slug * @returns {Promise} - The promise with the result */ - async delete(type: Type, slug: string, project: string): Promise { - if (type === undefined || slug === undefined || project === undefined) { + async delete(type_: Type, slug: string, project: string): Promise { + if (type_ === undefined || slug === undefined || project === undefined) { throw new Error( - 'The following are required parameters: type,slug,project, cannot be empty or blank', + 'The following are required parameters: type_,slug,project, cannot be empty or blank', ); } const queryParams: string[] = []; let urlEndpoint = '/v3/projects/project/members/member/{type}/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{type_}', - encodeURIComponent(serializePath('simple', false, type, undefined)), - ); - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); + urlEndpoint = urlEndpoint.replace('{type}', serializePath('simple', false, type_, undefined)); + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.delete( finalUrl, { project }, diff --git a/src/services/projectMembers/index.ts b/src/services/projectMembers/index.ts index 626e296..7bdcab1 100644 --- a/src/services/projectMembers/index.ts +++ b/src/services/projectMembers/index.ts @@ -1,7 +1,7 @@ -export type { Type } from './models/Type'; -export type { ProjectMembersListResponse } from './models/ProjectMembersListResponse'; +export type { AddRequest } from './models/AddRequest'; export type { AddResponse } from './models/AddResponse'; export type { ProjectMembersGetResponse } from './models/ProjectMembersGetResponse'; -export type { ProjectMembersUpdateResponse } from './models/ProjectMembersUpdateResponse'; -export type { AddRequest } from './models/AddRequest'; +export type { ProjectMembersListResponse } from './models/ProjectMembersListResponse'; export type { ProjectMembersUpdateRequest } from './models/ProjectMembersUpdateRequest'; +export type { ProjectMembersUpdateResponse } from './models/ProjectMembersUpdateResponse'; +export type { Type } from './models/Type'; diff --git a/src/services/projectMembers/models/AddRequest.ts b/src/services/projectMembers/models/AddRequest.ts index cf755a4..b92ea96 100644 --- a/src/services/projectMembers/models/AddRequest.ts +++ b/src/services/projectMembers/models/AddRequest.ts @@ -1,4 +1,4 @@ -type Type = 'workplace_user' | 'group' | 'invite' | 'service_account'; +type Type_ = 'workplace_user' | 'group' | 'invite' | 'service_account'; export interface AddRequest { /** @@ -13,5 +13,5 @@ export interface AddRequest { * Environment slugs to grant the member access to */ environments?: string[]; - type_: Type; + type_: Type_; } diff --git a/src/services/projectRoles/ProjectRoles.ts b/src/services/projectRoles/ProjectRoles.ts index bf446fc..68ee977 100644 --- a/src/services/projectRoles/ProjectRoles.ts +++ b/src/services/projectRoles/ProjectRoles.ts @@ -1,22 +1,29 @@ import BaseService from '../../BaseService'; -import { ProjectRolesListResponse } from './models/ProjectRolesListResponse'; -import { ProjectRolesCreateResponse } from './models/ProjectRolesCreateResponse'; import { ProjectRolesGetResponse } from './models/ProjectRolesGetResponse'; import { ProjectRolesUpdateResponse } from './models/ProjectRolesUpdateResponse'; +import { ProjectRolesUpdateRequest } from './models/ProjectRolesUpdateRequest'; +import { ProjectRolesListResponse } from './models/ProjectRolesListResponse'; +import { ProjectRolesCreateResponse } from './models/ProjectRolesCreateResponse'; +import { ProjectRolesCreateRequest } from './models/ProjectRolesCreateRequest'; import { ProjectRolesListPermissionsResponse } from './models/ProjectRolesListPermissionsResponse'; import { serializePath } from '../../http/QuerySerializer'; export class ProjectRolesService extends BaseService { /** - * @summary List + * @summary Retrieve - * @returns {Promise} - The promise with the result + * @param role The role's unique identifier + * @returns {Promise} - The promise with the result */ - async list(): Promise { - const urlEndpoint = '/v3/projects/roles'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + async get(role: string): Promise { + if (role === undefined) { + throw new Error('The following parameter is required: role, cannot be empty or blank'); + } + let urlEndpoint = '/v3/projects/roles/role/{role}'; + urlEndpoint = urlEndpoint.replace('{role}', serializePath('simple', false, role, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -25,47 +32,54 @@ export class ProjectRolesService extends BaseService { }, true, ); - const responseModel = response.data as ProjectRolesListResponse; + const responseModel = response.data as ProjectRolesGetResponse; return responseModel; } /** - * @summary Create + * @summary Update - * @returns {Promise} - The promise with the result + * @param role The role's unique identifier + * @returns {Promise} - The promise with the result */ - async create(): Promise { - const urlEndpoint = '/v3/projects/roles'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( + async update( + input: ProjectRolesUpdateRequest, + role: string, + ): Promise { + if (role === undefined) { + throw new Error('The following parameter is required: role, cannot be empty or blank'); + } + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + let urlEndpoint = '/v3/projects/roles/role/{role}'; + urlEndpoint = urlEndpoint.replace('{role}', serializePath('simple', false, role, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.patch( finalUrl, - {}, + input, { + ...headers, ...this.getAuthorizationHeader(), }, true, ); - const responseModel = response.data as ProjectRolesCreateResponse; + const responseModel = response.data as ProjectRolesUpdateResponse; return responseModel; } /** - * @summary Retrieve + * @summary Delete * @param role The role's unique identifier - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async get(role: string): Promise { + async delete(role: string): Promise { if (role === undefined) { throw new Error('The following parameter is required: role, cannot be empty or blank'); } let urlEndpoint = '/v3/projects/roles/role/{role}'; - urlEndpoint = urlEndpoint.replace( - '{role}', - encodeURIComponent(serializePath('simple', false, role, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.get( + urlEndpoint = urlEndpoint.replace('{role}', serializePath('simple', false, role, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.delete( finalUrl, {}, { @@ -73,27 +87,19 @@ export class ProjectRolesService extends BaseService { }, true, ); - const responseModel = response.data as ProjectRolesGetResponse; + const responseModel = response.data; return responseModel; } /** - * @summary Update + * @summary List - * @param role The role's unique identifier - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async update(role: string): Promise { - if (role === undefined) { - throw new Error('The following parameter is required: role, cannot be empty or blank'); - } - let urlEndpoint = '/v3/projects/roles/role/{role}'; - urlEndpoint = urlEndpoint.replace( - '{role}', - encodeURIComponent(serializePath('simple', false, role, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.patch( + async list(): Promise { + const urlEndpoint = '/v3/projects/roles'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.get( finalUrl, {}, { @@ -101,35 +107,29 @@ export class ProjectRolesService extends BaseService { }, true, ); - const responseModel = response.data as ProjectRolesUpdateResponse; + const responseModel = response.data as ProjectRolesListResponse; return responseModel; } /** - * @summary Delete + * @summary Create - * @param role The role's unique identifier - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async delete(role: string): Promise { - if (role === undefined) { - throw new Error('The following parameter is required: role, cannot be empty or blank'); - } - let urlEndpoint = '/v3/projects/roles/role/{role}'; - urlEndpoint = urlEndpoint.replace( - '{role}', - encodeURIComponent(serializePath('simple', false, role, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.delete( + async create(input: ProjectRolesCreateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/projects/roles'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( finalUrl, - {}, + input, { + ...headers, ...this.getAuthorizationHeader(), }, true, ); - const responseModel = response.data; + const responseModel = response.data as ProjectRolesCreateResponse; return responseModel; } @@ -140,7 +140,7 @@ export class ProjectRolesService extends BaseService { */ async listPermissions(): Promise { const urlEndpoint = '/v3/projects/permissions'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, diff --git a/src/services/projectRoles/index.ts b/src/services/projectRoles/index.ts index 4d5b3c4..be100b7 100644 --- a/src/services/projectRoles/index.ts +++ b/src/services/projectRoles/index.ts @@ -1,5 +1,7 @@ -export type { ProjectRolesListResponse } from './models/ProjectRolesListResponse'; +export type { ProjectRolesCreateRequest } from './models/ProjectRolesCreateRequest'; export type { ProjectRolesCreateResponse } from './models/ProjectRolesCreateResponse'; export type { ProjectRolesGetResponse } from './models/ProjectRolesGetResponse'; -export type { ProjectRolesUpdateResponse } from './models/ProjectRolesUpdateResponse'; export type { ProjectRolesListPermissionsResponse } from './models/ProjectRolesListPermissionsResponse'; +export type { ProjectRolesListResponse } from './models/ProjectRolesListResponse'; +export type { ProjectRolesUpdateRequest } from './models/ProjectRolesUpdateRequest'; +export type { ProjectRolesUpdateResponse } from './models/ProjectRolesUpdateResponse'; diff --git a/src/services/projectRoles/models/ProjectRolesCreateRequest.ts b/src/services/projectRoles/models/ProjectRolesCreateRequest.ts new file mode 100644 index 0000000..970e23b --- /dev/null +++ b/src/services/projectRoles/models/ProjectRolesCreateRequest.ts @@ -0,0 +1,10 @@ +export interface ProjectRolesCreateRequest { + /** + * The name of the role + */ + name: string; + /** + * An array containing the permissions the role has. Valid permissions are: `enclave_config_logs`, `enclave_project_config_secrets_read`, `enclave_project_config_dynamic_secrets_read`, `enclave_project_config_dynamic_secrets_leases_write`, `enclave_project_config_rotated_secrets_read`, `enclave_config_syncs_manage`, `enclave_project_secrets_notes_manage`, `enclave_project_config_create`, `enclave_project_config_duplicate`, `enclave_project_config_secrets_write`, `enclave_project_config_service_tokens`, `enclave_project_config_trusted_ips`, `enclave_project_config_logs_rollback`, `enclave_project_config_list_all`, `enclave_project_pull_request_create`, `enclave_project_pull_request_respond`, `enclave_project_pull_request_view`, `enclave_secret_reminders`, `enclave_config_access_logs`, `enclave_project_members`, `enclave_project_rename`, `enclave_project_delete`, `enclave_project_webhooks`, `enclave_project_config_dynamic_secrets_manage`, `enclave_project_config_rotated_secrets_manage`, `enclave_project_config_rename`, `enclave_project_config_lock`, `enclave_project_config_delete`, `enclave_project_environment_list_all`, `enclave_project_environment_all`, `enclave_project_environment_order`, `enclave_project_environment_create`, `enclave_project_environment_delete`, `enclave_project_environment_rename`, `enclave_project_environment_settings_manage`, `enclave_project_secrets_referencing`, `enclave_config_secrets_referencing` + */ + permissions: string[]; +} diff --git a/src/services/projectRoles/models/ProjectRolesUpdateRequest.ts b/src/services/projectRoles/models/ProjectRolesUpdateRequest.ts new file mode 100644 index 0000000..8d107de --- /dev/null +++ b/src/services/projectRoles/models/ProjectRolesUpdateRequest.ts @@ -0,0 +1,10 @@ +export interface ProjectRolesUpdateRequest { + /** + * The name of the role + */ + name?: string; + /** + * An array containing the permissions the role has. Valid permissions are: `enclave_config_logs`, `enclave_project_config_secrets_read`, `enclave_project_config_dynamic_secrets_read`, `enclave_project_config_dynamic_secrets_leases_write`, `enclave_project_config_rotated_secrets_read`, `enclave_config_syncs_manage`, `enclave_project_secrets_notes_manage`, `enclave_project_config_create`, `enclave_project_config_duplicate`, `enclave_project_config_secrets_write`, `enclave_project_config_service_tokens`, `enclave_project_config_trusted_ips`, `enclave_project_config_logs_rollback`, `enclave_project_config_list_all`, `enclave_project_pull_request_create`, `enclave_project_pull_request_respond`, `enclave_project_pull_request_view`, `enclave_secret_reminders`, `enclave_config_access_logs`, `enclave_project_members`, `enclave_project_rename`, `enclave_project_delete`, `enclave_project_webhooks`, `enclave_project_config_dynamic_secrets_manage`, `enclave_project_config_rotated_secrets_manage`, `enclave_project_config_rename`, `enclave_project_config_lock`, `enclave_project_config_delete`, `enclave_project_environment_list_all`, `enclave_project_environment_all`, `enclave_project_environment_order`, `enclave_project_environment_create`, `enclave_project_environment_delete`, `enclave_project_environment_rename`, `enclave_project_environment_settings_manage`, `enclave_project_secrets_referencing`, `enclave_config_secrets_referencing` + */ + permissions?: string[]; +} diff --git a/src/services/projects/Projects.ts b/src/services/projects/Projects.ts index d2d18c3..9e26f5f 100644 --- a/src/services/projects/Projects.ts +++ b/src/services/projects/Projects.ts @@ -3,9 +3,9 @@ import BaseService from '../../BaseService'; import { ListResponse } from './models/ListResponse'; import { CreateResponse } from './models/CreateResponse'; import { CreateRequest } from './models/CreateRequest'; -import { ProjectsGetResponse } from './models/ProjectsGetResponse'; -import { ProjectsUpdateResponse } from './models/ProjectsUpdateResponse'; -import { ProjectsUpdateRequest } from './models/ProjectsUpdateRequest'; +import { GetResponse } from './models/GetResponse'; +import { UpdateResponse } from './models/UpdateResponse'; +import { UpdateRequest } from './models/UpdateRequest'; import { DeleteRequest } from './models/DeleteRequest'; import { serializeQuery } from '../../http/QuerySerializer'; @@ -31,8 +31,8 @@ export class ProjectsService extends BaseService { queryParams.push(serializeQuery('form', true, 'per_page', perPage)); } const urlEndpoint = '/v3/projects'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -52,9 +52,9 @@ export class ProjectsService extends BaseService { * @returns {Promise} - The promise with the result */ async create(input: CreateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/projects'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -73,9 +73,9 @@ export class ProjectsService extends BaseService { * @description Project * @param project Unique identifier for the project object. - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async get(project: string): Promise { + async get(project: string): Promise { if (project === undefined) { throw new Error('The following parameter is required: project, cannot be empty or blank'); } @@ -84,7 +84,7 @@ export class ProjectsService extends BaseService { queryParams.push(serializeQuery('form', true, 'project', project)); } const urlEndpoint = '/v3/projects/project'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -93,7 +93,7 @@ export class ProjectsService extends BaseService { }, true, ); - const responseModel = response.data as ProjectsGetResponse; + const responseModel = response.data as GetResponse; return responseModel; } @@ -101,12 +101,12 @@ export class ProjectsService extends BaseService { * @summary Update * @description Project - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async update(input: ProjectsUpdateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + async update(input: UpdateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/projects/project'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -116,7 +116,7 @@ export class ProjectsService extends BaseService { }, true, ); - const responseModel = response.data as ProjectsUpdateResponse; + const responseModel = response.data as UpdateResponse; return responseModel; } @@ -127,9 +127,9 @@ export class ProjectsService extends BaseService { * @returns {Promise} - The promise with the result */ async delete(input: DeleteRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/projects/project'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.delete( finalUrl, input, diff --git a/src/services/projects/index.ts b/src/services/projects/index.ts index ebe5404..1112575 100644 --- a/src/services/projects/index.ts +++ b/src/services/projects/index.ts @@ -1,7 +1,7 @@ -export type { ListResponse } from './models/ListResponse'; -export type { CreateResponse } from './models/CreateResponse'; -export type { ProjectsGetResponse } from './models/ProjectsGetResponse'; -export type { ProjectsUpdateResponse } from './models/ProjectsUpdateResponse'; export type { CreateRequest } from './models/CreateRequest'; -export type { ProjectsUpdateRequest } from './models/ProjectsUpdateRequest'; +export type { CreateResponse } from './models/CreateResponse'; export type { DeleteRequest } from './models/DeleteRequest'; +export type { GetResponse } from './models/GetResponse'; +export type { ListResponse } from './models/ListResponse'; +export type { UpdateRequest } from './models/UpdateRequest'; +export type { UpdateResponse } from './models/UpdateResponse'; diff --git a/src/services/retrieve/Retrieve.ts b/src/services/retrieve/Retrieve.ts new file mode 100644 index 0000000..4bfab54 --- /dev/null +++ b/src/services/retrieve/Retrieve.ts @@ -0,0 +1,52 @@ +import BaseService from '../../BaseService'; + +import { MemberType } from './models/MemberType'; +import { MemberResponse } from './models/MemberResponse'; + +import { serializePath } from '../../http/QuerySerializer'; + +export class RetrieveService extends BaseService { + /** + * @summary Retrieve Member + + * @param groupSlug The group's slug + * @param memberType Needed input variable + * @param memberSlug The member's slug + * @returns {Promise} - The promise with the result + */ + async member( + groupSlug: string, + memberType: MemberType, + memberSlug: string, + ): Promise { + if (groupSlug === undefined || memberType === undefined || memberSlug === undefined) { + throw new Error( + 'The following are required parameters: groupSlug,memberType,memberSlug, cannot be empty or blank', + ); + } + let urlEndpoint = '/v3/workplace/groups/group/{group_slug}/members/{member_type}/{member_slug}'; + urlEndpoint = urlEndpoint.replace( + '{group_slug}', + serializePath('simple', false, groupSlug, undefined), + ); + urlEndpoint = urlEndpoint.replace( + '{member_type}', + serializePath('simple', false, memberType, undefined), + ); + urlEndpoint = urlEndpoint.replace( + '{member_slug}', + serializePath('simple', false, memberSlug, undefined), + ); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as MemberResponse; + return responseModel; + } +} diff --git a/src/services/retrieve/index.ts b/src/services/retrieve/index.ts new file mode 100644 index 0000000..94ec47d --- /dev/null +++ b/src/services/retrieve/index.ts @@ -0,0 +1,2 @@ +export type { MemberResponse } from './models/MemberResponse'; +export type { MemberType } from './models/MemberType'; diff --git a/src/services/retrieve/models/MemberResponse.ts b/src/services/retrieve/models/MemberResponse.ts new file mode 100644 index 0000000..2b5b3a5 --- /dev/null +++ b/src/services/retrieve/models/MemberResponse.ts @@ -0,0 +1,24 @@ +export interface MemberResponse { + group?: Group; +} +interface Group { + name?: string; + slug?: string; + created_at?: string; + default_project_role?: DefaultProjectRole; + projects?: { + name?: string; + slug?: string; + role?: Role; + }[]; + members?: { + slug?: string; + type_?: string; + }[]; +} +interface DefaultProjectRole { + identifier?: string; +} +interface Role { + identifier?: string; +} diff --git a/src/services/retrieve/models/MemberType.ts b/src/services/retrieve/models/MemberType.ts new file mode 100644 index 0000000..2b7e970 --- /dev/null +++ b/src/services/retrieve/models/MemberType.ts @@ -0,0 +1 @@ +export type MemberType = 'workplace_user'; diff --git a/src/services/secrets/Secrets.ts b/src/services/secrets/Secrets.ts index 1cf6904..360204e 100644 --- a/src/services/secrets/Secrets.ts +++ b/src/services/secrets/Secrets.ts @@ -1,15 +1,15 @@ import BaseService from '../../BaseService'; import { SecretsListResponse } from './models/SecretsListResponse'; -import { UpdateResponse } from './models/UpdateResponse'; -import { UpdateRequest } from './models/UpdateRequest'; +import { SecretsUpdateResponse } from './models/SecretsUpdateResponse'; +import { SecretsUpdateRequest } from './models/SecretsUpdateRequest'; import { SecretsGetResponse } from './models/SecretsGetResponse'; import { Format } from './models/Format'; import { NameTransformer } from './models/NameTransformer'; import { DownloadResponse } from './models/DownloadResponse'; -import { NamesResponse } from './models/NamesResponse'; import { UpdateNoteResponse } from './models/UpdateNoteResponse'; import { UpdateNoteRequest } from './models/UpdateNoteRequest'; +import { NamesResponse } from './models/NamesResponse'; import { serializeQuery, serializeHeader } from '../../http/QuerySerializer'; @@ -54,7 +54,7 @@ export class SecretsService extends BaseService { if (config) { queryParams.push(serializeQuery('form', true, 'config', config)); } - if (accepts) { + if (accepts !== undefined) { headers['accepts'] = serializeHeader(false, accepts); } if (includeDynamicSecrets) { @@ -76,8 +76,8 @@ export class SecretsService extends BaseService { ); } const urlEndpoint = '/v3/configs/config/secrets'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -95,12 +95,12 @@ export class SecretsService extends BaseService { * @summary Update * @description Secrets - * @returns {Promise} - The promise with the result + * @returns {Promise} - The promise with the result */ - async update(input: UpdateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + async update(input: SecretsUpdateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/configs/config/secrets'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -110,7 +110,7 @@ export class SecretsService extends BaseService { }, true, ); - const responseModel = response.data as UpdateResponse; + const responseModel = response.data as SecretsUpdateResponse; return responseModel; } @@ -140,7 +140,7 @@ export class SecretsService extends BaseService { queryParams.push(serializeQuery('form', true, 'name', name)); } const urlEndpoint = '/v3/configs/config/secret'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -179,7 +179,7 @@ export class SecretsService extends BaseService { queryParams.push(serializeQuery('form', true, 'name', name)); } const urlEndpoint = '/v3/configs/config/secret'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.delete( finalUrl, { project, config, name }, @@ -203,6 +203,7 @@ export class SecretsService extends BaseService { * @param optionalParams.nameTransformer - Transform secret names to a different case * @param optionalParams.includeDynamicSecrets - Whether or not to issue leases and include dynamic secret values for the config * @param optionalParams.dynamicSecretsTtlSec - The number of seconds until dynamic leases expire. Must be used with `include_dynamic_secrets`. Defaults to 1800 (30 minutes). + * @param optionalParams.secrets - Comma-delimited list of secrets to include in the download. Defaults to all secrets if left unspecified. * @returns {Promise} - The promise with the result */ async download( @@ -213,9 +214,11 @@ export class SecretsService extends BaseService { nameTransformer?: NameTransformer; includeDynamicSecrets?: boolean; dynamicSecretsTtlSec?: number; + secrets?: string; } = {}, ): Promise { - const { format, nameTransformer, includeDynamicSecrets, dynamicSecretsTtlSec } = optionalParams; + const { format, nameTransformer, includeDynamicSecrets, dynamicSecretsTtlSec, secrets } = + optionalParams; if (project === undefined || config === undefined) { throw new Error( 'The following are required parameters: project,config, cannot be empty or blank', @@ -244,9 +247,12 @@ export class SecretsService extends BaseService { serializeQuery('form', true, 'dynamic_secrets_ttl_sec', dynamicSecretsTtlSec), ); } + if (secrets) { + queryParams.push(serializeQuery('form', true, 'secrets', secrets)); + } const urlEndpoint = '/v3/configs/config/secrets/download'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -259,6 +265,29 @@ export class SecretsService extends BaseService { return responseModel; } + /** + * @summary Update Note + * @description Set a note on a secret + + * @returns {Promise} - The promise with the result + */ + async updateNote(input: UpdateNoteRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config/secrets/note'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as UpdateNoteResponse; + return responseModel; + } + /** * @summary List Names * @description Secret Names @@ -299,8 +328,8 @@ export class SecretsService extends BaseService { ); } const urlEndpoint = '/v3/configs/config/secrets/names'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -312,27 +341,4 @@ export class SecretsService extends BaseService { const responseModel = response.data as NamesResponse; return responseModel; } - - /** - * @summary Update Note - * @description Set a note on a secret - - * @returns {Promise} - The promise with the result - */ - async updateNote(input: UpdateNoteRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config/secrets/note'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( - finalUrl, - input, - { - ...headers, - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as UpdateNoteResponse; - return responseModel; - } } diff --git a/src/services/secrets/index.ts b/src/services/secrets/index.ts index 967d3b7..db7fcdf 100644 --- a/src/services/secrets/index.ts +++ b/src/services/secrets/index.ts @@ -1,10 +1,10 @@ +export type { DownloadResponse } from './models/DownloadResponse'; export type { Format } from './models/Format'; +export type { NamesResponse } from './models/NamesResponse'; export type { NameTransformer } from './models/NameTransformer'; -export type { SecretsListResponse } from './models/SecretsListResponse'; -export type { UpdateResponse } from './models/UpdateResponse'; export type { SecretsGetResponse } from './models/SecretsGetResponse'; -export type { DownloadResponse } from './models/DownloadResponse'; -export type { NamesResponse } from './models/NamesResponse'; -export type { UpdateNoteResponse } from './models/UpdateNoteResponse'; -export type { UpdateRequest } from './models/UpdateRequest'; +export type { SecretsListResponse } from './models/SecretsListResponse'; +export type { SecretsUpdateRequest } from './models/SecretsUpdateRequest'; +export type { SecretsUpdateResponse } from './models/SecretsUpdateResponse'; export type { UpdateNoteRequest } from './models/UpdateNoteRequest'; +export type { UpdateNoteResponse } from './models/UpdateNoteResponse'; diff --git a/src/services/secrets/models/SecretsListResponse.ts b/src/services/secrets/models/SecretsListResponse.ts index 8b6f5c6..155a882 100644 --- a/src/services/secrets/models/SecretsListResponse.ts +++ b/src/services/secrets/models/SecretsListResponse.ts @@ -11,19 +11,27 @@ interface Stripe { raw?: string; computed?: string; note?: string; + rawVisibility?: string; + computedVisibility?: string; } interface Algolia { raw?: string; computed?: string; note?: string; + rawVisibility?: string; + computedVisibility?: string; } interface Database { raw?: string; computed?: string; note?: string; + rawVisibility?: string; + computedVisibility?: string; } interface User { raw?: string; computed?: string; note?: string; + rawVisibility?: string; + computedVisibility?: string; } diff --git a/src/services/secrets/models/SecretsUpdateRequest.ts b/src/services/secrets/models/SecretsUpdateRequest.ts index d65c91d..6e578fb 100644 --- a/src/services/secrets/models/SecretsUpdateRequest.ts +++ b/src/services/secrets/models/SecretsUpdateRequest.ts @@ -7,13 +7,52 @@ export interface SecretsUpdateRequest { * Name of the config object. */ config: string; - secrets: Secrets; + secrets?: Secrets; + /** + * Either `secrets` or `change_requests` is required (can't use both). Object of secrets you would like to save to the config. Try it with the sample secrets below. + */ + change_requests?: { + /** + * The name of the secret. + */ + name: string; + /** + * The original name of the secret. Use `null` (an actual `null`, not the string `null`) or omit this parameter for new secrets. If it differs from `name` then a rename is inferred. + */ + originalName: string; + /** + * The value the secret should have. Use `null` (an actual `null`, not the string `null`) to leave the existing secret value unchanged. + */ + value: string; + /** + * The value you expect the secret to have before `name` is applied. If specified, the request will only be processed if the provided value matches what's found in Doppler. + */ + originalValue?: string; + /** + * Must be set to either `masked`, `unmasked`, or `restricted`. + */ + visibility?: string; + /** + * Must be set to either `masked`, `unmasked`, or `restricted`. The visibility you expect the secret to have before `visibility` is applied. If specified, the request will only be processed if the provided visibility matches what's found in Doppler. + */ + originalVisibility?: string; + /** + * Defaults to `false`. Can only be set to `true` if the config being updated is a branch config. If set to `true`, the provided secret will be set in both the branch config as well as the root config in that environment. + */ + shouldPromote?: boolean; + /** + * Defaults to `false`. If set to `true`, will delete the secret matching the `name` field. + */ + shouldDelete?: boolean; + /** + * Defaults to `false`. Can only be set to `true` if the config being updated is a branch config and there is a secret with the same name in the root config. In this case, the branch secret will inherit the value and visibility type from the root secret. + */ + shouldConverge?: boolean; + }[]; } /** - * Object of secrets you would like to save to the config. Try it with the sample secrets below: + * Either `secrets` or `change_requests` is required (can't use both). Object of secrets you would like to save to the config. Try it with the sample secrets below. */ interface Secrets { - STRIPE: string; - ALGOLIA?: string; - DATABASE?: string; + [k: string]: string; } diff --git a/src/services/secrets/models/UpdateNoteRequest.ts b/src/services/secrets/models/UpdateNoteRequest.ts index be641ec..030f99d 100644 --- a/src/services/secrets/models/UpdateNoteRequest.ts +++ b/src/services/secrets/models/UpdateNoteRequest.ts @@ -4,9 +4,15 @@ export interface UpdateNoteRequest { */ project: string; /** - * Name of the config object. + * Deprecated: Config is no longer required as notes have always been set at the project level. + */ + config?: string; + /** + * The name of the secret */ - config: string; secret: string; + /** + * The note you want to set on the secret. This note will be applied to the specified secret in all environments. + */ note: string; } diff --git a/src/services/serviceAccountTokens/ServiceAccountTokens.ts b/src/services/serviceAccountTokens/ServiceAccountTokens.ts new file mode 100644 index 0000000..37e2e32 --- /dev/null +++ b/src/services/serviceAccountTokens/ServiceAccountTokens.ts @@ -0,0 +1,166 @@ +import BaseService from '../../BaseService'; + +import { ServiceAccountTokensListResponse } from './models/ServiceAccountTokensListResponse'; +import { ServiceAccountTokensCreateResponse } from './models/ServiceAccountTokensCreateResponse'; +import { ServiceAccountTokensCreateRequest } from './models/ServiceAccountTokensCreateRequest'; +import { ServiceAccountTokensGetResponse } from './models/ServiceAccountTokensGetResponse'; + +import { serializeQuery, serializePath } from '../../http/QuerySerializer'; + +export class ServiceAccountTokensService extends BaseService { + /** + * @summary List + * @description List information about existing service account API tokens. + + * @param serviceAccount Slug of the service account + * @param optionalParams - Optional parameters + * @param optionalParams.page - Needed input variable + * @param optionalParams.perPage - Needed input variable + * @returns {Promise} - The promise with the result + */ + async list( + serviceAccount: string, + optionalParams: { page?: number; perPage?: number } = {}, + ): Promise { + const { page, perPage } = optionalParams; + if (serviceAccount === undefined) { + throw new Error( + 'The following parameter is required: serviceAccount, cannot be empty or blank', + ); + } + const queryParams: string[] = []; + if (page) { + queryParams.push(serializeQuery('form', true, 'page', page)); + } + if (perPage) { + queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + } + let urlEndpoint = '/v3/workplace/service_accounts/service_account/{service_account}/tokens'; + urlEndpoint = urlEndpoint.replace( + '{service_account}', + serializePath('simple', false, serviceAccount, undefined), + ); + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as ServiceAccountTokensListResponse; + return responseModel; + } + + /** + * @summary Create + * @description Generate a new service account API token. + + * @param serviceAccount Slug of the service account + * @returns {Promise} - The promise with the result + */ + async create( + input: ServiceAccountTokensCreateRequest, + serviceAccount: string, + ): Promise { + if (serviceAccount === undefined) { + throw new Error( + 'The following parameter is required: serviceAccount, cannot be empty or blank', + ); + } + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + let urlEndpoint = '/v3/workplace/service_accounts/service_account/{service_account}/tokens'; + urlEndpoint = urlEndpoint.replace( + '{service_account}', + serializePath('simple', false, serviceAccount, undefined), + ); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as ServiceAccountTokensCreateResponse; + return responseModel; + } + + /** + * @summary Retrieve + * @description Retrieve information about a single service account API token. + + * @param serviceAccount Slug of the service account + * @param apiToken Slug of the API token + * @returns {Promise} - The promise with the result + */ + async get(serviceAccount: string, apiToken: string): Promise { + if (serviceAccount === undefined || apiToken === undefined) { + throw new Error( + 'The following are required parameters: serviceAccount,apiToken, cannot be empty or blank', + ); + } + let urlEndpoint = + '/v3/workplace/service_accounts/service_account/{service_account}/tokens/token/{api_token}'; + urlEndpoint = urlEndpoint.replace( + '{service_account}', + serializePath('simple', false, serviceAccount, undefined), + ); + urlEndpoint = urlEndpoint.replace( + '{api_token}', + serializePath('simple', false, apiToken, undefined), + ); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as ServiceAccountTokensGetResponse; + return responseModel; + } + + /** + * @summary Delete + * @description Revoke an existing service account API token. + + * @param serviceAccount Slug of the service account + * @param apiToken Slug of the API token + * @returns {Promise} - The promise with the result + */ + async delete(serviceAccount: string, apiToken: string): Promise { + if (serviceAccount === undefined || apiToken === undefined) { + throw new Error( + 'The following are required parameters: serviceAccount,apiToken, cannot be empty or blank', + ); + } + let urlEndpoint = + '/v3/workplace/service_accounts/service_account/{service_account}/tokens/token/{api_token}'; + urlEndpoint = urlEndpoint.replace( + '{service_account}', + serializePath('simple', false, serviceAccount, undefined), + ); + urlEndpoint = urlEndpoint.replace( + '{api_token}', + serializePath('simple', false, apiToken, undefined), + ); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.delete( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data; + return responseModel; + } +} diff --git a/src/services/serviceAccountTokens/index.ts b/src/services/serviceAccountTokens/index.ts new file mode 100644 index 0000000..1812d6b --- /dev/null +++ b/src/services/serviceAccountTokens/index.ts @@ -0,0 +1,4 @@ +export type { ServiceAccountTokensCreateRequest } from './models/ServiceAccountTokensCreateRequest'; +export type { ServiceAccountTokensCreateResponse } from './models/ServiceAccountTokensCreateResponse'; +export type { ServiceAccountTokensGetResponse } from './models/ServiceAccountTokensGetResponse'; +export type { ServiceAccountTokensListResponse } from './models/ServiceAccountTokensListResponse'; diff --git a/src/services/serviceAccountTokens/models/ServiceAccountTokensCreateRequest.ts b/src/services/serviceAccountTokens/models/ServiceAccountTokensCreateRequest.ts new file mode 100644 index 0000000..99ba206 --- /dev/null +++ b/src/services/serviceAccountTokens/models/ServiceAccountTokensCreateRequest.ts @@ -0,0 +1,10 @@ +export interface ServiceAccountTokensCreateRequest { + /** + * The display name of the API token + */ + name?: string; + /** + * The datetime at which the API token should expire. If not provided, the API token will remain vaild indefinitely unless manually revoked + */ + expires_at?: string; +} diff --git a/src/services/serviceAccountTokens/models/ServiceAccountTokensCreateResponse.ts b/src/services/serviceAccountTokens/models/ServiceAccountTokensCreateResponse.ts new file mode 100644 index 0000000..2bd44a7 --- /dev/null +++ b/src/services/serviceAccountTokens/models/ServiceAccountTokensCreateResponse.ts @@ -0,0 +1,15 @@ +export interface ServiceAccountTokensCreateResponse { + api_token?: ApiToken; + api_key?: string; + success?: boolean; +} +interface ApiToken { + name?: string; + slug?: string; + created_at?: string; + last_seen_at?: LastSeenAt; + expires_at?: string; +} +interface LastSeenAt { + [k: string]: unknown; +} diff --git a/src/services/serviceAccountTokens/models/ServiceAccountTokensGetResponse.ts b/src/services/serviceAccountTokens/models/ServiceAccountTokensGetResponse.ts new file mode 100644 index 0000000..1d9ce90 --- /dev/null +++ b/src/services/serviceAccountTokens/models/ServiceAccountTokensGetResponse.ts @@ -0,0 +1,11 @@ +export interface ServiceAccountTokensGetResponse { + api_token?: ApiToken; + success?: boolean; +} +interface ApiToken { + name?: string; + slug?: string; + created_at?: string; + last_seen_at?: string; + expires_at?: string; +} diff --git a/src/services/serviceAccountTokens/models/ServiceAccountTokensListResponse.ts b/src/services/serviceAccountTokens/models/ServiceAccountTokensListResponse.ts new file mode 100644 index 0000000..d6bb231 --- /dev/null +++ b/src/services/serviceAccountTokens/models/ServiceAccountTokensListResponse.ts @@ -0,0 +1,10 @@ +export interface ServiceAccountTokensListResponse { + api_tokens?: { + name?: string; + slug?: string; + created_at?: string; + last_seen_at?: string; + expires_at?: string; + }[]; + success?: boolean; +} diff --git a/src/services/serviceAccounts/ServiceAccounts.ts b/src/services/serviceAccounts/ServiceAccounts.ts index 85eae59..11a1cf6 100644 --- a/src/services/serviceAccounts/ServiceAccounts.ts +++ b/src/services/serviceAccounts/ServiceAccounts.ts @@ -1,72 +1,15 @@ import BaseService from '../../BaseService'; -import { ServiceAccountsListResponse } from './models/ServiceAccountsListResponse'; -import { ServiceAccountsCreateResponse } from './models/ServiceAccountsCreateResponse'; -import { ServiceAccountsCreateRequest } from './models/ServiceAccountsCreateRequest'; import { ServiceAccountsGetResponse } from './models/ServiceAccountsGetResponse'; import { ServiceAccountsUpdateResponse } from './models/ServiceAccountsUpdateResponse'; import { ServiceAccountsUpdateRequest } from './models/ServiceAccountsUpdateRequest'; +import { ServiceAccountsListResponse } from './models/ServiceAccountsListResponse'; +import { ServiceAccountsCreateResponse } from './models/ServiceAccountsCreateResponse'; +import { ServiceAccountsCreateRequest } from './models/ServiceAccountsCreateRequest'; import { serializeQuery, serializePath } from '../../http/QuerySerializer'; export class ServiceAccountsService extends BaseService { - /** - * @summary List - - * @param optionalParams - Optional parameters - * @param optionalParams.page - Needed input variable - * @param optionalParams.perPage - Needed input variable - * @returns {Promise} - The promise with the result - */ - async list( - optionalParams: { page?: number; perPage?: number } = {}, - ): Promise { - const { page, perPage } = optionalParams; - - const queryParams: string[] = []; - if (page) { - queryParams.push(serializeQuery('form', true, 'page', page)); - } - if (perPage) { - queryParams.push(serializeQuery('form', true, 'per_page', perPage)); - } - const urlEndpoint = '/v3/workplace/service_accounts'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; - const response: any = await this.httpClient.get( - finalUrl, - {}, - { - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as ServiceAccountsListResponse; - return responseModel; - } - - /** - * @summary Create - - * @returns {Promise} - The promise with the result - */ - async create(input: ServiceAccountsCreateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/workplace/service_accounts'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.post( - finalUrl, - input, - { - ...headers, - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as ServiceAccountsCreateResponse; - return responseModel; - } - /** * @summary Retrieve @@ -78,11 +21,8 @@ export class ServiceAccountsService extends BaseService { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/service_accounts/service_account/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -108,13 +48,10 @@ export class ServiceAccountsService extends BaseService { if (slug === undefined) { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; let urlEndpoint = '/v3/workplace/service_accounts/service_account/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.patch( finalUrl, input, @@ -139,11 +76,8 @@ export class ServiceAccountsService extends BaseService { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/service_accounts/service_account/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.delete( finalUrl, {}, @@ -155,4 +89,61 @@ export class ServiceAccountsService extends BaseService { const responseModel = response.data; return responseModel; } + + /** + * @summary List + + * @param optionalParams - Optional parameters + * @param optionalParams.page - Needed input variable + * @param optionalParams.perPage - Needed input variable + * @returns {Promise} - The promise with the result + */ + async list( + optionalParams: { page?: number; perPage?: number } = {}, + ): Promise { + const { page, perPage } = optionalParams; + + const queryParams: string[] = []; + if (page) { + queryParams.push(serializeQuery('form', true, 'page', page)); + } + if (perPage) { + queryParams.push(serializeQuery('form', true, 'per_page', perPage)); + } + const urlEndpoint = '/v3/workplace/service_accounts'; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as ServiceAccountsListResponse; + return responseModel; + } + + /** + * @summary Create + + * @returns {Promise} - The promise with the result + */ + async create(input: ServiceAccountsCreateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/workplace/service_accounts'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.post( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as ServiceAccountsCreateResponse; + return responseModel; + } } diff --git a/src/services/serviceAccounts/index.ts b/src/services/serviceAccounts/index.ts index a60f321..8e40cc9 100644 --- a/src/services/serviceAccounts/index.ts +++ b/src/services/serviceAccounts/index.ts @@ -1,6 +1,6 @@ -export type { ServiceAccountsListResponse } from './models/ServiceAccountsListResponse'; +export type { ServiceAccountsCreateRequest } from './models/ServiceAccountsCreateRequest'; export type { ServiceAccountsCreateResponse } from './models/ServiceAccountsCreateResponse'; export type { ServiceAccountsGetResponse } from './models/ServiceAccountsGetResponse'; -export type { ServiceAccountsUpdateResponse } from './models/ServiceAccountsUpdateResponse'; -export type { ServiceAccountsCreateRequest } from './models/ServiceAccountsCreateRequest'; +export type { ServiceAccountsListResponse } from './models/ServiceAccountsListResponse'; export type { ServiceAccountsUpdateRequest } from './models/ServiceAccountsUpdateRequest'; +export type { ServiceAccountsUpdateResponse } from './models/ServiceAccountsUpdateResponse'; diff --git a/src/services/serviceTokens/ServiceTokens.ts b/src/services/serviceTokens/ServiceTokens.ts index bf5f8db..109de5c 100644 --- a/src/services/serviceTokens/ServiceTokens.ts +++ b/src/services/serviceTokens/ServiceTokens.ts @@ -1,14 +1,37 @@ import BaseService from '../../BaseService'; +import { DeleteResponse } from '../common/DeleteResponse'; +import { ServiceTokensDeleteRequest } from './models/ServiceTokensDeleteRequest'; import { ServiceTokensListResponse } from './models/ServiceTokensListResponse'; import { ServiceTokensCreateResponse } from './models/ServiceTokensCreateResponse'; import { ServiceTokensCreateRequest } from './models/ServiceTokensCreateRequest'; -import { DeleteResponse } from '../common/DeleteResponse'; -import { ServiceTokensDeleteRequest } from './models/ServiceTokensDeleteRequest'; import { serializeQuery } from '../../http/QuerySerializer'; export class ServiceTokensService extends BaseService { + /** + * @summary Delete + * @description Service Token + + * @returns {Promise} - The promise with the result + */ + async delete(input: ServiceTokensDeleteRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + const urlEndpoint = '/v3/configs/config/tokens/token'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.delete( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as DeleteResponse; + return responseModel; + } + /** * @summary List * @description Service Tokens @@ -31,7 +54,7 @@ export class ServiceTokensService extends BaseService { queryParams.push(serializeQuery('form', true, 'config', config)); } const urlEndpoint = '/v3/configs/config/tokens'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -51,9 +74,9 @@ export class ServiceTokensService extends BaseService { * @returns {Promise} - The promise with the result */ async create(input: ServiceTokensCreateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/configs/config/tokens'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -66,27 +89,4 @@ export class ServiceTokensService extends BaseService { const responseModel = response.data as ServiceTokensCreateResponse; return responseModel; } - - /** - * @summary Delete - * @description Service Token - - * @returns {Promise} - The promise with the result - */ - async delete(input: ServiceTokensDeleteRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; - const urlEndpoint = '/v3/configs/config/tokens/token'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.delete( - finalUrl, - input, - { - ...headers, - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as DeleteResponse; - return responseModel; - } } diff --git a/src/services/serviceTokens/index.ts b/src/services/serviceTokens/index.ts index 3d9631b..b30c213 100644 --- a/src/services/serviceTokens/index.ts +++ b/src/services/serviceTokens/index.ts @@ -1,5 +1,5 @@ export type { DeleteResponse } from '../common/DeleteResponse'; -export type { ServiceTokensListResponse } from './models/ServiceTokensListResponse'; -export type { ServiceTokensCreateResponse } from './models/ServiceTokensCreateResponse'; export type { ServiceTokensCreateRequest } from './models/ServiceTokensCreateRequest'; +export type { ServiceTokensCreateResponse } from './models/ServiceTokensCreateResponse'; export type { ServiceTokensDeleteRequest } from './models/ServiceTokensDeleteRequest'; +export type { ServiceTokensListResponse } from './models/ServiceTokensListResponse'; diff --git a/src/services/syncs/Syncs.ts b/src/services/syncs/Syncs.ts index 3caed00..fbaeaf8 100644 --- a/src/services/syncs/Syncs.ts +++ b/src/services/syncs/Syncs.ts @@ -27,7 +27,7 @@ export class SyncsService extends BaseService { ); } const queryParams: string[] = []; - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; if (project) { queryParams.push(serializeQuery('form', true, 'project', project)); } @@ -35,7 +35,7 @@ export class SyncsService extends BaseService { queryParams.push(serializeQuery('form', true, 'config', config)); } const urlEndpoint = '/v3/configs/config/syncs'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.post( finalUrl, input, @@ -75,7 +75,7 @@ export class SyncsService extends BaseService { queryParams.push(serializeQuery('form', true, 'sync', sync)); } const urlEndpoint = '/v3/configs/config/syncs/sync'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -128,7 +128,7 @@ export class SyncsService extends BaseService { queryParams.push(serializeQuery('form', true, 'delete_from_target', deleteFromTarget)); } const urlEndpoint = '/v3/configs/config/syncs/sync'; - const finalUrl = `${this.baseUrl + urlEndpoint}?${encodeURI(queryParams.join('&'))}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}?${queryParams.join('&')}`); const response: any = await this.httpClient.delete( finalUrl, { project, config, sync, delete_from_target: deleteFromTarget }, diff --git a/src/services/syncs/index.ts b/src/services/syncs/index.ts index 2c4fb94..b25e1b8 100644 --- a/src/services/syncs/index.ts +++ b/src/services/syncs/index.ts @@ -1,4 +1,4 @@ +export type { SyncsCreateRequest } from './models/SyncsCreateRequest'; export type { SyncsCreateResponse } from './models/SyncsCreateResponse'; -export type { SyncsGetResponse } from './models/SyncsGetResponse'; export type { SyncsDeleteResponse } from './models/SyncsDeleteResponse'; -export type { SyncsCreateRequest } from './models/SyncsCreateRequest'; +export type { SyncsGetResponse } from './models/SyncsGetResponse'; diff --git a/src/services/syncs/models/SyncsCreateRequest.ts b/src/services/syncs/models/SyncsCreateRequest.ts index 2941fc9..109e4eb 100644 --- a/src/services/syncs/models/SyncsCreateRequest.ts +++ b/src/services/syncs/models/SyncsCreateRequest.ts @@ -10,6 +10,10 @@ export interface SyncsCreateRequest { integration: string; data: Data; import_option?: ImportOption; + /** + * Causes sync creation to wait for the initial sync to complete before returning. + */ + await_initial_sync?: boolean; } /** * Configuration data for the sync diff --git a/src/services/users/Users.ts b/src/services/users/Users.ts index 2cece70..b571054 100644 --- a/src/services/users/Users.ts +++ b/src/services/users/Users.ts @@ -12,18 +12,22 @@ export class UsersService extends BaseService { * @param optionalParams - Optional parameters * @param optionalParams.page - The page of users to fetch + * @param optionalParams.email - Filter results to only include the user with the provided email address * @returns {Promise} - The promise with the result */ - async list(optionalParams: { page?: number } = {}): Promise { - const { page } = optionalParams; + async list(optionalParams: { page?: number; email?: string } = {}): Promise { + const { page, email } = optionalParams; const queryParams: string[] = []; if (page) { queryParams.push(serializeQuery('form', true, 'page', page)); } + if (email) { + queryParams.push(serializeQuery('form', true, 'email', email)); + } const urlEndpoint = '/v3/workplace/users'; - const urlParams = queryParams.length > 0 ? `?${encodeURI(queryParams.join('&'))}` : ''; - const finalUrl = `${this.baseUrl + urlEndpoint}${urlParams}`; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -48,11 +52,8 @@ export class UsersService extends BaseService { throw new Error('The following parameter is required: slug, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/users/{slug}'; - urlEndpoint = urlEndpoint.replace( - '{slug}', - encodeURIComponent(serializePath('simple', false, slug, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, diff --git a/src/services/users/index.ts b/src/services/users/index.ts index b11a30c..07515c3 100644 --- a/src/services/users/index.ts +++ b/src/services/users/index.ts @@ -1,2 +1,2 @@ -export type { UsersListResponse } from './models/UsersListResponse'; export type { UsersGetResponse } from './models/UsersGetResponse'; +export type { UsersListResponse } from './models/UsersListResponse'; diff --git a/src/services/webhooks/Webhooks.ts b/src/services/webhooks/Webhooks.ts new file mode 100644 index 0000000..87a8b87 --- /dev/null +++ b/src/services/webhooks/Webhooks.ts @@ -0,0 +1,259 @@ +import BaseService from '../../BaseService'; + +import { WebhooksListResponse } from './models/WebhooksListResponse'; +import { WebhooksAddResponse } from './models/WebhooksAddResponse'; +import { WebhooksAddRequest } from './models/WebhooksAddRequest'; +import { WebhooksGetResponse } from './models/WebhooksGetResponse'; +import { WebhooksUpdateResponse } from './models/WebhooksUpdateResponse'; +import { WebhooksDeleteResponse } from './models/WebhooksDeleteResponse'; +import { WebhooksUpdateRequest } from './models/WebhooksUpdateRequest'; +import { EnableResponse } from './models/EnableResponse'; +import { DisableResponse } from './models/DisableResponse'; + +import { serializeQuery, serializePath } from '../../http/QuerySerializer'; + +export class WebhooksService extends BaseService { + /** + * @summary List + * @description Webhooks + + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async list(optionalParams: { project?: string } = {}): Promise { + const { project } = optionalParams; + + const queryParams: string[] = []; + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + const urlEndpoint = '/v3/webhooks'; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as WebhooksListResponse; + return responseModel; + } + + /** + * @summary Add + * @description Webhook + + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async add( + input: WebhooksAddRequest, + optionalParams: { project?: string } = {}, + ): Promise { + const { project } = optionalParams; + + const queryParams: string[] = []; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + const urlEndpoint = '/v3/webhooks'; + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.post( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as WebhooksAddResponse; + return responseModel; + } + + /** + * @summary Retrieve + * @description Webhook + + * @param slug Webhook's slug + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async get(slug: string, optionalParams: { project?: string } = {}): Promise { + const { project } = optionalParams; + if (slug === undefined) { + throw new Error('The following parameter is required: slug, cannot be empty or blank'); + } + const queryParams: string[] = []; + let urlEndpoint = '/v3/webhooks/webhook/{slug}'; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as WebhooksGetResponse; + return responseModel; + } + + /** + * @summary Update + * @description Webhook + + * @param slug Webhook's slug + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async update( + input: WebhooksUpdateRequest, + slug: string, + optionalParams: { project?: string } = {}, + ): Promise { + const { project } = optionalParams; + if (slug === undefined) { + throw new Error('The following parameter is required: slug, cannot be empty or blank'); + } + const queryParams: string[] = []; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + let urlEndpoint = '/v3/webhooks/webhook/{slug}'; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.patch( + finalUrl, + input, + { + ...headers, + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as WebhooksUpdateResponse; + return responseModel; + } + + /** + * @summary Delete + * @description Webhook + + * @param slug Webhook's slug + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async delete( + slug: string, + optionalParams: { project?: string } = {}, + ): Promise { + const { project } = optionalParams; + if (slug === undefined) { + throw new Error('The following parameter is required: slug, cannot be empty or blank'); + } + const queryParams: string[] = []; + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + let urlEndpoint = '/v3/webhooks/webhook/{slug}'; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.delete( + finalUrl, + { project }, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as WebhooksDeleteResponse; + return responseModel; + } + + /** + * @summary Enable + * @description Webhook + + * @param slug Webhook's slug + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async enable(slug: string, optionalParams: { project?: string } = {}): Promise { + const { project } = optionalParams; + if (slug === undefined) { + throw new Error('The following parameter is required: slug, cannot be empty or blank'); + } + const queryParams: string[] = []; + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + let urlEndpoint = '/v3/webhooks/webhook/{slug}/enable'; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.post( + finalUrl, + { project }, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as EnableResponse; + return responseModel; + } + + /** + * @summary Disable + * @description Webhook + + * @param slug Webhook's slug + * @param optionalParams - Optional parameters + * @param optionalParams.project - The project's name + * @returns {Promise} - The promise with the result + */ + async disable(slug: string, optionalParams: { project?: string } = {}): Promise { + const { project } = optionalParams; + if (slug === undefined) { + throw new Error('The following parameter is required: slug, cannot be empty or blank'); + } + const queryParams: string[] = []; + if (project) { + queryParams.push(serializeQuery('form', true, 'project', project)); + } + let urlEndpoint = '/v3/webhooks/webhook/{slug}/disable'; + urlEndpoint = urlEndpoint.replace('{slug}', serializePath('simple', false, slug, undefined)); + const urlParams = queryParams.length > 0 ? `?${queryParams.join('&')}` : ''; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}${urlParams}`); + const response: any = await this.httpClient.post( + finalUrl, + { project }, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as DisableResponse; + return responseModel; + } +} diff --git a/src/services/webhooks/index.ts b/src/services/webhooks/index.ts new file mode 100644 index 0000000..f158be2 --- /dev/null +++ b/src/services/webhooks/index.ts @@ -0,0 +1,9 @@ +export type { DisableResponse } from './models/DisableResponse'; +export type { EnableResponse } from './models/EnableResponse'; +export type { WebhooksAddRequest } from './models/WebhooksAddRequest'; +export type { WebhooksAddResponse } from './models/WebhooksAddResponse'; +export type { WebhooksDeleteResponse } from './models/WebhooksDeleteResponse'; +export type { WebhooksGetResponse } from './models/WebhooksGetResponse'; +export type { WebhooksListResponse } from './models/WebhooksListResponse'; +export type { WebhooksUpdateRequest } from './models/WebhooksUpdateRequest'; +export type { WebhooksUpdateResponse } from './models/WebhooksUpdateResponse'; diff --git a/src/services/webhooks/models/DisableResponse.ts b/src/services/webhooks/models/DisableResponse.ts new file mode 100644 index 0000000..11778cb --- /dev/null +++ b/src/services/webhooks/models/DisableResponse.ts @@ -0,0 +1 @@ +export interface DisableResponse {} diff --git a/src/services/webhooks/models/EnableResponse.ts b/src/services/webhooks/models/EnableResponse.ts new file mode 100644 index 0000000..052e43b --- /dev/null +++ b/src/services/webhooks/models/EnableResponse.ts @@ -0,0 +1 @@ +export interface EnableResponse {} diff --git a/src/services/webhooks/models/WebhooksAddRequest.ts b/src/services/webhooks/models/WebhooksAddRequest.ts new file mode 100644 index 0000000..4387fe5 --- /dev/null +++ b/src/services/webhooks/models/WebhooksAddRequest.ts @@ -0,0 +1,36 @@ +type Type_ = 'None' | 'Bearer' | 'Basic'; + +export interface WebhooksAddRequest { + /** + * The webhook URL. Must be https + */ + url: string; + /** + * See: https://docs.doppler.com/docs/webhooks#verify-webhook-with-request-signing + */ + secret?: string; + authentication?: Authentication; + /** + * See: https://docs.doppler.com/docs/webhooks#default-payload + */ + payload?: string; + /** + * Config slugs that the webhook should be enabled for + */ + enableConfigs?: string[]; +} +interface Authentication { + /** + * Used when type = Bearer + */ + token?: string; + /** + * Used when type = Basic + */ + username?: string; + /** + * Used when type = Basic + */ + password?: string; + type_?: Type_; +} diff --git a/src/services/webhooks/models/WebhooksAddResponse.ts b/src/services/webhooks/models/WebhooksAddResponse.ts new file mode 100644 index 0000000..02eec38 --- /dev/null +++ b/src/services/webhooks/models/WebhooksAddResponse.ts @@ -0,0 +1 @@ +export interface WebhooksAddResponse {} diff --git a/src/services/webhooks/models/WebhooksDeleteResponse.ts b/src/services/webhooks/models/WebhooksDeleteResponse.ts new file mode 100644 index 0000000..2a9f9f4 --- /dev/null +++ b/src/services/webhooks/models/WebhooksDeleteResponse.ts @@ -0,0 +1 @@ +export interface WebhooksDeleteResponse {} diff --git a/src/services/webhooks/models/WebhooksGetResponse.ts b/src/services/webhooks/models/WebhooksGetResponse.ts new file mode 100644 index 0000000..f200698 --- /dev/null +++ b/src/services/webhooks/models/WebhooksGetResponse.ts @@ -0,0 +1 @@ +export interface WebhooksGetResponse {} diff --git a/src/services/webhooks/models/WebhooksListResponse.ts b/src/services/webhooks/models/WebhooksListResponse.ts new file mode 100644 index 0000000..6fe05ec --- /dev/null +++ b/src/services/webhooks/models/WebhooksListResponse.ts @@ -0,0 +1 @@ +export interface WebhooksListResponse {} diff --git a/src/services/webhooks/models/WebhooksUpdateRequest.ts b/src/services/webhooks/models/WebhooksUpdateRequest.ts new file mode 100644 index 0000000..9c272dd --- /dev/null +++ b/src/services/webhooks/models/WebhooksUpdateRequest.ts @@ -0,0 +1,40 @@ +type Type_ = 'None' | 'Bearer' | 'Basic'; + +export interface WebhooksUpdateRequest { + /** + * The webhook URL. Must be https + */ + url?: string; + /** + * See: https://docs.doppler.com/docs/webhooks#verify-webhook-with-request-signing + */ + secret?: string; + authentication?: Authentication; + /** + * See: https://docs.doppler.com/docs/webhooks#default-payload + */ + payload?: string; + /** + * Config slugs that the webhook should be enabled for + */ + enableConfigs?: string[]; + /** + * Config slugs that the webhook should be disabled for + */ + disableConfigs?: string[]; +} +interface Authentication { + /** + * Used when type = Bearer + */ + token?: string; + /** + * Used when type = Basic + */ + username?: string; + /** + * Used when type = Basic + */ + password?: string; + type_?: Type_; +} diff --git a/src/services/webhooks/models/WebhooksUpdateResponse.ts b/src/services/webhooks/models/WebhooksUpdateResponse.ts new file mode 100644 index 0000000..b47cfbc --- /dev/null +++ b/src/services/webhooks/models/WebhooksUpdateResponse.ts @@ -0,0 +1 @@ +export interface WebhooksUpdateResponse {} diff --git a/src/services/workplace/Workplace.ts b/src/services/workplace/Workplace.ts index 4429d87..1437a5e 100644 --- a/src/services/workplace/Workplace.ts +++ b/src/services/workplace/Workplace.ts @@ -12,7 +12,7 @@ export class WorkplaceService extends BaseService { */ async get(): Promise { const urlEndpoint = '/v3/workplace'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -31,9 +31,9 @@ export class WorkplaceService extends BaseService { * @returns {Promise} - The promise with the result */ async update(input: WorkplaceUpdateRequest): Promise { - const headers: { [key: string]: string } = { 'Content-type': 'application/json' }; + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/workplace'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, input, diff --git a/src/services/workplace/index.ts b/src/services/workplace/index.ts index 394fa44..c513513 100644 --- a/src/services/workplace/index.ts +++ b/src/services/workplace/index.ts @@ -1,3 +1,3 @@ export type { WorkplaceGetResponse } from './models/WorkplaceGetResponse'; -export type { WorkplaceUpdateResponse } from './models/WorkplaceUpdateResponse'; export type { WorkplaceUpdateRequest } from './models/WorkplaceUpdateRequest'; +export type { WorkplaceUpdateResponse } from './models/WorkplaceUpdateResponse'; diff --git a/src/services/workplaceRoles/WorkplaceRoles.ts b/src/services/workplaceRoles/WorkplaceRoles.ts index 7b2d463..ab1b5be 100644 --- a/src/services/workplaceRoles/WorkplaceRoles.ts +++ b/src/services/workplaceRoles/WorkplaceRoles.ts @@ -2,9 +2,11 @@ import BaseService from '../../BaseService'; import { WorkplaceRolesListResponse } from './models/WorkplaceRolesListResponse'; import { WorkplaceRolesCreateResponse } from './models/WorkplaceRolesCreateResponse'; -import { ListPermissionsResponse } from './models/ListPermissionsResponse'; +import { WorkplaceRolesCreateRequest } from './models/WorkplaceRolesCreateRequest'; import { WorkplaceRolesGetResponse } from './models/WorkplaceRolesGetResponse'; import { WorkplaceRolesUpdateResponse } from './models/WorkplaceRolesUpdateResponse'; +import { WorkplaceRolesUpdateRequest } from './models/WorkplaceRolesUpdateRequest'; +import { ListPermissionsResponse } from './models/ListPermissionsResponse'; import { serializePath } from '../../http/QuerySerializer'; @@ -16,7 +18,7 @@ export class WorkplaceRolesService extends BaseService { */ async list(): Promise { const urlEndpoint = '/v3/workplace/roles'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -34,13 +36,15 @@ export class WorkplaceRolesService extends BaseService { * @returns {Promise} - The promise with the result */ - async create(): Promise { + async create(input: WorkplaceRolesCreateRequest): Promise { + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; const urlEndpoint = '/v3/workplace/roles'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.post( finalUrl, - {}, + input, { + ...headers, ...this.getAuthorizationHeader(), }, true, @@ -49,26 +53,6 @@ export class WorkplaceRolesService extends BaseService { return responseModel; } - /** - * @summary List Permissions - - * @returns {Promise} - The promise with the result - */ - async listPermissions(): Promise { - const urlEndpoint = '/v3/workplace/permissions'; - const finalUrl = `${this.baseUrl + urlEndpoint}`; - const response: any = await this.httpClient.get( - finalUrl, - {}, - { - ...this.getAuthorizationHeader(), - }, - true, - ); - const responseModel = response.data as ListPermissionsResponse; - return responseModel; - } - /** * @summary Retrieve @@ -80,11 +64,8 @@ export class WorkplaceRolesService extends BaseService { throw new Error('The following parameter is required: role, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/roles/role/{role}'; - urlEndpoint = urlEndpoint.replace( - '{role}', - encodeURIComponent(serializePath('simple', false, role, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{role}', serializePath('simple', false, role, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.get( finalUrl, {}, @@ -100,23 +81,25 @@ export class WorkplaceRolesService extends BaseService { /** * @summary Update - * @param role The role's unique identifier + * @param role The role's unique identifier, which is the initial name the role was given * @returns {Promise} - The promise with the result */ - async update(role: string): Promise { + async update( + input: WorkplaceRolesUpdateRequest, + role: string, + ): Promise { if (role === undefined) { throw new Error('The following parameter is required: role, cannot be empty or blank'); } + const headers: { [key: string]: string } = { 'Content-Type': 'application/json' }; let urlEndpoint = '/v3/workplace/roles/role/{role}'; - urlEndpoint = urlEndpoint.replace( - '{role}', - encodeURIComponent(serializePath('simple', false, role, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{role}', serializePath('simple', false, role, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.patch( finalUrl, - {}, + input, { + ...headers, ...this.getAuthorizationHeader(), }, true, @@ -136,11 +119,8 @@ export class WorkplaceRolesService extends BaseService { throw new Error('The following parameter is required: role, cannot be empty or blank'); } let urlEndpoint = '/v3/workplace/roles/role/{role}'; - urlEndpoint = urlEndpoint.replace( - '{role}', - encodeURIComponent(serializePath('simple', false, role, undefined)), - ); - const finalUrl = `${this.baseUrl + urlEndpoint}`; + urlEndpoint = urlEndpoint.replace('{role}', serializePath('simple', false, role, undefined)); + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); const response: any = await this.httpClient.delete( finalUrl, {}, @@ -152,4 +132,24 @@ export class WorkplaceRolesService extends BaseService { const responseModel = response.data; return responseModel; } + + /** + * @summary List Permissions + + * @returns {Promise} - The promise with the result + */ + async listPermissions(): Promise { + const urlEndpoint = '/v3/workplace/permissions'; + const finalUrl = encodeURI(`${this.baseUrl + urlEndpoint}`); + const response: any = await this.httpClient.get( + finalUrl, + {}, + { + ...this.getAuthorizationHeader(), + }, + true, + ); + const responseModel = response.data as ListPermissionsResponse; + return responseModel; + } } diff --git a/src/services/workplaceRoles/index.ts b/src/services/workplaceRoles/index.ts index 74287ce..e8f8a3d 100644 --- a/src/services/workplaceRoles/index.ts +++ b/src/services/workplaceRoles/index.ts @@ -1,5 +1,7 @@ -export type { WorkplaceRolesListResponse } from './models/WorkplaceRolesListResponse'; -export type { WorkplaceRolesCreateResponse } from './models/WorkplaceRolesCreateResponse'; export type { ListPermissionsResponse } from './models/ListPermissionsResponse'; +export type { WorkplaceRolesCreateRequest } from './models/WorkplaceRolesCreateRequest'; +export type { WorkplaceRolesCreateResponse } from './models/WorkplaceRolesCreateResponse'; export type { WorkplaceRolesGetResponse } from './models/WorkplaceRolesGetResponse'; +export type { WorkplaceRolesListResponse } from './models/WorkplaceRolesListResponse'; +export type { WorkplaceRolesUpdateRequest } from './models/WorkplaceRolesUpdateRequest'; export type { WorkplaceRolesUpdateResponse } from './models/WorkplaceRolesUpdateResponse'; diff --git a/src/services/workplaceRoles/models/WorkplaceRolesCreateRequest.ts b/src/services/workplaceRoles/models/WorkplaceRolesCreateRequest.ts new file mode 100644 index 0000000..c19103a --- /dev/null +++ b/src/services/workplaceRoles/models/WorkplaceRolesCreateRequest.ts @@ -0,0 +1,10 @@ +export interface WorkplaceRolesCreateRequest { + /** + * The name of the role + */ + name: string; + /** + * An array containing the permissions the role has. Valid permissions are: `all_enclave_projects_admin`, `all_enclave_projects`, `billing_manage`, `billing`, `create_enclave_project`, `custom_roles_manage`, `ekm`, `enclave_secrets_referencing`, `logs_audit`, `logs`, `service_account_api_tokens_manage`, `service_account_api_tokens`, `service_accounts_manage`, `service_accounts`, `settings_manage`, `settings`, `team_manage`, `team`, `verified_domains_manage`, `verified_domains`, `workplace_default_environments_manage`, `workplace_default_environments_read`, `workplace_integrations_list`, `workplace_integrations_manage`, `workplace_integrations_read` + */ + permissions: string[]; +} diff --git a/src/services/workplaceRoles/models/WorkplaceRolesUpdateRequest.ts b/src/services/workplaceRoles/models/WorkplaceRolesUpdateRequest.ts new file mode 100644 index 0000000..ccec911 --- /dev/null +++ b/src/services/workplaceRoles/models/WorkplaceRolesUpdateRequest.ts @@ -0,0 +1,10 @@ +export interface WorkplaceRolesUpdateRequest { + /** + * The name of the role + */ + name?: string; + /** + * An array containing the permissions the role has. Valid permissions are: `all_enclave_projects_admin`, `all_enclave_projects`, `billing_manage`, `billing`, `create_enclave_project`, `custom_roles_manage`, `ekm`, `enclave_secrets_referencing`, `logs_audit`, `logs`, `service_account_api_tokens_manage`, `service_account_api_tokens`, `service_accounts_manage`, `service_accounts`, `settings_manage`, `settings`, `team_manage`, `team`, `verified_domains_manage`, `verified_domains`, `workplace_default_environments_manage`, `workplace_default_environments_read`, `workplace_integrations_list`, `workplace_integrations_manage`, `workplace_integrations_read` + */ + permissions?: string[]; +} diff --git a/test/services/activityLogs/ActivityLogs.test.ts b/test/services/activityLogs/ActivityLogs.test.ts index 8252a9f..bb41b9b 100644 --- a/test/services/activityLogs/ActivityLogs.test.ts +++ b/test/services/activityLogs/ActivityLogs.test.ts @@ -19,39 +19,37 @@ describe('test ActivityLogs', () => { nock.cleanAll(); }); + describe('test list', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/logs?page=ex&per_page=8') + .reply(200, { data: {} }); + return sdk.activityLogs + .list({ page: 'ex', perPage: 8 }) + .then((r: any) => expect(r.data).toEqual({})); + }); + }); + describe('test retrieve', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/logs/log?log=natus') + .get('/v3/logs/log?log=ipsa') .reply(200, { data: {} }); - return sdk.activityLogs.retrieve('natus').then((r: any) => expect(r.data).toEqual({})); + return sdk.activityLogs.retrieve('ipsa').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/logs/log?log=quibusdam') + .get('/v3/logs/log?log=occaecati') .reply(200, { data: {} }); return expect(async () => await sdk.activityLogs.retrieve()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/logs/log?log=exercitationem') + .get('/v3/logs/log?log=minima') .reply(404, { data: {} }); - return expect( - async () => await sdk.activityLogs.retrieve('exercitationem'), - ).rejects.toThrow(); - }); - }); - - describe('test list', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .get('/v3/logs?page=aliquam&per_page=3') - .reply(200, { data: {} }); - return sdk.activityLogs - .list({ page: 'aliquam', perPage: 3 }) - .then((r: any) => expect(r.data).toEqual({})); + return expect(async () => await sdk.activityLogs.retrieve('minima')).rejects.toThrow(); }); }); }); diff --git a/test/services/audit/Audit.test.ts b/test/services/audit/Audit.test.ts index 59a2924..64169a3 100644 --- a/test/services/audit/Audit.test.ts +++ b/test/services/audit/Audit.test.ts @@ -22,26 +22,26 @@ describe('test Audit', () => { describe('test getUser', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users/6303399708?settings=true') + .get('/v3/workplace/users/2031004567?settings=true') .reply(200, { data: {} }); return sdk.audit - .getUser('6303399708', { settings: true }) + .getUser('2031004567', { settings: true }) .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users/9214526573?settings=true') + .get('/v3/workplace/users/3960938579?settings=true') .reply(200, { data: {} }); return expect(async () => await sdk.audit.getUser()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users/6990925149?settings=true') + .get('/v3/workplace/users/6075520821?settings=true') .reply(404, { data: {} }); return expect( - async () => await sdk.audit.getUser('6990925149', { settings: true }), + async () => await sdk.audit.getUser('6075520821', { settings: true }), ).rejects.toThrow(); }); }); diff --git a/test/services/configLogs/ConfigLogs.test.ts b/test/services/configLogs/ConfigLogs.test.ts index 900e978..2325800 100644 --- a/test/services/configLogs/ConfigLogs.test.ts +++ b/test/services/configLogs/ConfigLogs.test.ts @@ -19,81 +19,85 @@ describe('test ConfigLogs', () => { nock.cleanAll(); }); - describe('test list', () => { + describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/logs?project=esse&config=quaerat&page=4&per_page=6') + .get('/v3/configs/config/logs/log?project=alias&config=alias&log=deserunt') .reply(200, { data: {} }); return sdk.configLogs - .list('esse', 'quaerat', { page: 4, perPage: 6 }) + .get('alias', 'alias', 'deserunt') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/logs?project=ullam&config=nulla&page=9&per_page=8') + .get('/v3/configs/config/logs/log?project=saepe&config=voluptatum&log=saepe') .reply(200, { data: {} }); - return expect(async () => await sdk.configLogs.list()).rejects.toThrow(); + return expect(async () => await sdk.configLogs.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/logs?project=vitae&config=dolor&page=5&per_page=2') + .get('/v3/configs/config/logs/log?project=reprehenderit&config=accusamus&log=animi') .reply(404, { data: {} }); return expect( - async () => await sdk.configLogs.list('vitae', 'dolor', { page: 5, perPage: 2 }), + async () => await sdk.configLogs.get('reprehenderit', 'accusamus', 'animi'), ).rejects.toThrow(); }); }); - describe('test get', () => { + describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/logs/log?project=modi&config=architecto&log=porro') + .get('/v3/configs/config/logs?project=quasi&config=excepturi&page=7&per_page=7') .reply(200, { data: {} }); return sdk.configLogs - .get('modi', 'architecto', 'porro') + .list('quasi', 'excepturi', { page: 7, perPage: 7 }) .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/logs/log?project=ut&config=perspiciatis&log=perferendis') + .get('/v3/configs/config/logs?project=eius&config=facere&page=9&per_page=9') .reply(200, { data: {} }); - return expect(async () => await sdk.configLogs.get()).rejects.toThrow(); + return expect(async () => await sdk.configLogs.list()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/logs/log?project=vel&config=in&log=sunt') + .get('/v3/configs/config/logs?project=beatae&config=architecto&page=4&per_page=1') .reply(404, { data: {} }); - return expect(async () => await sdk.configLogs.get('vel', 'in', 'sunt')).rejects.toThrow(); + return expect( + async () => await sdk.configLogs.list('beatae', 'architecto', { page: 4, perPage: 1 }), + ).rejects.toThrow(); }); }); describe('test rollback', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/logs/log/rollback?project=iusto&config=assumenda&log=incidunt') + .post('/v3/configs/config/logs/log/rollback?project=quas&config=error&log=excepturi') .reply(200, { data: {} }); return sdk.configLogs - .rollback('iusto', 'assumenda', 'incidunt') + .rollback('quas', 'error', 'excepturi') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/logs/log/rollback?project=mollitia&config=unde&log=occaecati') + .post( + '/v3/configs/config/logs/log/rollback?project=tempore&config=necessitatibus&log=soluta', + ) .reply(200, { data: {} }); return expect(async () => await sdk.configLogs.rollback()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/logs/log/rollback?project=ad&config=veritatis&log=molestias') + .post('/v3/configs/config/logs/log/rollback?project=omnis&config=expedita&log=saepe') .reply(404, { data: {} }); return expect( - async () => await sdk.configLogs.rollback('ad', 'veritatis', 'molestias'), + async () => await sdk.configLogs.rollback('omnis', 'expedita', 'saepe'), ).rejects.toThrow(); }); }); diff --git a/test/services/configs/Configs.test.ts b/test/services/configs/Configs.test.ts index af78132..6d0fcc0 100644 --- a/test/services/configs/Configs.test.ts +++ b/test/services/configs/Configs.test.ts @@ -19,79 +19,87 @@ describe('test Configs', () => { nock.cleanAll(); }); - describe('test list', () => { + describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs?project=assumenda&environment=quibusdam&page=6&per_page=1') + .get('/v3/configs/config?project=sint&config=non') .reply(200, { data: {} }); - return sdk.configs - .list('assumenda', { environment: 'quibusdam', page: 6, perPage: 1 }) - .then((r: any) => expect(r.data).toEqual({})); + return sdk.configs.get('sint', 'non').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs?project=cum&environment=placeat&page=2&per_page=8') + .get('/v3/configs/config?project=quasi&config=repudiandae') .reply(200, { data: {} }); - return expect(async () => await sdk.configs.list()).rejects.toThrow(); + return expect(async () => await sdk.configs.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs?project=beatae&environment=aliquid&page=8&per_page=4') + .get('/v3/configs/config?project=quis&config=consectetur') .reply(404, { data: {} }); - return expect( - async () => - await sdk.configs.list('beatae', { environment: 'aliquid', page: 8, perPage: 4 }), - ).rejects.toThrow(); + return expect(async () => await sdk.configs.get('quis', 'consectetur')).rejects.toThrow(); }); }); - describe('test create', () => { + describe('test update', () => { test('test api call', () => { - const scope = nock('https://api.doppler.com').post('/v3/configs').reply(200, { data: {} }); - return sdk.configs.create({}).then((r: any) => expect(r.data).toEqual({})); + const scope = nock('https://api.doppler.com') + .post('/v3/configs/config') + .reply(200, { data: {} }); + return sdk.configs.update({}).then((r: any) => expect(r.data).toEqual({})); }); }); - describe('test get', () => { + describe('test delete', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/configs/config') + .reply(200, { data: {} }); + return sdk.configs.delete({}).then((r: any) => expect(r.data).toEqual({})); + }); + }); + + describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config?project=alias&config=quod') + .get('/v3/configs?project=cumque&environment=ipsam&page=1&per_page=4') .reply(200, { data: {} }); - return sdk.configs.get('alias', 'quod').then((r: any) => expect(r.data).toEqual({})); + return sdk.configs + .list('cumque', { environment: 'ipsam', page: 1, perPage: 4 }) + .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config?project=impedit&config=maxime') + .get('/v3/configs?project=ratione&environment=adipisci&page=3&per_page=7') .reply(200, { data: {} }); - return expect(async () => await sdk.configs.get()).rejects.toThrow(); + return expect(async () => await sdk.configs.list()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config?project=ipsa&config=temporibus') + .get('/v3/configs?project=sint&environment=fuga&page=1&per_page=7') .reply(404, { data: {} }); - return expect(async () => await sdk.configs.get('ipsa', 'temporibus')).rejects.toThrow(); + return expect( + async () => await sdk.configs.list('sint', { environment: 'fuga', page: 1, perPage: 7 }), + ).rejects.toThrow(); }); }); - describe('test update', () => { + describe('test create', () => { test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/configs/config') - .reply(200, { data: {} }); - return sdk.configs.update({}).then((r: any) => expect(r.data).toEqual({})); + const scope = nock('https://api.doppler.com').post('/v3/configs').reply(200, { data: {} }); + return sdk.configs.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); - describe('test delete', () => { + describe('test unlock', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config') + .post('/v3/configs/config/unlock') .reply(200, { data: {} }); - return sdk.configs.delete({}).then((r: any) => expect(r.data).toEqual({})); + return sdk.configs.unlock({}).then((r: any) => expect(r.data).toEqual({})); }); }); @@ -113,38 +121,29 @@ describe('test Configs', () => { }); }); - describe('test unlock', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/unlock') - .reply(200, { data: {} }); - return sdk.configs.unlock({}).then((r: any) => expect(r.data).toEqual({})); - }); - }); - describe('test listTrustedIps', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/trusted_ips?project=iure&config=quaerat') + .get('/v3/configs/config/trusted_ips?project=ab&config=fugiat') .reply(200, { data: {} }); return sdk.configs - .listTrustedIps('iure', 'quaerat') + .listTrustedIps('ab', 'fugiat') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/trusted_ips?project=possimus&config=itaque') + .get('/v3/configs/config/trusted_ips?project=laboriosam&config=voluptas') .reply(200, { data: {} }); return expect(async () => await sdk.configs.listTrustedIps()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/trusted_ips?project=laboriosam&config=porro') + .get('/v3/configs/config/trusted_ips?project=iste&config=assumenda') .reply(404, { data: {} }); return expect( - async () => await sdk.configs.listTrustedIps('laboriosam', 'porro'), + async () => await sdk.configs.listTrustedIps('iste', 'assumenda'), ).rejects.toThrow(); }); }); @@ -152,53 +151,51 @@ describe('test Configs', () => { describe('test addTrustedIp', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/trusted_ips?project=nisi&config=reprehenderit') + .post('/v3/configs/config/trusted_ips?project=nobis&config=tempore') .reply(200, { data: {} }); return sdk.configs - .addTrustedIp({}, 'nisi', 'reprehenderit') + .addTrustedIp({}, 'nobis', 'tempore') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/trusted_ips?project=consectetur&config=alias') + .post('/v3/configs/config/trusted_ips?project=explicabo&config=facere') .reply(200, { data: {} }); return expect(async () => await sdk.configs.addTrustedIp()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/trusted_ips?project=perferendis&config=modi') + .post('/v3/configs/config/trusted_ips?project=et&config=esse') .reply(404, { data: {} }); - return expect( - async () => await sdk.configs.addTrustedIp({}, 'perferendis', 'modi'), - ).rejects.toThrow(); + return expect(async () => await sdk.configs.addTrustedIp({}, 'et', 'esse')).rejects.toThrow(); }); }); describe('test deleteTrustedIp', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/trusted_ips?project=fuga&config=explicabo') + .delete('/v3/configs/config/trusted_ips?project=dignissimos&config=quaerat') .reply(200, { data: {} }); return sdk.configs - .deleteTrustedIp({}, 'fuga', 'explicabo') + .deleteTrustedIp({}, 'dignissimos', 'quaerat') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/trusted_ips?project=minus&config=odit') + .delete('/v3/configs/config/trusted_ips?project=necessitatibus&config=itaque') .reply(200, { data: {} }); return expect(async () => await sdk.configs.deleteTrustedIp()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/trusted_ips?project=maxime&config=possimus') + .delete('/v3/configs/config/trusted_ips?project=blanditiis&config=repellat') .reply(404, { data: {} }); return expect( - async () => await sdk.configs.deleteTrustedIp({}, 'maxime', 'possimus'), + async () => await sdk.configs.deleteTrustedIp({}, 'blanditiis', 'repellat'), ).rejects.toThrow(); }); }); diff --git a/test/services/dynamicSecrets/DynamicSecrets.test.ts b/test/services/dynamicSecrets/DynamicSecrets.test.ts index 5ac0450..26558f5 100644 --- a/test/services/dynamicSecrets/DynamicSecrets.test.ts +++ b/test/services/dynamicSecrets/DynamicSecrets.test.ts @@ -19,21 +19,21 @@ describe('test DynamicSecrets', () => { nock.cleanAll(); }); - describe('test issueLease', () => { + describe('test revokeLease', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/dynamic_secrets/dynamic_secret/leases') + .delete('/v3/configs/config/dynamic_secrets/dynamic_secret/leases/lease') .reply(200, { data: {} }); - return sdk.dynamicSecrets.issueLease({}).then((r: any) => expect(r.data).toEqual({})); + return sdk.dynamicSecrets.revokeLease({}).then((r: any) => expect(r.data).toEqual({})); }); }); - describe('test revokeLease', () => { + describe('test issueLease', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/dynamic_secrets/dynamic_secret/leases/lease') + .post('/v3/configs/config/dynamic_secrets/dynamic_secret/leases') .reply(200, { data: {} }); - return sdk.dynamicSecrets.revokeLease({}).then((r: any) => expect(r.data).toEqual({})); + return sdk.dynamicSecrets.issueLease({}).then((r: any) => expect(r.data).toEqual({})); }); }); }); diff --git a/test/services/environments/Environments.test.ts b/test/services/environments/Environments.test.ts index 96900bd..c9effd6 100644 --- a/test/services/environments/Environments.test.ts +++ b/test/services/environments/Environments.test.ts @@ -19,126 +19,122 @@ describe('test Environments', () => { nock.cleanAll(); }); - describe('test get', () => { + describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/environments/environment?project=impedit&environment=nobis') + .get('/v3/environments?project=excepturi') .reply(200, { data: {} }); - return sdk.environments.get('impedit', 'nobis').then((r: any) => expect(r.data).toEqual({})); + return sdk.environments.list('excepturi').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/environments/environment?project=quos&environment=ad') + .get('/v3/environments?project=eius') .reply(200, { data: {} }); - return expect(async () => await sdk.environments.get()).rejects.toThrow(); + return expect(async () => await sdk.environments.list()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/environments/environment?project=facilis&environment=voluptate') + .get('/v3/environments?project=id') .reply(404, { data: {} }); - return expect( - async () => await sdk.environments.get('facilis', 'voluptate'), - ).rejects.toThrow(); + return expect(async () => await sdk.environments.list('id')).rejects.toThrow(); }); }); - describe('test rename', () => { + describe('test create', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .put('/v3/environments/environment?project=magni&environment=totam') + .post('/v3/environments?project=nam') .reply(200, { data: {} }); - return sdk.environments - .rename({}, 'magni', 'totam') - .then((r: any) => expect(r.data).toEqual({})); + return sdk.environments.create({}, 'nam').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .put('/v3/environments/environment?project=hic&environment=odio') + .post('/v3/environments?project=tempora') .reply(200, { data: {} }); - return expect(async () => await sdk.environments.rename()).rejects.toThrow(); + return expect(async () => await sdk.environments.create()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .put('/v3/environments/environment?project=amet&environment=eaque') + .post('/v3/environments?project=quia') .reply(404, { data: {} }); - return expect( - async () => await sdk.environments.rename({}, 'amet', 'eaque'), - ).rejects.toThrow(); + return expect(async () => await sdk.environments.create({}, 'quia')).rejects.toThrow(); }); }); - describe('test delete', () => { + describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/environments/environment?project=at&environment=tempore') + .get('/v3/environments/environment?project=doloribus&environment=illum') .reply(200, { data: {} }); - return sdk.environments.delete('at', 'tempore').then((r: any) => expect(r.data).toEqual({})); + return sdk.environments + .get('doloribus', 'illum') + .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/environments/environment?project=quod&environment=possimus') + .get('/v3/environments/environment?project=nam&environment=porro') .reply(200, { data: {} }); - return expect(async () => await sdk.environments.delete()).rejects.toThrow(); + return expect(async () => await sdk.environments.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/environments/environment?project=cupiditate&environment=dolor') + .get('/v3/environments/environment?project=natus&environment=voluptate') .reply(404, { data: {} }); - return expect( - async () => await sdk.environments.delete('cupiditate', 'dolor'), - ).rejects.toThrow(); + return expect(async () => await sdk.environments.get('natus', 'voluptate')).rejects.toThrow(); }); }); - describe('test list', () => { + describe('test rename', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/environments?project=voluptate') + .put('/v3/environments/environment?project=nemo&environment=soluta') .reply(200, { data: {} }); - return sdk.environments.list('voluptate').then((r: any) => expect(r.data).toEqual({})); + return sdk.environments + .rename({}, 'nemo', 'soluta') + .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/environments?project=perspiciatis') + .put('/v3/environments/environment?project=nam&environment=quibusdam') .reply(200, { data: {} }); - return expect(async () => await sdk.environments.list()).rejects.toThrow(); + return expect(async () => await sdk.environments.rename()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/environments?project=provident') + .put('/v3/environments/environment?project=id&environment=ullam') .reply(404, { data: {} }); - return expect(async () => await sdk.environments.list('provident')).rejects.toThrow(); + return expect(async () => await sdk.environments.rename({}, 'id', 'ullam')).rejects.toThrow(); }); }); - describe('test create', () => { + describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/environments?project=placeat') + .delete('/v3/environments/environment?project=in&environment=sequi') .reply(200, { data: {} }); - return sdk.environments.create({}, 'placeat').then((r: any) => expect(r.data).toEqual({})); + return sdk.environments.delete('in', 'sequi').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .post('/v3/environments?project=deserunt') + .delete('/v3/environments/environment?project=minima&environment=repellendus') .reply(200, { data: {} }); - return expect(async () => await sdk.environments.create()).rejects.toThrow(); + return expect(async () => await sdk.environments.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .post('/v3/environments?project=eveniet') + .delete('/v3/environments/environment?project=quos&environment=harum') .reply(404, { data: {} }); - return expect(async () => await sdk.environments.create({}, 'eveniet')).rejects.toThrow(); + return expect(async () => await sdk.environments.delete('quos', 'harum')).rejects.toThrow(); }); }); }); diff --git a/test/services/get/Get.test.ts b/test/services/get/Get.test.ts new file mode 100644 index 0000000..ead45cf --- /dev/null +++ b/test/services/get/Get.test.ts @@ -0,0 +1,44 @@ +import nock from 'nock'; + +import { DopplerSDK } from '../../../src'; + +import { GetService } from '../../../src/services/get/Get'; + +describe('test GetService object', () => { + it('should be an object', () => { + expect(typeof GetService).toBe('function'); + }); +}); + +describe('test Get', () => { + let sdk: any; + + beforeEach(() => { + sdk = new DopplerSDK({}); + + nock.cleanAll(); + }); + + describe('test options', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/integrations/integration/options?integration=quae') + .reply(200, { data: {} }); + return sdk.get.options('quae').then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/integrations/integration/options?integration=delectus') + .reply(200, { data: {} }); + return expect(async () => await sdk.get.options()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/integrations/integration/options?integration=possimus') + .reply(404, { data: {} }); + return expect(async () => await sdk.get.options('possimus')).rejects.toThrow(); + }); + }); +}); diff --git a/test/services/groups/Groups.test.ts b/test/services/groups/Groups.test.ts index 3326a9c..387ff10 100644 --- a/test/services/groups/Groups.test.ts +++ b/test/services/groups/Groups.test.ts @@ -19,140 +19,140 @@ describe('test Groups', () => { nock.cleanAll(); }); - describe('test list', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .get('/v3/workplace/groups?page=3&per_page=7') - .reply(200, { data: {} }); - return sdk.groups.list({ page: 3, perPage: 7 }).then((r: any) => expect(r.data).toEqual({})); - }); - }); - - describe('test create', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/workplace/groups') - .reply(200, { data: {} }); - return sdk.groups.create({}).then((r: any) => expect(r.data).toEqual({})); - }); - }); - describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/groups/group/consequuntur') + .get('/v3/workplace/groups/group/saepe') .reply(200, { data: {} }); - return sdk.groups.get('consequuntur').then((r: any) => expect(r.data).toEqual({})); + return sdk.groups.get('saepe').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/groups/group/assumenda') + .get('/v3/workplace/groups/group/rerum') .reply(200, { data: {} }); return expect(async () => await sdk.groups.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/groups/group/id') + .get('/v3/workplace/groups/group/suscipit') .reply(404, { data: {} }); - return expect(async () => await sdk.groups.get('id')).rejects.toThrow(); + return expect(async () => await sdk.groups.get('suscipit')).rejects.toThrow(); }); }); describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/groups/group/reiciendis') + .delete('/v3/workplace/groups/group/atque') .reply(200, { data: {} }); - return sdk.groups.delete('reiciendis').then((r: any) => expect(r.data).toEqual({})); + return sdk.groups.delete('atque').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/groups/group/velit') + .delete('/v3/workplace/groups/group/tempora') .reply(200, { data: {} }); return expect(async () => await sdk.groups.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/groups/group/laboriosam') + .delete('/v3/workplace/groups/group/blanditiis') .reply(404, { data: {} }); - return expect(async () => await sdk.groups.delete('laboriosam')).rejects.toThrow(); + return expect(async () => await sdk.groups.delete('blanditiis')).rejects.toThrow(); }); }); describe('test update', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/groups/group/laborum') + .patch('/v3/workplace/groups/group/aut') .reply(200, { data: {} }); - return sdk.groups.update({}, 'laborum').then((r: any) => expect(r.data).toEqual({})); + return sdk.groups.update({}, 'aut').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/groups/group/perspiciatis') + .patch('/v3/workplace/groups/group/nobis') .reply(200, { data: {} }); return expect(async () => await sdk.groups.update()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/groups/group/eveniet') + .patch('/v3/workplace/groups/group/sit') .reply(404, { data: {} }); - return expect(async () => await sdk.groups.update({}, 'eveniet')).rejects.toThrow(); + return expect(async () => await sdk.groups.update({}, 'sit')).rejects.toThrow(); }); }); - describe('test addMember', () => { + describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/workplace/groups/group/id/members') + .get('/v3/workplace/groups?page=5&per_page=3') .reply(200, { data: {} }); - return sdk.groups.addMember({}, 'id').then((r: any) => expect(r.data).toEqual({})); + return sdk.groups.list({ page: 5, perPage: 3 }).then((r: any) => expect(r.data).toEqual({})); }); + }); - test('test will throw error if required fields missing', () => { + describe('test create', () => { + test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/workplace/groups/group/cupiditate/members') + .post('/v3/workplace/groups') .reply(200, { data: {} }); - return expect(async () => await sdk.groups.addMember()).rejects.toThrow(); - }); - - test('test will throw error on a non-200 response', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/workplace/groups/group/voluptates/members') - .reply(404, { data: {} }); - return expect(async () => await sdk.groups.addMember({}, 'voluptates')).rejects.toThrow(); + return sdk.groups.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); describe('test deleteMember', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/groups/group/incidunt/members/%7Btype%7D/ad') + .delete('/v3/workplace/groups/group/voluptatum/members/dolorum/ut') .reply(200, { data: {} }); return sdk.groups - .deleteMember('incidunt', 'ut', 'ad') + .deleteMember('voluptatum', 'dolorum', 'ut') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/groups/group/distinctio/members/%7Btype%7D/facere') + .delete('/v3/workplace/groups/group/ducimus/members/rem/exercitationem') .reply(200, { data: {} }); return expect(async () => await sdk.groups.deleteMember()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/groups/group/natus/members/%7Btype%7D/qui') + .delete('/v3/workplace/groups/group/aperiam/members/necessitatibus/voluptatum') .reply(404, { data: {} }); return expect( - async () => await sdk.groups.deleteMember('natus', 'magni', 'qui'), + async () => await sdk.groups.deleteMember('aperiam', 'necessitatibus', 'voluptatum'), ).rejects.toThrow(); }); }); + + describe('test addMember', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/groups/group/vero/members') + .reply(200, { data: {} }); + return sdk.groups.addMember({}, 'vero').then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/groups/group/optio/members') + .reply(200, { data: {} }); + return expect(async () => await sdk.groups.addMember()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/groups/group/quaerat/members') + .reply(404, { data: {} }); + return expect(async () => await sdk.groups.addMember({}, 'quaerat')).rejects.toThrow(); + }); + }); }); diff --git a/test/services/integrations/Integrations.test.ts b/test/services/integrations/Integrations.test.ts index bd6517c..d60dd09 100644 --- a/test/services/integrations/Integrations.test.ts +++ b/test/services/integrations/Integrations.test.ts @@ -19,90 +19,92 @@ describe('test Integrations', () => { nock.cleanAll(); }); - describe('test list', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .get('/v3/integrations') - .reply(200, { data: {} }); - return sdk.integrations.list().then((r: any) => expect(r.data).toEqual({})); - }); - }); - - describe('test create', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/integrations') - .reply(200, { data: {} }); - return sdk.integrations.create({}).then((r: any) => expect(r.data).toEqual({})); - }); - }); - describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/integrations/integration?integration=ipsa') + .get('/v3/integrations/integration?integration=facilis') .reply(200, { data: {} }); - return sdk.integrations.get('ipsa').then((r: any) => expect(r.data).toEqual({})); + return sdk.integrations.get('facilis').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/integrations/integration?integration=labore') + .get('/v3/integrations/integration?integration=sint') .reply(200, { data: {} }); return expect(async () => await sdk.integrations.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/integrations/integration?integration=tempora') + .get('/v3/integrations/integration?integration=fugit') .reply(404, { data: {} }); - return expect(async () => await sdk.integrations.get('tempora')).rejects.toThrow(); + return expect(async () => await sdk.integrations.get('fugit')).rejects.toThrow(); }); }); describe('test update', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .put('/v3/integrations/integration?integration=soluta') + .put('/v3/integrations/integration?integration=consequuntur') .reply(200, { data: {} }); - return sdk.integrations.update({}, 'soluta').then((r: any) => expect(r.data).toEqual({})); + return sdk.integrations + .update({}, 'consequuntur') + .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .put('/v3/integrations/integration?integration=nam') + .put('/v3/integrations/integration?integration=blanditiis') .reply(200, { data: {} }); return expect(async () => await sdk.integrations.update()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .put('/v3/integrations/integration?integration=tempora') + .put('/v3/integrations/integration?integration=cum') .reply(404, { data: {} }); - return expect(async () => await sdk.integrations.update({}, 'tempora')).rejects.toThrow(); + return expect(async () => await sdk.integrations.update({}, 'cum')).rejects.toThrow(); }); }); describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/integrations/integration?integration=deserunt') + .delete('/v3/integrations/integration?integration=dolores') .reply(200, { data: {} }); - return sdk.integrations.delete('deserunt').then((r: any) => expect(r.data).toEqual({})); + return sdk.integrations.delete('dolores').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/integrations/integration?integration=eaque') + .delete('/v3/integrations/integration?integration=distinctio') .reply(200, { data: {} }); return expect(async () => await sdk.integrations.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/integrations/integration?integration=modi') + .delete('/v3/integrations/integration?integration=vero') .reply(404, { data: {} }); - return expect(async () => await sdk.integrations.delete('modi')).rejects.toThrow(); + return expect(async () => await sdk.integrations.delete('vero')).rejects.toThrow(); + }); + }); + + describe('test list', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/integrations') + .reply(200, { data: {} }); + return sdk.integrations.list().then((r: any) => expect(r.data).toEqual({})); + }); + }); + + describe('test create', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/integrations') + .reply(200, { data: {} }); + return sdk.integrations.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); }); diff --git a/test/services/invites/Invites.test.ts b/test/services/invites/Invites.test.ts index 0fc7a8b..4fb4ce6 100644 --- a/test/services/invites/Invites.test.ts +++ b/test/services/invites/Invites.test.ts @@ -22,9 +22,9 @@ describe('test Invites', () => { describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/invites?page=6&per_page=3') + .get('/v3/workplace/invites?page=4&per_page=7') .reply(200, { data: {} }); - return sdk.invites.list({ page: 6, perPage: 3 }).then((r: any) => expect(r.data).toEqual({})); + return sdk.invites.list({ page: 4, perPage: 7 }).then((r: any) => expect(r.data).toEqual({})); }); }); }); diff --git a/test/services/projectMembers/ProjectMembers.test.ts b/test/services/projectMembers/ProjectMembers.test.ts index ab37f92..6a8ff44 100644 --- a/test/services/projectMembers/ProjectMembers.test.ts +++ b/test/services/projectMembers/ProjectMembers.test.ts @@ -22,26 +22,26 @@ describe('test ProjectMembers', () => { describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project/members?project=ex&page=2&per_page=1') + .get('/v3/projects/project/members?project=quis&page=3&per_page=7') .reply(200, { data: {} }); return sdk.projectMembers - .list('ex', { page: 2, perPage: 1 }) + .list('quis', { page: 3, perPage: 7 }) .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project/members?project=error&page=9&per_page=4') + .get('/v3/projects/project/members?project=natus&page=9&per_page=1') .reply(200, { data: {} }); return expect(async () => await sdk.projectMembers.list()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project/members?project=suscipit&page=3&per_page=8') + .get('/v3/projects/project/members?project=sed&page=4&per_page=9') .reply(404, { data: {} }); return expect( - async () => await sdk.projectMembers.list('suscipit', { page: 3, perPage: 8 }), + async () => await sdk.projectMembers.list('sed', { page: 4, perPage: 9 }), ).rejects.toThrow(); }); }); @@ -49,49 +49,49 @@ describe('test ProjectMembers', () => { describe('test add', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/projects/project/members?project=repudiandae') + .post('/v3/projects/project/members?project=architecto') .reply(200, { data: {} }); - return sdk.projectMembers.add({}, 'repudiandae').then((r: any) => expect(r.data).toEqual({})); + return sdk.projectMembers.add({}, 'architecto').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .post('/v3/projects/project/members?project=ut') + .post('/v3/projects/project/members?project=veritatis') .reply(200, { data: {} }); return expect(async () => await sdk.projectMembers.add()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .post('/v3/projects/project/members?project=nulla') + .post('/v3/projects/project/members?project=deserunt') .reply(404, { data: {} }); - return expect(async () => await sdk.projectMembers.add({}, 'nulla')).rejects.toThrow(); + return expect(async () => await sdk.projectMembers.add({}, 'deserunt')).rejects.toThrow(); }); }); describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project/members/member/%7Btype%7D/officia?project=eligendi') + .get('/v3/projects/project/members/member/sint/totam?project=numquam') .reply(200, { data: {} }); return sdk.projectMembers - .get('eligendi', 'molestias', 'officia') + .get('numquam', 'sint', 'totam') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project/members/member/%7Btype%7D/recusandae?project=nemo') + .get('/v3/projects/project/members/member/modi/provident?project=numquam') .reply(200, { data: {} }); return expect(async () => await sdk.projectMembers.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project/members/member/%7Btype%7D/eaque?project=cumque') + .get('/v3/projects/project/members/member/nulla/fugiat?project=voluptatibus') .reply(404, { data: {} }); return expect( - async () => await sdk.projectMembers.get('cumque', 'esse', 'eaque'), + async () => await sdk.projectMembers.get('voluptatibus', 'nulla', 'fugiat'), ).rejects.toThrow(); }); }); @@ -99,26 +99,26 @@ describe('test ProjectMembers', () => { describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/projects/project/members/member/%7Btype%7D/quam?project=sunt') + .delete('/v3/projects/project/members/member/nam/asperiores?project=repellendus') .reply(200, { data: {} }); return sdk.projectMembers - .delete('est', 'quam', 'sunt') + .delete('nam', 'asperiores', 'repellendus') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/projects/project/members/member/%7Btype%7D/minima?project=ipsum') + .delete('/v3/projects/project/members/member/eos/eos?project=incidunt') .reply(200, { data: {} }); return expect(async () => await sdk.projectMembers.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/projects/project/members/member/%7Btype%7D/incidunt?project=quidem') + .delete('/v3/projects/project/members/member/necessitatibus/eveniet?project=doloremque') .reply(404, { data: {} }); return expect( - async () => await sdk.projectMembers.delete('repellat', 'incidunt', 'quidem'), + async () => await sdk.projectMembers.delete('necessitatibus', 'eveniet', 'doloremque'), ).rejects.toThrow(); }); }); @@ -126,26 +126,26 @@ describe('test ProjectMembers', () => { describe('test update', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/projects/project/members/member/%7Btype%7D/molestias?project=magni') + .patch('/v3/projects/project/members/member/vero/quibusdam?project=itaque') .reply(200, { data: {} }); return sdk.projectMembers - .update({}, 'at', 'molestias', 'magni') + .update({}, 'vero', 'quibusdam', 'itaque') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/projects/project/members/member/%7Btype%7D/accusantium?project=corporis') + .patch('/v3/projects/project/members/member/quia/ullam?project=magnam') .reply(200, { data: {} }); return expect(async () => await sdk.projectMembers.update()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/projects/project/members/member/%7Btype%7D/esse?project=harum') + .patch('/v3/projects/project/members/member/iste/expedita?project=quo') .reply(404, { data: {} }); return expect( - async () => await sdk.projectMembers.update({}, 'pariatur', 'esse', 'harum'), + async () => await sdk.projectMembers.update({}, 'iste', 'expedita', 'quo'), ).rejects.toThrow(); }); }); diff --git a/test/services/projectRoles/ProjectRoles.test.ts b/test/services/projectRoles/ProjectRoles.test.ts index 4c3883c..87b21db 100644 --- a/test/services/projectRoles/ProjectRoles.test.ts +++ b/test/services/projectRoles/ProjectRoles.test.ts @@ -19,90 +19,90 @@ describe('test ProjectRoles', () => { nock.cleanAll(); }); - describe('test list', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .get('/v3/projects/roles') - .reply(200, { data: {} }); - return sdk.projectRoles.list().then((r: any) => expect(r.data).toEqual({})); - }); - }); - - describe('test create', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/projects/roles') - .reply(200, { data: {} }); - return sdk.projectRoles.create().then((r: any) => expect(r.data).toEqual({})); - }); - }); - describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/roles/role/cumque') + .get('/v3/projects/roles/role/et') .reply(200, { data: {} }); - return sdk.projectRoles.get('cumque').then((r: any) => expect(r.data).toEqual({})); + return sdk.projectRoles.get('et').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/roles/role/magni') + .get('/v3/projects/roles/role/voluptates') .reply(200, { data: {} }); return expect(async () => await sdk.projectRoles.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/roles/role/amet') + .get('/v3/projects/roles/role/provident') .reply(404, { data: {} }); - return expect(async () => await sdk.projectRoles.get('amet')).rejects.toThrow(); + return expect(async () => await sdk.projectRoles.get('provident')).rejects.toThrow(); }); }); describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/projects/roles/role/blanditiis') + .delete('/v3/projects/roles/role/veniam') .reply(200, { data: {} }); - return sdk.projectRoles.delete('blanditiis').then((r: any) => expect(r.data).toEqual({})); + return sdk.projectRoles.delete('veniam').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/projects/roles/role/explicabo') + .delete('/v3/projects/roles/role/assumenda') .reply(200, { data: {} }); return expect(async () => await sdk.projectRoles.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/projects/roles/role/labore') + .delete('/v3/projects/roles/role/nobis') .reply(404, { data: {} }); - return expect(async () => await sdk.projectRoles.delete('labore')).rejects.toThrow(); + return expect(async () => await sdk.projectRoles.delete('nobis')).rejects.toThrow(); }); }); describe('test update', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/projects/roles/role/impedit') + .patch('/v3/projects/roles/role/corporis') .reply(200, { data: {} }); - return sdk.projectRoles.update('impedit').then((r: any) => expect(r.data).toEqual({})); + return sdk.projectRoles.update({}, 'corporis').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/projects/roles/role/dolores') + .patch('/v3/projects/roles/role/cum') .reply(200, { data: {} }); return expect(async () => await sdk.projectRoles.update()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/projects/roles/role/inventore') + .patch('/v3/projects/roles/role/quae') .reply(404, { data: {} }); - return expect(async () => await sdk.projectRoles.update('inventore')).rejects.toThrow(); + return expect(async () => await sdk.projectRoles.update({}, 'quae')).rejects.toThrow(); + }); + }); + + describe('test list', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/projects/roles') + .reply(200, { data: {} }); + return sdk.projectRoles.list().then((r: any) => expect(r.data).toEqual({})); + }); + }); + + describe('test create', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/projects/roles') + .reply(200, { data: {} }); + return sdk.projectRoles.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); diff --git a/test/services/projects/Projects.test.ts b/test/services/projects/Projects.test.ts index f5b48c7..a252393 100644 --- a/test/services/projects/Projects.test.ts +++ b/test/services/projects/Projects.test.ts @@ -22,10 +22,10 @@ describe('test Projects', () => { describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects?page=8&per_page=4') + .get('/v3/projects?page=7&per_page=7') .reply(200, { data: {} }); return sdk.projects - .list({ page: 8, perPage: 4 }) + .list({ page: 7, perPage: 7 }) .then((r: any) => expect(r.data).toEqual({})); }); }); @@ -40,23 +40,23 @@ describe('test Projects', () => { describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project?project=magnam') + .get('/v3/projects/project?project=ipsa') .reply(200, { data: {} }); - return sdk.projects.get('magnam').then((r: any) => expect(r.data).toEqual({})); + return sdk.projects.get('ipsa').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project?project=nulla') + .get('/v3/projects/project?project=a') .reply(200, { data: {} }); return expect(async () => await sdk.projects.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/projects/project?project=vitae') + .get('/v3/projects/project?project=dicta') .reply(404, { data: {} }); - return expect(async () => await sdk.projects.get('vitae')).rejects.toThrow(); + return expect(async () => await sdk.projects.get('dicta')).rejects.toThrow(); }); }); diff --git a/test/services/retrieve/Retrieve.test.ts b/test/services/retrieve/Retrieve.test.ts new file mode 100644 index 0000000..90b3fec --- /dev/null +++ b/test/services/retrieve/Retrieve.test.ts @@ -0,0 +1,48 @@ +import nock from 'nock'; + +import { DopplerSDK } from '../../../src'; + +import { RetrieveService } from '../../../src/services/retrieve/Retrieve'; + +describe('test RetrieveService object', () => { + it('should be an object', () => { + expect(typeof RetrieveService).toBe('function'); + }); +}); + +describe('test Retrieve', () => { + let sdk: any; + + beforeEach(() => { + sdk = new DopplerSDK({}); + + nock.cleanAll(); + }); + + describe('test member', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/groups/group/minima/members/exercitationem/hic') + .reply(200, { data: {} }); + return sdk.retrieve + .member('minima', 'exercitationem', 'hic') + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/groups/group/consectetur/members/adipisci/natus') + .reply(200, { data: {} }); + return expect(async () => await sdk.retrieve.member()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/groups/group/quasi/members/numquam/distinctio') + .reply(404, { data: {} }); + return expect( + async () => await sdk.retrieve.member('quasi', 'numquam', 'distinctio'), + ).rejects.toThrow(); + }); + }); +}); diff --git a/test/services/secrets/Secrets.test.ts b/test/services/secrets/Secrets.test.ts index a723c08..3ad8f56 100644 --- a/test/services/secrets/Secrets.test.ts +++ b/test/services/secrets/Secrets.test.ts @@ -23,15 +23,15 @@ describe('test Secrets', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets?project=sapiente&config=suscipit&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=7&secrets=distinctio&include_managed_secrets=true', + '/v3/configs/config/secrets?project=perspiciatis&config=deserunt&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=9&secrets=praesentium&include_managed_secrets=true', ) .reply(200, { data: {} }); return sdk.secrets - .list('sapiente', 'suscipit', { - accepts: 'sunt', + .list('perspiciatis', 'deserunt', { + accepts: 'aliquam', includeDynamicSecrets: true, - dynamicSecretsTtlSec: 7, - secrets: 'distinctio', + dynamicSecretsTtlSec: 9, + secrets: 'praesentium', includeManagedSecrets: true, }) .then((r: any) => expect(r.data).toEqual({})); @@ -40,7 +40,7 @@ describe('test Secrets', () => { test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets?project=deleniti&config=adipisci&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=9&secrets=molestiae&include_managed_secrets=true', + '/v3/configs/config/secrets?project=porro&config=pariatur&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=2&secrets=earum&include_managed_secrets=true', ) .reply(200, { data: {} }); return expect(async () => await sdk.secrets.list()).rejects.toThrow(); @@ -49,16 +49,16 @@ describe('test Secrets', () => { test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets?project=eveniet&config=pariatur&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=8&secrets=quia&include_managed_secrets=true', + '/v3/configs/config/secrets?project=consequatur&config=doloremque&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=6&secrets=minus&include_managed_secrets=true', ) .reply(404, { data: {} }); return expect( async () => - await sdk.secrets.list('eveniet', 'pariatur', { - accepts: 'repellat', + await sdk.secrets.list('consequatur', 'doloremque', { + accepts: 'nulla', includeDynamicSecrets: true, - dynamicSecretsTtlSec: 8, - secrets: 'quia', + dynamicSecretsTtlSec: 6, + secrets: 'minus', includeManagedSecrets: true, }), ).rejects.toThrow(); @@ -77,53 +77,51 @@ describe('test Secrets', () => { describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/secret?project=ipsum&config=iste&name=Roselyn') + .get('/v3/configs/config/secret?project=deserunt&config=occaecati&name=Douglas') .reply(200, { data: {} }); return sdk.secrets - .get('ipsum', 'iste', 'Roselyn') + .get('deserunt', 'occaecati', 'Douglas') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/secret?project=hic&config=in&name=Assunta') + .get('/v3/configs/config/secret?project=nihil&config=facere&name=Kattie') .reply(200, { data: {} }); return expect(async () => await sdk.secrets.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/secret?project=quas&config=recusandae&name=Odell') + .get('/v3/configs/config/secret?project=at&config=libero&name=Trudie') .reply(404, { data: {} }); - return expect( - async () => await sdk.secrets.get('quas', 'recusandae', 'Odell'), - ).rejects.toThrow(); + return expect(async () => await sdk.secrets.get('at', 'libero', 'Trudie')).rejects.toThrow(); }); }); describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/secret?project=repellendus&config=libero&name=Mack') + .delete('/v3/configs/config/secret?project=consectetur&config=numquam&name=Odessa') .reply(200, { data: {} }); return sdk.secrets - .delete('repellendus', 'libero', 'Mack') + .delete('consectetur', 'numquam', 'Odessa') .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/secret?project=deserunt&config=soluta&name=Coralie') + .delete('/v3/configs/config/secret?project=eum&config=blanditiis&name=Annabelle') .reply(200, { data: {} }); return expect(async () => await sdk.secrets.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/secret?project=corrupti&config=nisi&name=Andres') + .delete('/v3/configs/config/secret?project=vitae&config=eaque&name=Zoey') .reply(404, { data: {} }); return expect( - async () => await sdk.secrets.delete('corrupti', 'nisi', 'Andres'), + async () => await sdk.secrets.delete('vitae', 'eaque', 'Zoey'), ).rejects.toThrow(); }); }); @@ -132,15 +130,16 @@ describe('test Secrets', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets/download?project=iusto&config=ullam&format=deleniti&name_transformer=Emory&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=3', + '/v3/configs/config/secrets/download?project=nisi&config=dignissimos&format=ipsa&name_transformer=Elsie&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=4&secrets=provident', ) .reply(200, { data: {} }); return sdk.secrets - .download('iusto', 'ullam', { - format: 'deleniti', - nameTransformer: 'Emory', + .download('nisi', 'dignissimos', { + format: 'ipsa', + nameTransformer: 'Elsie', includeDynamicSecrets: true, - dynamicSecretsTtlSec: 3, + dynamicSecretsTtlSec: 4, + secrets: 'provident', }) .then((r: any) => expect(r.data).toEqual({})); }); @@ -148,7 +147,7 @@ describe('test Secrets', () => { test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets/download?project=voluptate&config=consequuntur&format=culpa&name_transformer=Rhea&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=7', + '/v3/configs/config/secrets/download?project=asperiores&config=aliquam&format=non&name_transformer=Alana&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=5&secrets=commodi', ) .reply(200, { data: {} }); return expect(async () => await sdk.secrets.download()).rejects.toThrow(); @@ -157,37 +156,47 @@ describe('test Secrets', () => { test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets/download?project=eveniet&config=aliquam&format=consequuntur&name_transformer=Luciano&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=8', + '/v3/configs/config/secrets/download?project=consectetur&config=incidunt&format=placeat&name_transformer=Jacky&include_dynamic_secrets=true&dynamic_secrets_ttl_sec=6&secrets=harum', ) .reply(404, { data: {} }); return expect( async () => - await sdk.secrets.download('eveniet', 'aliquam', { - format: 'consequuntur', - nameTransformer: 'Luciano', + await sdk.secrets.download('consectetur', 'incidunt', { + format: 'placeat', + nameTransformer: 'Jacky', includeDynamicSecrets: true, - dynamicSecretsTtlSec: 8, + dynamicSecretsTtlSec: 6, + secrets: 'harum', }), ).rejects.toThrow(); }); }); + describe('test updateNote', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/configs/config/secrets/note') + .reply(200, { data: {} }); + return sdk.secrets.updateNote({}).then((r: any) => expect(r.data).toEqual({})); + }); + }); + describe('test names', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets/names?project=quibusdam&config=ullam&include_dynamic_secrets=true&include_managed_secrets=true', + '/v3/configs/config/secrets/names?project=velit&config=velit&include_dynamic_secrets=true&include_managed_secrets=true', ) .reply(200, { data: {} }); return sdk.secrets - .names('quibusdam', 'ullam', { includeDynamicSecrets: true, includeManagedSecrets: true }) + .names('velit', 'velit', { includeDynamicSecrets: true, includeManagedSecrets: true }) .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets/names?project=facilis&config=beatae&include_dynamic_secrets=true&include_managed_secrets=true', + '/v3/configs/config/secrets/names?project=quos&config=mollitia&include_dynamic_secrets=true&include_managed_secrets=true', ) .reply(200, { data: {} }); return expect(async () => await sdk.secrets.names()).rejects.toThrow(); @@ -196,25 +205,16 @@ describe('test Secrets', () => { test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') .get( - '/v3/configs/config/secrets/names?project=magni&config=voluptatem&include_dynamic_secrets=true&include_managed_secrets=true', + '/v3/configs/config/secrets/names?project=eaque&config=soluta&include_dynamic_secrets=true&include_managed_secrets=true', ) .reply(404, { data: {} }); return expect( async () => - await sdk.secrets.names('magni', 'voluptatem', { + await sdk.secrets.names('eaque', 'soluta', { includeDynamicSecrets: true, includeManagedSecrets: true, }), ).rejects.toThrow(); }); }); - - describe('test updateNote', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/secrets/note') - .reply(200, { data: {} }); - return sdk.secrets.updateNote({}).then((r: any) => expect(r.data).toEqual({})); - }); - }); }); diff --git a/test/services/serviceAccountTokens/ServiceAccountTokens.test.ts b/test/services/serviceAccountTokens/ServiceAccountTokens.test.ts new file mode 100644 index 0000000..d766b12 --- /dev/null +++ b/test/services/serviceAccountTokens/ServiceAccountTokens.test.ts @@ -0,0 +1,129 @@ +import nock from 'nock'; + +import { DopplerSDK } from '../../../src'; + +import { ServiceAccountTokensService } from '../../../src/services/serviceAccountTokens/ServiceAccountTokens'; + +describe('test ServiceAccountTokensService object', () => { + it('should be an object', () => { + expect(typeof ServiceAccountTokensService).toBe('function'); + }); +}); + +describe('test ServiceAccountTokens', () => { + let sdk: any; + + beforeEach(() => { + sdk = new DopplerSDK({}); + + nock.cleanAll(); + }); + + describe('test list', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts/service_account/dolor/tokens?page=4&per_page=1') + .reply(200, { data: {} }); + return sdk.serviceAccountTokens + .list('dolor', { page: 4, perPage: 1 }) + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts/service_account/voluptates/tokens?page=4&per_page=8') + .reply(200, { data: {} }); + return expect(async () => await sdk.serviceAccountTokens.list()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts/service_account/voluptatem/tokens?page=5&per_page=5') + .reply(404, { data: {} }); + return expect( + async () => await sdk.serviceAccountTokens.list('voluptatem', { page: 5, perPage: 5 }), + ).rejects.toThrow(); + }); + }); + + describe('test create', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/service_accounts/service_account/explicabo/tokens') + .reply(200, { data: {} }); + return sdk.serviceAccountTokens + .create({}, 'explicabo') + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/service_accounts/service_account/dolor/tokens') + .reply(200, { data: {} }); + return expect(async () => await sdk.serviceAccountTokens.create()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/service_accounts/service_account/facilis/tokens') + .reply(404, { data: {} }); + return expect( + async () => await sdk.serviceAccountTokens.create({}, 'facilis'), + ).rejects.toThrow(); + }); + }); + + describe('test get', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts/service_account/possimus/tokens/token/laborum') + .reply(200, { data: {} }); + return sdk.serviceAccountTokens + .get('possimus', 'laborum') + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts/service_account/ex/tokens/token/dicta') + .reply(200, { data: {} }); + return expect(async () => await sdk.serviceAccountTokens.get()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts/service_account/eos/tokens/token/quia') + .reply(404, { data: {} }); + return expect( + async () => await sdk.serviceAccountTokens.get('eos', 'quia'), + ).rejects.toThrow(); + }); + }); + + describe('test delete', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/workplace/service_accounts/service_account/velit/tokens/token/omnis') + .reply(200, { data: {} }); + return sdk.serviceAccountTokens + .delete('velit', 'omnis') + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/workplace/service_accounts/service_account/aliquid/tokens/token/officiis') + .reply(200, { data: {} }); + return expect(async () => await sdk.serviceAccountTokens.delete()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/workplace/service_accounts/service_account/cum/tokens/token/animi') + .reply(404, { data: {} }); + return expect( + async () => await sdk.serviceAccountTokens.delete('cum', 'animi'), + ).rejects.toThrow(); + }); + }); +}); diff --git a/test/services/serviceAccounts/ServiceAccounts.test.ts b/test/services/serviceAccounts/ServiceAccounts.test.ts index ea3e12b..dd9dbbf 100644 --- a/test/services/serviceAccounts/ServiceAccounts.test.ts +++ b/test/services/serviceAccounts/ServiceAccounts.test.ts @@ -19,92 +19,94 @@ describe('test ServiceAccounts', () => { nock.cleanAll(); }); - describe('test list', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .get('/v3/workplace/service_accounts?page=7&per_page=2') - .reply(200, { data: {} }); - return sdk.serviceAccounts - .list({ page: 7, perPage: 2 }) - .then((r: any) => expect(r.data).toEqual({})); - }); - }); - - describe('test create', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .post('/v3/workplace/service_accounts') - .reply(200, { data: {} }); - return sdk.serviceAccounts.create({}).then((r: any) => expect(r.data).toEqual({})); - }); - }); - describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/service_accounts/service_account/laudantium') + .get('/v3/workplace/service_accounts/service_account/harum') .reply(200, { data: {} }); - return sdk.serviceAccounts.get('laudantium').then((r: any) => expect(r.data).toEqual({})); + return sdk.serviceAccounts.get('harum').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/service_accounts/service_account/asperiores') + .get('/v3/workplace/service_accounts/service_account/omnis') .reply(200, { data: {} }); return expect(async () => await sdk.serviceAccounts.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/service_accounts/service_account/veritatis') + .get('/v3/workplace/service_accounts/service_account/dolorum') .reply(404, { data: {} }); - return expect(async () => await sdk.serviceAccounts.get('veritatis')).rejects.toThrow(); + return expect(async () => await sdk.serviceAccounts.get('dolorum')).rejects.toThrow(); }); }); describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/service_accounts/service_account/nam') + .delete('/v3/workplace/service_accounts/service_account/repellendus') .reply(200, { data: {} }); - return sdk.serviceAccounts.delete('nam').then((r: any) => expect(r.data).toEqual({})); + return sdk.serviceAccounts.delete('repellendus').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/service_accounts/service_account/sapiente') + .delete('/v3/workplace/service_accounts/service_account/earum') .reply(200, { data: {} }); return expect(async () => await sdk.serviceAccounts.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/service_accounts/service_account/vel') + .delete('/v3/workplace/service_accounts/service_account/tempore') .reply(404, { data: {} }); - return expect(async () => await sdk.serviceAccounts.delete('vel')).rejects.toThrow(); + return expect(async () => await sdk.serviceAccounts.delete('tempore')).rejects.toThrow(); }); }); describe('test update', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/service_accounts/service_account/commodi') + .patch('/v3/workplace/service_accounts/service_account/voluptatibus') .reply(200, { data: {} }); - return sdk.serviceAccounts.update({}, 'commodi').then((r: any) => expect(r.data).toEqual({})); + return sdk.serviceAccounts + .update({}, 'voluptatibus') + .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/service_accounts/service_account/repellat') + .patch('/v3/workplace/service_accounts/service_account/cumque') .reply(200, { data: {} }); return expect(async () => await sdk.serviceAccounts.update()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/service_accounts/service_account/omnis') + .patch('/v3/workplace/service_accounts/service_account/alias') .reply(404, { data: {} }); - return expect(async () => await sdk.serviceAccounts.update({}, 'omnis')).rejects.toThrow(); + return expect(async () => await sdk.serviceAccounts.update({}, 'alias')).rejects.toThrow(); + }); + }); + + describe('test list', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/service_accounts?page=6&per_page=9') + .reply(200, { data: {} }); + return sdk.serviceAccounts + .list({ page: 6, perPage: 9 }) + .then((r: any) => expect(r.data).toEqual({})); + }); + }); + + describe('test create', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/workplace/service_accounts') + .reply(200, { data: {} }); + return sdk.serviceAccounts.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); }); diff --git a/test/services/serviceTokens/ServiceTokens.test.ts b/test/services/serviceTokens/ServiceTokens.test.ts index 7460794..f6aacad 100644 --- a/test/services/serviceTokens/ServiceTokens.test.ts +++ b/test/services/serviceTokens/ServiceTokens.test.ts @@ -19,29 +19,36 @@ describe('test ServiceTokens', () => { nock.cleanAll(); }); + describe('test delete', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/configs/config/tokens/token') + .reply(200, { data: {} }); + return sdk.serviceTokens.delete({}).then((r: any) => expect(r.data).toEqual({})); + }); + }); + describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/tokens?project=numquam&config=dolor') + .get('/v3/configs/config/tokens?project=quas&config=in') .reply(200, { data: {} }); - return sdk.serviceTokens - .list('numquam', 'dolor') - .then((r: any) => expect(r.data).toEqual({})); + return sdk.serviceTokens.list('quas', 'in').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/tokens?project=quisquam&config=quas') + .get('/v3/configs/config/tokens?project=consequatur&config=quae') .reply(200, { data: {} }); return expect(async () => await sdk.serviceTokens.list()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/tokens?project=illum&config=possimus') + .get('/v3/configs/config/tokens?project=consequatur&config=nisi') .reply(404, { data: {} }); return expect( - async () => await sdk.serviceTokens.list('illum', 'possimus'), + async () => await sdk.serviceTokens.list('consequatur', 'nisi'), ).rejects.toThrow(); }); }); @@ -54,13 +61,4 @@ describe('test ServiceTokens', () => { return sdk.serviceTokens.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); - - describe('test delete', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .delete('/v3/configs/config/tokens/token') - .reply(200, { data: {} }); - return sdk.serviceTokens.delete({}).then((r: any) => expect(r.data).toEqual({})); - }); - }); }); diff --git a/test/services/syncs/Syncs.test.ts b/test/services/syncs/Syncs.test.ts index 691c07e..f0ef114 100644 --- a/test/services/syncs/Syncs.test.ts +++ b/test/services/syncs/Syncs.test.ts @@ -22,24 +22,26 @@ describe('test Syncs', () => { describe('test create', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/syncs?project=qui&config=tempora') + .post('/v3/configs/config/syncs?project=necessitatibus&config=voluptas') .reply(200, { data: {} }); - return sdk.syncs.create({}, 'qui', 'tempora').then((r: any) => expect(r.data).toEqual({})); + return sdk.syncs + .create({}, 'necessitatibus', 'voluptas') + .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/syncs?project=voluptates&config=adipisci') + .post('/v3/configs/config/syncs?project=error&config=nisi') .reply(200, { data: {} }); return expect(async () => await sdk.syncs.create()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .post('/v3/configs/config/syncs?project=consequuntur&config=quibusdam') + .post('/v3/configs/config/syncs?project=consectetur&config=voluptate') .reply(404, { data: {} }); return expect( - async () => await sdk.syncs.create({}, 'consequuntur', 'quibusdam'), + async () => await sdk.syncs.create({}, 'consectetur', 'voluptate'), ).rejects.toThrow(); }); }); @@ -47,23 +49,25 @@ describe('test Syncs', () => { describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/syncs/sync?project=cum&config=modi&sync=eius') + .get('/v3/configs/config/syncs/sync?project=quia&config=nisi&sync=a') .reply(200, { data: {} }); - return sdk.syncs.get('cum', 'modi', 'eius').then((r: any) => expect(r.data).toEqual({})); + return sdk.syncs.get('quia', 'nisi', 'a').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/syncs/sync?project=illo&config=ipsum&sync=in') + .get('/v3/configs/config/syncs/sync?project=quam&config=culpa&sync=incidunt') .reply(200, { data: {} }); return expect(async () => await sdk.syncs.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/configs/config/syncs/sync?project=eos&config=laudantium&sync=modi') + .get('/v3/configs/config/syncs/sync?project=cupiditate&config=dicta&sync=autem') .reply(404, { data: {} }); - return expect(async () => await sdk.syncs.get('eos', 'laudantium', 'modi')).rejects.toThrow(); + return expect( + async () => await sdk.syncs.get('cupiditate', 'dicta', 'autem'), + ).rejects.toThrow(); }); }); @@ -71,18 +75,18 @@ describe('test Syncs', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') .delete( - '/v3/configs/config/syncs/sync?project=adipisci&config=minus&sync=quod&delete_from_target=true', + '/v3/configs/config/syncs/sync?project=perferendis&config=quaerat&sync=eveniet&delete_from_target=true', ) .reply(200, { data: {} }); return sdk.syncs - .delete('adipisci', 'minus', 'quod', true) + .delete('perferendis', 'quaerat', 'eveniet', true) .then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') .delete( - '/v3/configs/config/syncs/sync?project=illo&config=architecto&sync=consequatur&delete_from_target=true', + '/v3/configs/config/syncs/sync?project=beatae&config=quo&sync=totam&delete_from_target=true', ) .reply(200, { data: {} }); return expect(async () => await sdk.syncs.delete()).rejects.toThrow(); @@ -91,11 +95,11 @@ describe('test Syncs', () => { test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') .delete( - '/v3/configs/config/syncs/sync?project=illo&config=soluta&sync=consequuntur&delete_from_target=true', + '/v3/configs/config/syncs/sync?project=neque&config=ratione&sync=non&delete_from_target=true', ) .reply(404, { data: {} }); return expect( - async () => await sdk.syncs.delete('illo', 'soluta', 'consequuntur', true), + async () => await sdk.syncs.delete('neque', 'ratione', 'non', true), ).rejects.toThrow(); }); }); diff --git a/test/services/users/Users.test.ts b/test/services/users/Users.test.ts index 8620ebb..75fa91e 100644 --- a/test/services/users/Users.test.ts +++ b/test/services/users/Users.test.ts @@ -22,32 +22,34 @@ describe('test Users', () => { describe('test list', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users?page=2') + .get('/v3/workplace/users?page=2&email=Pascale.Yundt@gmail.com') .reply(200, { data: {} }); - return sdk.users.list({ page: 2 }).then((r: any) => expect(r.data).toEqual({})); + return sdk.users + .list({ page: 2, email: 'Pascale.Yundt@gmail.com' }) + .then((r: any) => expect(r.data).toEqual({})); }); }); describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users/dignissimos') + .get('/v3/workplace/users/veniam') .reply(200, { data: {} }); - return sdk.users.get('dignissimos').then((r: any) => expect(r.data).toEqual({})); + return sdk.users.get('veniam').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users/dolore') + .get('/v3/workplace/users/aut') .reply(200, { data: {} }); return expect(async () => await sdk.users.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/users/labore') + .get('/v3/workplace/users/at') .reply(404, { data: {} }); - return expect(async () => await sdk.users.get('labore')).rejects.toThrow(); + return expect(async () => await sdk.users.get('at')).rejects.toThrow(); }); }); }); diff --git a/test/services/webhooks/Webhooks.test.ts b/test/services/webhooks/Webhooks.test.ts new file mode 100644 index 0000000..58b4d87 --- /dev/null +++ b/test/services/webhooks/Webhooks.test.ts @@ -0,0 +1,174 @@ +import nock from 'nock'; + +import { DopplerSDK } from '../../../src'; + +import { WebhooksService } from '../../../src/services/webhooks/Webhooks'; + +describe('test WebhooksService object', () => { + it('should be an object', () => { + expect(typeof WebhooksService).toBe('function'); + }); +}); + +describe('test Webhooks', () => { + let sdk: any; + + beforeEach(() => { + sdk = new DopplerSDK({}); + + nock.cleanAll(); + }); + + describe('test list', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/webhooks?project=facilis') + .reply(200, { data: {} }); + return sdk.webhooks.list({ project: 'facilis' }).then((r: any) => expect(r.data).toEqual({})); + }); + }); + + describe('test add', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks?project=at') + .reply(200, { data: {} }); + return sdk.webhooks.add({}, { project: 'at' }).then((r: any) => expect(r.data).toEqual({})); + }); + }); + + describe('test get', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/webhooks/webhook/minus?project=cupiditate') + .reply(200, { data: {} }); + return sdk.webhooks + .get('minus', { project: 'cupiditate' }) + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/webhooks/webhook/nobis?project=consectetur') + .reply(200, { data: {} }); + return expect(async () => await sdk.webhooks.get()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/webhooks/webhook/omnis?project=impedit') + .reply(404, { data: {} }); + return expect( + async () => await sdk.webhooks.get('omnis', { project: 'impedit' }), + ).rejects.toThrow(); + }); + }); + + describe('test delete', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/webhooks/webhook/libero?project=deserunt') + .reply(200, { data: {} }); + return sdk.webhooks + .delete('libero', { project: 'deserunt' }) + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/webhooks/webhook/nobis?project=enim') + .reply(200, { data: {} }); + return expect(async () => await sdk.webhooks.delete()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .delete('/v3/webhooks/webhook/libero?project=blanditiis') + .reply(404, { data: {} }); + return expect( + async () => await sdk.webhooks.delete('libero', { project: 'blanditiis' }), + ).rejects.toThrow(); + }); + }); + + describe('test update', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .patch('/v3/webhooks/webhook/libero?project=explicabo') + .reply(200, { data: {} }); + return sdk.webhooks + .update({}, 'libero', { project: 'explicabo' }) + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .patch('/v3/webhooks/webhook/rerum?project=alias') + .reply(200, { data: {} }); + return expect(async () => await sdk.webhooks.update()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .patch('/v3/webhooks/webhook/assumenda?project=dolores') + .reply(404, { data: {} }); + return expect( + async () => await sdk.webhooks.update({}, 'assumenda', { project: 'dolores' }), + ).rejects.toThrow(); + }); + }); + + describe('test enable', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks/webhook/cupiditate/enable?project=numquam') + .reply(200, { data: {} }); + return sdk.webhooks + .enable('cupiditate', { project: 'numquam' }) + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks/webhook/esse/enable?project=illum') + .reply(200, { data: {} }); + return expect(async () => await sdk.webhooks.enable()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks/webhook/iusto/enable?project=provident') + .reply(404, { data: {} }); + return expect( + async () => await sdk.webhooks.enable('iusto', { project: 'provident' }), + ).rejects.toThrow(); + }); + }); + + describe('test disable', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks/webhook/eius/disable?project=perferendis') + .reply(200, { data: {} }); + return sdk.webhooks + .disable('eius', { project: 'perferendis' }) + .then((r: any) => expect(r.data).toEqual({})); + }); + + test('test will throw error if required fields missing', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks/webhook/deserunt/disable?project=ab') + .reply(200, { data: {} }); + return expect(async () => await sdk.webhooks.disable()).rejects.toThrow(); + }); + + test('test will throw error on a non-200 response', () => { + const scope = nock('https://api.doppler.com') + .post('/v3/webhooks/webhook/optio/disable?project=in') + .reply(404, { data: {} }); + return expect( + async () => await sdk.webhooks.disable('optio', { project: 'in' }), + ).rejects.toThrow(); + }); + }); +}); diff --git a/test/services/workplaceRoles/WorkplaceRoles.test.ts b/test/services/workplaceRoles/WorkplaceRoles.test.ts index 87bba9a..34e356e 100644 --- a/test/services/workplaceRoles/WorkplaceRoles.test.ts +++ b/test/services/workplaceRoles/WorkplaceRoles.test.ts @@ -33,85 +33,85 @@ describe('test WorkplaceRoles', () => { const scope = nock('https://api.doppler.com') .post('/v3/workplace/roles') .reply(200, { data: {} }); - return sdk.workplaceRoles.create().then((r: any) => expect(r.data).toEqual({})); - }); - }); - - describe('test listPermissions', () => { - test('test api call', () => { - const scope = nock('https://api.doppler.com') - .get('/v3/workplace/permissions') - .reply(200, { data: {} }); - return sdk.workplaceRoles.listPermissions().then((r: any) => expect(r.data).toEqual({})); + return sdk.workplaceRoles.create({}).then((r: any) => expect(r.data).toEqual({})); }); }); describe('test get', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/roles/role/ut') + .get('/v3/workplace/roles/role/est') .reply(200, { data: {} }); - return sdk.workplaceRoles.get('ut').then((r: any) => expect(r.data).toEqual({})); + return sdk.workplaceRoles.get('est').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/roles/role/recusandae') + .get('/v3/workplace/roles/role/porro') .reply(200, { data: {} }); return expect(async () => await sdk.workplaceRoles.get()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .get('/v3/workplace/roles/role/magni') + .get('/v3/workplace/roles/role/eius') .reply(404, { data: {} }); - return expect(async () => await sdk.workplaceRoles.get('magni')).rejects.toThrow(); + return expect(async () => await sdk.workplaceRoles.get('eius')).rejects.toThrow(); }); }); describe('test delete', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/roles/role/totam') + .delete('/v3/workplace/roles/role/quisquam') .reply(200, { data: {} }); - return sdk.workplaceRoles.delete('totam').then((r: any) => expect(r.data).toEqual({})); + return sdk.workplaceRoles.delete('quisquam').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/roles/role/molestiae') + .delete('/v3/workplace/roles/role/dolore') .reply(200, { data: {} }); return expect(async () => await sdk.workplaceRoles.delete()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .delete('/v3/workplace/roles/role/sunt') + .delete('/v3/workplace/roles/role/recusandae') .reply(404, { data: {} }); - return expect(async () => await sdk.workplaceRoles.delete('sunt')).rejects.toThrow(); + return expect(async () => await sdk.workplaceRoles.delete('recusandae')).rejects.toThrow(); }); }); describe('test update', () => { test('test api call', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/roles/role/reiciendis') + .patch('/v3/workplace/roles/role/neque') .reply(200, { data: {} }); - return sdk.workplaceRoles.update('reiciendis').then((r: any) => expect(r.data).toEqual({})); + return sdk.workplaceRoles.update({}, 'neque').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/roles/role/voluptate') + .patch('/v3/workplace/roles/role/at') .reply(200, { data: {} }); return expect(async () => await sdk.workplaceRoles.update()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('https://api.doppler.com') - .patch('/v3/workplace/roles/role/amet') + .patch('/v3/workplace/roles/role/ullam') .reply(404, { data: {} }); - return expect(async () => await sdk.workplaceRoles.update('amet')).rejects.toThrow(); + return expect(async () => await sdk.workplaceRoles.update({}, 'ullam')).rejects.toThrow(); + }); + }); + + describe('test listPermissions', () => { + test('test api call', () => { + const scope = nock('https://api.doppler.com') + .get('/v3/workplace/permissions') + .reply(200, { data: {} }); + return sdk.workplaceRoles.listPermissions().then((r: any) => expect(r.data).toEqual({})); }); }); }); diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 7b398aa..83e7556 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,6 +1,4 @@ { "extends": "./tsconfig.json", - "include": [ - "./src", "./test" - ] + "include": ["./src", "./test", "./examples"] } diff --git a/tsconfig.json b/tsconfig.json index 651d48f..f3a53e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,10 +18,6 @@ "lib": ["ES2021.String", "dom", "esnext"], "sourceMap": true }, - "include": [ - "./src/" - ], - "exclude": [ - "src/client/@custom_types" - ] + "include": ["./src/"], + "exclude": ["src/client/@custom_types"] }